/* AriConsent banner. Accept and Reject share one style on purpose: refusing must be as easy as accepting. */
.ariconsent-root {
	--ariconsent-accent: #1d4ed8;
	--ariconsent-accent-text: #fff;
	--ariconsent-bg: #fff;
	--ariconsent-fg: #111827;
	--ariconsent-muted: #4b5563;
	--ariconsent-border: #d1d5db;
	--ariconsent-radius: 10px;
	--ariconsent-shadow: 0 10px 30px rgba(0, 0, 0, 0.18);
	font-size: 16px;
	line-height: 1.5;
}

.ariconsent--dark {
	--ariconsent-bg: #111827;
	--ariconsent-fg: #f9fafb;
	--ariconsent-muted: #d1d5db;
	--ariconsent-border: #374151;
}

.ariconsent-root *,
.ariconsent-root *::before,
.ariconsent-root *::after {
	box-sizing: border-box;
}

.ariconsent-banner {
	position: fixed;
	z-index: 2147483000;
	background: var(--ariconsent-bg);
	color: var(--ariconsent-fg);
	box-shadow: var(--ariconsent-shadow);
	font-family: inherit;
}

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

/* Bar layout */
.ariconsent--bar .ariconsent-banner {
	left: 0;
	right: 0;
	display: flex;
	flex-wrap: wrap;
	align-items: center;
	justify-content: space-between;
	gap: 1rem 2rem;
	padding: 1.25rem max(1rem, calc((100vw - 72rem) / 2));
}

.ariconsent--bar.ariconsent--bottom .ariconsent-banner {
	bottom: 0;
	border-top: 1px solid var(--ariconsent-border);
}

.ariconsent--bar.ariconsent--top .ariconsent-banner {
	top: 0;
	border-bottom: 1px solid var(--ariconsent-border);
}

.ariconsent--bar .ariconsent-banner__body {
	flex: 1 1 32rem;
}

/* Box layout */
.ariconsent--box .ariconsent-banner {
	left: 1rem;
	width: min(26rem, calc(100vw - 2rem));
	padding: 1.25rem;
	border-radius: var(--ariconsent-radius);
	border: 1px solid var(--ariconsent-border);
}

.ariconsent--box.ariconsent--bottom .ariconsent-banner {
	bottom: 1rem;
}

.ariconsent--box.ariconsent--top .ariconsent-banner {
	top: 1rem;
}

/* Modal layout */
.ariconsent--modal.is-open::before {
	content: "";
	position: fixed;
	inset: 0;
	z-index: 2147482999;
	background: rgba(17, 24, 39, 0.55);
}

.ariconsent--modal .ariconsent-banner {
	top: 50%;
	left: 50%;
	transform: translate(-50%, -50%);
	width: min(34rem, calc(100vw - 2rem));
	max-height: calc(100vh - 2rem);
	overflow: auto;
	padding: 1.5rem;
	border-radius: var(--ariconsent-radius);
}

.ariconsent-banner__title {
	margin: 0 0 0.35rem;
	font-size: 1.125rem;
	line-height: 1.3;
	color: inherit;
}

.ariconsent-banner__text {
	margin: 0;
	color: var(--ariconsent-muted);
}

.ariconsent-banner a,
.ariconsent-dialog a {
	color: inherit;
	text-decoration: underline;
}

.ariconsent-banner__actions,
.ariconsent-dialog__actions {
	display: flex;
	flex-wrap: wrap;
	gap: 0.5rem;
	align-items: center;
}

.ariconsent--box .ariconsent-banner__actions,
.ariconsent--modal .ariconsent-banner__actions {
	margin-top: 1rem;
}

.ariconsent-btn {
	min-height: 44px;
	padding: 0.6rem 1.15rem;
	border-radius: 6px;
	font: inherit;
	font-weight: 600;
	cursor: pointer;
	line-height: 1.2;
}

.ariconsent-btn--choice {
	background: var(--ariconsent-accent);
	color: var(--ariconsent-accent-text);
	border: 2px solid var(--ariconsent-accent);
}

