/**
 * Cookie Consent Banner — styles
 * Dark navy bar + green accent (matches approved design mock).
 * Self-contained, prefixed with .scc- to avoid clashes with the theme.
 */

:root {
	--scc-bg: #0d2440;          /* dark navy */
	--scc-bg-soft: #14304f;     /* slightly lighter navy (cards inside modal) */
	--scc-fg: #ffffff;
	--scc-muted: #b9c6d6;
	--scc-border: rgba(255, 255, 255, 0.28);
	--scc-accent: #23b573;      /* green (primary button) */
	--scc-accent-fg: #ffffff;
	--scc-link: #35d08c;        /* green links */
	--scc-radius: 10px;
	--scc-shadow: 0 8px 40px rgba(4, 12, 24, 0.45);
	--scc-z: 2147483000;
}

/* Hidden until JS decides to show it (prevents flash for returning visitors). */
.scc-root[hidden],
.scc-modal[hidden] {
	display: none !important;
}

.scc-root,
.scc-modal,
.scc-root *,
.scc-modal * {
	box-sizing: border-box;
}

/* ---------- Banner ---------- */
.scc-banner {
	position: fixed;
	z-index: var(--scc-z);
	left: 50%;
	bottom: 10px;
	transform: translateX(-50%);
	width: calc(100% - 20px);
	background: var(--scc-bg);
	color: var(--scc-fg);
	border-radius: var(--scc-radius);
	box-shadow: var(--scc-shadow);
	padding: 14px 22px;
	display: flex;
	align-items: center;
	gap: 18px;
	flex-wrap: wrap;
	font-size: 13px;
	line-height: 1.45;
	animation: scc-slide-up 0.35s ease both;
}

@keyframes scc-slide-up {
	from { opacity: 0; transform: translate(-50%, 24px); }
	to   { opacity: 1; transform: translate(-50%, 0); }
}

.scc-banner__icon {
	flex: none;
	width: 44px;
	height: 44px;
	color: var(--scc-link);
	display: flex;
	align-items: center;
	justify-content: center;
}
.scc-banner__icon svg {
	width: 100%;
	height: 100%;
	display: block;
}

.scc-banner__text {
	flex: 1 1 380px;
	min-width: 240px;
	margin: 0;
	color: var(--scc-fg);
}

.scc-banner__links {
	margin: 6px 0 0;
	font-size: 12.5px;
}
.scc-banner__links a {
	color: var(--scc-link);
	text-decoration: none;
}
.scc-banner__links a:hover {
	text-decoration: underline;
}
.scc-banner__links .scc-sep {
	color: var(--scc-link);
	margin: 0 8px;
	opacity: 0.7;
}

.scc-banner__actions {
	display: flex;
	gap: 10px;
	flex-wrap: wrap;
	align-items: center;
}

/* ---------- Buttons ---------- */
.scc-btn {
	font: inherit;
	font-size: 13px;
	font-weight: 600;
	cursor: pointer;
	border-radius: 6px;
	padding: 10px 20px;
	border: 1px solid transparent;
	line-height: 1.2;
	white-space: nowrap;
	transition: background 0.15s ease, color 0.15s ease, border-color 0.15s ease, filter 0.15s ease;
}

.scc-btn:focus-visible {
	outline: 2px solid var(--scc-accent);
	outline-offset: 2px;
}

.scc-btn--primary {
	background: var(--scc-accent);
	color: var(--scc-accent-fg);
	border-color: var(--scc-accent);
}
.scc-btn--primary:hover { filter: brightness(1.1); }

.scc-btn--secondary {
	background: transparent;
	color: var(--scc-fg);
	border-color: var(--scc-border);
}
.scc-btn--secondary:hover {
	background: rgba(255, 255, 255, 0.08);
	border-color: rgba(255, 255, 255, 0.5);
}

/* ---------- Modal ---------- */
.scc-modal {
	position: fixed;
	inset: 0;
	z-index: calc(var(--scc-z) + 1);
	display: flex;
	align-items: center;
	justify-content: center;
	padding: 20px;
}

.scc-modal__overlay {
	position: absolute;
	inset: 0;
	background: rgba(4, 10, 20, 0.6);
	animation: scc-fade 0.2s ease both;
}

@keyframes scc-fade { from { opacity: 0; } to { opacity: 1; } }

.scc-modal__dialog {
	position: relative;
	background: var(--scc-bg);
	color: var(--scc-fg);
	width: min(560px, 100%);
	max-height: calc(100vh - 40px);
	overflow-y: auto;
	border-radius: var(--scc-radius);
	box-shadow: var(--scc-shadow);
	padding: 24px;
	animation: scc-pop 0.22s ease both;
}

