/* ============================================================
   Consentimiento de cookies — Apartamentos El Ardinal
   Usa las variables de diseño del tema (style.css :root).
   ============================================================ */

.ea-cookies *,
.ea-cookies *::before,
.ea-cookies *::after { box-sizing: border-box; }

/* ---------- Banner inferior ---------- */
.ea-ck-banner {
	position: fixed;
	left: 16px; right: 16px; bottom: 16px;
	z-index: 9999;
	background: var(--card);
	color: var(--ink);
	border: 1px solid var(--line);
	border-radius: 10px;
	box-shadow: 0 16px 48px rgba(20, 30, 22, .22);
	animation: ea-ck-in .35s cubic-bezier(.2, .7, .3, 1) both;
}
@keyframes ea-ck-in { from { opacity: 0; transform: translateY(14px); } to { opacity: 1; transform: none; } }

.ea-ck-banner-inner {
	display: flex;
	align-items: center;
	gap: 22px;
	max-width: 1200px;
	margin: 0 auto;
	padding: 20px 24px;
}
.ea-ck-text { flex: 1; min-width: 0; }
.ea-ck-title {
	font-family: var(--serif);
	font-size: 1.15rem;
	font-weight: 500;
	color: var(--ink);
	margin: 0 0 4px;
}
.ea-ck-banner p {
	margin: 0;
	font-size: .9rem;
	line-height: 1.5;
	color: var(--ink-soft);
}
.ea-ck-banner a, .ea-ck-modal a { color: var(--green); text-decoration: underline; }

.ea-ck-actions { display: flex; align-items: center; gap: 10px; flex-shrink: 0; flex-wrap: wrap; }

/* ---------- Botones (aceptar y rechazar con igual prominencia, AEPD) ---------- */
.ea-ck-btn {
	font-family: var(--sans);
	font-size: .88rem;
	font-weight: 700;
	line-height: 1;
	padding: 12px 18px;
	border-radius: 999px;
	border: 1px solid transparent;
	cursor: pointer;
	transition: background .2s, border-color .2s, color .2s, transform .1s;
	white-space: nowrap;
}
.ea-ck-btn:active { transform: translateY(1px); }
.ea-ck-btn-primary { background: var(--green); color: #fff; }
.ea-ck-btn-primary:hover { background: var(--ink); }
.ea-ck-btn-ghost { background: var(--panel); color: var(--ink); border-color: var(--line); }
.ea-ck-btn-ghost:hover { background: #fff; border-color: var(--green); color: var(--green); }

/* ---------- Panel de preferencias (modal) ---------- */
.ea-ck-modal { position: fixed; inset: 0; z-index: 10000; display: flex; align-items: center; justify-content: center; padding: 20px; }
.ea-ck-backdrop { position: absolute; inset: 0; background: rgba(20, 30, 22, .55); backdrop-filter: blur(2px); }
.ea-ck-modal-card {
	position: relative;
	z-index: 1;
	width: 100%;
	max-width: 560px;
	max-height: 88vh;
	display: flex;
	flex-direction: column;
	background: var(--card);
	border-radius: 14px;
	box-shadow: 0 24px 64px rgba(20, 30, 22, .35);
	animation: ea-ck-in .3s ease both;
	overflow: hidden;
}
.ea-ck-modal-head {
	display: flex; align-items: center; justify-content: space-between;
	padding: 20px 24px;
	border-bottom: 1px solid var(--line);
}
.ea-ck-modal-head h2 { font-family: var(--serif); font-weight: 500; font-size: 1.3rem; color: var(--ink); margin: 0; }
.ea-ck-close { background: none; border: 0; font-size: 1.8rem; line-height: 1; color: var(--sage); cursor: pointer; padding: 0 4px; }
.ea-ck-close:hover { color: var(--ink); }

.ea-ck-modal-body { padding: 8px 24px 4px; overflow-y: auto; }
.ea-ck-modal-intro { font-size: .9rem; color: var(--ink-soft); margin: 12px 0 18px; }

.ea-ck-cat { padding: 16px 0; border-bottom: 1px solid var(--line); }
.ea-ck-cat:last-child { border-bottom: 0; }
.ea-ck-cat-head { display: flex; align-items: center; justify-content: space-between; gap: 14px; }
.ea-ck-cat-label { font-weight: 700; font-size: .98rem; color: var(--ink); }
.ea-ck-cat-desc { margin: 6px 0 0; font-size: .85rem; line-height: 1.5; color: var(--sage); }
.ea-ck-always { font-size: .72rem; font-weight: 700; text-transform: uppercase; letter-spacing: .04em; color: var(--green); background: rgba(47, 69, 56, .1); padding: 4px 10px; border-radius: 999px; }

/* Interruptor (toggle) */
.ea-ck-switch { position: relative; display: inline-block; width: 46px; height: 26px; flex-shrink: 0; cursor: pointer; }
.ea-ck-switch input { position: absolute; opacity: 0; width: 0; height: 0; }
.ea-ck-slider { position: absolute; inset: 0; background: var(--line); border-radius: 999px; transition: background .2s; }
.ea-ck-slider::before { content: ''; position: absolute; height: 20px; width: 20px; left: 3px; top: 3px; background: #fff; border-radius: 50%; transition: transform .2s; box-shadow: 0 1px 3px rgba(0,0,0,.2); }
.ea-ck-switch input:checked + .ea-ck-slider { background: var(--green); }
.ea-ck-switch input:checked + .ea-ck-slider::before { transform: translateX(20px); }
.ea-ck-switch input:focus-visible + .ea-ck-slider { outline: 2px solid var(--gold); outline-offset: 2px; }

.ea-ck-modal-foot {
	display: flex; gap: 10px; flex-wrap: wrap; justify-content: flex-end;
	padding: 18px 24px;
	border-top: 1px solid var(--line);
	background: var(--panel);
}

/* Enlace «Gestionar cookies» en el footer */
.ea-ck-manage { cursor: pointer; }

.screen-reader-text { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }

/* ---------- Contenido de terceros gateado (mapa, buscador de reservas…) ---------- */
.consent-gate { position: relative; }
.consent-gate__overlay {
	position: absolute; inset: 0;
	display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 14px;
	background: var(--panel); text-align: center; padding: 24px; border-radius: inherit;
}
.consent-gate__overlay p { max-width: 320px; color: var(--ink-soft); font-size: 14px; margin: 0; }
.consent-gate.is-loaded .consent-gate__overlay { display: none; }
.map-embed { width: 100%; height: 100%; }
.booking-widget { height: 1800px; }
.booking-widget .consent-gate__overlay { border-radius: 8px; overflow: hidden; }

/* ---------- Responsive ---------- */
@media (max-width: 760px) {
	.ea-ck-banner-inner { flex-direction: column; align-items: stretch; gap: 16px; padding: 18px; }
	.ea-ck-actions { flex-direction: column-reverse; }
	.ea-ck-btn { width: 100%; text-align: center; padding: 13px 18px; }
	.ea-ck-modal-foot { flex-direction: column-reverse; }
	.ea-ck-modal-foot .ea-ck-btn { width: 100%; }
}
