/* ============================================================
   MM-Funnel · consent.css — banner cookies, 2ª capa, footer legal,
   información de primera capa en formularios, páginas legales.
   ============================================================ */

/* ---------- banner (1ª capa) ---------- */
.cc-banner {
  position: fixed; left: 0; right: 0; bottom: 0; z-index: 1000;
  background: #0b1d29; color: #d4e1ea;
  border-top: 1px solid rgba(143,211,255,.25);
  box-shadow: 0 -8px 30px rgba(0,0,0,.25);
}
.cc-banner[hidden] { display: none; }
.cc-in {
  max-width: 1180px; margin: 0 auto; padding: 18px 22px;
  display: flex; gap: 22px; align-items: center; justify-content: space-between;
}
.cc-txt { flex: 1 1 auto; min-width: 0; }
.cc-h { font-weight: 700; color: #fff; margin: 0 0 4px; font-size: 1rem; }
.cc-p { margin: 0; font-size: .88rem; line-height: 1.55; }
.cc-banner .cc-p strong { color: #fff; }
.cc-banner a { color: #7cc4ea; text-decoration: underline; }
.cc-btns { display: flex; gap: 10px; flex: 0 0 auto; flex-wrap: wrap; }

/* Aceptar y Rechazar: mismo estilo, tamaño y color (sin dark patterns). */
.cc-btn {
  font: inherit; font-weight: 700; font-size: .9rem; line-height: 1.2;
  min-height: 44px; padding: 11px 22px; border-radius: 999px; cursor: pointer;
  background: #fff; color: #0c2230; border: 2px solid #fff;
}
.cc-btn:hover { background: #e6f1f7; border-color: #e6f1f7; }
.cc-btn-alt { background: transparent; color: #fff; border-color: rgba(255,255,255,.75); }
.cc-btn-alt:hover { background: rgba(255,255,255,.12); border-color: #fff; }
.cc-btn:focus-visible, .cc-x:focus-visible, .cc-link:focus-visible, .cc-sw:focus-visible {
  outline: 3px solid #ffb45c; outline-offset: 2px;
}

/* ---------- 2ª capa (dialog) ---------- */
.cc-dlg {
  width: min(560px, calc(100vw - 24px)); max-height: calc(100vh - 24px);
  padding: 0; border: 0; border-radius: 14px; color: var(--body, #4a4a4a);
  box-shadow: 0 20px 60px rgba(0,0,0,.35); overflow: auto;
}
.cc-dlg::backdrop { background: rgba(0,20,32,.6); }
.cc-dlg-in { padding: 22px 22px 18px; }
.cc-dlg-head { display: flex; align-items: flex-start; justify-content: space-between; gap: 12px; margin-bottom: 10px; }
.cc-dlg h2 { font-size: 1.15rem; text-transform: none; margin: 0; color: var(--ink, #2b2b2b); }
.cc-x {
  font: inherit; font-size: 1.6rem; line-height: 1; background: none; border: 0; cursor: pointer;
  color: var(--ink, #2b2b2b); width: 44px; height: 44px; margin: -10px -10px 0 0; border-radius: 8px;
}
.cc-x:hover { background: var(--blue-light, #e6f1f7); }
.cc-dlg .cc-p { font-size: .88rem; }
.cc-dlg a { color: var(--blue, #006599); text-decoration: underline; }
.cc-cat { border: 1px solid var(--line, #e2e6ea); border-radius: 10px; padding: 14px 16px; margin-top: 14px; }
.cc-cat-head { display: flex; align-items: center; gap: 12px; margin-bottom: 6px; }
.cc-cat-h { font-weight: 700; color: var(--ink, #2b2b2b); flex: 1 1 auto; cursor: pointer; }
.cc-always { font-size: .78rem; font-weight: 700; color: var(--ok, #1b8a5b); }

/* Interruptor accesible: checkbox nativo con role="switch". */
.cc-sw {
  appearance: none; -webkit-appearance: none; flex: 0 0 auto; margin: 0;
  width: 46px; height: 26px; border-radius: 26px; position: relative; cursor: pointer;
  background: #9aa5ad; transition: background .2s;
}
.cc-sw::after {
  content: ""; position: absolute; top: 3px; left: 3px; width: 20px; height: 20px;
  border-radius: 50%; background: #fff; transition: transform .2s; box-shadow: 0 1px 3px rgba(0,0,0,.3);
}
.cc-sw:checked { background: var(--blue, #006599); }
.cc-sw:checked::after { transform: translateX(20px); }
.cc-sw:disabled { cursor: not-allowed; opacity: .6; }

.cc-dlg-btns { margin-top: 18px; justify-content: flex-end; }
.cc-dlg .cc-btn { background: var(--blue, #006599); color: #fff; border-color: var(--blue, #006599); }
.cc-dlg .cc-btn:hover { background: var(--blue-dark, #004b73); border-color: var(--blue-dark, #004b73); }
.cc-dlg .cc-btn-alt { background: #fff; color: var(--blue, #006599); }
.cc-dlg .cc-btn-alt:hover { background: var(--blue-light, #e6f1f7); color: var(--blue-dark, #004b73); }

.cc-sr {
  position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px;
  overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; border: 0;
}

/* ---------- footer: enlace "Configurar cookies" con aspecto de enlace ---------- */
.cc-link {
  font: inherit; font-size: inherit; color: #c7d2da; background: none; border: 0;
  padding: 0; cursor: pointer; text-decoration: none;
}
.cc-link:hover { color: #fff; text-decoration: underline; }

@media (max-width: 760px) {
  .cc-banner { max-height: 55vh; overflow-y: auto; }
  .cc-in { flex-direction: column; align-items: stretch; gap: 8px; padding: 10px 14px 12px; }
  .cc-h { font-size: .92rem; margin-bottom: 2px; }
  .cc-p { font-size: .78rem; line-height: 1.42; }
  /* Las tres opciones en una fila, mismo tamaño y prominencia */
  .cc-btns { display: grid; grid-template-columns: repeat(3, 1fr); gap: 6px; }
  .cc-banner .cc-btn { padding: 8px 4px; font-size: .8rem; min-height: 44px; }
  .cc-dlg-btns { grid-template-columns: 1fr; }
  .cc-dlg .cc-btn { padding: 11px 16px; font-size: .9rem; }
  .cc-dlg-in { padding: 18px 16px 14px; }
  .cc-dlg .cc-p { font-size: .84rem; }
  .cc-link { padding: 11px 0; }
}
@media (prefers-reduced-motion: reduce) { .cc-sw, .cc-sw::after { transition: none; } }

/* ---------- formularios: consentimiento + primera capa ---------- */
.consent a { color: var(--blue, #006599); text-decoration: underline; }
.consent-txt { display: block; text-align: left; }
.consent .err-msg { margin-top: 4px; }
.captcha { margin: 0 0 16px; }
/* CAPTCHA proof-of-work: una "casilla" que se resuelve sola (idle -> busy -> ok | err) */
.pow {
  display: inline-flex; align-items: center; gap: 10px; min-height: 44px; padding: 8px 14px 8px 10px;
  border: 1px solid var(--line, #e2e6ea); border-radius: 8px; background: #f7f9fa;
  font-size: .82rem; line-height: 1.3; color: var(--body, #4a4a4a); text-align: left;
}
.pow-box {
  flex: 0 0 auto; width: 22px; height: 22px; border: 2px solid #9aa4ad; border-radius: 5px; background: #fff;
  box-sizing: border-box; position: relative;
}
.pow[data-state="busy"] .pow-box { border-color: var(--blue, #006599); border-top-color: transparent; border-radius: 50%; animation: pow-spin .8s linear infinite; }
.pow[data-state="ok"] .pow-box { border-color: #1f8f4e; background: #1f8f4e; }
.pow[data-state="ok"] .pow-box::after {
  content: ""; position: absolute; left: 6px; top: 2px; width: 5px; height: 10px;
  border: solid #fff; border-width: 0 2px 2px 0; transform: rotate(45deg);
}
.pow[data-state="ok"] .pow-txt { color: #1f8f4e; font-weight: 600; }
.pow[data-state="err"] .pow-box { border-color: var(--alert, #c62828); }
.pow[data-state="err"] { cursor: pointer; }
@keyframes pow-spin { to { transform: rotate(360deg); } }
@media (prefers-reduced-motion: reduce) { .pow[data-state="busy"] .pow-box { animation: none; border-top-color: var(--blue, #006599); border-radius: 5px; } }
.lp-info {
  margin: 10px 0 16px; padding: 12px 14px; border: 1px solid var(--line, #e2e6ea);
  border-radius: 8px; background: #f7f9fa; text-align: left; font-size: .76rem; line-height: 1.45; color: var(--body, #4a4a4a);
}
.lp-info .lp-h { font-weight: 700; color: var(--ink, #2b2b2b); margin: 0 0 6px; font-size: .78rem; }
.lp-info dl { display: grid; grid-template-columns: max-content 1fr; gap: 3px 12px; margin: 0; }
.lp-info dt { font-weight: 700; color: var(--ink, #2b2b2b); }
.lp-info dd { margin: 0; }
.lp-info a { color: var(--blue, #006599); text-decoration: underline; }
@media (max-width: 480px) {
  .lp-info dl { grid-template-columns: 1fr; }
  .lp-info dd { margin-bottom: 4px; }
}

/* ---------- páginas legales ---------- */
.legal-hero { padding: clamp(40px, 6vw, 72px) 0 clamp(28px, 4vw, 44px); background: var(--blue-deep, #002840); color: #dbe6ee; }
.legal-hero h1 { color: #fff; margin-bottom: 8px; }
.legal-hero .eyebrow { color: #8fd3ff; }
.legal-note { margin: 0; font-size: .9rem; color: #b9cad6; }
.legal { padding: clamp(36px, 5vw, 64px) 0 clamp(56px, 8vw, 96px); background: var(--card, #fff); }
.legal-body { font-size: 1rem; line-height: 1.75; max-width: calc(72ch + 2 * var(--gutter, 22px)); }
.legal-body > p, .legal-body > ul { max-width: 72ch; }
.legal-body h2 + p, .legal-body h3 + p { margin-top: 0; }
.legal-body h2 {
  text-transform: none; font-size: clamp(1.15rem, 2.2vw, 1.4rem); margin: 38px 0 12px;
  padding-top: 8px; border-top: 1px solid var(--line, #e2e6ea);
}
.legal-body h2:first-child { margin-top: 0; border-top: 0; }
.legal-body h3 { font-size: 1.02rem; margin: 22px 0 8px; }
.legal-body ul { padding-left: 1.2em; margin: 0 0 14px; }
.legal-body li { margin-bottom: 6px; }
.legal-body a { color: var(--blue, #006599); text-decoration: underline; word-break: break-word; }
.legal-body .tbl-wrap { margin: 12px 0 18px; box-shadow: none; }
.legal-body table { font-size: .9rem; }
.legal-body th, .legal-body td { text-align: left; vertical-align: top; padding: 10px 12px; border-bottom: 1px solid var(--line, #e2e6ea); }
.legal-body tbody th { color: var(--ink, #2b2b2b); font-weight: 700; }
.legal-body thead th { padding: 10px 12px; }
.legal-body code { background: var(--blue-light, #e6f1f7); padding: 1px 5px; border-radius: 4px; font-size: .85em; }
.legal-body .tbl-id th { width: 34%; background: #f7f9fa; }
.legal-body .tbl-id table { min-width: 0; }
.legal-status { padding: 12px 14px; border-radius: 8px; background: var(--blue-light, #e6f1f7); margin: 10px 0 12px; }
