/* ==================== MODAL COOKIES BONITO Y MODERNO ==================== */
.cookie-modal {
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, 0.65);
  backdrop-filter: blur(8px);
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 9999;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.4s ease;
}

.cookie-modal.show {
  opacity: 1;
  pointer-events: all;
}

.cookie-modal-content {
  background: white;
  width: 92%;
  max-width: 540px;
  border-radius: 20px;
  padding: 32px 28px;
  box-shadow: 0 20px 70px rgba(0,0,0,0.4);
  position: relative;
  animation: modalPop 0.4s ease-out;
  max-height: 90vh;
  overflow-y: auto;
}

@keyframes modalPop {
  from { transform: translateY(40px); opacity: 0; }
  to   { transform: translateY(0); opacity: 1; }
}

.cookie-close {
  position: absolute;
  top: 16px;
  right: 20px;
  background: none;
  border: none;
  font-size: 2.2rem;
  color: #64748b;
  cursor: pointer;
  transition: color 0.2s;
}

.cookie-close:hover { color: #1e293b; }

.cookie-header {
  text-align: center;
  margin-bottom: 24px;
}

.cookie-header h2 {
  margin: 0 0 8px;
  font-size: 1.8rem;
  color: #1e293b;
  font-weight: 700;
}

.cookie-subtitle {
  margin: 0;
  color: #64748b;
  font-size: 1rem;
}

.cookie-toggles {
  margin: 24px 0 32px;
}

.toggle-item {
  margin-bottom: 16px;
  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;
  user-select: none;
}

.toggle-text {
  flex: 1;
  margin-right: 20px;
}

.toggle-text strong {
  display: block;
  color: #1e293b;
  font-size: 1.05rem;
  margin-bottom: 4px;
}

.toggle-text small {
  display: block;
  color: #64748b;
  font-size: 0.88rem;
  line-height: 1.4;
}

/* Toggle switch */
.toggle-switch {
  position: relative;
  width: 54px;
  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%;
  box-shadow: 0 2px 6px rgba(0,0,0,0.2);
  transition: .3s;
}

input:checked + .toggle-slider {
  background: #2563eb;
}

input:checked + .toggle-slider:before {
  transform: translateX(26px);
}

/* Botones */
.cookie-footer {
  display: flex;
  gap: 12px;
  flex-wrap: wrap;
  justify-content: center;
  margin: 24px 0;
}

.btn {
  flex: 1 1 140px;
  max-width: 180px;
  padding: 12px 24px;
  border: none;
  border-radius: 10px;
  font-weight: 600;
  font-size: 0.98rem;
  cursor: pointer;
  transition: all 0.25s;
}

.btn-accept {
  background: #2563eb;
  color: white;
}

.btn-accept:hover { background: #1d4ed8; transform: translateY(-1px); }

.btn-save {
  background: #3b82f6;
  color: white;
}

.btn-save:hover { background: #2563eb; transform: translateY(-1px); }

.btn-reject {
  background: #e2e8f0;
  color: #1e293b;
}

.btn-reject:hover { background: #cbd5e1; transform: translateY(-1px); }

/* Info */
.cookie-info {
  text-align: center;
  font-size: 0.86rem;
  color: #64748b;
  margin-top: 16px;
}

.cookie-info a {
  color: #2563eb;
  font-weight: 500;
}

/* Mobile */
@media (max-width: 600px) {
  .cookie-modal-content {
    padding: 24px 20px;
  }
  .cookie-footer {
    flex-direction: column;
  }
  .btn {
    max-width: none;
  }
}