/*
 * Consent banner: a non-modal bar pinned to the bottom of the viewport, so the
 * page stays usable before a choice is made.
 *
 * Both buttons share one style on purpose: the CNIL requires refusing to be as
 * easy and as visible as accepting.
 *
 * `secondary` is the footer's own background, so the reopen link below reads
 * as part of it. The palette is overridden in the database global styles: the
 * fallbacks are those live values, not the ones in `theme.json`.
 */

.sctc-consent {
	position: fixed;
	z-index: 9999;
	inset: auto 1rem calc(1rem + env(safe-area-inset-bottom, 0px)) 1rem;
	display: flex;
	flex-wrap: wrap;
	align-items: center;
	justify-content: space-between;
	gap: 0.75rem 1.5rem;
	max-width: 60rem;
	margin-inline: auto;
	padding: 1rem 1.25rem;
	border-radius: 8px;
	background: var(--wp--preset--color--secondary, #2a2d73);
	color: #fff;
	font-size: 0.9375rem;
	line-height: 1.5;
	/* The light ring keeps the edge visible over the footer, same navy as the bar. */
	box-shadow: 0 0 0 1px rgba(255, 255, 255, 0.15), 0 2px 12px rgba(0, 0, 0, 0.2);
}

.sctc-consent[hidden] {
	display: none;
}

.sctc-consent__text {
	flex: 1 1 20rem;
	margin: 0;
}

.sctc-consent__text a {
	color: inherit;
	text-decoration: underline;
}

.sctc-consent__actions {
	display: flex;
	flex-wrap: wrap;
	gap: 0.5rem;
}

.sctc-consent__button {
	padding: 0.5rem 1.25rem;
	border: 2px solid var(--wp--preset--color--primary, #cd1a2e);
	border-radius: 4px;
	background: var(--wp--preset--color--primary, #cd1a2e);
	color: #fff;
	font: inherit;
	font-weight: 600;
	cursor: pointer;
}

.sctc-consent__button:hover {
	border-color: var(--wp--preset--color--primary-dark, #a81325);
	background: var(--wp--preset--color--primary-dark, #a81325);
}

.sctc-consent__button:focus-visible,
.sctc-consent-manage__button:focus-visible {
	outline: 2px solid #fff;
	outline-offset: 2px;
}

.sctc-consent-manage {
	margin: 0;
	padding: 0.75rem 1rem;
	background: var(--wp--preset--color--secondary, #2a2d73);
	text-align: center;
}

.sctc-consent-manage__button {
	padding: 0;
	border: 0;
	background: none;
	color: #fff;
	font: inherit;
	font-size: 0.875rem;
	text-decoration: underline;
	cursor: pointer;
}
