/**
 * Simple Cookie Consent (GA4) styles.
 * Styled to match the Lechler Analysers website: dark navy surfaces
 * (like the footer) with Lechler green as the accent / action colour.
 * Override freely in your template.
 */

:root {
	--scc-navy: #0E1B33;
	--scc-navy-light: #1A2A47;
	--scc-green: #1FA85C;
	--scc-green-hover: #1A8C4C;
	--scc-green-link: #35C57B;
	--scc-text-light: #C9D4E5;
	--scc-text-on-dark: #DCE3EE;
}

.scc-banner {
	position: fixed;
	left: 0;
	right: 0;
	z-index: 99999;
	display: flex;
	flex-wrap: wrap;
	align-items: center;
	justify-content: space-between;
	gap: 16px;
	box-sizing: border-box;
	padding: 18px 22px;
	background: var(--scc-navy);
	color: var(--scc-text-light);
	font-size: 14px;
	line-height: 1.55;
	box-shadow: 0 -2px 18px rgba(0, 0, 0, .25);
}

.scc-banner.scc-bottom { bottom: 0; border-top: 3px solid var(--scc-green); }
.scc-banner.scc-top    { top: 0; border-bottom: 3px solid var(--scc-green); box-shadow: 0 2px 18px rgba(0, 0, 0, .25); }

.scc-text { flex: 1 1 320px; min-width: 240px; }
.scc-title { display: block; margin-bottom: 4px; font-size: 15px; font-weight: 600; color: #fff; }
.scc-body { display: inline; }

.scc-link,
.scc-banner a { color: var(--scc-green-link); text-decoration: underline; }

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

.scc-btn {
	box-sizing: border-box;
	display: inline-block;
	padding: 9px 18px;
	border: 1px solid transparent;
	border-radius: 6px;
	font: inherit;
	font-weight: 600;
	cursor: pointer;
	transition: background-color .15s ease, border-color .15s ease, color .15s ease;
}

.scc-btn-primary { background: var(--scc-green); color: #fff; border-color: var(--scc-green); }
.scc-btn-primary:hover { background: var(--scc-green-hover); border-color: var(--scc-green-hover); }

.scc-btn-secondary { background: transparent; color: var(--scc-text-on-dark); border-color: #44557A; }
.scc-btn-secondary:hover { background: rgba(255, 255, 255, .08); }

.scc-btn-link {
	background: none;
	color: var(--scc-green-link);
	border: none;
	padding: 9px 8px;
	text-decoration: underline;
}
.scc-btn-link:hover { color: #57d693; }

/* ------------------------------------------------------------- preferences modal */

.scc-overlay {
	position: fixed;
	inset: 0;
	z-index: 100000;
	display: flex;
	align-items: center;
	justify-content: center;
	padding: 20px;
	background: rgba(14, 27, 51, .6);
}

.scc-modal {
	position: relative;
	box-sizing: border-box;
	width: 100%;
	max-width: 560px;
	max-height: 85vh;
	overflow-y: auto;
	padding: 28px 28px 22px;
	border-radius: 12px;
	background: #fff;
	color: var(--scc-navy);
	box-shadow: 0 18px 50px rgba(0, 0, 0, .35);
}

.scc-modal-close {
	position: absolute;
	top: 12px;
	right: 14px;
	width: 34px;
	height: 34px;
	border: none;
	background: none;
	font-size: 26px;
	line-height: 1;
	color: #6b7280;
	cursor: pointer;
}
.scc-modal-close:hover { color: var(--scc-navy); }

.scc-modal-title { margin: 0 0 8px; font-size: 20px; color: var(--scc-navy); }
.scc-modal-intro { margin: 0 0 18px; font-size: 14px; color: #4b5563; line-height: 1.5; }

.scc-category {
	padding: 14px 0;
	border-top: 1px solid #e5e7eb;
}

.scc-category-head {
	display: flex;
	align-items: center;
	justify-content: space-between;
	gap: 12px;
	margin-bottom: 4px;
}

.scc-category-title { margin: 0; font-size: 15px; color: var(--scc-navy); }
.scc-category-body { margin: 0; font-size: 13px; color: #4b5563; line-height: 1.5; }

.scc-always-on {
	font-size: 12px;
	font-weight: 600;
	color: var(--scc-green);
	white-space: nowrap;
}

.scc-toggle {
	position: relative;
	display: inline-block;
	width: 46px;
	height: 26px;
	flex: 0 0 auto;
}
.scc-toggle-input { position: absolute; opacity: 0; width: 0; height: 0; }
.scc-slider {
	position: absolute;
	inset: 0;
	background: #cbd5e1;
	border-radius: 26px;
	transition: background-color .15s ease;
}
.scc-slider::before {
	content: "";
	position: absolute;
	top: 3px;
	left: 3px;
	width: 20px;
	height: 20px;
	background: #fff;
	border-radius: 50%;
	transition: transform .15s ease;
}
.scc-toggle-input:checked + .scc-slider { background: var(--scc-green); }
.scc-toggle-input:checked + .scc-slider::before { transform: translateX(20px); }
.scc-toggle-input:focus-visible + .scc-slider { outline: 2px solid var(--scc-green); outline-offset: 2px; }

.scc-modal-footer {
	display: flex;
	flex-wrap: wrap;
	justify-content: flex-end;
	gap: 10px;
	margin-top: 22px;
}

.scc-modal-footer .scc-btn-secondary { color: var(--scc-navy); border-color: #cbd5e1; }
.scc-modal-footer .scc-btn-secondary:hover { background: #f3f4f6; }

/* ------------------------------------------------------- floating settings button */

.scc-settings-button {
	position: fixed;
	left: 16px;
	bottom: 16px;
	z-index: 99998;
	padding: 8px 16px;
	border: 1px solid var(--scc-navy);
	border-radius: 30px;
	background: var(--scc-navy);
	color: #fff;
	font: inherit;
	font-size: 13px;
	font-weight: 600;
	cursor: pointer;
	box-shadow: 0 2px 10px rgba(0, 0, 0, .2);
}
.scc-settings-button:hover { background: var(--scc-navy-light); border-color: var(--scc-navy-light); }

.scc-btn:focus-visible,
.scc-settings-button:focus-visible,
.scc-modal-close:focus-visible {
	outline: 2px solid var(--scc-green);
	outline-offset: 2px;
}

@media (max-width: 600px) {
	.scc-banner { flex-direction: column; align-items: stretch; }
	.scc-actions { justify-content: stretch; }
	.scc-actions .scc-btn { flex: 1 1 auto; text-align: center; }
	.scc-modal-footer { justify-content: stretch; }
	.scc-modal-footer .scc-btn { flex: 1 1 auto; text-align: center; }
}
