/*!
 * SASSAN Cookies 1.0.1 — estilos con la paleta oficial del BrandBoard SASSAN.
 * #174060 · #216191 · #5B96C4 · #B3D6F1 · #E3EDFF · #626363 · #EFEFEF — KLEIN (títulos) + Nunito (texto)
 */
.sc-root,
.sc-embed,
.sc-policy,
.sc-btn {
	--sc-navy: #174060;
	--sc-blue: #216191;
	--sc-sky: #5B96C4;
	--sc-ice: #B3D6F1;
	--sc-pale: #E3EDFF;
	--sc-grey: #626363;
	--sc-light: #EFEFEF;
	--sc-white: #FFFFFF;
	--sc-font: "Nunito", system-ui, -apple-system, "Segoe UI", Roboto, Arial, sans-serif;
	--sc-font-title: "KLEIN", "Nunito", system-ui, -apple-system, "Segoe UI", Roboto, Arial, sans-serif;
	--sc-radius: 14px;
	--sc-z: 2147483000;
}

.sc-root *,
.sc-root *::before,
.sc-root *::after,
.sc-embed *,
.sc-embed *::before,
.sc-embed *::after {
	box-sizing: border-box;
}

/* ---------- Tipografía base ---------- */
.sc-root .sc-title {
	margin: 0 0 6px;
	font-family: var(--sc-font-title);
	font-size: 1.25rem;
	font-weight: 700;
	line-height: 1.25;
	color: var(--sc-navy);
	letter-spacing: 0;
	text-transform: none;
}

.sc-root .sc-text {
	margin: 0;
	font-family: var(--sc-font);
	font-size: 0.95rem;
	line-height: 1.55;
	color: var(--sc-grey);
}

.sc-root .sc-link,
.sc-root .sc-text a {
	color: var(--sc-blue);
	font-weight: 700;
	text-decoration: underline;
	text-underline-offset: 2px;
}

.sc-root .sc-link:hover,
.sc-root .sc-text a:hover {
	color: var(--sc-navy);
}

/* ---------- Botones (neutraliza estilos del tema Hello Elementor) ---------- */
button.sc-btn.sc-btn {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	min-height: 46px;
	margin: 0;
	padding: 10px 22px;
	border: 2px solid var(--sc-navy);
	border-radius: 999px;
	font-family: var(--sc-font);
	font-size: 0.95rem;
	font-weight: 700;
	line-height: 1.2;
	text-align: center;
	text-transform: none;
	letter-spacing: 0;
	white-space: nowrap;
	cursor: pointer;
	box-shadow: none;
	transition: background-color .15s ease, color .15s ease, border-color .15s ease;
}

/* Aceptar y Rechazar comparten exactamente el mismo estilo (Guía AEPD: mismo nivel y formato). */
button.sc-btn.sc-btn--solid {
	background-color: var(--sc-navy);
	border-color: var(--sc-navy);
	color: var(--sc-white);
}

button.sc-btn.sc-btn--solid:hover,
button.sc-btn.sc-btn--solid:focus-visible {
	background-color: var(--sc-blue);
	border-color: var(--sc-blue);
	color: var(--sc-white);
}

button.sc-btn.sc-btn--outline {
	background-color: var(--sc-white);
	border-color: var(--sc-blue);
	color: var(--sc-blue);
}

button.sc-btn.sc-btn--outline:hover,
button.sc-btn.sc-btn--outline:focus-visible {
	background-color: var(--sc-pale);
	border-color: var(--sc-navy);
	color: var(--sc-navy);
}

button.sc-btn.sc-btn--light {
	background-color: var(--sc-white);
	border-color: var(--sc-white);
	color: var(--sc-navy);
}

button.sc-btn.sc-btn--light:hover,
button.sc-btn.sc-btn--light:focus-visible {
	background-color: var(--sc-pale);
	border-color: var(--sc-pale);
	color: var(--sc-navy);
}

.sc-root :focus-visible,
.sc-embed :focus-visible,
button.sc-btn:focus-visible {
	outline: 3px solid var(--sc-sky);
	outline-offset: 2px;
}

