/* GD Колело на късмета — ползва само gd- токени от Bricks (без fallback-и) */

/* Cormorant Garamond с кирилица — самохостнат в плъгина (OFL) */
@font-face {
	font-family: 'GD Cormorant Garamond';
	font-style: normal;
	font-weight: 400;
	font-display: swap;
	src: url('fonts/cormorant-garamond-cyrillic-400-normal.woff2') format('woff2');
	unicode-range: U+0301, U+0400-045F, U+0490-0491, U+04B0-04B1, U+2116;
}
@font-face {
	font-family: 'GD Cormorant Garamond';
	font-style: italic;
	font-weight: 400;
	font-display: swap;
	src: url('fonts/cormorant-garamond-cyrillic-400-italic.woff2') format('woff2');
	unicode-range: U+0301, U+0400-045F, U+0490-0491, U+04B0-04B1, U+2116;
}
@font-face {
	font-family: 'GD Cormorant Garamond';
	font-style: normal;
	font-weight: 500;
	font-display: swap;
	src: url('fonts/cormorant-garamond-cyrillic-500-normal.woff2') format('woff2');
	unicode-range: U+0301, U+0400-045F, U+0490-0491, U+04B0-04B1, U+2116;
}
@font-face {
	font-family: 'GD Cormorant Garamond';
	font-style: normal;
	font-weight: 400;
	font-display: swap;
	src: url('fonts/cormorant-garamond-latin-400-normal.woff2') format('woff2');
	unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}
@font-face {
	font-family: 'GD Cormorant Garamond';
	font-style: italic;
	font-weight: 400;
	font-display: swap;
	src: url('fonts/cormorant-garamond-latin-400-italic.woff2') format('woff2');
	unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}
@font-face {
	font-family: 'GD Cormorant Garamond';
	font-style: normal;
	font-weight: 500;
	font-display: swap;
	src: url('fonts/cormorant-garamond-latin-500-normal.woff2') format('woff2');
	unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}


.gd-wheel {
	display: grid;
	grid-template-columns: minmax(0, 460px) minmax(0, 1fr);
	gap: 48px;
	align-items: center;
	overflow: visible;
	color: var(--gd-navy);
}

.gd-wheel__stage {
	position: relative;
	width: 100%;
	max-width: 460px;
	margin: 0 auto;
	overflow: visible;
}

.gd-wheel__pointer { filter: drop-shadow(0 2px 3px rgba(19, 42, 78, .35)); }

.gd-wheel__svg {
	display: block;
	width: 100%;
	height: auto;
	overflow: visible;
}

/* Слоеве на колелото. Върти се само .gd-wheel__disc — като цял елемент, на видеокартата,
   без да се прерисува нищо друго. Центърът на колелото е в (50%, 244/444). */
.gd-wheel__layer {
	position: absolute;
	inset: 0;
	display: block;
	width: 100%;
	height: 100%;
	overflow: visible;
	pointer-events: none;
}
.gd-wheel__disc {
	transform-origin: 50% 54.955%;
	transform: rotate(var(--gd-wheel-angle, 0deg)) translateZ(0);
	transition: transform 5.2s cubic-bezier(.12, .62, .08, 1);
	will-change: transform;
	backface-visibility: hidden;
}

.gd-wheel.is-spinning .gd-wheel__stage { cursor: wait; }

.gd-wheel__label {
	font-family: var(--gd-font-body);
	font-size: 11px;
	font-weight: 600;
	letter-spacing: .12em;
}

.gd-wheel__seg.is-winner rect { fill: var(--gd-gold); }
.gd-wheel__seg.is-winner text { fill: var(--gd-navy); }

.gd-wheel__title {
	font-family: var(--gd-font-display);
	font-weight: 400;
	font-size: clamp(2rem, 4vw, 3rem);
	line-height: 1.1;
	margin: 0 0 14px;
}
.gd-wheel__title em { font-style: italic; color: var(--gd-gold); }

.gd-wheel__text {
	font-family: var(--gd-font-body);
	font-size: 15px;
	line-height: 1.7;
	color: var(--gd-muted);
	max-width: 46ch;
	margin: 0 0 24px;
}

