/* Site Consent 1.0.0 - override any --sc-* property in the theme to restyle. */
:root {
	--sc-primary: #1d4ed8;
	--sc-primary-text: #ffffff;
	--sc-bg: #ffffff;
	--sc-text: #1f2937;
	--sc-muted: #4b5563;
	--sc-border: #d1d5db;
	--sc-focus: #1f2937;
	--sc-ink: var(--sc-primary);
	--sc-radius: 6px;
	--sc-btn-radius: 6px;
	--sc-font: inherit;
	--sc-size: 15px;
	--sc-shadow: 0 -2px 16px rgba(0, 0, 0, 0.15);
	--sc-max-width: 1100px;
	--sc-z: 2147483000;
}

.sc-banner,
.sc-overlay,
.sc-reopen {
	font-family: var(--sc-font);
	font-size: var(--sc-size);
	line-height: 1.5;
	color: var(--sc-text);
	box-sizing: border-box;
}

.sc-banner *,
.sc-overlay * {
	box-sizing: border-box;
}

[hidden].sc-banner,
[hidden].sc-overlay,
[hidden].sc-reopen {
	display: none !important;
}

/* First layer: never covers the page; no overlay. */
.sc-banner {
	position: fixed;
	z-index: var(--sc-z);
	background: var(--sc-bg);
	box-shadow: var(--sc-shadow);
	max-height: 45vh;
	overflow-y: auto;
}

.sc-pos-bar {
	left: 0;
	right: 0;
	bottom: 0;
	border-top: 1px solid var(--sc-border);
}

.sc-pos-box {
	left: 16px;
	bottom: 16px;
	max-width: 420px;
	border: 1px solid var(--sc-border);
	border-radius: var(--sc-radius);
}

.sc-inner {
	max-width: var(--sc-max-width);
	margin: 0 auto;
	padding: 16px 20px;
}

.sc-title {
	margin: 0 0 4px;
	font-size: 1.1em;
	font-weight: 700;
	color: var(--sc-text);
}

.sc-desc {
	margin: 0 0 12px;
	color: var(--sc-text);
}

.sc-link {
	color: var(--sc-ink);
	text-decoration: underline;
}

.sc-actions {
	display: flex;
	flex-wrap: wrap;
	gap: 8px;
}

/* All first-layer buttons share one style: equal prominence. */
.sc-btn {
	flex: 1 1 0;
	min-width: 140px;
	min-height: 44px;
	padding: 10px 16px;
	font: inherit;
	font-weight: 600;
	cursor: pointer;
	border: 2px solid var(--sc-ink);
	border-radius: var(--sc-btn-radius);
	background: var(--sc-primary);
	color: var(--sc-primary-text);
}

.sc-style-outline .sc-btn {
	background: transparent;
	color: var(--sc-ink);
}

.sc-btn:hover {
	filter: brightness(0.92);
}

.sc-btn:focus-visible,
.sc-reopen:focus-visible,
.sc-close:focus-visible,
.sc-link:focus-visible,
.sc-cat input:focus-visible,
.sc-panel:focus-visible {
	outline: 3px solid var(--sc-focus);
	outline-offset: 2px;
}

/* Second layer: settings panel (modal; the visitor chose to open it). */
.sc-overlay {
	position: fixed;
	inset: 0;
	z-index: calc(var(--sc-z) + 1);
	background: rgba(0, 0, 0, 0.5);
	display: flex;
	align-items: center;
	justify-content: center;
	padding: 16px;
}

.sc-panel {
	position: relative;
	background: var(--sc-bg);
	color: var(--sc-text);
	border-radius: var(--sc-radius);
	width: 100%;
	max-width: 560px;
	max-height: calc(100vh - 32px);
	overflow-y: auto;
	padding: 24px 20px 20px;
}

.sc-panel .sc-title {
	padding-right: 40px;
}

.sc-close {
	position: absolute;
	top: 8px;
	right: 8px;
	width: 44px;
	height: 44px;
	font-size: 26px;
	line-height: 1;
	background: transparent;
	border: 0;
	color: var(--sc-text);
	cursor: pointer;
	border-radius: var(--sc-btn-radius);
}

.sc-cat {
	border-top: 1px solid var(--sc-border);
	padding: 12px 0;
}

.sc-cat-head {
	display: flex;
	align-items: center;
	gap: 10px;
	font-weight: 600;
	cursor: pointer;
}

.sc-cat-head input {
	width: 22px;
	height: 22px;
	margin: 0;
	accent-color: var(--sc-ink);
	flex: none;
}

.sc-always {
	margin-left: auto;
	font-size: 0.85em;
	font-weight: 400;
	color: var(--sc-muted);
}

.sc-cat-desc {
	margin: 4px 0 0 32px;
	color: var(--sc-muted);
	font-size: 0.93em;
}

.sc-panel .sc-actions {
	border-top: 1px solid var(--sc-border);
	padding-top: 16px;
}

/* Persistent way back in (withdrawal). */
.sc-reopen {
	position: fixed;
	left: 12px;
	bottom: 12px;
	z-index: calc(var(--sc-z) - 1);
	padding: 8px 12px;
	min-height: 40px;
	font-size: 13px;
	background: var(--sc-bg);
	color: var(--sc-text);
	border: 1px solid var(--sc-border);
	border-radius: var(--sc-btn-radius);
	box-shadow: 0 1px 6px rgba(0, 0, 0, 0.15);
	cursor: pointer;
}

.sc-settings-link {
	font: inherit;
	background: none;
	border: 0;
	padding: 0;
	color: inherit;
	text-decoration: underline;
	cursor: pointer;
}

.sc-cookie-table {
	width: 100%;
	border-collapse: collapse;
	margin: 0 0 1.5em;
}

.sc-cookie-table th,
.sc-cookie-table td {
	text-align: left;
	vertical-align: top;
	padding: 6px 8px;
	border: 1px solid var(--sc-border);
}

@media (max-width: 600px) {
	.sc-pos-box {
		left: 0;
		right: 0;
		bottom: 0;
		max-width: none;
		border-radius: 0;
	}

	.sc-inner {
		padding: 12px 16px;
	}

	.sc-btn {
		flex: 1 1 100%;
	}

	.sc-cookie-table thead {
		display: none;
	}

	.sc-cookie-table td {
		display: block;
		border-top: 0;
	}

	.sc-cookie-table td::before {
		content: attr(data-label) ": ";
		font-weight: 600;
	}

	.sc-cookie-table tr td:first-child {
		border-top: 1px solid var(--sc-border);
	}
}

@media (prefers-reduced-motion: reduce) {
	.sc-banner,
	.sc-overlay {
		transition: none;
	}
}