@keyframes scc-pop {
	from { opacity: 0; transform: translateY(12px) scale(0.98); }
	to   { opacity: 1; transform: translateY(0) scale(1); }
}

.scc-modal__head {
	display: flex;
	align-items: flex-start;
	justify-content: space-between;
	gap: 16px;
	margin-bottom: 8px;
}

.scc-modal__title {
	margin: 0;
	font-size: 20px;
	font-weight: 700;
	color: var(--scc-fg);
}

.scc-modal__close {
	background: none;
	border: none;
	cursor: pointer;
	font-size: 26px;
	line-height: 1;
	color: var(--scc-muted);
	padding: 0 4px;
}
.scc-modal__close:hover { color: var(--scc-fg); }

.scc-modal__intro {
	margin: 0 0 16px;
	color: var(--scc-muted);
	font-size: 14px;
	line-height: 1.5;
}

/* ---------- Category rows ---------- */
.scc-cat {
	background: var(--scc-bg-soft);
	border: 1px solid rgba(255, 255, 255, 0.14);
	border-radius: 8px;
	padding: 16px;
	margin-bottom: 12px;
}

.scc-cat__head {
	display: flex;
	align-items: center;
	justify-content: space-between;
	gap: 12px;
}

.scc-cat__title {
	margin: 0;
	font-size: 15px;
	font-weight: 700;
	color: var(--scc-fg);
}

.scc-cat__desc {
	margin: 8px 0 0;
	color: var(--scc-muted);
	font-size: 13px;
	line-height: 1.5;
}

.scc-cat__status {
	font-size: 12px;
	font-weight: 600;
	color: var(--scc-link);
}

/* ---------- Toggle switch ---------- */
.scc-switch {
	position: relative;
	display: inline-block;
	width: 46px;
	height: 26px;
	flex: none;
}
.scc-switch input {
	opacity: 0;
	width: 0;
	height: 0;
	position: absolute;
}
.scc-switch__slider {
	position: absolute;
	cursor: pointer;
	inset: 0;
	background: rgba(255, 255, 255, 0.25);
	border-radius: 26px;
	transition: background 0.2s ease;
}
.scc-switch__slider::before {
	content: "";
	position: absolute;
	height: 20px;
	width: 20px;
	left: 3px;
	top: 3px;
	background: #fff;
	border-radius: 50%;
	transition: transform 0.2s ease;
	box-shadow: 0 1px 3px rgba(0, 0, 0, 0.35);
}
.scc-switch input:checked + .scc-switch__slider {
	background: var(--scc-accent);
}
.scc-switch input:checked + .scc-switch__slider::before {
	transform: translateX(20px);
}
.scc-switch input:disabled + .scc-switch__slider {
	background: var(--scc-accent);
	opacity: 0.5;
	cursor: not-allowed;
}
.scc-switch input:focus-visible + .scc-switch__slider {
	outline: 2px solid var(--scc-accent);
	outline-offset: 2px;
}

.scc-modal__actions {
	display: flex;
	gap: 10px;
	flex-wrap: wrap;
	justify-content: flex-end;
	margin-top: 20px;
}

/* ---------- Footer link ---------- */
.scc-footer-link {
	cursor: pointer;
	background: none;
	border: none;
	color: inherit;
	font: inherit;
	text-decoration: underline;
	padding: 0;
}

/* ---------- Email-form consent row (rendered inside site content, keep neutral) ---------- */
.scc-email-consent {
	display: flex;
	align-items: flex-start;
	gap: 8px;
	margin: 10px 0;
	font-size: 13px;
	line-height: 1.45;
	text-align: left;
}
.scc-email-consent input[type="checkbox"] {
	margin-top: 2px;
	flex: none;
}
.scc-email-consent a {
	text-decoration: underline;
}

/* ---------- Responsive ---------- */
@media (max-width: 780px) {
	.scc-banner {
		left: 0;
		right: 0;
		bottom: 0;
		transform: none;
		width: 100%;
		border-radius: 12px 12px 0 0;
		padding: 16px 16px calc(16px + env(safe-area-inset-bottom, 0px));
		gap: 12px;
		animation: scc-slide-up-m 0.35s ease both;
	}
	@keyframes scc-slide-up-m {
		from { opacity: 0; transform: translateY(24px); }
		to   { opacity: 1; transform: translateY(0); }
	}
	.scc-banner__icon { width: 34px; height: 34px; }
	.scc-banner__actions {
		width: 100%;
		flex-direction: column;
		align-items: stretch;
	}
	.scc-btn { width: 100%; text-align: center; }
	.scc-modal__dialog { padding: 20px 16px; }
}
