/*
 * DW SEO cookie banner. Picks up the theme's colours from theme.json presets
 * where they exist; a theme can restyle it by setting these on :root:
 * --dwseo-bg, --dwseo-fg, --dwseo-accent, --dwseo-accent-fg, --dwseo-line,
 * --dwseo-radius, --dwseo-btn-radius.
 */
.dwseo-consent {
	--_bg: var(--dwseo-bg, var(--wp--preset--color--base, #fff));
	--_fg: var(--dwseo-fg, var(--wp--preset--color--contrast, #1d1d1b));
	--_accent: var(--dwseo-accent, var(--_fg));
	--_accent-fg: var(--dwseo-accent-fg, var(--_bg));
	--_line: var(--dwseo-line, rgba(127, 127, 127, 0.3));
	position: fixed;
	left: 24px;
	bottom: 24px;
	z-index: 100000;
	box-sizing: border-box;
	width: min(460px, calc(100vw - 48px));
	max-height: calc(100vh - 48px);
	overflow: auto;
	border-radius: var(--dwseo-radius, 20px);
	background: var(--_bg);
	color: var(--_fg);
	box-shadow: 0 24px 60px rgba(0, 0, 0, 0.22), 0 0 0 1px rgba(0, 0, 0, 0.06);
	font-size: 16px;
	text-align: left;
}

.dwseo-consent[hidden],
.dwseo-consent [hidden] {
	display: none !important;
}

.dwseo-consent *,
.dwseo-consent *::before,
.dwseo-consent *::after {
	box-sizing: border-box;
}

.dwseo-consent__inner {
	padding: 26px 26px 22px;
}

.dwseo-consent__title {
	margin: 0 0 8px;
	color: inherit;
	font-size: 1.25rem;
	line-height: 1.25;
}

.dwseo-consent__title:focus {
	outline: none;
}

.dwseo-consent__text {
	margin: 0;
	font-size: 0.92rem;
	line-height: 1.6;
}

.dwseo-consent__text a {
	color: inherit;
	white-space: nowrap;
	text-decoration: underline;
	text-underline-offset: 3px;
}

.dwseo-consent__choices {
	margin-top: 14px;
	padding-top: 6px;
	border-top: 1px solid var(--_line);
}

.dwseo-consent__choice {
	display: flex;
	gap: 10px;
	align-items: flex-start;
	margin: 10px 0 0;
	font-size: 0.88rem;
	line-height: 1.5;
}

.dwseo-consent__choice input {
	flex: none;
	width: 18px;
	height: 18px;
	margin: 2px 0 0;
	accent-color: var(--_accent);
}

.dwseo-consent__actions {
	display: flex;
	flex-wrap: wrap;
	gap: 10px;
	margin-top: 18px;
}

.dwseo-consent__btn {
	flex: 1 1 140px;
	margin: 0;
	padding: 11px 18px;
	border: 1.5px solid var(--_fg);
	border-radius: var(--dwseo-btn-radius, 999px);
	background: transparent;
	color: var(--_fg);
	font: inherit;
	font-size: 0.95rem;
	font-weight: 600;
	line-height: 1.2;
	cursor: pointer;
}

.dwseo-consent__btn--accept {
	border-color: var(--_accent);
	background: var(--_accent);
	color: var(--_accent-fg);
}

.dwseo-consent__btn:hover {
	opacity: 0.85;
}

.dwseo-consent__btn:focus-visible {
	outline: 3px solid var(--_accent);
	outline-offset: 2px;
}

.dwseo-consent__btn--link {
	flex: 1 1 100%;
	padding: 4px;
	border-color: transparent;
	background: none;
	font-weight: 500;
	text-decoration: underline;
	text-underline-offset: 3px;
}

@media (max-width: 600px) {
	.dwseo-consent {
		left: 12px;
		bottom: 12px;
		width: calc(100vw - 24px);
	}

	.dwseo-consent__inner {
		padding: 22px 20px 18px;
	}
}

@media (prefers-reduced-motion: no-preference) {
	.dwseo-consent:not([hidden]) {
		animation: dwseo-rise 0.25s ease-out;
	}

	@keyframes dwseo-rise {
		from {
			opacity: 0;
			transform: translateY(12px);
		}
	}
}
