/**
 * AdSense Consent Banner styles.
 * Vanilla CSS, no framework, no build step. Colours come from CSS custom
 * properties set inline by PHP from the admin colour pickers.
 */

.acb-banner {
	--acb-bg: #1f2430;
	--acb-text: #f5f5f5;
	--acb-accent: #3d8bfd;

	position: fixed;
	left: 0;
	right: 0;
	z-index: 999999;
	background: var(--acb-bg);
	color: var(--acb-text);
	box-shadow: 0 -2px 12px rgba(0, 0, 0, 0.25);
	font-size: 15px;
	line-height: 1.5;
}

.acb-banner[hidden] {
	display: none;
}

.acb-pos-bottom {
	bottom: 0;
}

.acb-pos-top {
	top: 0;
	box-shadow: 0 2px 12px rgba(0, 0, 0, 0.25);
}

.acb-pos-bottom-left,
.acb-pos-bottom-right {
	bottom: 16px;
	left: auto;
	right: auto;
	max-width: 420px;
	border-radius: 10px;
}

.acb-pos-bottom-left {
	left: 16px;
}

.acb-pos-bottom-right {
	right: 16px;
}

.acb-banner__inner {
	display: flex;
	flex-wrap: wrap;
	align-items: center;
	gap: 16px;
	padding: 16px 20px;
	max-width: 1200px;
	margin: 0 auto;
}

.acb-banner__text {
	flex: 1 1 320px;
}

.acb-banner__title {
	margin: 0 0 4px;
	font-weight: 700;
}

.acb-banner__desc {
	margin: 0;
	opacity: 0.92;
}

.acb-banner__links {
	display: inline-block;
	margin-top: 6px;
}

.acb-banner__links a {
	color: var(--acb-accent);
	margin-right: 12px;
	text-decoration: underline;
}

.acb-banner__actions {
	display: flex;
	flex-wrap: wrap;
	gap: 8px;
	flex: 0 0 auto;
}

.acb-btn {
	font: inherit;
	cursor: pointer;
	border-radius: 6px;
	padding: 10px 16px;
	border: 2px solid transparent;
	white-space: nowrap;
}

.acb-btn--primary {
	background: var(--acb-accent);
	color: #fff;
}

.acb-btn--outline {
	background: transparent;
	color: var(--acb-text);
	border-color: currentColor;
}

.acb-btn--text {
	background: transparent;
	color: var(--acb-text);
	text-decoration: underline;
	padding: 10px 8px;
}

.acb-btn:hover {
	filter: brightness(1.1);
}

.acb-btn:focus-visible,
.acb-reopen:focus-visible {
	outline: 3px solid #ffb703;
	outline-offset: 2px;
}

.acb-panel {
	max-width: 1200px;
	margin: 0 auto;
	padding: 0 20px 20px;
}

.acb-panel[hidden] {
	display: none;
}

.acb-panel__title {
	font-size: 16px;
	margin: 0 0 12px;
}

.acb-panel__row {
	padding: 10px 0;
	border-top: 1px solid rgba(255, 255, 255, 0.15);
}

.acb-panel__legal {
	margin: 0 0 12px;
	font-size: 12.5px;
	opacity: 0.8;
}

.acb-switch {
	display: flex;
	align-items: center;
	gap: 10px;
	font-weight: 600;
	cursor: pointer;
	position: relative;
}

.acb-switch input[type="checkbox"] {
	position: absolute;
	opacity: 0;
	width: 40px;
	height: 22px;
	margin: 0;
	cursor: pointer;
}

.acb-switch__track {
	position: relative;
	width: 40px;
	height: 22px;
	flex: 0 0 auto;
	border-radius: 999px;
	background: rgba(255, 255, 255, 0.25);
	transition: background 0.2s ease;
}

.acb-switch__track::before {
	content: "";
	position: absolute;
	top: 2px;
	left: 2px;
	width: 18px;
	height: 18px;
	border-radius: 50%;
	background: #fff;
	transition: transform 0.2s ease;
}

.acb-switch input:checked + .acb-switch__track {
	background: var(--acb-accent);
}

.acb-switch input:checked + .acb-switch__track::before {
	transform: translateX(18px);
}

.acb-switch input:focus-visible + .acb-switch__track {
	outline: 3px solid #ffb703;
	outline-offset: 2px;
}

.acb-switch--disabled {
	cursor: default;
	opacity: 0.75;
}

.acb-switch--disabled .acb-switch__track {
	background: var(--acb-accent);
}

