/*
 * Spin-wheel popup — плътно по бранд палитрата (крем/маслина/глина).
 * Колелото е SVG (геометрията е в spin-wheel.php) + завъртане на диска чрез
 * transform — без канвас, без библиотека. Секторите са с претеглена ширина
 * (по шанса); JS-ът смята финалния ъгъл от odoWheel.sectors.
 * Сайтът е без заоблени ъгли по дизайнерско решение — колелото е
 * единственото изключение по природа; модалът остава с прави ъгли.
 */

/* [hidden] ТРЯБВА да печели над display:flex — без това правило авторският display
   отменя UA стила на hidden атрибута и попъпът се показва ВИНАГИ —
   вкл. когато JS се е отказал рано (вече играл/30-дневна пауза) и НЕ е
   закачил listener-ите → голата форма прави нативен GET и рефрешва. */
.odo-wheel-overlay[hidden] {
	display: none;
}

.odo-wheel-overlay {
	position: fixed;
	inset: 0;
	z-index: 9999;
	display: flex;
	align-items: center;
	justify-content: center;
	background: rgba(43, 42, 38, 0.55);
	padding: 16px;
}

.odo-wheel-modal {
	position: relative;
	background: #faf8f4;
	max-width: 420px;
	width: 100%;
	padding: 28px 24px 24px;
	text-align: center;
	box-shadow: 0 24px 64px rgba(0, 0, 0, 0.3);
	max-height: calc(100vh - 32px);
	overflow-y: auto;
}

.odo-wheel-close {
	position: absolute;
	top: 8px;
	right: 8px;
	width: 36px;
	height: 36px;
	border: 0;
	background: transparent;
	font-size: 26px;
	line-height: 1;
	color: #73745b;
	cursor: pointer;
}

/* ---- колелото ---- */

.odo-wheel-stage {
	position: relative;
	width: 264px;
	height: 264px;
	margin: 0 auto 20px;
}

.odo-wheel-pointer {
	position: absolute;
	top: 50%;
	right: -8px;
	transform: translateY(-50%);
	width: 30px;
	height: 34px;
	z-index: 2;
	filter: drop-shadow(-1px 1px 2px rgba(0, 0, 0, 0.25));
}

/* SVG дискът: геометрията/етикетите живеят в spin-wheel.php — тук само
   размер и въртенето. transform-origin е задължителен: без него SVG се
   върти около (0,0) и излита от екрана. */
.odo-wheel-disc {
	width: 100%;
	height: 100%;
	display: block;
	transform-origin: 50% 50%;
	transition: transform 4.2s cubic-bezier(0.12, 0.6, 0.08, 1);
	will-change: transform;
}

.odo-wheel-disc text { font-family: inherit; }

/* джакпот секторът е златен с лек блясък — единствената анимация освен въртенето */
.odo-wheel-jackpot { animation: odo-wheel-glow 2.2s ease-in-out infinite; }
@keyframes odo-wheel-glow {
	0%, 100% { fill: #e8b94f; }
	50% { fill: #f3cf74; }
}
@media (prefers-reduced-motion: reduce) {
	.odo-wheel-jackpot { animation: none; }
}

/* ---- текст и форма ---- */

.odo-wheel-title {
	font-size: 19px;
	line-height: 1.35;
	font-weight: 700;
	color: #2b2a26;
	margin: 0 0 8px;
	text-transform: none;
}

.odo-wheel-sub {
	font-size: 13px;
	color: #6d6a61;
	margin: 0 0 16px;
}

.odo-wheel-form {
	display: flex;
	flex-direction: column;
	gap: 10px;
}

.odo-wheel-email {
	height: 46px;
	padding: 0 14px;
	border: 1px solid #d8d2c4;
	background: #ffffff;
	font-size: 15px;
	color: #2b2a26;
}

.odo-wheel-email:focus-visible {
	outline: 2px solid #73745b;
	outline-offset: 1px;
}

.odo-wheel-hp {
	position: absolute !important;
	left: -9999px !important;
	width: 1px;
	height: 1px;
	opacity: 0;
}

.odo-wheel-spin-btn {
	height: 48px;
	border: 0;
	background: #73745b;
	color: #faf8f4;
	font-size: 15px;
	font-weight: 600;
	letter-spacing: 0.04em;
	cursor: pointer;
	text-transform: uppercase;
}

.odo-wheel-spin-btn:hover { background: #62634d; }

.odo-wheel-spin-btn[disabled] {
	opacity: 0.6;
	cursor: default;
}

.odo-wheel-msg {
	min-height: 1.2em;
	font-size: 14px;
	font-weight: 500;
	margin: 12px 0 0;
	color: #2b2a26;
}

.odo-wheel-msg.is-error { color: #a13d3d; }

.odo-wheel-msg .odo-wheel-code-label {
	display: block;
	margin-top: 14px;
	font-size: 11px;
	letter-spacing: 0.12em;
	text-transform: uppercase;
	color: #8a8577;
}

.odo-wheel-msg .odo-wheel-code {
	display: block;
	margin-top: 6px;
	padding: 12px;
	border: 2px dashed #73745b;
	background: #ffffff;
	font-size: 22px;
	font-weight: 700;
	letter-spacing: 3px;
	color: #73745b;
	user-select: all;
}

/* вторият код (ваучерът за консултация) е в глина, за да не се бърка с купона */
.odo-wheel-msg .odo-wheel-code.is-voucher {
	border-style: solid;
	border-color: #c8957b;
	color: #b07a5e;
}

.odo-wheel-msg .odo-wheel-code-sub {
	display: block;
	margin-top: 6px;
	font-size: 12px;
	font-weight: 400;
	color: #6d6a61;
}

.odo-wheel-msg .odo-wheel-mailnote {
	display: block;
	margin-top: 12px;
	font-size: 12px;
	font-weight: 400;
	color: #8a8577;
}

.odo-wheel-modal.is-jackpot { box-shadow: 0 0 0 4px #e8b94f, 0 24px 64px rgba(0, 0, 0, 0.3); }

.odo-wheel-consent {
	font-size: 11px;
	color: #8a8577;
	margin: 14px 0 0;
	line-height: 1.5;
}

.odo-wheel-consent a {
	color: #73745b;
	text-decoration: underline;
}

/* условията на играта — сгънати, дребен шрифт, не се натрапват */
.odo-wheel-rules {
	margin: 10px 0 0;
	font-size: 11px;
	color: #8a8577;
	text-align: left;
}

.odo-wheel-rules summary {
	cursor: pointer;
	text-align: center;
	color: #73745b;
	text-decoration: underline;
	list-style: none;
}

.odo-wheel-rules summary::-webkit-details-marker { display: none; }

.odo-wheel-rules ul {
	margin: 8px 0 0;
	padding-left: 16px;
	line-height: 1.5;
}

.odo-wheel-rules li { margin: 0 0 4px; }

/* мобилно: колелото по-малко, модалът плътно към екрана */
@media (max-width: 480px) {
	.odo-wheel-stage { width: 216px; height: 216px; }
	.odo-wheel-title { font-size: 17px; }
}