/* ---------- Banner (primera capa) ---------- */
.sc-banner {
	display: none;
	position: fixed;
	left: 16px;
	right: 16px;
	bottom: 16px;
	z-index: var(--sc-z);
	margin: 0 auto;
	max-width: 1120px;
	background: var(--sc-white);
	border-top: 5px solid var(--sc-blue);
	border-radius: var(--sc-radius);
	box-shadow: 0 12px 40px rgba(23, 64, 96, .28);
	font-family: var(--sc-font);
}

html.sc-pending .sc-banner {
	display: block;
	animation: sc-in .35s ease-out both;
}

html.sc-modal-open .sc-banner {
	visibility: hidden;
}

.sc-banner__inner {
	display: flex;
	align-items: center;
	gap: 24px;
	padding: 22px 26px;
}

.sc-banner__text {
	flex: 1 1 auto;
	min-width: 0;
}

.sc-banner__actions {
	display: flex;
	flex: 0 0 auto;
	flex-wrap: wrap;
	gap: 10px;
}

@keyframes sc-in {
	from { opacity: 0; transform: translateY(16px); }
	to { opacity: 1; transform: none; }
}

/* ---------- Panel (segunda capa) ---------- */
.sc-modal[hidden] {
	display: none !important;
}

.sc-modal {
	position: fixed;
	inset: 0;
	z-index: calc(var(--sc-z) + 1);
	display: flex;
	align-items: center;
	justify-content: center;
	padding: 16px;
	font-family: var(--sc-font);
}

.sc-modal__backdrop {
	position: absolute;
	inset: 0;
	background: rgba(23, 64, 96, .55);
}

.sc-modal__dialog {
	position: relative;
	display: flex;
	flex-direction: column;
	width: 100%;
	max-width: 720px;
	max-height: calc(100vh - 32px);
	max-height: calc(100dvh - 32px);
	background: var(--sc-white);
	border-radius: var(--sc-radius);
	box-shadow: 0 20px 60px rgba(23, 64, 96, .35);
	overflow: hidden;
	animation: sc-in .25s ease-out both;
}

.sc-modal__dialog:focus {
	outline: none;
}

.sc-modal__header {
	display: flex;
	align-items: center;
	justify-content: space-between;
	gap: 12px;
	padding: 18px 22px;
	background: var(--sc-navy);
}

.sc-root .sc-modal__header .sc-title {
	margin: 0;
	color: var(--sc-white);
}

button.sc-close.sc-close {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	width: 40px;
	height: 40px;
	min-height: 0;
	margin: 0;
	padding: 0;
	border: 0;
	border-radius: 50%;
	background: transparent;
	color: var(--sc-white);
	cursor: pointer;
}

button.sc-close.sc-close:hover,
button.sc-close.sc-close:focus-visible {
	background: var(--sc-blue);
	color: var(--sc-white);
}

.sc-modal__body {
	flex: 1 1 auto;
	overflow-y: auto;
	padding: 20px 22px 8px;
	overscroll-behavior: contain;
}

.sc-modal__body > .sc-text {
	margin-bottom: 16px;
}

.sc-cat {
	margin: 0 0 12px;
	padding: 14px 16px;
	background: var(--sc-pale);
	border: 1px solid var(--sc-ice);
	border-radius: 10px;
}

.sc-cat__head {
	display: flex;
	align-items: center;
	justify-content: space-between;
	gap: 12px;
}

button.sc-cat__toggle.sc-cat__toggle {
	display: inline-flex;
	align-items: center;
	gap: 8px;
	margin: 0;
	padding: 4px 0;
	min-height: 0;
	border: 0;
	background: transparent;
	font-family: var(--sc-font-title);
	font-size: 1.02rem;
	font-weight: 700;
	line-height: 1.3;
	color: var(--sc-navy);
	text-align: left;
	text-transform: none;
	cursor: pointer;
}

button.sc-cat__toggle.sc-cat__toggle:hover,
button.sc-cat__toggle.sc-cat__toggle:focus-visible {
	background: transparent;
	color: var(--sc-blue);
}

