/* ============================================================
   cookie-consent.css — CC&A StratEx · Etapa 6
   Subir a: public_html/cookie-consent.css
   Agregar en el <head> de TODAS las páginas después de performance.css:
   <link rel="stylesheet" href="cookie-consent.css"/>
   (descargas/index.html usa: ../cookie-consent.css)
   ============================================================ */

/* ── BANNER PRINCIPAL ──────────────────────────────────────── */
.cc-banner {
  position: fixed;
  bottom: 0;
  left: 0;
  right: 0;
  z-index: 10000;
  background: #1a1510;
  border-top: 2px solid rgba(200,149,58,.35);
  box-shadow: 0 -8px 32px rgba(0,0,0,.25);
  padding: 1.25rem 2rem;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1.5rem;
  flex-wrap: wrap;
  transform: translateY(100%);
  transition: transform .45s cubic-bezier(.16,1,.3,1);
  will-change: transform;
}

/* Visible cuando tiene la clase .show */
.cc-banner.show {
  transform: translateY(0);
}

/* Oculto cuando tiene la clase .hidden */
.cc-banner.hidden {
  display: none;
}

/* ── TEXTO DEL BANNER ──────────────────────────────────────── */
.cc-text {
  flex: 1;
  min-width: 240px;
}

.cc-text p {
  color: rgba(240,236,228,.82);
  font-size: .83rem;
  line-height: 1.65;
  margin: 0;
}

.cc-text a {
  color: #c8953a;
  text-decoration: underline;
  text-underline-offset: 3px;
  transition: opacity .2s;
}

.cc-text a:hover {
  opacity: .75;
}

/* ── BOTONES DEL BANNER ────────────────────────────────────── */
.cc-actions {
  display: flex;
  gap: .6rem;
  flex-wrap: wrap;
  flex-shrink: 0;
  align-items: center;
}

.cc-btn {
  padding: .6rem 1.25rem;
  border-radius: 8px;
  font-family: inherit;
  font-size: .82rem;
  font-weight: 700;
  cursor: pointer;
  border: none;
  transition: transform .18s, background .18s, box-shadow .18s;
  white-space: nowrap;
  min-height: 44px; /* Área de toque mínima WCAG */
}

.cc-btn:hover {
  transform: translateY(-2px);
}

/* Aceptar todo */
.cc-btn-accept {
  background: #c8953a;
  color: #000;
  box-shadow: 0 4px 12px rgba(200,149,58,.35);
}
.cc-btn-accept:hover {
  background: #e8b96a;
  box-shadow: 0 6px 18px rgba(200,149,58,.45);
}

/* Solo necesarias */
.cc-btn-necessary {
  background: rgba(255,255,255,.1);
  color: rgba(240,236,228,.85);
  border: 1px solid rgba(255,255,255,.15);
}
.cc-btn-necessary:hover {
  background: rgba(255,255,255,.15);
}

/* Personalizar */
.cc-btn-settings {
  background: transparent;
  color: rgba(240,236,228,.6);
  font-size: .78rem;
  padding: .5rem .85rem;
  min-height: 44px;
}
.cc-btn-settings:hover {
  color: #c8953a;
}

/* ── MODAL DE PREFERENCIAS ─────────────────────────────────── */
.cc-modal-overlay {
  position: fixed;
  inset: 0;
  z-index: 10001;
  background: rgba(10,8,6,.65);
  backdrop-filter: blur(4px);
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 1.5rem;
  opacity: 0;
  pointer-events: none;
  transition: opacity .3s ease;
}

.cc-modal-overlay.show {
  opacity: 1;
  pointer-events: all;
}

.cc-modal {
  background: #fff;
  border-radius: 20px;
  box-shadow: 0 24px 64px rgba(0,0,0,.2);
  max-width: 520px;
  width: 100%;
  max-height: 90vh;
  overflow-y: auto;
  transform: scale(.96) translateY(10px);
  transition: transform .3s ease;
}

.cc-modal-overlay.show .cc-modal {
  transform: scale(1) translateY(0);
}

.cc-modal-head {
  padding: 1.75rem 1.75rem 1rem;
  border-bottom: 1px solid rgba(0,0,0,.07);
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 1rem;
}

