/* GUAY Legal — banner de cookies. Paleta: blanco, amarillo #FFD23F, naranja #FF7A1A, texto #1A1A1A.
   Tipografía heredada del tema. Contraste AA; foco visible; sin muro de cookies. */
:root {
	--guay-cc-bg: #fff;
	--guay-cc-ink: #1A1A1A;
	--guay-cc-yellow: #FFD23F;
	--guay-cc-orange: #FF7A1A;
	--guay-cc-muted: #4a4a4a;
}
.guay-embed, .guay-embed *, .guay-cc-btn { box-sizing: border-box; }
.guay-cc {
	--guay-cc-bg: #fff;
	--guay-cc-ink: #1A1A1A;
	--guay-cc-yellow: #FFD23F;
	--guay-cc-orange: #FF7A1A;
	--guay-cc-muted: #4a4a4a;
	font: inherit;
	color: var(--guay-cc-ink);
}
.guay-cc [hidden] { display: none !important; }
.guay-cc *, .guay-cc *::before, .guay-cc *::after { box-sizing: border-box; }

.guay-cc-banner {
	position: fixed;
	z-index: 99999;
	left: 16px;
	right: 16px;
	bottom: 16px;
	max-width: 1040px;
	margin: 0 auto;
	background: var(--guay-cc-bg);
	color: var(--guay-cc-ink);
	border: 2px solid var(--guay-cc-ink);
	border-radius: 16px;
	box-shadow: 0 12px 40px rgba(26, 26, 26, .18), 6px 6px 0 var(--guay-cc-yellow);
	max-height: calc(100vh - 32px);
	overflow: auto;
}
.guay-cc-banner::before {
	content: "";
	display: block;
	height: 6px;
	border-radius: 14px 14px 0 0;
	background: linear-gradient(90deg, var(--guay-cc-yellow) 0 60%, var(--guay-cc-orange) 60% 100%);
}
.guay-cc-inner {
	display: flex;
	gap: 20px 28px;
	align-items: center;
	padding: 18px 22px 20px;
}
.guay-cc-copy { flex: 1 1 auto; min-width: 0; }
.guay-cc-title {
	margin: 0 0 .35em;
	font-size: 1.05rem;
	line-height: 1.25;
	font-weight: 800;
	letter-spacing: -.01em;
	color: var(--guay-cc-ink);
}
.guay-cc-text { margin: 0; font-size: .92rem; line-height: 1.5; color: var(--guay-cc-ink); }
.guay-cc a { color: var(--guay-cc-ink); text-decoration: underline; text-decoration-thickness: 2px; text-decoration-color: var(--guay-cc-orange); text-underline-offset: 3px; }
.guay-cc a:hover { text-decoration-color: var(--guay-cc-ink); }

.guay-cc-actions { display: flex; gap: 10px; flex: 0 0 auto; flex-wrap: wrap; justify-content: flex-end; }