.sc-chevron {
	flex: 0 0 auto;
	transition: transform .2s ease;
}

.sc-cat__toggle[aria-expanded="true"] .sc-chevron {
	transform: rotate(90deg);
}

.sc-root .sc-cat__desc {
	margin: 6px 0 0;
	font-size: 0.9rem;
	line-height: 1.5;
	color: var(--sc-grey);
}

.sc-cat__details {
	margin-top: 12px;
}

.sc-badge {
	flex: 0 0 auto;
	padding: 4px 12px;
	border-radius: 999px;
	background: var(--sc-white);
	border: 1px solid var(--sc-ice);
	font-size: 0.8rem;
	font-weight: 700;
	color: var(--sc-blue);
	white-space: nowrap;
}

/* Interruptor accesible (checkbox nativo con role="switch"). */
.sc-switch {
	position: relative;
	display: inline-block;
	flex: 0 0 auto;
	width: 52px;
	height: 30px;
	margin: 0;
	cursor: pointer;
}

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

.sc-switch__track {
	position: absolute;
	inset: 0;
	border-radius: 999px;
	background: var(--sc-light);
	border: 2px solid var(--sc-grey);
	transition: background-color .2s ease, border-color .2s ease;
}

.sc-switch__track::after {
	content: "";
	position: absolute;
	top: 3px;
	left: 3px;
	width: 20px;
	height: 20px;
	border-radius: 50%;
	background: var(--sc-grey);
	transition: transform .2s ease, background-color .2s ease;
}

.sc-switch input:checked + .sc-switch__track {
	background: var(--sc-blue);
	border-color: var(--sc-blue);
}

.sc-switch input:checked + .sc-switch__track::after {
	transform: translateX(22px);
	background: var(--sc-white);
}

.sc-switch input:focus-visible + .sc-switch__track {
	outline: 3px solid var(--sc-sky);
	outline-offset: 2px;
}

.sc-modal__footer {
	display: flex;
	justify-content: flex-end;
	flex-wrap: wrap;
	gap: 10px;
	padding: 16px 22px;
	border-top: 1px solid var(--sc-ice);
	background: var(--sc-white);
}

/* ---------- Tabla de cookies (panel y política) ---------- */
.sc-table-wrap {
	overflow-x: auto;
}

.sc-table {
	width: 100%;
	margin: 0;
	border-collapse: collapse;
	font-family: var(--sc-font);
	font-size: 0.85rem;
	line-height: 1.45;
	color: var(--sc-grey);
	background: var(--sc-white);
}

.sc-table th,
.sc-table td {
	padding: 8px 10px;
	border: 1px solid var(--sc-ice);
	text-align: left;
	vertical-align: top;
}

.sc-table th {
	background: var(--sc-navy);
	color: var(--sc-white);
	font-weight: 700;
}

.sc-table code {
	padding: 0;
	background: none;
	font-size: 0.82rem;
	color: var(--sc-navy);
	word-break: break-word;
}

.sc-policy__title {
	font-family: var(--sc-font-title);
	color: var(--sc-navy);
}

.sc-policy .sc-table-wrap {
	margin: 0 0 24px;
}

/* ---------- Botón flotante (galletita) ---------- */
button.sc-float.sc-float {
	display: none;
	position: fixed;
	left: 16px;
	bottom: 16px;
	z-index: calc(var(--sc-z) - 1);
	width: 48px;
	height: 48px;
	min-height: 0;
	margin: 0;
	padding: 0;
	align-items: center;
	justify-content: center;
	border: 2px solid var(--sc-white);
	border-radius: 50%;
	background: var(--sc-blue);
	color: var(--sc-white);
	box-shadow: 0 6px 18px rgba(23, 64, 96, .35);
	cursor: pointer;
	transition: background-color .15s ease, transform .15s ease;
}

html.sc-decided button.sc-float.sc-float {
	display: inline-flex;
}

html.sc-modal-open button.sc-float.sc-float {
	display: none;
}

