/* ============================================================================
   cookie-banner.css — GDPR-compliant consent banner.

   Design principles applied (per redesign-existing-projects skill):
   - No dark patterns: "Solo essenziali" and "Accetta tutto" given EQUAL
     visual weight (one ghost, one primary, but both legible & clickable).
   - Sunset-tinted glass to match the rest of the site.
   - Bottom-fixed sheet that does not block primary content above the fold.
   - Hidden until JS populates it; default state is "no consent given" so
     no non-essential cookies fire until the user clicks Accept.
   ============================================================================ */

.cookie-banner {
  position: fixed;
  left: 50%;
  bottom: max(16px, env(safe-area-inset-bottom));
  transform: translateX(-50%) translateY(120%);
  width: min(640px, calc(100% - 32px));
  z-index: 150;            /* above modal (100), below skip-link (200) */
  background: rgba(26, 10, 21, 0.78);
  border: 1px solid rgba(255, 255, 255, 0.18);
  border-radius: 16px;
  backdrop-filter: blur(22px) saturate(1.4);
  -webkit-backdrop-filter: blur(22px) saturate(1.4);
  box-shadow:
    inset 0 1px 1px rgba(255, 255, 255, 0.18),
    0 18px 44px rgba(193, 74, 74, 0.32),
    0 6px 16px rgba(245, 166, 35, 0.18);
  transition: transform 0.45s cubic-bezier(0.34, 1.56, 0.64, 1),
              opacity 0.3s ease;
  opacity: 0;
  pointer-events: none;
}

.cookie-banner.is-open {
  transform: translateX(-50%) translateY(0);
  opacity: 1;
  pointer-events: auto;
}

.cookie-banner__inner {
  padding: 18px 22px 20px;
  color: var(--sand-cream, #FFF3E0);
  font-family: var(--font-body, 'Inter', sans-serif);
}

.cookie-banner__title {
  font-family: 'Fraunces', serif;
  font-weight: 700;
  font-size: 1.05rem;
  letter-spacing: 0.01em;
  margin: 0 0 6px;
  color: #fff;
}

.cookie-banner__text {
  font-size: 0.85rem;
  line-height: 1.5;
  margin: 0 0 14px;
  color: rgba(255, 243, 224, 0.82);
  text-wrap: pretty;
  max-width: 56ch;
}

.cookie-banner__actions {
  display: flex;
  gap: 10px;
  flex-wrap: wrap;
  justify-content: flex-end;
}

/* Buttons share the spring physics from the rest of the site. */
.cookie-btn {
  border: 0;
  border-radius: 999px;
  padding: 10px 18px;
  font-family: var(--font-body, 'Inter', sans-serif);
  font-size: 0.82rem;
  font-weight: 600;
  letter-spacing: 0.06em;
  cursor: pointer;
  transition: transform 0.35s cubic-bezier(0.34, 1.56, 0.64, 1),
              background 0.25s ease,
              box-shadow 0.25s ease,
              color 0.2s ease;
  min-height: 40px;
}

.cookie-btn:active {
  transform: scale(0.96);
  transition-duration: 0.1s;
}

.cookie-btn--ghost {
  background: transparent;
  color: rgba(255, 243, 224, 0.85);
  border: 1px solid rgba(255, 255, 255, 0.28);
}

.cookie-btn--ghost:hover,
.cookie-btn--ghost:focus-visible {
  background: rgba(255, 255, 255, 0.08);
  color: #fff;
  outline: none;
}

.cookie-btn--primary {
  /* Sunset gradient consistent with .qn-btn.is-active */
  background: linear-gradient(165deg,
    rgba(245, 166, 35, 0.95) 0%,
    rgba(193, 74, 74, 0.92) 100%);
  color: #fff;
  box-shadow:
    inset 0 1px 1px rgba(255, 255, 255, 0.45),
    0 6px 16px rgba(193, 74, 74, 0.42),
    0 2px 6px rgba(245, 166, 35, 0.22);
}

.cookie-btn--primary:hover,
.cookie-btn--primary:focus-visible {
  transform: translateY(-1px);
  box-shadow:
    inset 0 1px 1px rgba(255, 255, 255, 0.55),
    0 10px 22px rgba(193, 74, 74, 0.5),
    0 4px 10px rgba(245, 166, 35, 0.32);
  outline: none;
}

@media (max-width: 480px) {
  .cookie-banner__inner { padding: 16px 18px 18px; }
  .cookie-banner__actions { justify-content: stretch; }
  .cookie-btn { flex: 1; }
}

@media (prefers-reduced-motion: reduce) {
  .cookie-banner,
  .cookie-btn {
    transition: opacity 0.2s ease;
  }
  .cookie-banner.is-open {
    transform: translateX(-50%) translateY(0);
  }
}
