/* =============================================================================
   Cookie Consent Banner + Preferences Modal
   ========================================================================== */

.wt-cookie-banner {
	position: fixed;
	bottom: 0;
	left: 0;
	right: 0;
	z-index: 700;
	background: rgba(255, 255, 255, 0.98);
	backdrop-filter: blur(20px);
	-webkit-backdrop-filter: blur(20px);
	border-top: 1px solid var(--wt-outline-variant, #c4c5d5);
	box-shadow: 0 -8px 32px rgba(15, 23, 42, 0.08);
	padding: 20px;
	transform: translateY(100%);
	transition: transform 400ms cubic-bezier(0.16, 1, 0.3, 1);
}
.wt-cookie-banner.is-visible {
	transform: translateY(0);
}

.wt-cookie-banner__inner {
	max-width: 1280px;
	margin: 0 auto;
	display: grid;
	grid-template-columns: 1fr auto;
	gap: 24px;
	align-items: center;
}
@media (max-width: 900px) {
	.wt-cookie-banner__inner { grid-template-columns: 1fr; }
}

.wt-cookie-banner__text h3 {
	font-family: var(--wt-font-display, Sora), sans-serif;
	font-size: 18px;
	font-weight: 600;
	color: var(--wt-primary, #00288e);
	margin: 0 0 4px;
}
.wt-cookie-banner__text p {
	font-size: 14px;
	color: var(--wt-on-surface-variant, #444653);
	margin: 0;
	line-height: 1.5;
}
.wt-cookie-banner__text a {
	color: var(--wt-primary, #00288e);
	font-weight: 500;
}

.wt-cookie-banner__actions {
	display: flex;
	gap: 12px;
	flex-wrap: wrap;
	justify-content: flex-end;
}
@media (max-width: 640px) {
	.wt-cookie-banner__actions > * { flex: 1; }
}

/* Preferences Modal */
.wt-cookie-modal-overlay {
	position: fixed;
	inset: 0;
	background: rgba(0, 20, 83, 0.60);
	backdrop-filter: blur(4px);
	-webkit-backdrop-filter: blur(4px);
	z-index: 899;
	opacity: 0;
	transition: opacity 250ms ease;
}
.wt-cookie-modal-overlay.is-visible { opacity: 1; }

.wt-cookie-modal {
	position: fixed;
	inset: 0;
	z-index: 900;
	margin: auto;
	width: 90%;
	max-width: 560px;
	max-height: 90vh;
	background: #fff;
	border-radius: 16px;
	box-shadow: 0 24px 64px rgba(0, 40, 142, 0.20);
	overflow: hidden;
	display: flex;
	flex-direction: column;
	opacity: 0;
	transform: scale(0.96) translateY(8px);
	transition: opacity 250ms ease, transform 250ms cubic-bezier(0.16, 1, 0.3, 1);
	height: fit-content;
}
.wt-cookie-modal.is-visible {
	opacity: 1;
	transform: scale(1) translateY(0);
}

.wt-cookie-modal__header {
	display: flex;
	align-items: center;
	justify-content: space-between;
	padding: 20px 24px;
	border-bottom: 1px solid var(--wt-outline-variant, #c4c5d5);
}
.wt-cookie-modal__header h2 {
	margin: 0;
	font-family: var(--wt-font-display, Sora), sans-serif;
	font-size: 22px;
	font-weight: 600;
	color: var(--wt-primary, #00288e);
}
.wt-cookie-modal__close {
	width: 40px; height: 40px;
	background: transparent;
	border: 0;
	cursor: pointer;
	color: var(--wt-on-surface-variant, #444653);
	border-radius: 8px;
	display: flex;
	align-items: center;
	justify-content: center;
}
.wt-cookie-modal__close:hover { background: rgba(0, 40, 142, 0.05); }

.wt-cookie-modal__body {
	padding: 8px 24px 16px;
	overflow-y: auto;
}

.wt-cookie-category {
	padding: 16px 0;
	border-bottom: 1px solid var(--wt-outline-variant, #c4c5d5);
}
.wt-cookie-category:last-child { border-bottom: 0; }
.wt-cookie-category__head {
	display: flex;
	align-items: center;
	gap: 12px;
	margin-bottom: 6px;
}
.wt-cookie-category h3 {
	margin: 0;
	font-family: var(--wt-font-display, Sora), sans-serif;
	font-size: 16px;
	font-weight: 600;
	color: var(--wt-on-surface, #131b2e);
}
.wt-cookie-category p {
	margin: 0;
	padding-left: 60px;
	font-size: 13px;
	color: var(--wt-on-surface-variant, #444653);
	line-height: 1.5;
}

/* iOS-style toggle */
.wt-cookie-toggle {
	position: relative;
	display: inline-block;
	width: 44px;
	height: 24px;
	cursor: pointer;
	flex-shrink: 0;
}
.wt-cookie-toggle input { display: none; }
.wt-cookie-toggle span {
	position: absolute;
	inset: 0;
	background: #ccc;
	border-radius: 999px;
	transition: background 200ms ease;
}
.wt-cookie-toggle span::before {
	content: '';
	position: absolute;
	top: 2px; left: 2px;
	width: 20px; height: 20px;
	background: #fff;
	border-radius: 50%;
	transition: transform 200ms ease;
	box-shadow: 0 2px 4px rgba(0, 0, 0, 0.15);
}
.wt-cookie-toggle input:checked + span { background: var(--wt-primary, #00288e); }
.wt-cookie-toggle input:checked + span::before { transform: translateX(20px); }
.wt-cookie-toggle--locked span { background: var(--wt-primary, #00288e); opacity: 0.7; cursor: not-allowed; }

.wt-cookie-modal__footer {
	display: flex;
	gap: 12px;
	padding: 16px 24px;
	border-top: 1px solid var(--wt-outline-variant, #c4c5d5);
	background: var(--wt-surface-container-low, #f2f3ff);
	flex-wrap: wrap;
	justify-content: flex-end;
}
@media (max-width: 640px) {
	.wt-cookie-modal__footer > * { flex: 1; }
}