.ariconsent-btn--link {
	background: transparent;
	color: inherit;
	border: 2px solid var(--ariconsent-border);
}

.ariconsent-btn:hover {
	filter: brightness(1.08);
}

.ariconsent-root :focus-visible,
.ariconsent-embed :focus-visible {
	outline: 3px solid var(--ariconsent-accent);
	outline-offset: 2px;
}

.ariconsent--dark :focus-visible {
	outline-color: #fff;
}

/* Preferences dialog */
.ariconsent-dialog {
	width: min(40rem, calc(100vw - 2rem));
	max-height: calc(100vh - 2rem);
	padding: 0;
	border: 0;
	border-radius: var(--ariconsent-radius);
	background: var(--ariconsent-bg);
	color: var(--ariconsent-fg);
	box-shadow: var(--ariconsent-shadow);
}

.ariconsent-dialog::backdrop {
	background: rgba(17, 24, 39, 0.55);
}

.ariconsent-dialog__inner {
	padding: 1.5rem;
}

.ariconsent-dialog__head {
	display: flex;
	justify-content: space-between;
	align-items: center;
	gap: 1rem;
}

.ariconsent-dialog__head h2 {
	margin: 0;
	font-size: 1.25rem;
	color: inherit;
}

.ariconsent-close {
	width: 44px;
	height: 44px;
	border: 0;
	border-radius: 6px;
	background: transparent;
	color: inherit;
	font-size: 1.75rem;
	line-height: 1;
	cursor: pointer;
}

.ariconsent-dialog__intro {
	color: var(--ariconsent-muted);
}

.ariconsent-gpc {
	margin: 0.5rem 0 0;
	font-size: 0.875em;
	color: var(--ariconsent-muted);
}

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

.ariconsent-cat__row {
	display: flex;
	justify-content: space-between;
	align-items: center;
	gap: 1rem;
}

.ariconsent-cat__name {
	font-weight: 700;
}

.ariconsent-cat__desc {
	margin: 0.35rem 0 0;
	color: var(--ariconsent-muted);
	font-size: 0.95em;
}

.ariconsent-cat__always {
	font-size: 0.9em;
	font-weight: 600;
	color: var(--ariconsent-muted);
}

.ariconsent-cat__services {
	margin-top: 0.5rem;
	font-size: 0.95em;
}

.ariconsent-cat__services summary {
	cursor: pointer;
	min-height: 24px;
}

.ariconsent-cat__services ul {
	margin: 0.5rem 0 0;
	padding-left: 1.25rem;
}

.ariconsent-switch {
	display: flex;
	align-items: center;
	gap: 0.75rem;
	cursor: pointer;
	position: relative;
	flex: 1;
}

.ariconsent-switch input {
	position: absolute;
	opacity: 0;
	width: 52px;
	height: 30px;
	right: 0;
	margin: 0;
	cursor: pointer;
	z-index: 1;
}

.ariconsent-switch__track {
	position: relative;
	margin-left: auto;
	width: 52px;
	height: 30px;
	flex: none;
	border-radius: 999px;
	background: #6b7280;
	transition: background 0.15s;
}

.ariconsent-switch__track::after {
	content: "";
	position: absolute;
	top: 3px;
	left: 3px;
	width: 24px;
	height: 24px;
	border-radius: 50%;
	background: #fff;
	transition: transform 0.15s;
}

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

.ariconsent-switch input:checked + .ariconsent-switch__track::after {
	transform: translateX(22px);
}

.ariconsent-switch input:disabled + .ariconsent-switch__track {
	opacity: 0.6;
}

.ariconsent-switch input:focus-visible + .ariconsent-switch__track {
	outline: 3px solid var(--ariconsent-accent);
	outline-offset: 2px;
}

/* Single-service switches inside a category */
.ariconsent-cat__services .ariconsent-svc-list {
	padding-left: 0;
	list-style: none;
}

.ariconsent-svc {
	padding: 0.4rem 0;
	border-top: 1px dashed var(--ariconsent-border);
}

