/* SCR Consent */
.scr-consent-banner,
.scr-consent-modal,
.scr-consent-revisit {
	--scr-radius: 6px;
	font-family: inherit;
	font-size: 15px;
	line-height: 1.5;
	color: var(--scr-text);
	box-sizing: border-box;
}
.scr-consent-banner *, .scr-consent-modal * { box-sizing: border-box; }
[hidden].scr-consent-banner, [hidden].scr-consent-modal, [hidden].scr-consent-revisit { display: none !important; }

/* Bottom bar */
.scr-consent-banner {
	position: fixed;
	left: 0; right: 0; bottom: 0;
	z-index: 999998;
	background: var(--scr-bg);
	box-shadow: 0 -4px 24px rgba(0, 0, 0, .12);
	padding: 20px 16px;
}
.scr-consent-inner {
	max-width: 1200px;
	margin: 0 auto;
	display: flex;
	align-items: center;
	gap: 24px;
}
.scr-consent-text { flex: 1; }
.scr-consent-text p { margin: 0; }
.scr-consent-text a { color: inherit; text-decoration: underline; }
.scr-consent-title { font-weight: 700; font-size: 1.05em; margin: 0 0 4px !important; }
.scr-consent-actions { display: flex; gap: 10px; flex-shrink: 0; }

/* Buttons. Accept and Reject share the same style so neither is nudged. */
.scr-btn {
	appearance: none;
	font: inherit;
	font-weight: 600;
	padding: 10px 18px;
	border-radius: var(--scr-radius);
	border: 2px solid var(--scr-primary);
	background: var(--scr-primary);
	color: var(--scr-bg);
	cursor: pointer;
	white-space: nowrap;
	line-height: 1.2;
}
.scr-btn:hover { opacity: .88; }
.scr-btn-outline { background: transparent; color: var(--scr-primary); }
.scr-btn:focus-visible, .scr-consent-close:focus-visible, .scr-consent-revisit:focus-visible, .scr-switch input:focus-visible + span {
	outline: 3px solid var(--scr-primary);
	outline-offset: 2px;
}

/* Modal */
.scr-consent-modal { position: fixed; inset: 0; z-index: 999999; display: flex; align-items: center; justify-content: center; padding: 16px; }
.scr-consent-overlay { position: absolute; inset: 0; background: rgba(0, 0, 0, .5); }
.scr-consent-dialog {
	position: relative;
	background: var(--scr-bg);
	border-radius: var(--scr-radius);
	width: 100%;
	max-width: 560px;
	max-height: calc(100vh - 32px);
	display: flex;
	flex-direction: column;
	box-shadow: 0 10px 40px rgba(0, 0, 0, .25);
	outline: none;
}
.scr-consent-dialog-head, .scr-consent-dialog-foot { padding: 16px 20px; display: flex; align-items: center; gap: 10px; }
.scr-consent-dialog-head { justify-content: space-between; border-bottom: 1px solid rgba(0, 0, 0, .1); }
.scr-consent-dialog-head .scr-consent-title { margin: 0 !important; }
.scr-consent-dialog-foot { justify-content: flex-end; flex-wrap: wrap; border-top: 1px solid rgba(0, 0, 0, .1); }
.scr-consent-dialog-body { padding: 8px 20px; overflow-y: auto; }
.scr-consent-close { background: none; border: 0; font-size: 28px; line-height: 1; cursor: pointer; color: inherit; padding: 0 4px; }

.scr-consent-cat { padding: 14px 0; border-bottom: 1px solid rgba(0, 0, 0, .08); }
.scr-consent-cat:last-child { border-bottom: 0; }
.scr-consent-cat-head { display: flex; justify-content: space-between; align-items: center; gap: 12px; }
.scr-consent-cat-head label { font-weight: 600; cursor: pointer; }
.scr-consent-cat p { margin: 6px 0 0; font-size: .92em; opacity: .85; }
.scr-consent-always { font-size: .85em; font-weight: 600; color: var(--scr-primary); }

/* Toggle switch */
.scr-switch { position: relative; width: 44px; height: 24px; flex-shrink: 0; }
.scr-switch input { position: absolute; inset: 0; width: 100%; height: 100%; margin: 0; opacity: 0; cursor: pointer; z-index: 1; }
.scr-switch span { position: absolute; inset: 0; background: #c4c4c4; border-radius: 24px; transition: background .2s; }
.scr-switch span::after { content: ""; position: absolute; top: 3px; left: 3px; width: 18px; height: 18px; border-radius: 50%; background: #fff; transition: transform .2s; }
.scr-switch input:checked + span { background: var(--scr-primary); }
.scr-switch input:checked + span::after { transform: translateX(20px); }

/* Revisit button */
.scr-consent-revisit {
	position: fixed;
	left: 16px; bottom: 16px;
	z-index: 999997;
	width: 44px; height: 44px;
	border-radius: 50%;
	border: 0;
	background: var(--scr-primary);
	color: var(--scr-bg);
	display: flex; align-items: center; justify-content: center;
	cursor: pointer;
	box-shadow: 0 2px 10px rgba(0, 0, 0, .2);
	padding: 0;
}

.scr-consent-locked { overflow: hidden; }

@media (max-width: 782px) {
	.scr-consent-inner { flex-direction: column; align-items: stretch; gap: 16px; }
	.scr-consent-actions { flex-direction: column-reverse; }
	.scr-btn { width: 100%; }
	.scr-consent-dialog-foot { flex-direction: column-reverse; align-items: stretch; }
}

@media (prefers-reduced-motion: reduce) {
	.scr-switch span, .scr-switch span::after { transition: none; }
}
