/* =====================================================
   COOKIE BANNER — Integrado con la paleta institucional
   ===================================================== */

.cookie-overlay {
  position: fixed;
  inset: 0;
  background: rgba(31, 20, 16, 0.6); /* Oscuro cálido (--qy-warm-dark) */
  z-index: 99999;

  display: none;

  align-items: flex-end;
  justify-content: center;

  padding: 1rem 1rem 1.5rem;

  backdrop-filter: blur(4px); /* Aumentado suavemente para mantener consistencia visual */
}

.cookie-banner {
  width: 100%;
  max-width: 860px;
  background: #fff8f0; /* Crema claro, como las cards del sitio */
  border: 2px solid #e94a39; /* --qy-red */
  border-radius: 16px;
  padding: 1.75rem 2rem;
  display: flex;
  flex-direction: column;
  gap: 1.25rem;
  box-shadow: 0 20px 50px -15px rgba(233, 74, 57, 0.5);
  animation: cookieSlideUp 0.35s cubic-bezier(0.22, 1, 0.36, 1);
}

@keyframes cookieSlideUp {
  from { opacity: 0; transform: translateY(24px); }
  to   { opacity: 1; transform: translateY(0); }
}

/* Cabecera */
.cookie-top {
  display: flex;
  align-items: flex-start;
  gap: 1rem;
}

.cookie-icon {
  font-size: 2rem;
  line-height: 1;
  flex-shrink: 0;
}

.cookie-text h3 {
  font-family: var(--font-display, 'Anton', Impact, sans-serif);
  font-weight: 400;
  font-size: 1.5rem;
  letter-spacing: .03em;
  text-transform: uppercase;
  color: #c53b2c; /* --qy-red-dark */
  margin-bottom: 0.4rem;
}

.cookie-text p {
  font-size: 0.85rem;
  color: #1f1410; /* --qy-warm-dark */
  line-height: 1.6;
}

.cookie-text a {
  color: #c53b2c; /* --qy-red-dark */
  font-weight: 600;
  text-decoration: underline;
  text-underline-offset: 3px;
}

/* Paneles de categorías */
.cookie-panels {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 0.75rem;
}

.cookie-panel {
  background: #ffffff;
  border: 1px solid rgba(247, 173, 97, 0.6); /* --qy-orange */
  border-radius: 10px;
  padding: 0.9rem 1rem;
  display: flex;
  gap: 0.75rem;
  align-items: flex-start;
}

.cookie-panel input[type="checkbox"] {
  width: 17px;
  height: 17px;
  accent-color: #e94a39; /* --qy-red */
  cursor: pointer;
  flex-shrink: 0;
  margin-top: 2px;
}

.cookie-panel input[type="checkbox"]:disabled {
  opacity: 0.6;
  cursor: not-allowed;
}

.panel-label {
  display: block;
  font-size: 0.78rem;
  font-weight: 600;
  color: #1f1410;
  margin-bottom: 3px;
}

.panel-desc {
  font-size: 0.72rem;
  color: rgba(31, 20, 16, 0.75);
  line-height: 1.4;
}

.panel-badge {
  font-size: 0.6rem;
  font-weight: 700;
  letter-spacing: 0.5px;
  padding: 2px 6px;
  border-radius: 4px;
  background: rgba(243, 189, 4, 0.3); /* --qy-yellow suave */
  color: #c53b2c;
  margin-left: 4px;
  vertical-align: middle;
}

/* Botones */
.cookie-actions {
  display: flex;
  gap: 0.75rem;
  flex-wrap: wrap;
  justify-content: flex-end;
  align-items: center;
}

.btn-cookie {
  font-family: var(--font-display, 'Anton', Impact, sans-serif);
  font-weight: 400;
  font-size: 0.95rem;
  letter-spacing: .05em;
  text-transform: uppercase;
  padding: 0.6rem 1.4rem;
  border-radius: 999px;
  cursor: pointer;
  border: none;
  transition: opacity 0.2s, transform 0.1s;
  line-height: 1;
}

.btn-cookie:hover  { opacity: 0.85; }
.btn-cookie:active { transform: scale(0.97); }

.btn-reject {
  background: transparent;
  border: 1px solid rgba(31, 20, 16, 0.3);
  color: rgba(31, 20, 16, 0.75);
}

.btn-custom {
  background: transparent;
  border: 2px solid #e94a39;
  color: #c53b2c;
}

.btn-accept {
  background: #e94a39; /* --qy-red, igual que el CTA del sitio */
  color: #ffffff;
  box-shadow: 0 8px 20px -8px rgba(233, 74, 57, 0.7);
}

.cookie-mini-note {
  font-size: 0.7rem;
  color: rgba(31, 20, 16, 0.55);
  text-align: center;
}

/* Responsive */
@media (max-width: 640px) {
  .cookie-banner {
    padding: 1.25rem;
    border-radius: 12px;
  }

  .cookie-panels {
    grid-template-columns: 1fr;
  }

  .cookie-actions {
    flex-direction: column;
    align-items: stretch;
  }

  .btn-cookie {
    text-align: center;
    padding: 0.75rem;
  }
}