/* ==========================================================================
   Largemoda Akıllı Kupon — Önyüz Stilleri
   Mobil öncelikli. Tüm ölçüler max-width / clamp ile taşma korumalı.
   Popup fixed overlay olduğundan layout shift (CLS) üretmez.
   ========================================================================== */

/* CSS değişkenleri JS tarafından doldurulur (LMAK_CONFIG.style). */
:root {
	--lmak-c1: #c2185b;
	--lmak-c2: #880e4f;
	--lmak-text: #ffffff;
	--lmak-radius: 16px;
	--lmak-overlay: 0.55;
}

/* --- Root konteyner: tema CSS'inin ezmesini engelle --- */
#lmak-root {
	position: static;
}
#lmak-root .lmak-overlay {
	box-sizing: border-box;
}

/* --- Overlay --- */
.lmak-overlay {
	position: fixed;
	top: 0;
	left: 0;
	right: 0;
	bottom: 0;
	width: 100%;
	height: 100%;
	z-index: 2147483646; /* tüm tema/banner elemanlarının üstünde */
	display: flex;
	align-items: center;
	justify-content: center;
	padding: 16px;
	background: rgba(0, 0, 0, var(--lmak-overlay));
	opacity: 0;
	visibility: hidden;
	transition: opacity 0.25s ease, visibility 0.25s ease;
	-webkit-overflow-scrolling: touch;
	overflow-y: auto;
}
.lmak-overlay.lmak-open {
	opacity: 1;
	visibility: visible;
}
/* Alt konum (bottom sheet) varyantı — mobilde daha az rahatsız edici. */
.lmak-overlay.lmak-pos-bottom {
	align-items: flex-end;
	padding: 0;
}

/* --- Kart --- */
.lmak-card {
	position: relative;
	width: 100%;
	max-width: 380px;
	box-sizing: border-box;
	background: linear-gradient(145deg, var(--lmak-c1), var(--lmak-c2));
	color: var(--lmak-text);
	border-radius: var(--lmak-radius);
	padding: 28px 22px 24px;
	text-align: center;
	box-shadow: 0 18px 50px rgba(0, 0, 0, 0.35);
	transform: translateY(24px) scale(0.96);
	transition: transform 0.3s cubic-bezier(0.16, 1, 0.3, 1);
	overflow-wrap: break-word;
	word-break: break-word;
}
.lmak-open .lmak-card {
	transform: translateY(0) scale(1);
}
.lmak-pos-bottom .lmak-card {
	max-width: 100%;
	border-radius: var(--lmak-radius) var(--lmak-radius) 0 0;
	transform: translateY(100%);
}
.lmak-pos-bottom.lmak-open .lmak-card {
	transform: translateY(0);
}

/* --- İçerik --- */
.lmak-emoji {
	font-size: 40px;
	line-height: 1;
	margin-bottom: 10px;
}
.lmak-title {
	font-size: clamp(19px, 5vw, 23px);
	font-weight: 800;
	line-height: 1.25;
	margin: 0 0 8px;
}
.lmak-subtitle {
	font-size: clamp(13px, 3.6vw, 15px);
	line-height: 1.5;
	opacity: 0.95;
	margin: 0 0 18px;
}

/* --- Kupon kutusu --- */
.lmak-coupon-box {
	display: none;
	margin: 0 0 16px;
}
.lmak-coupon-box.lmak-visible {
	display: block;
}
.lmak-coupon-code {
	display: inline-flex;
	align-items: center;
	gap: 10px;
	max-width: 100%;
	box-sizing: border-box;
	background: rgba(255, 255, 255, 0.16);
	border: 2px dashed rgba(255, 255, 255, 0.7);
	border-radius: 10px;
	padding: 12px 16px;
	font-size: clamp(16px, 4.5vw, 20px);
	font-weight: 800;
	letter-spacing: 2px;
	cursor: pointer;
}
.lmak-copy-hint {
	display: block;
	font-size: 11px;
	opacity: 0.8;
	margin-top: 6px;
}

/* --- Butonlar --- */
.lmak-btn {
	display: block;
	width: 100%;
	box-sizing: border-box;
	border: none;
	cursor: pointer;
	font-family: inherit;
	font-size: clamp(14px, 4vw, 16px);
	font-weight: 700;
	padding: 14px 18px;
	border-radius: 10px;
	transition: transform 0.12s ease, opacity 0.2s ease;
	min-height: 48px; /* mobil dokunma hedefi */
}
.lmak-btn:active {
	transform: scale(0.98);
}
.lmak-btn-primary {
	background: #ffffff;
	color: var(--lmak-c2);
}
.lmak-btn-secondary {
	background: transparent;
	color: var(--lmak-text);
	text-decoration: underline;
	margin-top: 10px;
	min-height: 40px;
	font-weight: 500;
	opacity: 0.85;
}

/* --- Kapat --- */
.lmak-close {
	position: absolute;
	top: 10px;
	right: 10px;
	width: 34px;
	height: 34px;
	border: none;
	border-radius: 50%;
	background: rgba(255, 255, 255, 0.18);
	color: var(--lmak-text);
	font-size: 20px;
	line-height: 1;
	cursor: pointer;
	display: flex;
	align-items: center;
	justify-content: center;
}

/* --- Ürün altı satır içi rozet --- */
.lmak-inline-badge {
	display: block;
	margin: 0 0 14px;
	padding: 10px 14px;
	background: linear-gradient(135deg, rgba(194, 24, 91, 0.08), rgba(136, 14, 79, 0.08));
	border: 1px solid rgba(194, 24, 91, 0.25);
	border-left: 4px solid var(--lmak-c1);
	border-radius: 8px;
	font-size: 13px;
	font-weight: 600;
	color: var(--lmak-c2);
	line-height: 1.4;
}

/* --- Erişilebilirlik / azaltılmış hareket --- */
@media (prefers-reduced-motion: reduce) {
	.lmak-overlay,
	.lmak-card {
		transition: none;
	}
}

/* Çok küçük ekranlarda ekstra güvenlik */
@media (max-width: 360px) {
	.lmak-card {
		padding: 24px 16px 20px;
	}
	.lmak-coupon-code {
		letter-spacing: 1px;
	}
}