.acb-panel__row input[type="checkbox"] {
	width: 18px;
	height: 18px;
}

.acb-panel__hint {
	margin: 6px 0 0 50px;
	opacity: 0.85;
	font-size: 13px;
}

.acb-panel__hint a {
	color: var(--acb-accent);
	text-decoration: underline;
	display: inline-block;
	margin-top: 2px;
}

.acb-panel__actions {
	display: flex;
	justify-content: flex-end;
	gap: 8px;
	margin-top: 16px;
}

.acb-gpc-notice {
	--acb-bg: #1f2430;
	--acb-text: #f5f5f5;
	--acb-accent: #3d8bfd;

	position: fixed;
	left: 20px;
	bottom: 84px;
	z-index: 999997;
	max-width: 340px;
	background: var(--acb-bg);
	color: var(--acb-text);
	padding: 14px 16px;
	border-radius: 10px;
	box-shadow: 0 6px 18px rgba(0, 0, 0, 0.3);
	font-size: 13.5px;
	line-height: 1.5;
}

.acb-gpc-notice[hidden] {
	display: none;
}

.acb-gpc-notice p {
	margin: 0 0 8px;
}

.acb-gpc-notice__actions {
	display: flex;
	gap: 8px;
}

.acb-gpc-notice .acb-btn {
	padding: 6px 10px;
	font-size: 12.5px;
}

.acb-reopen {
	--acb-icon-opacity: 0.85;

	position: fixed;
	bottom: 20px;
	left: 20px;
	z-index: 999998;
	box-sizing: border-box !important;
	width: 50px !important;
	height: 50px !important;
	min-width: 50px !important;
	min-height: 50px !important;
	max-width: 50px !important;
	max-height: 50px !important;
	padding: 0 !important;
	margin: 0 !important;
	flex: none !important;
	border-radius: 50%;
	border: none;
	display: flex;
	align-items: center;
	justify-content: center;
	color: #fff;
	background: rgba(20, 22, 30, 0.72);
	cursor: pointer;
	line-height: 1;
	font-size: 0;
	box-shadow: 0 4px 14px rgba(0, 0, 0, 0.28);
	transition: transform 0.2s ease, box-shadow 0.2s ease, background 0.25s ease;
	animation: acb-reopen-in 0.35s ease;
}

.acb-reopen__icon {
	box-sizing: content-box !important;
	display: block !important;
	width: 24px !important;
	height: 24px !important;
	min-width: 24px !important;
	min-height: 24px !important;
	max-width: none !important;
	flex: none !important;
	opacity: var(--acb-icon-opacity, 0.85);
	transition: opacity 0.2s ease, transform 0.25s ease;
}

.acb-reopen__icon--custom {
	width: 24px !important;
	height: 24px !important;
	object-fit: contain;
}

.acb-reopen:hover,
.acb-reopen:focus-visible {
	transform: translateY(-3px) scale(1.06);
	box-shadow: 0 8px 20px rgba(0, 0, 0, 0.35);
	background: var(--acb-accent, #3d8bfd);
	background: linear-gradient(145deg, var(--acb-accent, #3d8bfd), color-mix(in srgb, var(--acb-accent, #3d8bfd) 70%, #000 20%));
}

.acb-reopen:hover .acb-reopen__icon,
.acb-reopen:focus-visible .acb-reopen__icon {
	opacity: 1;
	transform: rotate(-12deg) scale(1.08);
}

.acb-reopen:active {
	transform: translateY(-1px) scale(0.97);
}

.acb-reopen[hidden] {
	display: none;
}

@keyframes acb-reopen-in {
	from {
		opacity: 0;
		transform: translateY(10px) scale(0.85);
	}
	to {
		opacity: 1;
		transform: translateY(0) scale(1);
	}
}

@media (prefers-reduced-motion: reduce) {
	.acb-reopen {
		animation: none;
		transition: none;
	}
}

.screen-reader-text {
	position: absolute;
	width: 1px;
	height: 1px;
	overflow: hidden;
	clip: rect(1px, 1px, 1px, 1px);
	white-space: nowrap;
}

@media (max-width: 600px) {
	.acb-banner__inner {
		flex-direction: column;
		align-items: stretch;
	}

	.acb-banner__actions {
		justify-content: stretch;
	}

	.acb-btn {
		flex: 1 1 auto;
	}
}

@media (prefers-reduced-motion: no-preference) {
	.acb-banner {
		transition: transform 0.2s ease, opacity 0.2s ease;
	}
}
