/**
 * RAMSI Cookies — estilos del front-end.
 *
 * Los colores salen de variables que PHP inyecta desde la configuración.
 * Namespace .rc- para no chocar con Elementor ni con el tema.
 */

:root {
	--rc-bg: #ffffff;
	--rc-text: #1a1a1a;
	--rc-btn-bg: #333333;
	--rc-btn-text: #ffffff;
	--rc-link: #1a1a1a;
	--rc-radius: 6px;
	--rc-muted: #5b5b5b;
	--rc-border: #d6d6d6;
}

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

/* --------------------------------------------------------------------- */
/* Primera capa                                                           */
/* --------------------------------------------------------------------- */

.rc-banner {
	position: fixed;
	inset: 0;
	z-index: 999990;
	display: flex;
	padding: 16px;
	font-family: inherit;
	line-height: 1.5;
}

.rc-banner[hidden],
.rc-modal[hidden],
.rc-float[hidden] {
	display: none !important;
}

.rc-banner__backdrop {
	position: absolute;
	inset: 0;
	background: rgba(0, 0, 0, 0.45);
}

.rc-banner__box {
	position: relative;
	z-index: 1;
	width: 100%;
	max-width: 600px;
	max-height: calc(100vh - 32px);
	overflow-y: auto;
	padding: 24px;
	background: var(--rc-bg);
	color: var(--rc-text);
	border-radius: var(--rc-radius);
	box-shadow: 0 10px 40px rgba(0, 0, 0, 0.25);
	box-sizing: border-box;
}

/* Centrado: el patrón de la maqueta. */
.rc-banner--center {
	align-items: center;
	justify-content: center;
}

/* Variantes sin bloqueo visual del resto de la página. */
.rc-banner--bottom-left,
.rc-banner--bottom-right,
.rc-banner--bottom {
	inset: auto 0 0 0;
	pointer-events: none;
}

.rc-banner--bottom-left .rc-banner__backdrop,
.rc-banner--bottom-right .rc-banner__backdrop,
.rc-banner--bottom .rc-banner__backdrop {
	display: none;
}

.rc-banner--bottom-left .rc-banner__box,
.rc-banner--bottom-right .rc-banner__box,
.rc-banner--bottom .rc-banner__box {
	pointer-events: auto;
	box-shadow: 0 -2px 24px rgba(0, 0, 0, 0.18);
}

.rc-banner--bottom-left {
	justify-content: flex-start;
}

.rc-banner--bottom-right {
	justify-content: flex-end;
}

.rc-banner--bottom {
	justify-content: center;
}

.rc-banner--bottom .rc-banner__box {
	max-width: 1100px;
}

.rc-banner__title {
	margin: 0 0 12px;
	font-size: 20px;
	font-weight: 700;
	color: var(--rc-text);
	line-height: 1.3;
}

.rc-banner__text {
	margin: 0 0 20px;
	font-size: 14px;
	color: var(--rc-text);
}

.rc-banner__text p {
	margin: 0 0 12px;
}

.rc-banner__text p:last-child {
	margin-bottom: 0;
}

.rc-banner__actions {
	display: flex;
	flex-direction: column;
	gap: 10px;
	margin-bottom: 18px;
}

.rc-banner__links,
.rc-modal__links {
	display: flex;
	flex-wrap: wrap;
	align-items: center;
	justify-content: center;
	gap: 8px 18px;
	margin: 0;
	padding: 0;
	list-style: none;
	font-size: 13px;
}

.rc-banner__links li,
.rc-modal__links li {
	position: relative;
	margin: 0;
}

/* Separador vertical entre enlaces, como en la maqueta. */
.rc-banner__links li + li::before,
.rc-modal__links li + li::before {
	content: "";
	position: absolute;
	left: -9px;
	top: 50%;
	transform: translateY(-50%);
	width: 1px;
	height: 14px;
	background: var(--rc-border);
}

.rc-banner__links a,
.rc-modal__links a {
	color: var(--rc-link);
	text-decoration: underline;
}

/* --------------------------------------------------------------------- */
/* Botones                                                                */
/* --------------------------------------------------------------------- */

/*
 * Aceptar y rechazar comparten exactamente la misma clase, y por tanto el
 * mismo tamaño, color y posición. No modifiques esto para destacar el botón
 * de aceptar: la Guía de cookies de la AEPD lo considera un patrón oscuro y
 * invalida el consentimiento obtenido así.
 */
