/* ==================== MODAL COOKIES PREMIUM ==================== */

/* Overlay fondo */
.cookie-modal {
  position: fixed;
  inset: 0;
  background: rgba(15, 23, 42, 0.75);
  backdrop-filter: blur(6px);
  display: flex;
  align-items: center;
  justify-content: center;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.4s ease;
  z-index: 9999;
}

.cookie-modal.show {
  opacity: 1;
  pointer-events: all;
}

/* Contenedor principal */
.cookie-modal-content {
  background: white;
  width: 90%;
  max-width: 540px;
  border-radius: 20px;
  padding: 32px 28px;
  box-shadow: 0 20px 70px rgba(0, 0, 0, 0.35);
  position: relative;
  animation: modalFadeIn 0.35s ease-out;
  max-height: 88vh;
  overflow-y: auto;
}

/* Animación entrada */
@keyframes modalFadeIn {
  from { transform: translateY(30px); opacity: 0; }
  to   { transform: translateY(0);    opacity: 1; }
}

/* Botón cerrar */
.cookie-close {
  position: absolute;
  top: 18px;
  right: 20px;
  background: none;
  border: none;
  font-size: 2rem;
  color: #64748b;
  cursor: pointer;
  transition: color 0.2s;
}

.cookie-close:hover {
  color: #1e293b;
}

/* Header */
.cookie-header {
  text-align: center;
  margin-bottom: 24px;
}

.cookie-header h2 {
  margin: 0 0 8px;
  font-size: 1.6rem;
  color: #1e293b;
}

.cookie-subtitle {
  margin: 0;
  color: #64748b;
  font-size: 0.95rem;
}

/* Toggles */
.cookie-toggles {
  margin: 20px 0 32px;
}

.toggle-item {
  margin-bottom: 18px;
  padding: 16px 20px;
  background: #f8fafc;
  border-radius: 12px;
  border: 1px solid #e2e8f0;
  transition: all 0.2s;
}

.toggle-item:hover {
  background: #f1f5f9;
}

.toggle-label {
  display: flex;
  align-items: center;
  justify-content: space-between;
  cursor: pointer;
}

.toggle-text {
  flex: 1;
  margin-right: 16px;
}

.toggle-text strong {
  display: block;
  color: #1e293b;
  font-size: 1rem;
  margin-bottom: 4px;
}

.toggle-text small {
  display: block;
  color: #64748b;
  font-size: 0.85rem;
  line-height: 1.4;
}

/* Switch toggle */
.toggle-switch {
  position: relative;
  display: inline-block;
  width: 52px;
  height: 28px;
}

.toggle-switch input {
  opacity: 0;
  width: 0;
  height: 0;
}

.toggle-slider {
  position: absolute;
  cursor: pointer;
  inset: 0;
  background: #cbd5e1;
  border-radius: 28px;
  transition: .3s;
}

.toggle-slider:before {
  position: absolute;
  content: "";
  height: 22px;
  width: 22px;
  left: 3px;
  bottom: 3px;
  background: white;
  border-radius: 50%;
  transition: .3s;
}

input:checked + .toggle-slider {
  background: #2563eb;
}

input:checked + .toggle-slider:before {
  transform: translateX(24px);
}

/* Botones */
.cookie-footer {
  display: flex;
  gap: 12px;
  flex-wrap: wrap;
  justify-content: center;
  margin: 24px 0 16px;
}

.btn {
  flex: 1 1 140px;
  max-width: 180px;
  padding: 12px 20px;
  border: none;
  border-radius: 10px;
  font-weight: 600;
  font-size: 0.95rem;
  cursor: pointer;
  transition: all 0.2s;
}

.btn-accept {
  background: #2563eb;
  color: white;
}

.btn-accept:hover {
  background: #1d4ed8;
}

.btn-save {
  background: #3b82f6;
  color: white;
}

.btn-save:hover {
  background: #2563eb;
}

.btn-reject {
  background: #e2e8f0;
  color: #1e293b;
}

.btn-reject:hover {
  background: #cbd5e1;
}

/* Info final */
.cookie-info {
  text-align: center;
  font-size: 0.85rem;
  color: #64748b;
  margin-top: 16px;
}

.cookie-info a {
  color: #2563eb;
  text-decoration: underline;
}

/* Mobile */
@media (max-width: 600px) {
  .cookie-modal-content {
    padding: 24px 18px;
  }

  .cookie-footer {
    flex-direction: column;
  }

  .btn {
    max-width: none;
  }
}