/* ================================================================
   cookie-banner.css — Salud & Ciencia
   Estilos para el banner de consentimiento de cookies (CCPA)
   Requiere: style.css (variables)
================================================================ */

.cookie-banner {
  position: fixed; left: 0; right: 0; bottom: 0;
  z-index: 500;
  background: var(--white);
  border-top: 1px solid var(--border);
  box-shadow: 0 -8px 32px rgba(0,0,0,.12);
  transform: translateY(100%);
  transition: transform .35s cubic-bezier(.4,0,.2,1);
  max-height: 90vh; overflow-y: auto;
}
.cookie-banner.open { transform: translateY(0); }
.cookie-banner-inner { max-width: 1000px; margin: 0 auto; padding: 20px; }

/* Empuja el contenido para que el banner no tape el sticky ad móvil */
body.cookie-banner-open .ad-sticky-mobile { display: none !important; }

/* ── VISTA SIMPLE ────────────────────────────────────────── */
.cookie-view--simple {
  display: flex; align-items: center; gap: 20px; flex-wrap: wrap;
}
.cookie-text { flex: 1; min-width: 240px; }
.cookie-text p { font-size: .85rem; color: var(--text-muted); line-height: 1.6; margin: 0; }
.cookie-link { color: var(--teal); text-decoration: underline; }

.cookie-actions { display: flex; gap: 10px; flex-wrap: wrap; flex-shrink: 0; }
.cookie-btn {
  font-family: inherit; font-size: .85rem; font-weight: 600;
  padding: 10px 18px; border-radius: 8px; cursor: pointer;
  border: 1.5px solid transparent; white-space: nowrap;
  transition: all .2s;
}
.cookie-btn--primary { background: var(--teal); color: white; }
.cookie-btn--primary:hover { background: var(--teal-dark); }
.cookie-btn--outline { background: var(--white); border-color: var(--border); color: var(--text); }
.cookie-btn--outline:hover { border-color: var(--teal); color: var(--teal); }
.cookie-btn--ghost { background: none; border-color: transparent; color: var(--text-muted); text-decoration: underline; padding: 10px 8px; }
.cookie-btn--ghost:hover { color: var(--teal); }

/* ── VISTA PERSONALIZAR ──────────────────────────────────── */
.cookie-view--custom h3 { font-size: 1.05rem; font-weight: 800; color: var(--text); margin-bottom: 14px; }
.cookie-option {
  display: flex; align-items: flex-start; justify-content: space-between;
  gap: 16px; padding: 12px 0; border-bottom: 1px solid var(--border);
}
.cookie-option:last-of-type { border-bottom: none; }
.cookie-option-text strong { display: block; font-size: .88rem; color: var(--text); margin-bottom: 2px; }
.cookie-option-text p { font-size: .8rem; color: var(--text-muted); line-height: 1.5; margin: 0; }

/* Toggle switch */
.cookie-toggle { position: relative; display: inline-block; width: 44px; height: 24px; flex-shrink: 0; cursor: pointer; }
.cookie-toggle input { opacity: 0; width: 0; height: 0; position: absolute; }
.cookie-toggle-slider {
  position: absolute; inset: 0; background: var(--border);
  border-radius: 99px; transition: background .2s;
}
.cookie-toggle-slider::before {
  content: ""; position: absolute; left: 3px; top: 3px;
  width: 18px; height: 18px; background: white; border-radius: 50%;
  transition: transform .2s; box-shadow: 0 1px 3px rgba(0,0,0,.2);
}
.cookie-toggle input:checked + .cookie-toggle-slider { background: var(--teal); }
.cookie-toggle input:checked + .cookie-toggle-slider::before { transform: translateX(20px); }
.cookie-toggle--disabled { cursor: default; opacity: .6; }

@media (max-width: 768px) {
  .cookie-view--simple { flex-direction: column; align-items: stretch; }
  .cookie-actions { width: 100%; }
  .cookie-actions .cookie-btn { flex: 1; text-align: center; }
  .cookie-actions .cookie-btn--ghost { flex: none; }
}
@media (max-width: 480px) {
  .cookie-actions { flex-direction: column; }
  .cookie-actions .cookie-btn { width: 100%; }
}