/* Форма */
.gd-wheel__form { display: flex; flex-direction: column; gap: 14px; max-width: 420px; }
.gd-wheel__field span {
	display: block;
	font-family: var(--gd-font-body);
	font-size: 11px;
	font-weight: 600;
	letter-spacing: .14em;
	text-transform: uppercase;
	color: var(--gd-navy);
	margin-bottom: 6px;
}
.gd-wheel__field input {
	width: 100%;
	box-sizing: border-box;
	font-family: var(--gd-font-body);
	font-size: 15px;
	color: var(--gd-navy);
	background: #fff;
	border: 1px solid var(--gd-gold-light);
	border-radius: 0;
	padding: 14px 16px;
	outline: none;
	transition: border-color .2s;
}
.gd-wheel__field input:focus { border-color: var(--gd-gold); }
.gd-wheel__field input.is-invalid { border-color: #b3423a; }
.gd-wheel__consent {
	display: flex;
	gap: 10px;
	align-items: flex-start;
	font-family: var(--gd-font-body);
	font-size: 12.5px;
	line-height: 1.5;
	color: var(--gd-muted);
	cursor: pointer;
}
.gd-wheel__consent input { margin: 3px 0 0; accent-color: var(--gd-gold); }

.gd-wheel__btn {
	display: inline-block;
	box-sizing: border-box;
	font-family: var(--gd-font-body);
	font-size: 13px;
	font-weight: 600;
	letter-spacing: .16em;
	text-transform: uppercase;
	text-align: center;
	text-decoration: none;
	line-height: 1.2;
	background: var(--gd-navy);
	color: var(--gd-ivory);
	border: 1px solid var(--gd-navy);
	border-radius: 0;
	padding: 16px 36px;
	cursor: pointer;
	transition: background .25s, color .25s, border-color .25s;
}
.gd-wheel__btn:hover:not(:disabled) { background: var(--gd-gold); border-color: var(--gd-gold); color: var(--gd-navy); }
.gd-wheel__btn:focus-visible { outline: 2px solid var(--gd-gold); outline-offset: 3px; }
.gd-wheel__btn:disabled { opacity: .45; cursor: default; }
.gd-wheel__btn--gold { background: var(--gd-gold); border-color: var(--gd-gold); color: var(--gd-navy); }
.gd-wheel__btn--gold:hover { background: var(--gd-navy); border-color: var(--gd-navy); color: var(--gd-ivory); }
.gd-wheel__btn--shop { background: transparent; color: var(--gd-navy); }
.gd-wheel__form .gd-wheel__btn { align-self: flex-start; }

.gd-wheel__note {
	font-family: var(--gd-font-body);
	font-size: 13px;
	color: #b3423a;
	margin: 0;
}
.gd-wheel__note:empty { display: none; }

/* Резултат */
.gd-wheel__result {
	opacity: 0;
	transform: translateY(10px);
	transition: opacity .6s, transform .6s;
}
.gd-wheel__result.is-visible { opacity: 1; transform: none; }

.gd-wheel__prize {
	display: grid;
	grid-template-columns: 120px minmax(0, 1fr);
	gap: 22px;
	align-items: center;
	background: #fff;
	border: 1px solid var(--gd-gold);
	padding: 20px 24px;
	margin: 0 0 18px;
}
.gd-wheel__prize-img {
	width: 120px;
	height: 120px;
	object-fit: contain;
	display: block;
}
.gd-wheel__prize-img[hidden] { display: none; }
.gd-wheel__prize-kicker {
	font-family: var(--gd-font-body);
	font-size: 11px;
	font-weight: 600;
	letter-spacing: .18em;
	text-transform: uppercase;
	color: var(--gd-gold);
	margin: 0 0 6px;
}
.gd-wheel__prize-name {
	font-family: var(--gd-font-display);
	font-size: clamp(1.5rem, 2.6vw, 2rem);
	line-height: 1.15;
	color: var(--gd-navy);
	margin: 0 0 8px;
}
.gd-wheel__prize-value {
	font-family: var(--gd-font-body);
	font-size: 13px;
	color: var(--gd-muted);
	margin: 0;
}
.gd-wheel__status {
	font-family: var(--gd-font-body);
	font-size: 14.5px;
	line-height: 1.6;
	color: var(--gd-navy);
	margin: 0 0 18px;
}
.gd-wheel__actions { display: flex; gap: 12px; flex-wrap: wrap; }
.gd-wheel__actions [hidden] { display: none; }

/* Светлинки по ръба */
.gd-wheel__bulbs circle { fill: var(--gd-gold-light); }
/* мига целият слой (opacity) — евтино, без прерисуване */
.gd-wheel__bulbs { animation: gd-wheel-bulb 1.6s ease-in-out infinite alternate; will-change: opacity; }
.gd-wheel__bulbs--b { animation-delay: -.8s; }
.gd-wheel.is-spinning .gd-wheel__bulbs { animation-duration: .35s; }
@keyframes gd-wheel-bulb { from { opacity: .35; } to { opacity: 1; } }

/* Подаръкът в количката */
.gd-gift-tag {
	display: inline-block;
	margin-left: 8px;
	padding: 2px 8px;
	font-family: var(--gd-font-body);
	font-size: 11px;
	letter-spacing: .1em;
	text-transform: uppercase;
	background: var(--gd-gold-light);
	color: var(--gd-navy);
	vertical-align: middle;
}
.gd-gift-price { color: var(--gd-gold); font-weight: 600; }

/* Попъп */
.gd-wheel-modal { position: fixed; inset: 0; z-index: 9999; display: flex; align-items: center; justify-content: center; padding: 24px; }
.gd-wheel-modal[hidden] { display: none; }
.gd-wheel-modal__backdrop { position: absolute; inset: 0; background: rgba(19, 42, 78, .72); }
.gd-wheel-modal__dialog {
	position: relative;
	box-sizing: border-box;
	width: min(1080px, 100%);
	max-height: calc(100vh - 48px);
	max-height: calc(100dvh - 48px);
	overflow-x: hidden;
	overflow-y: auto;
	background: var(--gd-ivory);
	padding: 56px 48px 48px;
	box-shadow: 0 30px 80px rgba(0, 0, 0, .35);
	animation: gd-wheel-in .5s cubic-bezier(.2, .7, .2, 1);
}
.gd-wheel-modal__close {
	position: absolute; top: 14px; right: 14px; z-index: 1;
	width: 40px; height: 40px;
	display: grid; place-items: center;
	background: none; border: 0; border-radius: 0;
	color: var(--gd-navy); cursor: pointer;
}
.gd-wheel-modal__close:hover { color: var(--gd-gold); }
body.gd-wheel-is-open { overflow: hidden; }

@keyframes gd-wheel-in { from { opacity: 0; transform: translateY(16px); } to { opacity: 1; transform: none; } }

/* ---------- Premium тъмен попъп ---------- */
/* изолация от глобалните стилове на Bricks/темата */
.gd-wheel-modal, .gd-wheel-modal *, .gd-wheel-modal *::before, .gd-wheel-modal *::after { box-sizing: border-box; }
.gd-wheel-modal .gd-wheel,
.gd-wheel-modal .gd-wheel__body,
.gd-wheel-modal .gd-wheel__text,
.gd-wheel-modal .gd-wheel__consent,
.gd-wheel-modal .gd-wheel__status { text-align: left; }
.gd-wheel-modal .gd-wheel__body { min-width: 0; }
.gd-wheel-modal .gd-wheel__field input { text-align: left !important; height: auto; margin: 0; box-shadow: none; }
.gd-wheel-modal h2.gd-wheel__title {
	font-family: 'GD Cormorant Garamond', 'Cormorant Garamond', serif !important;
	font-size: clamp(2.75rem, 4.4vw, 4rem) !important;
	font-weight: 400 !important;
	font-style: normal;
	letter-spacing: 0 !important;
	text-transform: none !important;
	text-align: left;
	line-height: 1.05;
}
.gd-wheel-modal h2.gd-wheel__title em { font-family: inherit; font-weight: 400; font-style: italic; }
.gd-wheel-modal .gd-wheel__prize-name { font-family: 'GD Cormorant Garamond', 'Cormorant Garamond', serif; font-weight: 500; text-align: left; }
.gd-wheel-modal .gd-wheel__form { margin: 0; }
.gd-wheel-modal .gd-wheel__form .gd-wheel__btn { align-self: flex-start; width: auto; }
.gd-wheel-modal .gd-wheel__svg { max-width: 100%; }

.gd-wheel-modal__backdrop { background: rgba(6, 13, 27, .86); } /* без blur — той прерисува целия екран на всеки кадър */

.gd-wheel-modal__dialog {
	color: var(--gd-ivory);
	border: 1px solid rgba(201, 169, 97, .5);
	background:
		radial-gradient(ellipse 55% 75% at 27% 52%, rgba(201, 169, 97, .26), transparent 70%),
		radial-gradient(ellipse 70% 55% at 100% 0%, rgba(232, 213, 176, .09), transparent 65%),
		linear-gradient(140deg, var(--gd-navy) 0%, color-mix(in srgb, var(--gd-navy) 58%, #000) 100%);
	box-shadow: 0 40px 120px rgba(0, 0, 0, .6), 0 0 0 1px rgba(0, 0, 0, .4);
	isolation: isolate;
}
/* вътрешна тънка рамка */
.gd-wheel-modal__dialog::before {
	content: '';
	position: absolute;
	inset: 10px;
	border: 1px solid rgba(201, 169, 97, .2);
	pointer-events: none;
	z-index: -1;
}
/* фина текстура */
.gd-wheel-modal__dialog::after {
	content: '';
	position: absolute;
	inset: 0;
	pointer-events: none;
	z-index: -1;
	opacity: .07;
	background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='160' height='160'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='.9' numOctaves='2' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)'/%3E%3C/svg%3E");
}

/* светлинни лъчи зад колелото — в SVG-то, затова не създават скрол */
.gd-wheel__rays { display: none; }
.gd-wheel-modal .gd-wheel__rays { display: inline; fill: rgba(232, 213, 176, .14); }


/* колелото се смалява по височината на екрана, за да не се налага скрол */
.gd-wheel-modal .gd-wheel { grid-template-columns: minmax(0, min(440px, calc((100vh - 200px) * .9))) minmax(0, 1fr); grid-template-columns: minmax(0, min(440px, calc((100dvh - 200px) * .9))) minmax(0, 1fr); }
.gd-wheel-modal .gd-wheel__stage { max-width: min(440px, calc((100vh - 200px) * .9)); max-width: min(440px, calc((100dvh - 200px) * .9)); }

.gd-wheel-modal .gd-wheel__svg {
	position: relative;
	filter: drop-shadow(0 22px 40px rgba(0, 0, 0, .5)) drop-shadow(0 0 34px rgba(201, 169, 97, .28));
}

/* текст на тъмно */
.gd-wheel-modal .gd-wheel { color: var(--gd-ivory); }
.gd-wheel-modal .gd-wheel__title { color: var(--gd-ivory); }
.gd-wheel-modal .gd-wheel__text { color: rgba(247, 243, 236, .72); }
.gd-wheel-modal .gd-wheel__field span { color: var(--gd-gold-light); }
.gd-wheel-modal .gd-wheel__field input {
	background: rgba(255, 255, 255, .06);
	border-color: rgba(201, 169, 97, .5);
	color: var(--gd-ivory);
}
.gd-wheel-modal .gd-wheel__field input::placeholder { color: rgba(247, 243, 236, .4); }
.gd-wheel-modal .gd-wheel__field input:focus { border-color: var(--gd-gold); background: rgba(255, 255, 255, .09); }
.gd-wheel-modal .gd-wheel__consent { color: rgba(247, 243, 236, .62); }
.gd-wheel-modal .gd-wheel__note { color: #F0A89E; }
.gd-wheel-modal .gd-wheel__btn { background: var(--gd-gold); border-color: var(--gd-gold); color: var(--gd-navy); }
.gd-wheel-modal .gd-wheel__btn:hover:not(:disabled) { background: var(--gd-ivory); border-color: var(--gd-ivory); color: var(--gd-navy); }
.gd-wheel-modal .gd-wheel__btn--shop { background: transparent; border-color: rgba(247, 243, 236, .5); color: var(--gd-ivory); }
.gd-wheel-modal .gd-wheel__prize { background: var(--gd-ivory); border-color: var(--gd-gold); box-shadow: 0 18px 40px rgba(0, 0, 0, .35); }
.gd-wheel-modal .gd-wheel__prize-value { color: var(--gd-muted); }
.gd-wheel-modal .gd-wheel__status { color: rgba(247, 243, 236, .85); }
.gd-wheel-modal__close { color: var(--gd-gold-light); }
.gd-wheel-modal__close:hover { color: var(--gd-ivory); }

@media (max-width: 900px) {
	.gd-wheel-modal__dialog {
		background:
			radial-gradient(ellipse 90% 45% at 50% 28%, rgba(201, 169, 97, .26), transparent 70%),
			linear-gradient(170deg, var(--gd-navy) 0%, color-mix(in srgb, var(--gd-navy) 58%, #000) 100%);
	}
}

@media (max-width: 900px) {
	.gd-wheel { grid-template-columns: 1fr; gap: 24px; text-align: center; }
	.gd-wheel__stage { max-width: 320px; }
	.gd-wheel__text, .gd-wheel__form { margin-left: auto; margin-right: auto; }
	.gd-wheel__form .gd-wheel__btn { align-self: stretch; }
	.gd-wheel__consent { text-align: left; }
	.gd-wheel__prize { grid-template-columns: 90px minmax(0, 1fr); text-align: left; padding: 16px; }
	.gd-wheel__prize-img { width: 90px; height: 90px; }
	.gd-wheel__actions { justify-content: center; }
	.gd-wheel-modal { padding: 10px; }
	.gd-wheel-modal__dialog { padding: 44px 18px 24px; max-height: calc(100vh - 20px); max-height: calc(100dvh - 20px); }
	.gd-wheel-modal .gd-wheel { grid-template-columns: 1fr; }
	.gd-wheel-modal .gd-wheel__stage { max-width: min(320px, calc(100vh - 470px)); min-width: 180px; }
	.gd-wheel-modal .gd-wheel[data-won="1"] .gd-wheel__stage { max-width: min(320px, calc(100vh - 460px)); }
	.gd-wheel-modal .gd-wheel__form .gd-wheel__btn { align-self: stretch; width: 100%; }
	.gd-wheel-modal h2.gd-wheel__title { font-size: 2.6rem !important; }
	/* след печалба уводният текст не е нужен — освобождава място за картата */
	.gd-wheel-modal .gd-wheel[data-won="1"] .gd-wheel__text { display: none; }
	.gd-wheel-modal .gd-wheel[data-won="1"] .gd-wheel__title { margin-bottom: 14px; }
	.gd-wheel-modal .gd-wheel__prize { grid-template-columns: 70px minmax(0, 1fr); gap: 14px; margin-bottom: 12px; }
	.gd-wheel-modal .gd-wheel__prize-img { width: 70px; height: 70px; }
	.gd-wheel-modal .gd-wheel__status { font-size: 13.5px; margin-bottom: 14px; }
}

/* ниски телефони (iPhone SE, стари Android) */
@media (max-width: 900px) and (max-height: 700px) {
	.gd-wheel-modal__dialog { padding: 38px 16px 18px; }
	.gd-wheel-modal .gd-wheel { gap: 14px; }
	.gd-wheel-modal h2.gd-wheel__title { font-size: 2.35rem !important; margin-bottom: 8px; }
	.gd-wheel-modal .gd-wheel__text { font-size: 13.5px; line-height: 1.5; margin-bottom: 14px; }
	.gd-wheel-modal .gd-wheel__form { gap: 10px; }
	.gd-wheel-modal .gd-wheel__field input { padding: 12px 14px; }
	.gd-wheel-modal .gd-wheel__consent { font-size: 11.5px; }
	.gd-wheel-modal .gd-wheel__btn { padding: 14px 24px; }
	.gd-wheel-modal .gd-wheel__prize { padding: 12px 14px; }
	.gd-wheel-modal .gd-wheel__prize-name { font-size: 1.35rem; margin-bottom: 4px; }
}

@media (min-width: 901px) and (max-height: 700px) {
	.gd-wheel-modal__dialog { padding: 40px 40px 32px; }
	.gd-wheel-modal h2.gd-wheel__title { font-size: 2.75rem !important; margin-bottom: 10px; }
	.gd-wheel-modal .gd-wheel__text { margin-bottom: 16px; }
}

@media (prefers-reduced-motion: reduce) {
	.gd-wheel__disc { transition-duration: .01s; }
	.gd-wheel__result, .gd-wheel-modal__dialog { transition: none; animation: none; }
	.gd-wheel__bulbs { animation: none; }
}


/* ---------- Вземане на подаръка (след завъртане) ---------- */
.gd-wheel__claim { margin-top: 4px; }
.gd-wheel__claim-text {
	font-family: var(--gd-font-body);
	font-size: 14px;
	line-height: 1.55;
	margin: 0;
}
.gd-wheel-modal .gd-wheel__claim-text { color: var(--gd-ivory); }
.gd-wheel__claim[hidden], .gd-wheel__status[hidden], .gd-wheel__spin-step[hidden] { display: none; }

/* Банерът в количката и мини количката: стиловете са вградени в gd-wheel.php (notice_css), защото се показва на всяка страница. */

/* текстовата колона е над колелото — лъчите не минават върху картата */
.gd-wheel__stage { z-index: 0; }
.gd-wheel__body { position: relative; z-index: 1; }