button.sc-float.sc-float:hover,
button.sc-float.sc-float:focus-visible {
	background: var(--sc-navy);
	color: var(--sc-white);
	transform: scale(1.06);
}

/* ---------- Vídeo bloqueado ---------- */
.sc-embed {
	position: relative;
	display: flex;
	align-items: center;
	justify-content: center;
	width: 100%;
	min-height: 220px;
	overflow: hidden;
	border-radius: 12px;
	background: linear-gradient(135deg, var(--sc-navy) 0%, var(--sc-blue) 100%);
	color: var(--sc-white);
	font-family: var(--sc-font);
	text-align: center;
}

.sc-embed--loaded {
	min-height: 0;
	background: #000;
}

.sc-embed iframe {
	position: absolute;
	inset: 0;
	width: 100%;
	height: 100%;
	border: 0;
}

.sc-embed__inner {
	max-width: 520px;
	padding: 24px;
}

.sc-embed__icon {
	color: var(--sc-ice);
}

.sc-embed .sc-embed__title {
	margin: 8px 0 6px;
	font-family: var(--sc-font-title);
	font-size: 1.15rem;
	font-weight: 700;
	line-height: 1.3;
	color: var(--sc-white);
}

.sc-embed .sc-embed__text {
	margin: 0 0 16px;
	font-size: 0.92rem;
	line-height: 1.5;
	color: var(--sc-pale);
}

.sc-embed__actions {
	display: flex;
	flex-wrap: wrap;
	align-items: center;
	justify-content: center;
	gap: 12px 18px;
}

.sc-embed a.sc-embed__link {
	color: var(--sc-white);
	font-weight: 700;
	text-decoration: underline;
	text-underline-offset: 2px;
}

.sc-embed a.sc-embed__link:hover {
	color: var(--sc-ice);
}

/* ---------- Móvil ---------- */
@media (max-width: 860px) {
	.sc-banner__inner {
		flex-direction: column;
		align-items: stretch;
		gap: 16px;
		padding: 18px;
	}

	.sc-banner__actions {
		display: grid;
		grid-template-columns: 1fr 1fr;
	}

	/* Aceptar y Rechazar, lado a lado y del mismo tamaño; Configurar debajo. */
	.sc-banner__actions [data-sc-action="settings"] {
		grid-column: 1 / -1;
		order: 3;
	}

	.sc-banner__actions [data-sc-action="reject"] {
		order: 1;
	}

	.sc-banner__actions [data-sc-action="accept"] {
		order: 2;
	}

	button.sc-btn.sc-btn {
		width: 100%;
		padding: 10px 14px;
		white-space: normal;
	}

	.sc-modal {
		padding: 0;
		align-items: flex-end;
	}

	.sc-modal__dialog {
		max-width: none;
		max-height: 92vh;
		max-height: 92dvh;
		border-radius: var(--sc-radius) var(--sc-radius) 0 0;
	}

	.sc-modal__footer {
		display: grid;
		grid-template-columns: 1fr 1fr;
	}

	.sc-modal__footer [data-sc-action="save"] {
		grid-column: 1 / -1;
		order: 3;
	}

	/* Tabla apilada en móvil. */
	.sc-table thead {
		display: none;
	}

	.sc-table,
	.sc-table tbody,
	.sc-table tr,
	.sc-table td {
		display: block;
		width: 100%;
	}

	.sc-table tr {
		margin-bottom: 8px;
		border: 1px solid var(--sc-ice);
	}

	.sc-table td {
		border: 0;
		border-bottom: 1px solid var(--sc-light);
	}

	.sc-table td::before {
		content: attr(data-label) ": ";
		font-weight: 700;
		color: var(--sc-navy);
	}
}

@media (max-width: 380px) {
	.sc-banner__actions,
	.sc-modal__footer {
		grid-template-columns: 1fr;
	}
}

@media (prefers-reduced-motion: reduce) {
	.sc-banner,
	.sc-modal__dialog,
	.sc-chevron,
	button.sc-float.sc-float {
		animation: none !important;
		transition: none !important;
	}
}

@media print {
	.sc-root {
		display: none !important;
	}
}
