/*
 * Cookie banner (inc/consent.php). No frame exists for it, so it borrows the
 * site's own parts: the black of the footer bar, the yellow of its buttons, the
 * small uppercase labels. The two buttons are the same size on purpose; the CNIL
 * expects refusing to be as easy as accepting.
 */

.ageca-consent {
	position: fixed;
	right: 1rem;
	bottom: calc(1rem + env(safe-area-inset-bottom, 0px));
	left: 1rem;
	z-index: 1000;
	box-sizing: border-box;
	max-width: 26rem;
	padding: 1.25rem;
	background-color: var(--wp--preset--color--ink);
	box-shadow: 0 16px 40px rgba(0, 0, 0, 0.25);
	color: var(--wp--preset--color--white);
}

/* Keeps the banner hidden until the script reveals it, even if a display value is
   later given to the class above, which would otherwise override [hidden]. */
.ageca-consent[hidden] {
	display: none;
}

.ageca-consent__title {
	margin: 0 0 0.5rem;
	color: var(--wp--preset--color--yellow);
	font-size: var(--wp--preset--font-size--meta);
	font-weight: 900;
	letter-spacing: 0.2em;
	line-height: 1.5;
	text-transform: uppercase;
}

.ageca-consent__text {
	margin: 0 0 1rem;
	font-size: var(--wp--preset--font-size--body-small);
	font-weight: 300;
	line-height: 1.55;
}

.ageca-consent__more {
	color: inherit;
	font-weight: 600;
}

.ageca-consent__actions {
	display: grid;
	grid-template-columns: 1fr 1fr;
	gap: 0.5rem;
}

.ageca-consent__btn {
	padding: 0.75rem 1rem;
	border: 1px solid var(--wp--preset--color--white);
	border-radius: 0;
	background: transparent;
	color: var(--wp--preset--color--white);
	font-family: inherit;
	font-size: var(--wp--preset--font-size--meta);
	font-weight: 900;
	letter-spacing: 0.167em;
	line-height: 1.33;
	text-transform: uppercase;
	cursor: pointer;
	transition: background-color 150ms ease, color 150ms ease;
}

.ageca-consent__btn--accept {
	border-color: var(--wp--preset--color--yellow);
	background-color: var(--wp--preset--color--yellow);
	color: var(--wp--preset--color--ink);
}

.ageca-consent__btn:hover,
.ageca-consent__btn:focus-visible {
	background-color: var(--wp--preset--color--white);
	color: var(--wp--preset--color--ink);
}

.ageca-consent__btn:focus-visible {
	outline: 2px solid var(--wp--preset--color--yellow);
	outline-offset: 2px;
}

@media (prefers-reduced-motion: reduce) {

	.ageca-consent__btn {
		transition: none;
	}
}
