/*
 * Dame Alas Proyectos: aviso de cookies (banda y panel) y marcadores de contenido externo.
 * Archivo propio (no depende de front.css). Usa las variables --da-* del tema con valor de reserva.
 * Los :not(#dap) suben la especificidad frente a los estilos globales de botones de Elementor.
 */

.dap-ck, .dap-ck *, .dap-ck *::before, .dap-ck *::after,
.dap-ck-marcador, .dap-ck-marcador *, .dap-ck-marcador *::before, .dap-ck-marcador *::after { box-sizing: border-box; }

/* Lo que solo sirve con JavaScript sale oculto, y lo que es para cuando no hay JavaScript se oculta al cargar
   cookies.js (con atributo hidden; esta hoja no depende de front.css ni del tema). */
[data-dap-ck-cargar][hidden], [data-dap-ck-con-js][hidden], [data-dap-ck-sin-js][hidden] { display: none !important; }

/* ---------------------------------------------------------------- Botones */
.dap-ck-boton:not(#dap) {
	display: inline-flex; align-items: center; justify-content: center; gap: .5em;
	min-height: 48px; min-width: 44px; margin: 0; padding: .55em 1.35em;
	border: 2px solid var(--da-tinta, #1A1530); border-radius: 999px;
	background: var(--da-tinta, #1A1530); color: #fff;
	font: 800 1rem/1.15 var(--da-f-titulo, "Nunito", ui-rounded, system-ui, sans-serif);
	letter-spacing: normal; text-transform: none; text-decoration: none; text-align: center; white-space: normal;
	cursor: pointer; box-shadow: none;
}
.dap-ck-boton:not(#dap):hover { background: var(--da-magenta-hondo, #B00163); border-color: var(--da-magenta-hondo, #B00163); color: #fff; }
.dap-ck-boton:not(#dap):focus-visible { outline: 3px solid var(--da-tinta, #1A1530); outline-offset: 3px; box-shadow: 0 0 0 6px var(--da-sol, #E3B215); }
.dap-ck-boton--claro:not(#dap) { background: #fff; color: var(--da-tinta, #1A1530); border-color: #fff; }
.dap-ck-boton--claro:not(#dap):hover { background: var(--da-bruma, #F5F2FA); border-color: var(--da-bruma, #F5F2FA); color: var(--da-tinta, #1A1530); }
.dap-ck-boton--claro:not(#dap):focus-visible { outline-color: #fff; }

/* «Configurar cookies» con aspecto de enlace (pie, textos). */
.dap-ck-abrir--enlace:not(#dap) {
	display: inline; min-height: 0; margin: 0; padding: 0; border: 0; border-radius: 0;
	background: none; box-shadow: none; color: inherit;
	font: inherit; letter-spacing: inherit; text-transform: none; text-align: inherit;
	text-decoration: underline; text-underline-offset: .18em; cursor: pointer;
}
.dap-ck-abrir--enlace:not(#dap):hover { background: none; text-decoration-thickness: 2px; }
.dap-ck-abrir--enlace:not(#dap):focus-visible { outline: 3px solid currentColor; outline-offset: 3px; box-shadow: 0 0 0 6px var(--da-sol, #E3B215); border-radius: 4px; }
.menu-item-dap-cookies .dap-ck-abrir--enlace:not(#dap) { line-height: inherit; }

/* ---------------------------------------------------------------- Banda (primera capa) */
.dap-ck-banda {
	display: none; position: relative; z-index: 99990;
	background: var(--da-papel, #fff); color: var(--da-tinta, #1A1530);
	border-top: 4px solid var(--da-turquesa, #3CC2C6);
	border-bottom: 1px solid var(--da-linea, #E4DEEF);
	font: 400 1rem/1.55 var(--da-f-texto, "Atkinson Hyperlegible", Verdana, system-ui, sans-serif);
	text-align: left;
}
html.dap-ck-preguntar .dap-ck-banda,
html.dap-ck-confirmando .dap-ck-banda { display: block; }
.dap-ck-banda__envoltura {
	max-width: var(--da-ancho, 1180px); margin: 0 auto;
	padding: 18px max(16px, env(safe-area-inset-right, 0px)) 20px max(16px, env(safe-area-inset-left, 0px));
}
.dap-ck-banda__pregunta,
.dap-ck-banda__confirmacion { display: grid; gap: 14px 32px; align-items: center; }
.dap-ck-banda__confirmacion[hidden], .dap-ck-banda__pregunta[hidden] { display: none; }
.dap-ck-banda__confirmacion:focus { outline: none; }
.dap-ck-banda__confirmacion:focus-visible { outline: 3px solid var(--da-tinta, #1A1530); outline-offset: 4px; border-radius: 6px; }
.dap-ck-titulo:not(#dap) { margin: 0 0 4px; font: 900 1.2rem/1.2 var(--da-f-titulo, "Nunito", ui-rounded, system-ui, sans-serif); color: inherit; letter-spacing: normal; }
.dap-ck-banda p { margin: 0; max-width: 68em; }
.dap-ck-banda a { color: var(--da-magenta-hondo, #B00163); text-decoration: underline; text-underline-offset: .18em; }
.dap-ck-banda a:focus-visible { outline: 3px solid var(--da-tinta, #1A1530); outline-offset: 2px; box-shadow: 0 0 0 6px var(--da-sol, #E3B215); border-radius: 4px; }
.dap-ck-acciones { display: flex; flex-wrap: wrap; gap: 10px; }
.dap-ck-acciones .dap-ck-boton:not(#dap) { flex: 1 1 11em; }

@media (min-width: 64em) {
	.dap-ck-banda__pregunta { grid-template-columns: minmax(0, 1fr) auto; }
	.dap-ck-banda__pregunta .dap-ck-acciones { flex-wrap: nowrap; }
	.dap-ck-banda__pregunta .dap-ck-acciones .dap-ck-boton:not(#dap) { flex: 0 0 auto; min-width: 11em; }
	.dap-ck-banda__confirmacion { grid-template-columns: minmax(0, 1fr) auto; }
}

/*
 * En pantallas grandes la banda queda fija abajo y el JS reserva su alto al final de la página
 * (html.dap-ck-hueco), para no tapar ni el contenido del final ni el elemento con el foco.
 * En pantallas estrechas o bajas (móvil, zoom al 400 %) va en el flujo, arriba del todo.
 */
@media (min-width: 40em) and (min-height: 34em) {
	.dap-ck-banda {
		position: fixed; left: 0; right: 0; bottom: 0;
		max-height: 60vh; overflow-y: auto;
		border-bottom: 0;
		box-shadow: 0 -14px 40px rgba(26, 21, 48, .18);
		padding-bottom: env(safe-area-inset-bottom, 0px);
	}
}
html.dap-ck-hueco { scroll-padding-bottom: calc(var(--dap-ck-alto, 0px) + 16px); }
html.dap-ck-hueco body { padding-bottom: var(--dap-ck-alto, 0px); }

/* ---------------------------------------------------------------- Panel (segunda capa) */
.dap-ck-dialogo {
	border: 0; padding: 0; margin: auto;
	width: min(640px, calc(100vw - 32px)); max-width: none;
	max-height: calc(100vh - 32px); max-height: calc(100dvh - 32px);
	border-radius: var(--da-radio, 22px);
	background: var(--da-papel, #fff); color: var(--da-tinta, #1A1530);
	box-shadow: 0 30px 80px rgba(26, 21, 48, .35);
	font: 400 1rem/1.55 var(--da-f-texto, "Atkinson Hyperlegible", Verdana, system-ui, sans-serif);
	text-align: left; overflow: hidden;
}
.dap-ck-dialogo[open] { display: flex; flex-direction: column; }
.dap-ck-dialogo::backdrop { background: rgba(26, 21, 48, .72); }
.dap-ck-dialogo__cabeza {
	display: flex; align-items: center; justify-content: space-between; gap: 12px; flex: none;
	padding: 12px 12px 12px 24px; border-bottom: 1px solid var(--da-linea, #E4DEEF);
}
.dap-ck-dialogo__titulo:not(#dap) { margin: 0; font: 900 1.35rem/1.2 var(--da-f-titulo, "Nunito", ui-rounded, system-ui, sans-serif); color: inherit; letter-spacing: normal; }
.dap-ck-dialogo__titulo:focus { outline: none; }
.dap-ck-dialogo__titulo:focus-visible { outline: 3px solid var(--da-tinta, #1A1530); outline-offset: 3px; border-radius: 6px; }
.dap-ck-cerrar:not(#dap) {
	display: inline-flex; align-items: center; gap: .4em; min-height: 44px; margin: 0; padding: 0 14px;
	border: 2px solid var(--da-tinta, #1A1530); border-radius: 999px;
	background: transparent; color: var(--da-tinta, #1A1530);
	font: 800 .95rem/1 var(--da-f-titulo, "Nunito", ui-rounded, system-ui, sans-serif); cursor: pointer; box-shadow: none;
}
.dap-ck-cerrar:not(#dap):hover { background: var(--da-tinta, #1A1530); color: #fff; }
.dap-ck-cerrar:not(#dap):focus-visible { outline: 3px solid var(--da-tinta, #1A1530); outline-offset: 3px; box-shadow: 0 0 0 6px var(--da-sol, #E3B215); }
.dap-ck-dialogo__cuerpo { padding: 20px 24px; overflow: auto; flex: 1 1 auto; min-height: 0; display: grid; gap: 16px; }
.dap-ck-dialogo__cuerpo p { margin: 0; }
.dap-ck-dialogo a { color: var(--da-magenta-hondo, #B00163); text-decoration: underline; text-underline-offset: .18em; }
.dap-ck-dialogo a:focus-visible { outline: 3px solid var(--da-tinta, #1A1530); outline-offset: 2px; box-shadow: 0 0 0 6px var(--da-sol, #E3B215); border-radius: 4px; }
.dap-ck-dialogo__pie { flex: none; padding: 16px 24px 20px; border-top: 1px solid var(--da-linea, #E4DEEF); }
.dap-ck-categorias { list-style: none; margin: 0; padding: 0; display: grid; gap: 12px; }
.dap-ck-categoria { margin: 0; padding: 16px 18px; border: 1px solid var(--da-linea, #E4DEEF); border-radius: 16px; background: var(--da-papel, #fff); display: grid; gap: 8px; }
.dap-ck-categoria__cabeza { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 8px 16px; }
.dap-ck-categoria__nombre:not(#dap) { margin: 0; font: 800 1.1rem/1.25 var(--da-f-titulo, "Nunito", ui-rounded, system-ui, sans-serif); color: inherit; letter-spacing: normal; }
.dap-ck-categoria__texto { color: var(--da-tinta-suave, #4A4560); }
.dap-ck-siempre { display: inline-flex; align-items: center; gap: 8px; padding: 4px 12px; border-radius: 999px; background: var(--da-bruma, #F5F2FA); color: #21777A; font-weight: 700; font-size: .92rem; }
.dap-ck-siempre::before { content: ""; width: 9px; height: 9px; border-radius: 50%; background: currentColor; }
.dap-ck-interruptor { justify-content: flex-start; flex-wrap: nowrap; }
.dap-ck-interruptor label { cursor: pointer; }
.dap-ck-interruptor input[type="checkbox"]:not(#dap) {
	flex: none; width: 26px; height: 26px; margin: 0; cursor: pointer;
	accent-color: var(--da-magenta-hondo, #B00163);
}
.dap-ck-interruptor input[type="checkbox"]:not(#dap):focus-visible { outline: 3px solid var(--da-tinta, #1A1530); outline-offset: 3px; box-shadow: 0 0 0 6px var(--da-sol, #E3B215); }

/* Con poca altura (zoom grande, móvil apaisado) todo el panel se desplaza de una vez. */
@media (max-height: 34em) {
	.dap-ck-dialogo[open] { display: block; overflow-y: auto; }
	.dap-ck-dialogo__cuerpo { overflow: visible; }
}

/* Avisos para lectores de pantalla. */
.dap-ck-anuncio { position: absolute !important; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden; clip: rect(0 0 0 0); clip-path: inset(50%); white-space: nowrap; border: 0; }

/* ---------------------------------------------------------------- Marcadores de vídeo y contenido externo */
.dap-ck-marcador { position: relative; width: auto; flex: 1 1 100%; min-width: 0; max-width: 100%; margin: 0 0 1.5em; color: #fff; font-family: var(--da-f-texto, "Atkinson Hyperlegible", Verdana, system-ui, sans-serif); text-align: left; }
.dap-ck-marcador__marco {
	position: relative; display: grid; place-items: center; aspect-ratio: 16 / 9; width: 100%;
	padding: 20px; border-radius: var(--da-radio, 22px);
	background:
		radial-gradient(circle at 88% 12%, rgba(60, 194, 198, .35) 0 18%, transparent 19%),
		radial-gradient(circle at 10% 92%, rgba(240, 139, 188, .30) 0 16%, transparent 17%),
		var(--da-tinta, #1A1530);
}
.dap-ck-marcador__imagen { position: absolute; inset: 0; width: 100%; height: 100%; max-width: none; object-fit: cover; border-radius: inherit; }
.dap-ck-marcador__panel {
	position: relative; display: grid; gap: 10px; max-width: 36em; width: 100%;
	padding: 18px 20px; border-radius: 18px;
	background: rgba(26, 21, 48, .94); color: #fff;
}
.dap-ck-marcador__titulo:not(#dap) { display: flex; align-items: center; gap: 10px; margin: 0; font: 800 1.15rem/1.25 var(--da-f-titulo, "Nunito", ui-rounded, system-ui, sans-serif); color: #fff; }
.dap-ck-marcador__icono { flex: none; color: var(--da-turquesa, #3CC2C6); }
.dap-ck-marcador__texto:not(#dap) { margin: 0; font-size: .98rem; line-height: 1.5; color: #EDEAF5; }
.dap-ck-marcador__texto a:not(#dap) { color: #fff; font-weight: 700; text-decoration: underline; text-underline-offset: .18em; }
.dap-ck-marcador__texto a:not(#dap):hover { text-decoration-thickness: 2px; color: #fff; }
.dap-ck-marcador__texto a:not(#dap):focus-visible { outline: 3px solid #fff; outline-offset: 2px; box-shadow: 0 0 0 6px var(--da-sol, #E3B215); border-radius: 4px; }
/* Texto solo para lectores de pantalla (la página puede no cargar front.css: un vídeo suelto en una entrada). */
.dap-ck-marcador .dap-texto-lector, .dap-ck-video-enlace .dap-texto-lector { position: absolute !important; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden; clip: rect(0 0 0 0); clip-path: inset(50%); white-space: nowrap; border: 0; }
.dap-ck-marcador__acciones { display: flex; flex-wrap: wrap; align-items: center; gap: 10px 20px; }
.dap-ck-marcador__enlace:not(#dap) { color: #fff; font-weight: 700; text-decoration: underline; text-underline-offset: .18em; display: inline-flex; align-items: center; min-height: 44px; }
.dap-ck-marcador__enlace:not(#dap):hover { text-decoration-thickness: 2px; color: #fff; }
.dap-ck-marcador__enlace:not(#dap):focus-visible { outline: 3px solid #fff; outline-offset: 2px; box-shadow: 0 0 0 6px var(--da-sol, #E3B215); border-radius: 4px; }
.dap-ck-marcador__reproductor { position: relative; width: 100%; aspect-ratio: 16 / 9; border-radius: var(--da-radio, 22px); overflow: hidden; background: #000; }
.dap-ck-marcador__iframe { position: absolute; inset: 0; width: 100%; height: 100%; border: 0; }
.dap-ck-marcador__iframe:focus-visible { outline: 3px solid var(--da-sol, #E3B215); outline-offset: 3px; }
.dap-ck-marcador--externo .dap-ck-marcador__marco { aspect-ratio: auto; min-height: 220px; }
.dap-ck-marcador--externo .dap-ck-marcador__reproductor { aspect-ratio: auto; height: 450px; max-height: 80vh; }
@media (max-width: 30em) {
	.dap-ck-marcador__marco { padding: 12px; }
	.dap-ck-marcador__panel { padding: 14px 16px; }
	.dap-ck-marcador__acciones .dap-ck-boton:not(#dap) { width: 100%; }
}

/* Tablas de la política de cookies. En pantallas estrechas, cada fila es una tarjeta con la
   etiqueta de cada dato (data-etiqueta); el JS añade los roles ARIA de tabla. */
.tabla-cookies { max-width: 100%; overflow-x: auto; }
.tabla-cookies caption { text-align: left; font-weight: 800; padding: 0 0 .5em; caption-side: top; }
.tabla-cookies th[scope="row"] { overflow-wrap: break-word; }
.tabla-cookies:focus-visible { outline: 3px solid var(--da-tinta, #1A1530); outline-offset: 2px; box-shadow: 0 0 0 6px var(--da-sol, #E3B215); }
@media (max-width: 40em) {
	.tabla-cookies table, .tabla-cookies tbody, .tabla-cookies tr, .tabla-cookies th, .tabla-cookies td, .tabla-cookies caption { display: block; }
	.tabla-cookies table, .tabla-cookies.wp-block-table table { border: 0; }
	.tabla-cookies thead { position: absolute; width: 1px; height: 1px; margin: -1px; padding: 0; overflow: hidden; clip: rect(0 0 0 0); clip-path: inset(50%); white-space: nowrap; border: 0; }
	.tabla-cookies tr { margin: 0 0 12px; border: 1px solid var(--da-linea, #E2DDF0); border-radius: 14px; overflow: hidden; }
	.tabla-cookies tr:last-child { margin-bottom: 0; }
	.tabla-cookies th[scope="row"], .tabla-cookies.wp-block-table th[scope="row"] { padding: 10px 16px; border: 0; }
	.tabla-cookies td, .tabla-cookies.wp-block-table td { padding: 4px 16px; border: 0; }
	.tabla-cookies.wp-block-table td:nth-child(2), .tabla-cookies td:nth-child(2) { padding-top: 10px; }
	.tabla-cookies.wp-block-table td:last-child, .tabla-cookies td:last-child { padding-bottom: 12px; }
	.tabla-cookies td[data-etiqueta]::before { content: attr(data-etiqueta) ": "; content: attr(data-etiqueta) ": " / ""; font-weight: 800; }
}

/* Bloque «Incrustar» de WordPress: la proporción la pone el marcador. */
.wp-block-embed__wrapper:has(> .dap-ck-marcador)::before { content: none !important; display: none !important; }
.wp-block-embed .dap-ck-marcador { margin-bottom: 0; }
/* Widget atómico de YouTube de Elementor y widget «Vídeo» nativo convertidos. */
.dap-ck-elementor-video .dap-ck-marcador, .dap-ck-marcador--elementor { margin-bottom: 0; }

/* Sin animaciones si la persona las ha reducido (y ningún movimiento por defecto). */
@media (prefers-reduced-motion: no-preference) {
	.dap-ck-boton:not(#dap), .dap-ck-cerrar:not(#dap) { transition: background-color .15s ease, color .15s ease, border-color .15s ease; }
}
@media print {
	.dap-ck, .dap-ck-marcador__acciones .dap-ck-boton { display: none !important; }
}
