/**
 * Complyr consent banner.
 *
 * Colour variables are injected from the settings as an inline style, so this
 * file stays cacheable.
 */

:root {
	--complyr-accent: #1e5eff;
	--complyr-bg: #0f1524;
	--complyr-text: #f3f5f9;
	--complyr-radius: 14px;
}

.complyr-scroll-locked {
	overflow: hidden;
}

.complyr-banner {
	position: fixed;
	z-index: 2147482000;
	left: 0;
	right: 0;
	background: var( --complyr-bg );
	color: var( --complyr-text );
	font: 15px/1.55 inherit;
	box-shadow: 0 -8px 40px rgba( 0, 0, 0, 0.28 );
}

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

.complyr-banner--bottom {
	bottom: 0;
}

.complyr-banner--top {
	top: 0;
	box-shadow: 0 8px 40px rgba( 0, 0, 0, 0.28 );
}

.complyr-banner__inner {
	max-width: 1180px;
	margin: 0 auto;
	padding: 22px clamp( 16px, 4vw, 32px );
	display: grid;
	gap: 18px;
	align-items: start;
}

.complyr-banner--bar .complyr-banner__inner {
	grid-template-columns: minmax( 0, 1fr ) auto;
}

.complyr-banner--bar .complyr-preferences {
	grid-column: 1 / -1;
}

/* Box layout: a card in the corner. */
.complyr-banner--box {
	left: auto;
	right: clamp( 12px, 3vw, 28px );
	bottom: clamp( 12px, 3vw, 28px );
	max-width: 420px;
	border-radius: var( --complyr-radius );
}

.complyr-banner--box.complyr-banner--top {
	top: clamp( 12px, 3vw, 28px );
	bottom: auto;
}

/* Centre layout: a dialog. */
.complyr-banner--centre {
	top: 50%;
	left: 50%;
	right: auto;
	bottom: auto;
	transform: translate( -50%, -50% );
	max-width: 560px;
	width: calc( 100vw - 32px );
	border-radius: var( --complyr-radius );
	max-height: 86vh;
	overflow-y: auto;
}

.complyr-banner--modal::before {
	content: "";
	position: fixed;
	inset: 0;
	background: rgba( 4, 8, 16, 0.6 );
	z-index: -1;
}

.complyr-banner__title {
	margin: 0 0 8px;
	font-size: 17px;
	font-weight: 650;
	line-height: 1.35;
	color: var( --complyr-text );
}

.complyr-banner__message {
	margin: 0;
	opacity: 0.88;
}

.complyr-banner__message p {
	margin: 0 0 8px;
}

.complyr-banner__message p:last-child {
	margin-bottom: 0;
}

.complyr-banner__policy {
	margin: 10px 0 0;
	font-size: 13px;
}

.complyr-banner__policy a {
	color: var( --complyr-text );
	text-decoration: underline;
	text-underline-offset: 2px;
}

.complyr-banner__actions {
	display: flex;
	flex-wrap: wrap;
	gap: 10px;
	align-items: center;
}

.complyr-banner--box .complyr-banner__actions,
.complyr-banner--centre .complyr-banner__actions {
	flex-direction: column;
	align-items: stretch;
}

/* Buttons */

.complyr-btn {
	appearance: none;
	cursor: pointer;
	border: 1px solid transparent;
	border-radius: 8px;
	padding: 11px 20px;
	font: inherit;
	font-size: 14px;
	font-weight: 600;
	line-height: 1.2;
	transition: background-color 0.15s ease, border-color 0.15s ease, color 0.15s ease;
}

.complyr-btn--small {
	padding: 8px 14px;
	font-size: 13px;
}

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

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

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

.complyr-btn--secondary:hover {
	background: rgba( 255, 255, 255, 0.08 );
}

.complyr-btn--ghost {
	background: transparent;
	border-color: transparent;
	color: var( --complyr-text );
	text-decoration: underline;
	text-underline-offset: 3px;
	padding-left: 8px;
	padding-right: 8px;
}

