/* ═══════════════════════════════════════════
   COOKIE CONSENT
   Banner + granular preferences dialog
   ═══════════════════════════════════════════ */

.se-cookie {
	position: fixed;
	inset: auto 0 0 0;
	z-index: var(--z-overlay);
	background: var(--se-black);
	color: var(--se-white);
	border-top: 2px solid var(--se-gold);
	padding: 1.25rem var(--gutter);
}

.se-cookie__inner {
	display: flex;
	flex-direction: column;
	gap: 0.75rem;
	max-width: var(--container-max);
	margin-inline: auto;
}

@media (min-width: 64rem) {
	.se-cookie__inner {
		flex-direction: row;
		align-items: center;
		gap: 2rem;
	}
}

.se-cookie__title {
	font-family: var(--font-heading);
	font-size: 1.25rem;
	text-transform: uppercase;
	flex-shrink: 0;
}

.se-cookie__text {
	font-family: var(--font-body);
	font-size: 1rem;
	line-height: 1.5;
	flex: 1;
}

.se-cookie__link {
	text-decoration: underline;
	text-underline-offset: 0.15em;
	white-space: nowrap;
	margin-inline-start: 0.35em;
}

.se-cookie__link:hover { color: var(--se-gold); }

.se-cookie__actions {
	display: flex;
	flex-wrap: wrap;
	gap: 0.625rem;
	flex-shrink: 0;
}

/* On the black banner the solid button has to be light, and the ghost button
   needs a white border to be visible at all. */
.se-cookie .se-btn--solid {
	background: var(--se-gold);
	border-color: var(--se-gold);
	color: var(--se-black);
}

.se-cookie .se-btn--solid:hover {
	background: var(--se-white);
	border-color: var(--se-white);
	color: var(--se-black);
}

.se-cookie .se-btn--ghost {
	color: var(--se-white);
	border-color: var(--se-white);
}

.se-cookie .se-btn--ghost:hover {
	background: var(--se-white);
	color: var(--se-black);
}

/* ── Preferences dialog ──────────────────── */

.se-cookie-modal {
	position: fixed;
	inset: 0;
	z-index: var(--z-modal);
	display: flex;
	align-items: center;
	justify-content: center;
	padding: 1rem;
}

.se-cookie-modal__backdrop {
	position: absolute;
	inset: 0;
	background: rgba(0, 0, 0, 0.72);
}

.se-cookie-modal__dialog {
	position: relative;
	width: min(38rem, 100%);
	max-height: min(85vh, 46rem);
	overflow-y: auto;
	background: var(--se-white);
	color: var(--se-black);
	padding: clamp(1.25rem, 1rem + 1.2vw, 2rem);
	box-shadow: 0 24px 60px rgba(0, 0, 0, 0.35);
}

.se-cookie-modal__head {
	display: flex;
	align-items: flex-start;
	justify-content: space-between;
	gap: 1rem;
	margin-bottom: 1rem;
}

.se-cookie-modal__title {
	font-family: var(--font-heading);
	font-size: 1.75rem;
	text-transform: uppercase;
}

.se-cookie-modal__close {
	display: flex;
	align-items: center;
	justify-content: center;
	width: 44px;
	height: 44px;
	flex-shrink: 0;
	margin: -10px -10px 0 0;
}

.se-cookie-modal__close svg { width: 22px; height: 22px; }

.se-cookie-cat {
	border: none;
	border-top: 1px solid var(--se-line-on-light);
	padding: 1.125rem 0 0;
	margin: 0 0 1.125rem;
}

.se-cookie-cat__legend {
	font-family: var(--font-heading);
	font-size: 1.25rem;
	text-transform: uppercase;
	padding: 0;
	margin-bottom: 0.375rem;
}

.se-cookie-cat__desc {
	font-family: var(--font-body);
	font-size: 0.9375rem;
	line-height: 1.55;
	color: var(--se-muted-on-light);
	margin-bottom: 0.75rem;
}

/* ── Switch ──────────────────────────────── */

.se-switch {
	display: inline-flex;
	align-items: center;
	gap: 0.75rem;
	cursor: pointer;
	font-family: var(--font-body);
	font-size: 1rem;
	min-height: 44px;
}

.se-switch input {
	position: absolute;
	opacity: 0;
	width: 1px;
	height: 1px;
}

.se-switch__track {
	position: relative;
	display: block;
	width: 52px;
	height: 30px;
	flex-shrink: 0;
	border: 2px solid var(--se-black);
	border-radius: 999px;
	background: var(--se-white);
	transition: background var(--transition-fast), border-color var(--transition-fast);
}

.se-switch__track::after {
	content: '';
	position: absolute;
	top: 3px;
	inset-inline-start: 3px;
	width: 20px;
	height: 20px;
	border-radius: 50%;
	background: var(--se-black);
	transition: transform var(--transition-fast), background var(--transition-fast);
}

.se-switch input:checked + .se-switch__track {
	background: var(--se-pink);
	border-color: var(--se-pink);
}

.se-switch input:checked + .se-switch__track::after {
	background: var(--se-white);
	transform: translateX(22px);
}

/* Focus must be visible on the track, since the input itself is hidden. */
.se-switch input:focus-visible + .se-switch__track {
	outline: var(--se-focus-width) solid var(--se-black);
	outline-offset: var(--se-focus-offset);
}

.se-switch--locked {
	cursor: default;
	opacity: 0.75;
}

.se-switch--locked .se-switch__track {
	background: var(--se-muted-on-light);
	border-color: var(--se-muted-on-light);
}

.se-switch--locked .se-switch__track::after {
	background: var(--se-white);
	transform: translateX(22px);
}

.se-cookie-modal__actions {
	display: flex;
	flex-wrap: wrap;
	gap: 0.625rem;
	padding-top: 0.5rem;
	border-top: 1px solid var(--se-line-on-light);
	margin-top: 0.5rem;
}

.se-cookie-modal__note {
	font-family: var(--font-body);
	font-size: 0.875rem;
	line-height: 1.55;
	color: var(--se-muted-on-light);
	margin-top: 1rem;
}
