/* ATL Offer Plugin — frontend styles. All selectors are namespaced under
   .atl-offer- to avoid clashing with theme/page-builder classes. */

:root {
	--atl-offer-font-display: 'Space Grotesk', system-ui, sans-serif;
	--atl-offer-font-body: 'Inter', system-ui, sans-serif;
	--atl-offer-color-primary: #5b3df5;
	--atl-offer-color-accent: #14b8a6;
}

.atl-offer {
	position: fixed;
	inset: 0;
	display: block;
	font-family: var(--atl-offer-font-body);
}

.atl-offer[hidden] {
	display: none !important;
}

.atl-offer-overlay {
	position: fixed;
	inset: 0;
	z-index: 0;
	opacity: 0;
	animation: atl-offer-overlay-fade 0.25s ease forwards;
}

@keyframes atl-offer-overlay-fade { to { opacity: 1; } }

.atl-offer-overlay-blur {
	backdrop-filter: blur(4px);
}

.atl-offer-container {
	position: fixed;
	z-index: 1;
	background: #ffffff;
	border-radius: 14px;
	max-width: 480px;
	width: calc(100% - 32px);
	padding: 36px 32px;
	box-shadow: 0 24px 70px -12px rgba(17, 24, 39, 0.35), 0 0 0 1px rgba(17, 24, 39, 0.04);
	box-sizing: border-box;
}

.atl-offer-inline.atl-offer-container {
	position: static;
	box-shadow: none;
	max-width: 100%;
	top: auto;
	left: auto;
	right: auto;
	bottom: auto;
	transform: none;
	animation: none;
}

/* Positions */
.atl-offer-position-center { top: 50%; left: 50%; transform: translate(-50%, -50%); }
.atl-offer-position-top { top: 24px; left: 50%; transform: translateX(-50%); }
.atl-offer-position-top-left { top: 24px; left: 24px; }
.atl-offer-position-top-right { top: 24px; right: 24px; }
.atl-offer-position-bottom { bottom: 24px; left: 50%; transform: translateX(-50%); }
.atl-offer-position-bottom-left { bottom: 24px; left: 24px; }
.atl-offer-position-bottom-right { bottom: 24px; right: 24px; }

/* Offer-type layout variants */
.atl-offer-fullscreen .atl-offer-container { inset: 0; max-width: none; width: 100%; height: 100%; border-radius: 0; display: flex; flex-direction: column; align-items: center; justify-content: center; }
.atl-offer-top_bar .atl-offer-container { top: 0; left: 0; right: 0; transform: none; width: 100%; max-width: none; border-radius: 0; display: flex; align-items: center; justify-content: center; gap: 12px; padding: 12px 20px; }
.atl-offer-bottom_popup .atl-offer-container,
.atl-offer-floating_box .atl-offer-container { bottom: 0; left: 50%; transform: translateX(-50%); border-radius: 12px 12px 0 0; }
.atl-offer-floating_box .atl-offer-container { bottom: 24px; right: 24px; left: auto; transform: none; max-width: 320px; }
.atl-offer-slide_in .atl-offer-container { bottom: 24px; right: 24px; left: auto; top: auto; transform: none; max-width: 340px; }

/* Animations */
@keyframes atl-offer-fade { from { opacity: 0; } to { opacity: 1; } }
@keyframes atl-offer-fade-up { from { opacity: 0; transform: translateY(20px); } to { opacity: 1; transform: translateY(0); } }
@keyframes atl-offer-zoom { from { opacity: 0; transform: scale(0.9); } to { opacity: 1; transform: scale(1); } }
@keyframes atl-offer-slide-up { from { transform: translateY(100%); } to { transform: translateY(0); } }
@keyframes atl-offer-bounce { 0% { opacity: 0; transform: scale(0.8); } 60% { opacity: 1; transform: scale(1.03); } 100% { transform: scale(1); } }

.atl-offer-anim-fade .atl-offer-container { animation: atl-offer-fade 0.3s ease both; }
.atl-offer-anim-fade_up .atl-offer-container,
.atl-offer-anim-fadeUp .atl-offer-container { animation: atl-offer-fade-up 0.35s ease both; }
.atl-offer-anim-zoom .atl-offer-container { animation: atl-offer-zoom 0.3s ease both; }
.atl-offer-anim-slide_up .atl-offer-container { animation: atl-offer-slide-up 0.35s ease both; }
.atl-offer-anim-bounce .atl-offer-container { animation: atl-offer-bounce 0.45s ease both; }
.atl-offer-anim-none .atl-offer-container { animation: none; }

