/* =========================
   COOKIE BANNER
========================= */
.cookie-banner {
  position: fixed;
  bottom: 20px;
  left: 50%;
  transform: translateX(-50%);

  width: 90%;
  max-width: 520px;

  background: rgba(2, 6, 23, 0.9);
  backdrop-filter: blur(12px);

  padding: 18px 20px;
  border-radius: 14px;

  box-shadow: 0 10px 40px rgba(0,0,0,0.6);
  border: 1px solid rgba(255,255,255,0.05);

  text-align: center;
  z-index: 9999;
}

.cookie-overlay {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: rgba(0,0,0,0.6);
  backdrop-filter: blur(4px);
  z-index: 9998;
}

.cookie-banner p {
  font-size: 0.9rem;
  opacity: 0.85;
  line-height: 1.4;
}

/* BOTONES */
.cookie-buttons {
  margin-top: 15px;
  display: flex;
  gap: 10px;
  justify-content: center;
  flex-wrap: wrap;
}

.cookie-buttons button {
  padding: 8px 16px;
  border-radius: 8px;
  cursor: pointer;
  font-size: 0.85rem;
  font-weight: 500;
  transition: all 0.25s ease;
}

/* aceptar */
#accept-cookies {
  background: #38bdf8;
  color: #000;
  border: none;
}

#accept-cookies:hover {
  transform: scale(1.05);
  box-shadow: 0 0 15px rgba(56,189,248,0.5);
}

/* rechazar */
#reject-cookies {
  background: #1e293b;
  color: #fff;
  border: none;
}

#reject-cookies:hover {
  background: #334155;
}

/* configurar */
#open-settings {
  background: transparent;
  border: 1px solid #38bdf8;
  color: #38bdf8;
}

#open-settings:hover {
  background: rgba(56,189,248,0.1);
}

/* =========================
   PANEL CONFIGURACIÓN
========================= */
.cookie-settings {
  position: fixed;
  bottom: 20px;
  left: 50%;
  transform: translateX(-50%);

  width: 90%;
  max-width: 520px;

  background: #020617;
  backdrop-filter: blur(12px);

  padding: 25px;
  border-radius: 16px;

  box-shadow: 0 20px 50px rgba(0,0,0,0.7);
  border: 1px solid rgba(255,255,255,0.05);

  z-index: 10000;
}

/* título */
.cookie-settings h3 {
  text-align: center;
  margin-bottom: 20px;
  font-size: 1.1rem;
}

/* opciones */
.cookie-settings label {
  display: flex;
  align-items: center;
  justify-content: space-between;

  background: #0f172a;
  padding: 12px 15px;
  border-radius: 10px;

  margin-bottom: 10px;
  font-size: 0.85rem;
  cursor: pointer;

  transition: 0.3s;
}

.cookie-settings label:hover {
  background: #1e293b;
}

/* checkboxes */
.cookie-settings input[type="checkbox"] {
  accent-color: #38bdf8;
  transform: scale(1.2);
}

/* botón guardar */
#save-preferences {
  margin-top: 15px;
  width: 100%;
  padding: 10px;

  background: #38bdf8;
  color: #000;

  border: none;
  border-radius: 8px;
  cursor: pointer;
  font-weight: bold;

  transition: 0.3s;
}

#save-preferences:hover {
  transform: scale(1.03);
  box-shadow: 0 0 15px rgba(56,189,248,0.5);
}

/* =========================
   UTILIDAD
========================= */
.cookie-hidden {
  display: none;
}

/* =========================
   TABLET (≤ 768px)
========================= */
@media (max-width: 768px) {

  .cookie-banner,
  .cookie-settings {
    width: 92%;
    max-width: 480px;
    padding: 16px;
  }

  .cookie-banner p {
    font-size: 0.85rem;
  }

  .cookie-buttons {
    gap: 8px;
  }

  .cookie-buttons button {
    font-size: 0.8rem;
    padding: 7px 12px;
  }

  .cookie-settings h3 {
    font-size: 1rem;
  }

  .cookie-settings label {
    font-size: 0.8rem;
    padding: 10px;
  }
}


/* =========================
   MÓVIL (≤ 480px)
========================= */
@media (max-width: 480px) {

  .cookie-banner,
  .cookie-settings {
    width: 95%;
    bottom: 10px;
    border-radius: 12px;
  }

  .cookie-banner p {
    font-size: 0.8rem;
    line-height: 1.3;
  }

  /* 🔥 botones en columna */
  .cookie-buttons {
    flex-direction: column;
    gap: 8px;
  }

  .cookie-buttons button {
    width: 100%;
    padding: 10px;
    font-size: 0.85rem;
  }

  /* panel */
  .cookie-settings {
    padding: 18px;
  }

  .cookie-settings label {
    flex-direction: column;
    align-items: flex-start;
    gap: 6px;
  }

  .cookie-settings input[type="checkbox"] {
    transform: scale(1.1);
  }

  #save-preferences {
    padding: 12px;
    font-size: 0.9rem;
  }
}


/* =========================
   PANTALLAS GRANDES (≥ 1200px)
========================= */
@media (min-width: 1200px) {

  .cookie-banner,
  .cookie-settings {
    max-width: 600px;
  }

  .cookie-banner p {
    font-size: 0.95rem;
  }

  .cookie-settings h3 {
    font-size: 1.2rem;
  }
}