/* ============================================================
   SONYA — cookie consent bar (pairs with shared/cookie-consent.js).
   A floating, inflated glass capsule at the bottom of the screen.
   Dark (default):  #010102 · #06060D · #0B0D14 · #171719
   Light:           #2D2D2F · #97979A · #C8C8C8 (milky grey glass)
   No blue/violet/pink tint. Text colours use !important because the
   site's light theme forces a colour on every element.
   ============================================================ */
.sonya-cc {
	position: fixed;
	left: 50%;
	bottom: calc(14px + env(safe-area-inset-bottom));
	z-index: 9000; /* above the page and App Library, below auth/paywall modals */
	box-sizing: border-box;
	width: min(920px, calc(100vw - 28px));
	display: flex;
	align-items: center;
	gap: 22px;
	padding: 16px 16px 16px 28px;
	border-radius: 999px;
	font-family: 'Onest', system-ui, sans-serif;
	color: #F2F2F3 !important;
	background:
		radial-gradient(140% 90% at 50% -40%, rgba(255, 255, 255, 0.14), transparent 62%),
		linear-gradient(180deg, rgba(23, 23, 25, 0.78) 0%, rgba(11, 13, 20, 0.82) 60%, rgba(6, 6, 13, 0.86) 100%);
	backdrop-filter: blur(24px) saturate(140%);
	-webkit-backdrop-filter: blur(24px) saturate(140%);
	box-shadow:
		inset 0 1px 0 rgba(255, 255, 255, 0.26),
		-21.48px -21.48px 10.74px -21.48px rgba(200, 200, 200, 0.55) inset,
		21.48px 21.48px 10.74px -21.48px rgba(200, 200, 200, 0.55) inset,
		inset 0 -14px 26px -16px rgba(1, 1, 2, 0.7),
		0 10px 30px rgba(1, 1, 2, 0.4),
		0 24px 60px rgba(1, 1, 2, 0.45);
	opacity: 0;
	transform: translate3d(-50%, 16px, 0);
	transition: opacity 0.24s ease, transform 0.26s cubic-bezier(0.23, 1, 0.32, 1);
}
.sonya-cc[hidden] { display: none; }
.sonya-cc.is-open { opacity: 1; transform: translate3d(-50%, 0, 0); transition-duration: 0.32s, 0.38s; }
.sonya-cc *, .sonya-cc *::before, .sonya-cc *::after { box-sizing: border-box; }

.sonya-cc-text { flex: 1; min-width: 0; }
.sonya-cc-title {
	margin: 0 0 3px;
	font-family: 'Unbounded', 'Sora', system-ui, sans-serif;
	font-weight: 400;
	font-size: 14px;
	letter-spacing: 0.03em;
	color: #fff !important;
}
.sonya-cc-body { margin: 0; font-size: 13px; line-height: 1.45; color: rgba(242, 242, 243, 0.66) !important; }
.sonya-cc-link {
	color: #fff !important;
	text-decoration: underline;
	text-underline-offset: 3px;
	text-decoration-color: rgba(255, 255, 255, 0.4);
	white-space: nowrap;
}
.sonya-cc-link:hover { text-decoration-color: currentColor; }

