/* =========================================================
   AVISO DE COOKIES — Estero Natural
   ========================================================= */
body.ck-open { overflow: hidden; }

.ck-banner {
  position: fixed; left: 24px; bottom: 24px; z-index: 1500;
  width: min(560px, calc(100% - 48px));
  padding: 30px 28px 24px; overflow: hidden; isolation: isolate;
  border-radius: var(--radius-lg, 28px); background: var(--paper, #FBF8F1); color: var(--ink, #1B2627);
  border: 1px solid var(--line);
  box-shadow: 0 32px 80px -24px rgba(9, 39, 43, .45), 0 2px 8px rgba(9, 39, 43, .08);
  opacity: 0; transform: translateY(24px) scale(.98);
  transition: opacity .45s var(--ease), transform .45s var(--ease);
}
.ck-banner::before {
  content: ""; position: absolute; inset: 0 0 auto 0; height: 4px;
  background: linear-gradient(90deg, var(--estuary), var(--marsh), var(--ochre), var(--salt-gold));
}
.ck-banner::after {
  content: ""; position: absolute; right: -90px; top: -90px; z-index: -1; width: 240px; height: 240px; border-radius: 50%;
  background: repeating-radial-gradient(circle, rgba(14, 58, 64, .07) 0 1px, transparent 1px 12px); pointer-events: none;
}
.ck-banner.is-visible { opacity: 1; transform: none; }

.ck-banner-head { display: flex; align-items: center; gap: 16px; margin-bottom: 14px; }
.ck-icon {
  display: grid; place-items: center; flex-shrink: 0; width: 52px; height: 52px; border-radius: 16px;
  background: var(--estuary); color: var(--salt-gold); box-shadow: 0 10px 22px -12px rgba(9, 39, 43, .7);
}
.ck-icon svg { width: 26px; height: 26px; }
.ck-kicker { font-size: .7rem; font-weight: 600; letter-spacing: .2em; text-transform: uppercase; color: var(--ochre-ink); }
.ck-title { font-family: var(--font-display); font-size: 1.75rem; font-weight: 600; line-height: 1.1; color: var(--estuary); }
.ck-text { font-size: .95rem; line-height: 1.65; color: var(--muted); }
.ck-text a { color: var(--estuary); font-weight: 600; text-decoration: underline; text-underline-offset: 3px; text-decoration-color: rgba(154, 78, 30, .55); }
.ck-text a:hover { color: var(--ochre-ink); }

.ck-actions { display: flex; align-items: center; gap: 10px; margin-top: 22px; }
.ck-actions .ck-btn-text { margin-right: auto; }
.ck-btn { min-height: 48px; padding: 12px 24px; font-size: .9rem; }
.ck-btn-text {
  min-height: 48px; padding: 8px 4px; background: none; border: 0; cursor: pointer;
  font-size: .9rem; font-weight: 600; color: var(--estuary);
  text-decoration: underline; text-underline-offset: 4px; text-decoration-color: rgba(14, 58, 64, .35);
  transition: color .25s;
}
.ck-btn-text:hover { color: var(--ochre-ink); text-decoration-color: currentColor; }

/* ---------- Panel de preferencias ---------- */
.ck-modal { position: fixed; inset: 0; z-index: 2500; display: flex; align-items: center; justify-content: center; padding: 16px; }
.ck-overlay {
  position: absolute; inset: 0; background: rgba(6, 24, 27, .62);
  -webkit-backdrop-filter: blur(6px); backdrop-filter: blur(6px);
  opacity: 0; transition: opacity .3s var(--ease);
}
.ck-dialog {
  position: relative; width: min(640px, 100%);
  max-height: calc(100vh - 32px); max-height: calc(100dvh - 32px);
  overflow-y: auto; overscroll-behavior: contain;
  padding: clamp(24px, 4vw, 40px); border-radius: var(--radius-lg); background: var(--paper);
  box-shadow: var(--shadow-lg); opacity: 0; transform: translateY(20px) scale(.98);
  transition: opacity .35s var(--ease), transform .35s var(--ease);
}
.ck-dialog:focus { outline: none; }
.ck-modal.is-open .ck-overlay { opacity: 1; }
.ck-modal.is-open .ck-dialog { opacity: 1; transform: none; }
.ck-dialog-head { display: flex; align-items: flex-start; justify-content: space-between; gap: 16px; margin-bottom: 12px; }
.ck-close {
  display: grid; place-items: center; flex-shrink: 0; width: 44px; height: 44px; border-radius: 50%;
  border: 1px solid var(--line); background: transparent; color: var(--estuary); cursor: pointer;
  transition: background .25s, color .25s;
}
.ck-close:hover { background: var(--estuary); color: #fff; }
.ck-close svg { width: 20px; height: 20px; }

.ck-cats { margin: 24px 0; border-top: 1px solid var(--line); }
.ck-cat { padding: 20px 0; border-bottom: 1px solid var(--line); }
.ck-cat-head { display: flex; align-items: center; gap: 12px; }
.ck-cat-title { margin-right: auto; font-family: var(--font-display); font-size: 1.4rem; font-weight: 600; line-height: 1.2; color: var(--estuary); cursor: pointer; }
.ck-always { font-size: .7rem; font-weight: 600; letter-spacing: .12em; text-transform: uppercase; color: var(--marsh); }
.ck-cat-desc { margin-top: 6px; font-size: .95rem; line-height: 1.6; color: var(--muted); }
.ck-cat-cookies { margin-top: 8px; font-size: .82rem; color: var(--muted); }
.ck-cat-cookies span { font-weight: 600; color: var(--ink); }

.ck-switch {
  -webkit-appearance: none; appearance: none; position: relative; flex-shrink: 0;
  width: 52px; height: 30px; border-radius: 999px; background: #7A8987; cursor: pointer;
  transition: background .25s var(--ease);
}
.ck-switch::before {
  content: ""; position: absolute; top: 3px; left: 3px; width: 24px; height: 24px; border-radius: 50%;
  background: #fff; box-shadow: 0 2px 6px rgba(0, 0, 0, .2); transition: transform .25s var(--ease);
}
.ck-switch:checked { background: var(--marsh); }
.ck-switch:checked::before { transform: translateX(22px); }
.ck-switch:disabled { cursor: not-allowed; opacity: .6; }
.ck-switch:focus-visible { outline: 2px solid var(--ochre); outline-offset: 3px; }

.ck-dialog-actions { display: flex; flex-wrap: wrap; justify-content: flex-end; gap: 10px; }

/* ---------- Mapas bloqueados ---------- */
.ck-map-placeholder {
  position: absolute; inset: 0; z-index: 2; display: grid; place-items: center;
  padding: 24px; text-align: center; color: var(--on-dark); border-radius: inherit;
  background:
    radial-gradient(80% 80% at 50% 0%, var(--estuary-3), transparent 70%),
    repeating-radial-gradient(circle at 70% 120%, rgba(232, 199, 126, .1) 0 1px, transparent 1px 18px),
    var(--estuary);
}
.ck-map-inner { display: flex; flex-direction: column; align-items: center; gap: 12px; max-width: 440px; }
.ck-map-pin { display: grid; place-items: center; width: 56px; height: 56px; border-radius: 50%; background: rgba(232, 199, 126, .16); color: var(--salt-gold); }
.ck-map-pin svg { width: 26px; height: 26px; }
.ck-map-placeholder h3 { font-family: var(--font-display); font-size: 1.6rem; font-weight: 500; line-height: 1.15; color: #fff; }
.ck-map-placeholder p { font-size: .95rem; line-height: 1.6; color: var(--on-dark-muted); }
.ck-map-actions { display: flex; flex-wrap: wrap; justify-content: center; gap: 10px; margin-top: 6px; }
.ck-map-link { font-size: .88rem; font-weight: 600; color: var(--salt-gold); text-decoration: underline; text-underline-offset: 3px; }
.ck-map-link:hover { color: #fff; }

/* ---------- Aviso breve ---------- */
.ck-toast {
  position: fixed; left: 50%; bottom: 24px; z-index: 2600; max-width: calc(100% - 32px);
  padding: 14px 22px; border-radius: 999px; background: var(--estuary); color: #fff;
  font-size: .92rem; font-weight: 600; text-align: center; box-shadow: var(--shadow);
  opacity: 0; transform: translate(-50%, 20px); pointer-events: none;
  transition: opacity .35s var(--ease), transform .35s var(--ease);
}
.ck-toast.is-visible { opacity: 1; transform: translate(-50%, 0); }

/* ---------- Responsive ---------- */
@media (max-width: 680px) {
  .ck-banner {
    left: 12px; right: 12px; bottom: 12px; width: auto; padding: 24px 20px 18px;
    max-height: calc(100vh - 24px); max-height: calc(100dvh - 24px); overflow-y: auto;
  }
  .ck-title { font-size: 1.5rem; }
  .ck-icon { width: 46px; height: 46px; border-radius: 14px; }
  .ck-actions { display: grid; grid-template-columns: 1fr 1fr; }
  .ck-actions .ck-btn-text { grid-column: 1 / -1; order: 3; justify-self: center; margin: 0; }
  .ck-btn { padding-inline: 12px; }
  .ck-dialog-actions { display: grid; grid-template-columns: 1fr; }
  .ck-dialog-actions .btn { width: 100%; }
  .ck-map-actions .btn { width: 100%; }
}

@media (forced-colors: active) {
  .ck-switch { border: 1px solid ButtonText; }
  .ck-banner, .ck-dialog { border: 1px solid CanvasText; }
}
@media print {
  .ck-banner, .ck-modal, .ck-toast { display: none !important; }
}