.cc-modal-head h2 {
  font-size: 1.1rem;
  font-weight: 800;
  color: #1a1510;
  letter-spacing: -.04em;
  margin: 0;
}

.cc-modal-head p {
  font-size: .82rem;
  color: #8a7d6e;
  margin: .35rem 0 0;
  line-height: 1.6;
}

.cc-close {
  background: rgba(0,0,0,.06);
  border: none;
  border-radius: 8px;
  width: 32px;
  height: 32px;
  cursor: pointer;
  font-size: 1rem;
  color: #8a7d6e;
  flex-shrink: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: background .18s;
}
.cc-close:hover { background: rgba(0,0,0,.1); }

/* Categorías de cookies */
.cc-categories {
  padding: 1rem 1.75rem;
}

.cc-category {
  border: 1px solid rgba(0,0,0,.08);
  border-radius: 12px;
  padding: 1rem 1.1rem;
  margin-bottom: .75rem;
  transition: border-color .2s;
}
.cc-category:hover { border-color: rgba(200,149,58,.3); }

.cc-cat-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  margin-bottom: .4rem;
}

.cc-cat-head h3 {
  font-size: .9rem;
  font-weight: 700;
  color: #1a1510;
  margin: 0;
}

.cc-cat-head p {
  font-size: .78rem;
  color: #8a7d6e;
  margin: 0;
  line-height: 1.55;
}

/* Toggle switch */
.cc-toggle {
  position: relative;
  width: 44px;
  height: 24px;
  flex-shrink: 0;
}

.cc-toggle input {
  opacity: 0;
  width: 0;
  height: 0;
  position: absolute;
}

.cc-toggle-slider {
  position: absolute;
  inset: 0;
  background: #d1cdc7;
  border-radius: 100px;
  cursor: pointer;
  transition: background .25s;
}

.cc-toggle-slider::before {
  content: '';
  position: absolute;
  width: 18px;
  height: 18px;
  left: 3px;
  top: 3px;
  background: #fff;
  border-radius: 50%;
  transition: transform .25s;
  box-shadow: 0 1px 4px rgba(0,0,0,.2);
}

.cc-toggle input:checked + .cc-toggle-slider {
  background: #c8953a;
}

.cc-toggle input:checked + .cc-toggle-slider::before {
  transform: translateX(20px);
}

.cc-toggle input:disabled + .cc-toggle-slider {
  opacity: .5;
  cursor: not-allowed;
}

/* Foco visible en toggle */
.cc-toggle input:focus-visible + .cc-toggle-slider {
  outline: 3px solid #c8953a;
  outline-offset: 2px;
}

/* Acciones del modal */
.cc-modal-actions {
  padding: 1rem 1.75rem 1.75rem;
  display: flex;
  gap: .65rem;
  border-top: 1px solid rgba(0,0,0,.07);
}

.cc-modal-actions .cc-btn {
  flex: 1;
  font-size: .85rem;
}

.cc-modal-accept {
  background: #c8953a;
  color: #000;
}
.cc-modal-accept:hover { background: #e8b96a; }

.cc-modal-save {
  background: rgba(0,0,0,.06);
  color: #1a1510;
}
.cc-modal-save:hover { background: rgba(0,0,0,.1); }

/* ── RESPONSIVE ────────────────────────────────────────────── */
@media (max-width: 640px) {
  .cc-banner {
    flex-direction: column;
    align-items: flex-start;
    padding: 1.25rem 1.25rem 1.5rem;
  }

  .cc-actions {
    width: 100%;
  }

  .cc-btn-accept,
  .cc-btn-necessary {
    flex: 1;
  }

  .cc-modal-head { padding: 1.25rem 1.25rem .85rem; }
  .cc-categories { padding: .85rem 1.25rem; }
  .cc-modal-actions { padding: .85rem 1.25rem 1.25rem; flex-direction: column; }
}

/* ── REDUCCIÓN DE MOVIMIENTO ───────────────────────────────── */
@media (prefers-reduced-motion: reduce) {
  .cc-banner,
  .cc-modal-overlay,
  .cc-modal { transition: none; }
}