/* Close button */
.atl-offer-close {
	position: absolute;
	background: rgba(17, 24, 39, 0.05);
	border: none;
	cursor: pointer;
	font-size: 18px;
	line-height: 1;
	width: 30px;
	height: 30px;
	border-radius: 50%;
	display: flex;
	align-items: center;
	justify-content: center;
	color: #6b7280;
	z-index: 2;
	transition: background 0.15s ease, color 0.15s ease;
}
.atl-offer-close:hover { background: rgba(17, 24, 39, 0.1); color: #111827; }
.atl-offer-close-top-right { top: 12px; right: 12px; }
.atl-offer-close-top-left { top: 12px; left: 12px; }
.atl-offer-close:disabled { opacity: 0.35; cursor: not-allowed; }

/* Blocks */
.atl-offer-block-heading { font-family: var(--atl-offer-font-display); margin: 0 0 10px; font-size: 27px; line-height: 1.25; font-weight: 700; color: #111827; letter-spacing: -0.01em; }
.atl-offer-block-paragraph { margin: 0 0 18px; color: #4b5563; line-height: 1.55; font-size: 15px; }
.atl-offer-block-image { max-width: 100%; height: auto; border-radius: 10px; margin-bottom: 18px; display: block; }
.atl-offer-block-divider { border: none; border-top: 1px solid #e5e7eb; margin: 18px 0; }
.atl-offer-block-button {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	background: var(--atl-offer-color-primary);
	background-image: linear-gradient(135deg, var(--atl-offer-color-primary), #7c5cff);
	color: #ffffff;
	border: none;
	border-radius: 9px;
	padding: 13px 26px;
	font-size: 15px;
	font-weight: 600;
	cursor: pointer;
	box-shadow: 0 8px 20px -6px rgba(91, 61, 245, 0.55);
	transition: transform 0.15s ease, box-shadow 0.15s ease, opacity 0.15s ease;
}
.atl-offer-block-button:hover { opacity: 0.96; transform: translateY(-2px); box-shadow: 0 12px 26px -6px rgba(91, 61, 245, 0.6); }
.atl-offer-block-button:active { transform: translateY(0); }

.atl-offer-block-coupon {
	display: flex;
	align-items: center;
	gap: 10px;
	border: 2px dashed var(--atl-offer-color-accent);
	background: rgba(20, 184, 166, 0.06);
	border-radius: 10px;
	padding: 12px 16px;
	margin-bottom: 18px;
	font-family: 'JetBrains Mono', monospace;
}
.atl-offer-coupon-code { font-weight: 700; letter-spacing: 1.5px; color: #0f766e; }
.atl-offer-coupon-copy {
	margin-left: auto;
	background: var(--atl-offer-color-accent);
	color: #ffffff;
	border: none;
	border-radius: 7px;
	padding: 7px 14px;
	cursor: pointer;
	font-size: 13px;
	font-weight: 600;
	transition: opacity 0.15s ease;
}
.atl-offer-coupon-copy:hover { opacity: 0.88; }

.atl-offer-block-countdown {
	display: flex;
	gap: 8px;
	font-family: 'JetBrains Mono', monospace;
	font-size: 15px;
	font-weight: 700;
	color: #ffffff;
	background: #111827;
	padding: 10px 14px;
	border-radius: 8px;
	margin-bottom: 18px;
	letter-spacing: 0.5px;
	width: fit-content;
}

.atl-offer-block-social { display: flex; gap: 14px; margin-bottom: 18px; }
.atl-offer-block-social a { color: #6b7280; font-size: 20px; transition: color 0.15s ease; }
.atl-offer-block-social a:hover { color: var(--atl-offer-color-primary); }

.atl-offer-block-video iframe { width: 100%; aspect-ratio: 16 / 9; border-radius: 10px; margin-bottom: 18px; border: none; }

.atl-offer-expired-message { color: #b91c1c; font-weight: 600; }

/* Trigger button (shortcode/Elementor manual trigger) */
.atl-offer-trigger-btn {
	background: var(--atl-offer-color-primary);
	color: #fff;
	border: none;
	border-radius: 9px;
	padding: 11px 22px;
	cursor: pointer;
	font-weight: 600;
	transition: opacity 0.15s ease;
}
.atl-offer-trigger-btn:hover { opacity: 0.92; }

@media (max-width: 767px) {
	.atl-offer-container { padding: 28px 20px; width: calc(100% - 20px); border-radius: 12px; }
	.atl-offer-block-heading { font-size: 22px; }
}
