/* =========================================================
   AVISO DE COOKIES — banner + panel de preferencias
   ========================================================= */

.cookie-banner{
  position:fixed;
  left:0; right:0; bottom:0;
  z-index:300;
  background:var(--blue-900);
  color:var(--blue-100);
  padding:20px 24px;
  box-shadow:0 -10px 30px rgba(10,46,77,0.25);
  display:none;
}
.cookie-banner.show{ display:block; }
.cookie-banner-inner{
  max-width:var(--max);
  margin:0 auto;
  display:flex;
  align-items:center;
  justify-content:space-between;
  gap:24px;
  flex-wrap:wrap;
}
.cookie-banner p{
  margin:0;
  font-size:.92rem;
  color:var(--blue-100);
  max-width:640px;
}
.cookie-banner a{ color:var(--white); text-decoration:underline; }
.cookie-actions{ display:flex; gap:10px; flex-wrap:wrap; }
.cookie-actions .btn{ padding:10px 18px; font-size:.88rem; }
.btn-ghost{
  background:transparent;
  color:var(--blue-100);
  border:2px solid rgba(255,255,255,0.35);
}
.btn-ghost:hover{ background:rgba(255,255,255,0.1); color:var(--white); border-color:rgba(255,255,255,0.6); }

/* Modal de preferencias */
.cookie-modal-overlay{
  position:fixed; inset:0;
  background:rgba(10,20,32,0.55);
  z-index:310;
  display:none;
  align-items:center;
  justify-content:center;
  padding:20px;
}
.cookie-modal-overlay.show{ display:flex; }
.cookie-modal{
  background:var(--white);
  border-radius:var(--radius);
  max-width:560px;
  width:100%;
  max-height:86vh;
  overflow-y:auto;
  padding:32px;
  box-shadow:var(--shadow);
}
.cookie-modal h3{ color:var(--blue-900); margin-bottom:6px; }
.cookie-modal > p{ color:var(--ink-soft); font-size:.92rem; margin-bottom:22px; }

.cookie-category{
  border:1px solid var(--border);
  border-radius:var(--radius);
  padding:16px 18px;
  margin-bottom:14px;
}
.cookie-category-head{
  display:flex;
  align-items:center;
  justify-content:space-between;
  gap:16px;
}
.cookie-category-head strong{ color:var(--blue-900); font-size:.98rem; }
.cookie-category p{
  margin:8px 0 0;
  color:var(--ink-soft);
  font-size:.86rem;
}

/* Interruptor (toggle) */
.cookie-switch{
  position:relative;
  flex:none;
  width:44px;
  height:26px;
}
.cookie-switch input{
  opacity:0;
  width:100%;
  height:100%;
  position:absolute;
  margin:0;
  cursor:pointer;
}
.cookie-switch input:disabled{ cursor:not-allowed; }
.cookie-switch-track{
  position:absolute; inset:0;
  background:var(--border);
  border-radius:20px;
  transition:background .15s ease;
}
.cookie-switch-track::before{
  content:"";
  position:absolute;
  top:3px; left:3px;
  width:20px; height:20px;
  background:var(--white);
  border-radius:50%;
  transition:transform .15s ease;
  box-shadow:0 1px 3px rgba(0,0,0,0.3);
}
.cookie-switch input:checked ~ .cookie-switch-track{ background:var(--blue-500); }
.cookie-switch input:checked ~ .cookie-switch-track::before{ transform:translateX(18px); }
.cookie-switch input:disabled ~ .cookie-switch-track{ background:var(--blue-300, #8fbfe6); opacity:.7; }

.cookie-modal-actions{
  display:flex;
  justify-content:flex-end;
  gap:10px;
  margin-top:20px;
  flex-wrap:wrap;
}

/* Enlace discreto para reabrir preferencias (footer) */
.cookie-settings-link{
  background:none;
  border:none;
  padding:0;
  color:var(--blue-100);
  font-size:.95rem;
  cursor:pointer;
  text-align:left;
  font-family:var(--font-body);
}
.cookie-settings-link:hover{ color:var(--white); text-decoration:underline; }

@media (max-width: 700px){
  .cookie-banner-inner{ flex-direction:column; align-items:flex-start; }
  .cookie-actions{ width:100%; }
  .cookie-actions .btn{ flex:1; text-align:center; justify-content:center; }
}
