/* Gestor de consentimiento de cookies - estilos del banner, la pestana y los marcadores de contenido bloqueado */

.cst-banner,
.cst-pestana,
.cst-marcador {
	--cst-principal: #3f7f75;        /* color del boton Aceptar, enlaces e interruptores */
	--cst-principal-oscuro: #33685f;
	--cst-texto: #222222;
	--cst-fondo: #ffffff;
	--cst-gris: #f9f9f9;
	--cst-borde: #e6e6e6;
	font-family: Arial, Helvetica, sans-serif;
	box-sizing: border-box;
	text-align: left;
}

.cst-banner *,
.cst-marcador * {
	box-sizing: border-box;
	font-family: inherit;
}

.cst-banner[hidden],
.cst-pestana[hidden],
.cst-banner [hidden] {
	display: none !important;
}

/* ---------- Banner ---------- */
.cst-banner {
	position: fixed;
	right: 10px;
	bottom: 10px;
	z-index: 99999;
	width: 526px;
	max-width: calc(100% - 20px);
	max-height: calc(100% - 20px);
	display: flex;
	flex-direction: column;
	padding: 15px 20px;
	background: var(--cst-fondo);
	color: var(--cst-texto);
	border-radius: 12px;
	box-shadow: 0 10px 20px rgba(0, 0, 0, 0.19), 0 6px 6px rgba(0, 0, 0, 0.23);
	font-size: 12px;
	line-height: 1.5;
}

.cst-cabecera {
	display: flex;
	align-items: center;
	margin-bottom: 10px;
}

.cst-titulo {
	flex: 1;
	text-align: center;
	padding-left: 24px;
	font-size: 15px;
	font-weight: 600;
}

.cst-cerrar {
	width: 24px;
	height: 24px;
	padding: 0;
	border: 0;
	background: none;
	color: var(--cst-texto);
	font-size: 24px;
	line-height: 24px;
	cursor: pointer;
}

.cst-cuerpo {
	overflow-y: auto;
	margin-bottom: 12px;
}

.cst-mensaje {
	font-size: 12px;
	color: var(--cst-texto);
}

/* ---------- Categorias ---------- */
.cst-categorias {
	margin-top: 12px;
}

.cst-categoria {
	margin-bottom: 8px;
	background: rgba(239, 239, 239, 0.5);
	border-radius: 6px;
}

.cst-categoria-cabecera {
	display: flex;
	align-items: center;
	gap: 10px;
	padding: 0 10px;
}

.cst-categoria-titulo {
	flex: 1;
	padding: 11px 0;
	border: 0;
	background: none;
	color: var(--cst-texto);
	font-size: 14px;
	font-weight: 600;
	text-align: left;
	cursor: pointer;
}

.cst-siempre {
	color: #2e7d32;
	font-size: 12px;
	font-weight: 600;
}

.cst-categoria-flecha {
	width: 20px;
	height: 20px;
	padding: 0;
	border: 0;
	background: none;
	cursor: pointer;
}

.cst-categoria-flecha:before {
	content: "";
	display: block;
	width: 7px;
	height: 7px;
	margin: 3px auto 0;
	border-right: 2px solid #555555;
	border-bottom: 2px solid #555555;
	transform: rotate(45deg);
}

.cst-abierta .cst-categoria-flecha:before {
	margin-top: 8px;
	transform: rotate(-135deg);
}

.cst-categoria-descripcion {
	padding: 0 10px 12px;
	font-size: 12px;
	color: #444444;
}

/* Interruptor */
.cst-interruptor {
	position: relative;
	display: inline-block;
	width: 40px;
	height: 22px;
	cursor: pointer;
}

.cst-interruptor input {
	position: absolute;
	opacity: 0;
	width: 100%;
	height: 100%;
	margin: 0;
	cursor: pointer;
}

.cst-interruptor-pista {
	display: block;
	width: 40px;
	height: 22px;
	border-radius: 11px;
	background: #8a8a8a;
	transition: background 0.2s;
}

.cst-interruptor-pista:before {
	content: "";
	position: absolute;
	top: 3px;
	left: 3px;
	width: 16px;
	height: 16px;
	border-radius: 50%;
	background: #ffffff;
	transition: left 0.2s;
}

.cst-interruptor input:checked + .cst-interruptor-pista {
	background: var(--cst-principal);
}

.cst-interruptor input:checked + .cst-interruptor-pista:before {
	left: 21px;
}

.cst-interruptor input:focus-visible + .cst-interruptor-pista {
	outline: 2px solid var(--cst-texto);
	outline-offset: 2px;
}

.cst-oculto {
	position: absolute;
	width: 1px;
	height: 1px;
	overflow: hidden;
	clip: rect(0, 0, 0, 0);
}

/* ---------- Botones ---------- */
.cst-botones {
	display: flex;
	gap: 10px;
}

.cst-boton {
	flex: 1;
	min-height: 45px;
	padding: 10px;
	border: 1px solid var(--cst-borde);
	border-radius: 6px;
	background: var(--cst-gris);
	color: var(--cst-texto);
	font-size: 15px;
	font-weight: 500;
	cursor: pointer;
}

.cst-boton:hover {
	background: #efefef;
}

/* "Leer mas" es un enlace con aspecto de boton */
.cst-boton-enlace {
	display: flex;
	align-items: center;
	justify-content: center;
	text-align: center;
	text-decoration: none;
}

/* Aceptar y Denegar tienen el mismo tamano y peso visual; solo cambia el color */
.cst-boton-aceptar {
	border-color: var(--cst-principal);
	background: var(--cst-principal);
	color: #ffffff;
}

.cst-boton-aceptar:hover {
	background: var(--cst-principal-oscuro);
}

/* ---------- Enlaces legales ---------- */
.cst-enlaces {
	margin-top: 10px;
	text-align: center;
}

.cst-enlaces a {
	margin: 0 6px;
	color: var(--cst-principal);
	font-size: 12px;
	text-decoration: underline;
}

/* ---------- Pestana "Gestionar consentimiento" ---------- */
.cst-pestana {
	position: fixed;
	right: 40px;
	bottom: 0;
	z-index: 99998;
	padding: 9px 15px;
	border: 0;
	border-radius: 12px 12px 0 0;
	background: var(--cst-fondo);
	color: var(--cst-texto);
	box-shadow: 0 0 10px rgba(0, 0, 0, 0.3);
	font-size: 13px;
	cursor: pointer;
}

.cst-pestana:hover {
	color: var(--cst-principal);
}

/* ---------- Marcador de contenido bloqueado (iframes) ---------- */
.cst-marcador {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	max-width: 100%;
	min-height: 160px;
	padding: 20px;
	background: #ececec;
	border: 1px solid #d5d5d5;
	color: var(--cst-texto);
	text-align: center;
	vertical-align: top;
}

.cst-marcador-interior {
	max-width: 420px;
}

.cst-marcador p {
	margin: 0 0 14px;
	font-size: 14px;
	line-height: 1.5;
}

.cst-marcador .cst-boton {
	flex: none;
	padding: 10px 18px;
}

/* ---------- Pantallas estrechas ---------- */
@media (max-width: 600px) {
	.cst-banner {
		right: 0;
		bottom: 0;
		width: 100%;
		max-width: 100%;
		border-radius: 12px 12px 0 0;
	}

	.cst-botones {
		flex-direction: column;
	}

	.cst-pestana {
		right: 10px;
	}
}

@media print {
	.cst-banner,
	.cst-pestana {
		display: none !important;
	}
}