.sonya-cc-actions { flex: none; display: flex; gap: 8px; }
.sonya-cc-btn {
	height: 46px;
	padding: 0 22px;
	border: 0;
	border-radius: 999px;
	font-family: 'Onest', system-ui, sans-serif;
	font-size: 14px;
	font-weight: 600;
	white-space: nowrap;
	cursor: pointer;
	-webkit-tap-highlight-color: transparent;
	transition: background-color 0.2s ease, box-shadow 0.22s ease, transform 0.16s cubic-bezier(0.23, 1, 0.32, 1);
}
.sonya-cc-btn:active { transform: scale(0.97); }
.sonya-cc-btn:focus-visible { outline: 2px solid rgba(255, 255, 255, 0.85); outline-offset: 3px; }
/* Secondary — the home «Файл» pill */
.sonya-cc-btn--secondary {
	color: rgba(242, 242, 243, 0.85) !important;
	background: rgba(1, 1, 2, 0.32);
	box-shadow:
		-14px -14px 8px -14px rgba(200, 200, 200, 0.6) inset,
		14px 14px 8px -14px rgba(200, 200, 200, 0.6) inset;
}
.sonya-cc-btn--secondary:hover { background: rgba(23, 23, 25, 0.55); color: #fff !important; }
/* Primary — light milky bead */
.sonya-cc-btn--primary {
	color: #0B0D14 !important;
	background: radial-gradient(120% 90% at 50% -30%, #fff, rgba(255, 255, 255, 0) 62%), rgba(232, 232, 234, 0.95);
	box-shadow: inset 0 1px 0 #fff, inset 0 -6px 12px -6px rgba(45, 45, 47, 0.35), 0 8px 20px -8px rgba(1, 1, 2, 0.7);
}
.sonya-cc-btn--primary:hover { background: radial-gradient(120% 90% at 50% -30%, #fff, rgba(255, 255, 255, 0) 62%), #fff; }

/* ── Light theme: milky grey glass ── */
[data-theme="light"] .sonya-cc {
	color: #2D2D2F !important;
	background:
		radial-gradient(140% 90% at 50% -40%, rgba(255, 255, 255, 0.9), transparent 62%),
		linear-gradient(180deg, rgba(236, 236, 238, 0.72) 0%, rgba(200, 200, 200, 0.62) 100%);
	box-shadow:
		inset 0 1.5px 0 rgba(255, 255, 255, 0.95),
		inset 0 0 0 1px rgba(255, 255, 255, 0.45),
		inset 0 -14px 26px -16px rgba(45, 45, 47, 0.22),
		0 10px 30px rgba(45, 45, 47, 0.14),
		0 24px 60px rgba(45, 45, 47, 0.18);
}
[data-theme="light"] .sonya-cc-title { color: #2D2D2F !important; }
[data-theme="light"] .sonya-cc-body { color: rgba(45, 45, 47, 0.7) !important; }
[data-theme="light"] .sonya-cc-link { color: #2D2D2F !important; text-decoration-color: rgba(45, 45, 47, 0.4); }
[data-theme="light"] .sonya-cc-btn--secondary {
	color: #2D2D2F !important;
	background: rgba(151, 151, 154, 0.22);
	box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.75), inset 0 0 0 1px rgba(255, 255, 255, 0.35), inset 0 -6px 12px -8px rgba(45, 45, 47, 0.25);
}
[data-theme="light"] .sonya-cc-btn--secondary:hover { background: rgba(151, 151, 154, 0.32); }
[data-theme="light"] .sonya-cc-btn--primary {
	color: #fff !important;
	background: radial-gradient(120% 90% at 50% -30%, rgba(255, 255, 255, 0.36), rgba(255, 255, 255, 0) 60%), rgba(45, 45, 47, 0.9);
	box-shadow:
		-14px -14px 8px -14px rgba(255, 255, 255, 0.55) inset,
		14px 14px 8px -14px rgba(255, 255, 255, 0.3) inset,
		0 8px 20px -8px rgba(45, 45, 47, 0.6);
}
[data-theme="light"] .sonya-cc-btn--primary:hover { background: radial-gradient(120% 90% at 50% -30%, rgba(255, 255, 255, 0.45), rgba(255, 255, 255, 0) 60%), #2D2D2F; }
[data-theme="light"] .sonya-cc-btn:focus-visible { outline-color: rgba(45, 45, 47, 0.7); }

/* ── Mobile: stacked, comfortable touch targets ── */
@media (max-width: 640px) {
	.sonya-cc {
		flex-direction: column;
		align-items: stretch;
		gap: 14px;
		width: calc(100vw - 20px);
		bottom: calc(10px + env(safe-area-inset-bottom));
		padding: 20px 16px 16px;
		border-radius: 30px;
	}
	.sonya-cc-text { padding: 0 6px; }
	.sonya-cc-actions { flex-direction: column-reverse; gap: 8px; }
	.sonya-cc-btn { width: 100%; height: 50px; }
}

@media (prefers-reduced-motion: reduce) {
	.sonya-cc, .sonya-cc.is-open { transform: translate3d(-50%, 0, 0); transition: opacity 0.18s ease; }
}