.complyr-btn--ghost:hover {
	background: rgba( 255, 255, 255, 0.08 );
}

.complyr-btn:focus-visible,
.complyr-reopen:focus-visible,
.complyr-inline-preferences:focus-visible {
	outline: 3px solid var( --complyr-accent );
	outline-offset: 2px;
}

/* Preferences panel */

.complyr-preferences {
	border-top: 1px solid rgba( 255, 255, 255, 0.14 );
	padding-top: 16px;
}

.complyr-preferences[hidden] {
	display: none;
}

.complyr-preferences__intro {
	font-size: 14px;
	opacity: 0.85;
	margin-bottom: 14px;
}

.complyr-preferences__intro p {
	margin: 0;
}

.complyr-preferences__list {
	list-style: none;
	margin: 0 0 16px;
	padding: 0;
	display: grid;
	gap: 12px;
}

@media ( min-width: 720px ) {
	.complyr-preferences__list {
		grid-template-columns: repeat( 2, minmax( 0, 1fr ) );
	}
}

.complyr-preferences__item {
	background: rgba( 255, 255, 255, 0.05 );
	border: 1px solid rgba( 255, 255, 255, 0.1 );
	border-radius: 10px;
	padding: 12px 14px;
}

.complyr-preferences__control {
	display: flex;
	align-items: center;
	gap: 9px;
	flex-wrap: wrap;
}

.complyr-preferences__control input {
	width: 18px;
	height: 18px;
	accent-color: var( --complyr-accent );
	flex: none;
	margin: 0;
}

.complyr-preferences__control label {
	font-weight: 600;
	font-size: 14px;
	cursor: pointer;
}

.complyr-preferences__control input:disabled + label {
	cursor: default;
}

.complyr-preferences__badge {
	font-size: 11px;
	text-transform: uppercase;
	letter-spacing: 0.05em;
	padding: 2px 7px;
	border-radius: 20px;
	border: 1px solid currentColor;
	opacity: 0.7;
}

.complyr-preferences__description {
	margin: 6px 0 0;
	font-size: 13px;
	opacity: 0.8;
}

.complyr-preferences__actions {
	display: flex;
	gap: 10px;
}

/* Reopen tab */

.complyr-reopen {
	position: fixed;
	left: 16px;
	bottom: 16px;
	z-index: 2147481000;
	display: inline-flex;
	align-items: center;
	gap: 7px;
	appearance: none;
	cursor: pointer;
	border: 1px solid rgba( 255, 255, 255, 0.16 );
	background: var( --complyr-bg );
	color: var( --complyr-text );
	border-radius: 999px;
	padding: 9px 15px;
	font: inherit;
	font-size: 13px;
	font-weight: 600;
	box-shadow: 0 6px 20px rgba( 0, 0, 0, 0.24 );
}

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

.complyr-reopen:hover {
	filter: brightness( 1.15 );
}

.complyr-inline-preferences {
	appearance: none;
	background: none;
	border: 0;
	padding: 0;
	font: inherit;
	color: inherit;
	cursor: pointer;
	text-decoration: underline;
	text-underline-offset: 2px;
}

/* Blocked embed placeholder */

.complyr-embed-placeholder {
	display: flex;
	flex-direction: column;
	align-items: flex-start;
	gap: 12px;
	padding: 24px;
	border: 1px dashed rgba( 0, 0, 0, 0.24 );
	border-radius: 10px;
	background: rgba( 0, 0, 0, 0.04 );
	color: inherit;
	font-size: 14px;
}

.complyr-embed-placeholder__body p {
	margin: 6px 0 0;
}

.complyr-embed-placeholder__body strong {
	display: block;
	font-size: 15px;
}

@media ( prefers-color-scheme: dark ) {
	.complyr-embed-placeholder {
		border-color: rgba( 255, 255, 255, 0.24 );
		background: rgba( 255, 255, 255, 0.05 );
	}
}

@media ( prefers-reduced-motion: reduce ) {
	.complyr-btn {
		transition: none;
	}
}