.ariconsent-svc__name {
	font-weight: 400;
}

.ariconsent-switch--small input,
.ariconsent-switch--small .ariconsent-switch__track {
	width: 40px;
	height: 24px;
}

.ariconsent-switch--small .ariconsent-switch__track::after {
	width: 18px;
	height: 18px;
}

.ariconsent-switch--small input:checked + .ariconsent-switch__track::after {
	transform: translateX(16px);
}

/* The buttons stay in reach at the bottom while the categories scroll, so a visitor on a phone
   never has to scroll past every category to save or reject. */
.ariconsent-dialog__actions {
	position: sticky;
	bottom: 0;
	margin: 0 -1.5rem -1.5rem;
	padding: 1rem 1.5rem 1.5rem;
	background: var(--ariconsent-bg);
	border-top: 1px solid var(--ariconsent-border);
}

/* Reopen button */
.ariconsent-reopen {
	position: fixed;
	z-index: 2147482998;
	left: 1rem;
	bottom: 1rem;
	width: 48px;
	height: 48px;
	border-radius: 50%;
	border: 1px solid var(--ariconsent-border);
	background: var(--ariconsent-bg);
	color: var(--ariconsent-fg);
	box-shadow: var(--ariconsent-shadow);
	cursor: pointer;
	display: grid;
	place-items: center;
}

/* Blocked embeds */
.ariconsent-embed {
	width: 100%;
	max-width: 100%;
	/* No min-height here: an explicit one would stop the box growing to fit the placeholder on a
	   narrow phone, and the text and buttons would spill out of it. The placeholder sets its own. */
	aspect-ratio: 16 / 9;
	display: flex;
	align-items: center;
	justify-content: center;
	background: #f3f4f6;
	color: #111827;
	border-radius: 8px;
}

.ariconsent-embed.is-loaded {
	display: block;
	background: none;
	min-height: 0;
	overflow: hidden;
}

.ariconsent-embed iframe {
	width: 100%;
	height: 100%;
	border: 0;
}

.ariconsent-embed__placeholder {
	box-sizing: border-box;
	width: 100%;
	min-height: 12rem;
	display: flex;
	flex-direction: column;
	align-items: center;
	justify-content: center;
	gap: 0.5rem;
	padding: 1rem;
	text-align: center;
	--ariconsent-accent: #1d4ed8;
	--ariconsent-accent-text: #fff;
	--ariconsent-border: #9ca3af;
}

.ariconsent-embed__placeholder p {
	margin: 0;
	max-width: 32rem;
}

.ariconsent-embed__actions {
	display: flex;
	flex-wrap: wrap;
	justify-content: center;
	gap: 0.5rem;
	margin-top: 0.25rem;
}

.ariconsent-embed__title {
	font-weight: 700;
}

/* Cookie declaration */
.ariconsent-declaration__table {
	width: 100%;
	table-layout: fixed;
	border-collapse: collapse;
	overflow-wrap: anywhere;
	margin-bottom: 1.5rem;
}

.ariconsent-declaration__table th,
.ariconsent-declaration__table td {
	padding: 0.4rem 0.5rem;
	border-bottom: 1px solid #d1d5db;
	text-align: left;
	vertical-align: top;
}

.ariconsent-settings-link {
	font: inherit;
	cursor: pointer;
	min-height: 44px;
}

.ariconsent-sr {
	position: absolute !important;
	width: 1px;
	height: 1px;
	overflow: hidden;
	clip: rect(0 0 0 0);
	clip-path: inset(50%);
	white-space: nowrap;
}

@media (max-width: 600px) {
	.ariconsent-banner__actions .ariconsent-btn,
	.ariconsent-dialog__actions .ariconsent-btn {
		flex: 1 1 100%;
	}
}

@media (prefers-reduced-motion: reduce) {
	.ariconsent-switch__track,
	.ariconsent-switch__track::after {
		transition: none;
	}
}

@media print {
	.ariconsent-root {
		display: none !important;
	}
}
