/**
 * Consent control styles.
 *
 * Small on purpose: the dialog is native and the footer link inherits the
 * theme. Only the trigger spacing, the dialog surface, the focus ring, the
 * screen-reader-only live region, and reduced motion are set here.
 */

.lp-consent-trigger {
	margin: 0;
}

.lp-consent-control {
	/* Focus ring colour: 18.9:1 against the white dialog and 18.9:1 against
	 * the white page. The Save button's white text made currentColor invisible. */
	--lp-focus-ring: #111;
}

#lp-consent {
	width: calc(100% - 2rem);
	max-width: 32rem;
	max-height: calc(100vh - 2rem);
	max-height: calc(100dvh - 2rem);
	overflow: auto;
	margin: auto;
	padding: 1.5rem;
	border: 0;
	border-radius: 4px;
	background: #fff;
	color: #111;
	box-shadow: 0 1rem 3rem rgba(0, 0, 0, 0.45);
	transition: opacity 0.15s ease, transform 0.15s ease;
}

@starting-style {
	#lp-consent[open] {
		opacity: 0;
		transform: translateY(0.5rem);
	}
}

#lp-consent::backdrop {
	background: rgba(0, 0, 0, 0.6);
	transition: background-color 0.15s ease;
}

@starting-style {
	#lp-consent[open]::backdrop {
		background: rgba(0, 0, 0, 0);
	}
}

#lp-consent h2 {
	margin: 0 0 0.75rem;
	font-size: 1.25rem;
	line-height: 1.25;
}

#lp-consent p {
	margin: 0 0 1rem;
}

.lp-consent-option {
	display: flex;
	align-items: center;
	gap: 0.5rem;
}

#lp-consent-analytics {
	width: 1.15rem;
	height: 1.15rem;
	margin: 0;
}

.lp-consent-note {
	font-size: 0.875em;
}

.lp-consent-actions {
	display: flex;
	flex-wrap: wrap;
	gap: 0.5rem;
	margin: 0;
}

.lp-consent-actions button {
	font: inherit;
	padding: 0.5rem 0.9rem;
	border: 1px solid currentColor;
	border-radius: 4px;
	background: #fff;
	color: inherit;
	cursor: pointer;
}

.lp-consent-actions button[data-lp-save] {
	border-color: #111;
	background: #111;
	color: #fff;
}

#lp-consent .lp-consent-actions button[data-lp-save]:focus-visible {
	outline-color: var(--lp-focus-ring, #111);
}

#lp-consent :focus-visible,
.lp-consent-open:focus-visible {
	outline: 2px solid var(--lp-focus-ring, #111);
	outline-offset: 2px;
}

.lp-consent-live {
	position: absolute;
	width: 1px;
	height: 1px;
	margin: -1px;
	padding: 0;
	overflow: hidden;
	clip-path: inset(50%);
	white-space: nowrap;
	border: 0;
}

@media (prefers-reduced-motion: reduce) {
	#lp-consent,
	#lp-consent::backdrop {
		transition: none;
		animation: none;
	}
}