.rc-btn {
	display: block;
	width: 100%;
	margin: 0;
	padding: 12px 20px;
	font-family: inherit;
	font-size: 15px;
	font-weight: 500;
	line-height: 1.4;
	text-align: center;
	border: 1px solid transparent;
	border-radius: var(--rc-radius);
	cursor: pointer;
	transition: opacity 0.15s ease;
	box-sizing: border-box;
}

.rc-btn:hover {
	opacity: 0.88;
}

.rc-btn:focus-visible {
	outline: 2px solid var(--rc-btn-bg);
	outline-offset: 2px;
}

.rc-btn--primary {
	background: var(--rc-btn-bg);
	color: var(--rc-btn-text);
	border-color: var(--rc-btn-bg);
}

.rc-btn--ghost {
	background: transparent;
	color: var(--rc-text);
	border-color: var(--rc-border);
}

.rc-link-button {
	padding: 0;
	background: none;
	border: 0;
	font: inherit;
	color: inherit;
	text-decoration: underline;
	cursor: pointer;
}

/* --------------------------------------------------------------------- */
/* Segunda capa                                                           */
/* --------------------------------------------------------------------- */

.rc-modal {
	position: fixed;
	inset: 0;
	z-index: 999995;
	display: flex;
	align-items: center;
	justify-content: center;
	padding: 16px;
	font-family: inherit;
	line-height: 1.5;
}

.rc-modal__backdrop {
	position: absolute;
	inset: 0;
	background: rgba(0, 0, 0, 0.5);
}

.rc-modal__box {
	position: relative;
	z-index: 1;
	display: flex;
	flex-direction: column;
	width: 100%;
	max-width: 680px;
	max-height: calc(100vh - 32px);
	background: var(--rc-bg);
	color: var(--rc-text);
	border-radius: var(--rc-radius);
	box-shadow: 0 10px 40px rgba(0, 0, 0, 0.3);
	box-sizing: border-box;
}

.rc-modal__head {
	display: flex;
	align-items: center;
	justify-content: space-between;
	gap: 16px;
	padding: 20px 24px;
	border-bottom: 1px solid var(--rc-border);
}

.rc-modal__title {
	margin: 0;
	font-size: 18px;
	font-weight: 700;
	line-height: 1.3;
}

.rc-modal__close {
	flex: 0 0 auto;
	width: 32px;
	height: 32px;
	padding: 0;
	font-size: 24px;
	line-height: 1;
	color: var(--rc-text);
	background: none;
	border: 0;
	border-radius: var(--rc-radius);
	cursor: pointer;
}

.rc-modal__body {
	flex: 1 1 auto;
	overflow-y: auto;
	padding: 20px 24px;
	font-size: 14px;
	-webkit-overflow-scrolling: touch;
}

.rc-modal__intro {
	margin: 0 0 20px;
	color: var(--rc-muted);
}

.rc-modal__foot {
	display: flex;
	flex-wrap: wrap;
	gap: 10px;
	padding: 16px 24px;
	border-top: 1px solid var(--rc-border);
}

.rc-modal__foot .rc-btn {
	flex: 1 1 180px;
	width: auto;
}

.rc-modal__links {
	justify-content: flex-start;
	margin-top: 20px;
}

/* --------------------------------------------------------------------- */
/* Categorías                                                             */
/* --------------------------------------------------------------------- */

.rc-cat {
	padding: 16px 0;
	border-bottom: 1px solid var(--rc-border);
}

.rc-cat:last-of-type {
	border-bottom: 0;
}

.rc-cat__head {
	display: flex;
	align-items: center;
	justify-content: space-between;
	gap: 12px;
	margin-bottom: 6px;
}

.rc-cat__label {
	font-weight: 600;
	cursor: pointer;
}

.rc-cat__always {
	flex: 0 0 auto;
	font-size: 12px;
	font-weight: 600;
	color: var(--rc-muted);
	text-transform: uppercase;
	letter-spacing: 0.03em;
}

.rc-cat__desc {
	margin: 0;
	color: var(--rc-muted);
}

/* La casilla de la categoría bloqueada no se muestra, pero sigue en el DOM
   para que los lectores de pantalla anuncien su estado. */
.rc-cat__head input[disabled] {
	position: absolute;
	width: 1px;
	height: 1px;
	overflow: hidden;
	clip: rect(0 0 0 0);
	white-space: nowrap;
}

