/*
 * The cookies banner (muduex-core Consentimiento, assets/consentimiento.js).
 * Fixed at the bottom, so it shifts nothing: a card at the bottom left on
 * desktop (clear of «Volver arriba», at the right), and the full width above
 * the tab bar on phones and tablets (the bar is 3.75rem + 1px, section 4b of
 * the theme). «Aceptar» and «Rechazar» are the same button, side by side.
 * Colours from the theme's tokens: light and dark follow data-tema.
 */

.muduex-cookies {
	position: fixed;
	bottom: calc(1rem + env(safe-area-inset-bottom, 0px));
	left: max(1rem, env(safe-area-inset-left, 0px));
	z-index: 28; /* over «Volver arriba» (25), under the tab bar (30) */
	box-sizing: border-box;
	width: min(34rem, calc(100% - 2rem));
	margin: 0;
	padding: 1rem 1.25rem 1.25rem;
	border: 1px solid var(--muduex-borde-campo);
	border-radius: var(--muduex-radio-widget);
	background: var(--muduex-fondo);
	color: var(--muduex-texto);
	/* Never over the header: with large text it scrolls inside. */
	max-height: min(60dvh, calc(100dvh - 7rem));
	overflow-y: auto;
	box-shadow: 0 8px 32px rgb(0 0 0 / 22%);
	font-size: 1.125rem;
	line-height: 1.4;
}

.muduex-cookies[hidden] {
	display: none;
}

.muduex-cookies p {
	margin: 0 0 0.5rem;
}

.muduex-cookies .muduex-cookies__titulo {
	font-weight: 700;
}

.muduex-cookies a {
	color: var(--muduex-acento);
	text-decoration: underline;
}

.muduex-cookies__estado {
	font-weight: 600;
}

.muduex-cookies__botones {
	display: grid;
	grid-template-columns: 1fr 1fr;
	gap: 0.75rem;
	margin-top: 0.75rem;
}

.muduex-cookies__boton {
	min-height: 3rem;
	padding: 0.5rem 1rem;
	border: 2px solid transparent; /* drawn in forced colours */
	border-radius: var(--muduex-radio-control);
	background: var(--muduex-acento);
	color: var(--muduex-acento-contraste);
	font: inherit;
	font-weight: 600;
	cursor: pointer;
}

.muduex-cookies__boton:hover {
	text-decoration: underline;
}

@media (max-width: 1023.98px) {

	.muduex-cookies {
		bottom: calc(3.75rem + 1px + 0.5rem + env(safe-area-inset-bottom, 0px));
		left: 0.5rem;
		width: calc(100% - 1rem);
		max-height: 50dvh;
		padding: 0.875rem 1rem 1rem;
	}
}

@media (forced-colors: active) {

	.muduex-cookies {
		border-color: CanvasText;
	}
}

@media print {

	.muduex-cookies {
		display: none !important;
	}
}