/* Aceptar y Rechazar: idéntico formato y prominencia (AEPD). */
.guay-cc-btn,
button.guay-cc-btn,
.guay-withdraw > summary.guay-cc-btn {
	-webkit-appearance: none;
	appearance: none;
	display: inline-flex;
	align-items: center;
	justify-content: center;
	min-height: 44px;
	min-width: 120px;
	padding: .6em 1.3em;
	border: 2px solid var(--guay-cc-ink);
	border-radius: 999px;
	font: inherit;
	font-size: .95rem;
	font-weight: 700;
	line-height: 1.1;
	cursor: pointer;
	text-decoration: none;
	transition: transform .12s ease, box-shadow .12s ease, background-color .12s ease;
}
.guay-cc-btn--choice { background: var(--guay-cc-yellow); color: var(--guay-cc-ink); }
.guay-cc-btn--choice:hover { background: #ffdc66; box-shadow: 3px 3px 0 var(--guay-cc-ink); transform: translate(-1px, -1px); }
.guay-cc-btn--ghost { background: #fff; color: var(--guay-cc-ink); }
.guay-cc-btn--ghost:hover { background: #fff6d6; }

.guay-cc button:focus-visible,
.guay-cc a:focus-visible,
.guay-cc input:focus-visible,
.guay-cc-dialog:focus-visible,
.guay-open-consent:focus-visible,
.guay-cc-float:focus-visible,
.guay-embed button:focus-visible,
.guay-withdraw > summary:focus-visible {
	outline: 3px solid var(--guay-cc-ink, #1A1A1A);
	outline-offset: 3px;
	box-shadow: 0 0 0 6px var(--guay-cc-yellow, #FFD23F);
}

/* Panel de configuración */
.guay-cc-backdrop {
	position: fixed;
	inset: 0;
	z-index: 100000;
	background: rgba(26, 26, 26, .45);
}
.guay-cc-dialog {
	position: fixed;
	z-index: 100001;
	left: 50%;
	top: 50%;
	transform: translate(-50%, -50%);
	width: min(640px, calc(100vw - 24px));
	max-height: calc(100vh - 24px);
	overflow: auto;
	background: #fff;
	color: var(--guay-cc-ink);
	border: 2px solid var(--guay-cc-ink);
	border-radius: 18px;
	box-shadow: 8px 8px 0 var(--guay-cc-yellow), 0 20px 60px rgba(0, 0, 0, .25);
	padding: 0 22px 20px;
}
.guay-cc-dhead {
	position: sticky;
	top: 0;
	display: flex;
	align-items: center;
	justify-content: space-between;
	gap: 12px;
	padding: 18px 0 10px;
	background: #fff;
	border-bottom: 3px solid var(--guay-cc-yellow);
	margin-bottom: 12px;
}
.guay-cc-dhead h2 { margin: 0; font-size: 1.2rem; font-weight: 800; color: var(--guay-cc-ink); }
.guay-cc-close {
	width: 44px; height: 44px;
	border: 2px solid var(--guay-cc-ink);
	border-radius: 50%;
	background: #fff;
	color: var(--guay-cc-ink);
	font-size: 1.5rem;
	line-height: 1;
	cursor: pointer;
}
.guay-cc-dialog p { font-size: .93rem; line-height: 1.5; margin: 0 0 12px; }
.guay-cc-cats { list-style: none; margin: 0 0 12px; padding: 0; }
.guay-cc-cat { border: 1px solid #d9d9d9; border-radius: 12px; padding: 12px 14px; margin: 0 0 10px; }
.guay-cc-cat-row { display: flex; align-items: center; justify-content: space-between; gap: 12px; }
.guay-cc-cat-label { font-weight: 700; font-size: 1rem; cursor: pointer; }
.guay-cc-cat-desc { margin: 6px 0 0 !important; color: var(--guay-cc-muted); font-size: .88rem !important; }
.guay-cc-always { font-size: .85rem; font-weight: 700; padding: .25em .7em; border-radius: 999px; background: #f1f1f1; }

/* Interruptor accesible (checkbox con role="switch") */
.guay-cc-switch {
	-webkit-appearance: none;
	appearance: none;
	position: relative;
	flex: 0 0 auto;
	width: 52px;
	height: 30px;
	margin: 0;
	border: 2px solid var(--guay-cc-ink);
	border-radius: 999px;
	background: #fff;
	cursor: pointer;
	transition: background-color .15s ease;
}
.guay-cc-switch::after {
	content: "";
	position: absolute;
	top: 3px;
	left: 3px;
	width: 20px;
	height: 20px;
	border-radius: 50%;
	background: var(--guay-cc-ink);
	transition: transform .15s ease;
}
.guay-cc-switch:checked { background: var(--guay-cc-yellow); }
.guay-cc-switch:checked::after { transform: translateX(22px); }
.guay-cc-id { font-size: .8rem !important; color: var(--guay-cc-muted); word-break: break-all; }
.guay-cc-dactions { display: flex; gap: 10px; flex-wrap: wrap; justify-content: flex-end; padding-top: 6px; }

.guay-cc-live { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }

.guay-cc-float {
	position: fixed;
	left: 16px;
	bottom: 16px;
	z-index: 9990;
	width: 48px;
	height: 48px;
	border-radius: 50%;
	border: 2px solid #1A1A1A;
	background: #FFD23F;
	font-size: 22px;
	cursor: pointer;
	box-shadow: 3px 3px 0 #1A1A1A;
}
html.guay-cc-open { overflow: hidden; }

/* Botón "Configurar cookies" del pie y de las políticas */
.guay-open-consent {
	-webkit-appearance: none;
	appearance: none;
	background: none;
	border: 0;
	padding: 0;
	font: inherit;
	color: inherit;
	text-decoration: underline;
	text-decoration-color: #FF7A1A;
	text-decoration-thickness: 2px;
	text-underline-offset: 3px;
	cursor: pointer;
}

/* Incrustaciones bloqueadas */
.guay-embed {
	position: relative;
	display: flex;
	align-items: center;
	justify-content: center;
	aspect-ratio: 16 / 9;
	width: 100%;
	margin: 1.5em 0;
	padding: 20px;
	border: 2px solid #1A1A1A;
	border-radius: 16px;
	background: repeating-linear-gradient(135deg, #fff 0 18px, #fff8dc 18px 36px);
	color: #1A1A1A;
	text-align: center;
}
.guay-embed__notice { max-width: 520px; background: #fff; border-radius: 12px; padding: 16px 18px; box-shadow: 4px 4px 0 #FFD23F; border: 2px solid #1A1A1A; }
.guay-embed__notice p { margin: 0 0 10px; font-size: .93rem; line-height: 1.5; }
.guay-embed__actions { display: flex; flex-wrap: wrap; gap: 8px; justify-content: center; margin: 0 !important; }
.guay-embed__loaded iframe { max-width: 100%; }

@media (max-width: 760px) {
	.guay-cc-banner { left: 8px; right: 8px; bottom: 8px; border-radius: 14px; max-height: 70vh; }
	.guay-cc-inner { flex-direction: column; align-items: stretch; padding: 14px 16px 16px; gap: 12px; }
	.guay-cc-text { font-size: .88rem; }
	.guay-cc-actions { display: grid; grid-template-columns: 1fr 1fr; }
	.guay-cc-actions .guay-cc-btn--ghost { grid-column: 1 / -1; }
	.guay-cc-btn { min-width: 0; width: 100%; padding: .6em .7em; white-space: nowrap; }
	.guay-cc-dactions { display: grid; grid-template-columns: 1fr 1fr; }
	.guay-cc-dactions .guay-cc-btn--ghost { grid-column: 1 / -1; }
	.guay-embed { aspect-ratio: auto; min-height: 220px; }
}

@media (prefers-reduced-motion: no-preference) {
	.guay-cc-banner:not([hidden]) { animation: guay-cc-in .35s cubic-bezier(.2, .8, .2, 1) both; }
	@keyframes guay-cc-in { from { transform: translateY(24px); opacity: 0; } to { transform: none; opacity: 1; } }
}
@media (prefers-reduced-motion: reduce) {
	.guay-cc-btn, .guay-cc-switch, .guay-cc-switch::after { transition: none; }
}
@media print { .guay-cc, .guay-cc-float { display: none !important; } }
@media (forced-colors: active) {
	.guay-cc-switch:checked { background: Highlight; }
	.guay-cc-banner, .guay-cc-dialog { border-color: CanvasText; }
}