/* Interruptor */

.rc-switch {
	position: relative;
	flex: 0 0 auto;
	display: inline-block;
	width: 44px;
	height: 24px;
}

.rc-switch input {
	position: absolute;
	inset: 0;
	width: 100%;
	height: 100%;
	margin: 0;
	opacity: 0;
	cursor: pointer;
	z-index: 1;
}

.rc-switch__track {
	position: absolute;
	inset: 0;
	background: #b9b9b9;
	border-radius: 999px;
	transition: background 0.18s ease;
}

.rc-switch__track::after {
	content: "";
	position: absolute;
	top: 3px;
	left: 3px;
	width: 18px;
	height: 18px;
	background: #ffffff;
	border-radius: 50%;
	transition: transform 0.18s ease;
}

.rc-switch input:checked + .rc-switch__track {
	background: var(--rc-btn-bg);
}

.rc-switch input:checked + .rc-switch__track::after {
	transform: translateX(20px);
}

.rc-switch input:focus-visible + .rc-switch__track {
	outline: 2px solid var(--rc-btn-bg);
	outline-offset: 2px;
}

/* --------------------------------------------------------------------- */
/* Botón flotante de revocación                                           */
/* --------------------------------------------------------------------- */

.rc-float {
	position: fixed;
	left: 18px;
	bottom: 18px;
	z-index: 999980;
	display: flex;
	align-items: center;
	justify-content: center;
	width: 42px;
	height: 42px;
	padding: 0;
	color: var(--rc-btn-text);
	background: var(--rc-btn-bg);
	border: 0;
	border-radius: 50%;
	box-shadow: 0 2px 10px rgba(0, 0, 0, 0.28);
	cursor: pointer;
	opacity: 0.75;
	transition: opacity 0.15s ease;
}

.rc-float:hover,
.rc-float:focus-visible {
	opacity: 1;
}

/* --------------------------------------------------------------------- */
/* Contenido incrustado bloqueado                                         */
/* --------------------------------------------------------------------- */

.rc-embed {
	position: relative;
	width: 100%;
	background: #f2f2f2;
	border-radius: var(--rc-radius);
	overflow: hidden;
}

.rc-embed--16-9 {
	aspect-ratio: 16 / 9;
}

.rc-embed--4-3 {
	aspect-ratio: 4 / 3;
}

.rc-embed--1-1 {
	aspect-ratio: 1 / 1;
}

.rc-embed iframe {
	display: block;
	width: 100%;
	height: 100%;
	border: 0;
}

.rc-embed__notice {
	position: absolute;
	inset: 0;
	display: flex;
	flex-direction: column;
	align-items: center;
	justify-content: center;
	gap: 14px;
	padding: 24px;
	text-align: center;
	background: #f2f2f2;
	color: var(--rc-text);
	font-size: 14px;
	box-sizing: border-box;
}

.rc-embed__notice p {
	margin: 0;
	max-width: 42ch;
}

.rc-embed__btn {
	padding: 10px 18px;
	font: inherit;
	color: var(--rc-btn-text);
	background: var(--rc-btn-bg);
	border: 0;
	border-radius: var(--rc-radius);
	cursor: pointer;
}

.rc-embed--granted .rc-embed__notice {
	display: none;
}

/* --------------------------------------------------------------------- */
/* Responsive                                                             */
/* --------------------------------------------------------------------- */

@media (max-width: 480px) {
	.rc-banner__box,
	.rc-modal__box {
		max-height: calc(100vh - 24px);
	}

	.rc-banner__box {
		padding: 20px;
	}

	.rc-banner__title {
		font-size: 18px;
	}

	.rc-modal__head,
	.rc-modal__body,
	.rc-modal__foot {
		padding-left: 18px;
		padding-right: 18px;
	}

	.rc-modal__foot .rc-btn {
		flex: 1 1 100%;
	}
}

/* --------------------------------------------------------------------- */
/* Accesibilidad                                                          */
/* --------------------------------------------------------------------- */

@media (prefers-reduced-motion: reduce) {
	.rc-btn,
	.rc-float,
	.rc-switch__track,
	.rc-switch__track::after {
		transition: none;
	}
}

@media (prefers-contrast: more) {
	.rc-banner__box,
	.rc-modal__box {
		border: 2px solid var(--rc-text);
	}
}
