/* ============================================================
   cookie.css — GDPR/ePrivacy-compliant cookie consent banner
   Appears on first visit, persisted via first-party cookie,
   blocks non-essential analytics until user consents.
   ============================================================ */

.cookie-banner {
  position: fixed;
  left: 16px;
  right: 16px;
  bottom: 16px;
  z-index: 9993;
  max-width: 640px;
  margin-inline: auto;
  padding: 20px 22px;
  background: rgba(15, 12, 9, 0.96);
  backdrop-filter: blur(14px) saturate(1.1);
  border: 1px solid rgba(212, 169, 74, 0.25);
  border-radius: 14px;
  box-shadow: 0 24px 60px rgba(0,0,0,0.55), 0 0 0 1px rgba(212,169,74,0.08);
  color: #d8cfc2;
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Inter, sans-serif;
  transform: translateY(140%);
  opacity: 0;
  transition: transform 480ms cubic-bezier(0.22, 1, 0.36, 1), opacity 300ms;
}
.cookie-banner.is-visible {
  transform: translateY(0);
  opacity: 1;
}
.cookie-banner__eyebrow {
  font-family: "Courier Prime", "Courier New", monospace;
  font-size: 10px;
  letter-spacing: 0.25em;
  text-transform: uppercase;
  color: #d4a94a;
  margin-bottom: 8px;
}
.cookie-banner__title {
  font-family: Georgia, "Playfair Display", serif;
  font-size: 18px;
  color: #f4d89a;
  margin-bottom: 6px;
  line-height: 1.25;
}
.cookie-banner__body {
  font-size: 13px;
  line-height: 1.55;
  color: #c2b9ac;
  margin-bottom: 14px;
}
.cookie-banner__body a { color: #d4a94a; text-decoration: underline; }

.cookie-banner__actions {
  display: flex;
  gap: 10px;
  flex-wrap: wrap;
  align-items: center;
}
.cookie-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 10px 18px;
  border-radius: 8px;
  font-size: 13px;
  font-weight: 600;
  letter-spacing: 0.04em;
  cursor: pointer;
  border: 1px solid transparent;
  background: transparent;
  color: inherit;
  font-family: inherit;
  transition: background 180ms, border-color 180ms, color 180ms, transform 180ms;
}
.cookie-btn--primary {
  background: #d4a94a;
  color: #0f0c09;
}
.cookie-btn--primary:hover { background: #f4d89a; transform: translateY(-1px); }
.cookie-btn--ghost {
  border-color: rgba(212, 169, 74, 0.35);
  color: #d8cfc2;
}
.cookie-btn--ghost:hover { border-color: #d4a94a; color: #f4d89a; }
.cookie-btn--text {
  color: #8a8073;
  text-decoration: underline;
  text-underline-offset: 3px;
  padding: 10px 8px;
}
.cookie-btn--text:hover { color: #d4a94a; }

/* Prefs drawer (appears when user clicks Customise) */
.cookie-prefs {
  display: none;
  margin-top: 14px;
  padding-top: 14px;
  border-top: 1px solid rgba(212, 169, 74, 0.18);
}
.cookie-prefs.is-visible { display: block; }
.cookie-pref-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
  padding: 10px 0;
  border-bottom: 1px solid rgba(212, 169, 74, 0.1);
}
.cookie-pref-row:last-of-type { border-bottom: none; }
.cookie-pref-row__label {
  font-size: 13px;
  color: #f4d89a;
}
.cookie-pref-row__desc {
  font-size: 11px;
  color: #8a8073;
  margin-top: 2px;
}
.cookie-pref-row__toggle input[type="checkbox"] {
  width: 38px;
  height: 22px;
  appearance: none;
  background: rgba(212, 169, 74, 0.15);
  border-radius: 11px;
  position: relative;
  cursor: pointer;
  transition: background 180ms;
}
.cookie-pref-row__toggle input[type="checkbox"]::after {
  content: "";
  position: absolute;
  top: 3px; left: 3px;
  width: 16px; height: 16px;
  background: #f4d89a;
  border-radius: 50%;
  transition: left 180ms;
}
.cookie-pref-row__toggle input[type="checkbox"]:checked {
  background: #d4a94a;
}
.cookie-pref-row__toggle input[type="checkbox"]:checked::after {
  left: 19px;
  background: #0f0c09;
}
.cookie-pref-row__toggle input[type="checkbox"]:disabled {
  opacity: 0.5;
  cursor: not-allowed;
}

/* Small floating reopen button (bottom-left corner) */
.cookie-reopen {
  position: fixed;
  bottom: 16px;
  left: 16px;
  z-index: 82;
  padding: 8px 12px;
  font-family: "Courier Prime", monospace;
  font-size: 10px;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  background: rgba(26, 22, 18, 0.75);
  color: #8a8073;
  border: 1px solid rgba(212, 169, 74, 0.2);
  border-radius: 999px;
  cursor: pointer;
  opacity: 0;
  transition: opacity 300ms, color 200ms, border-color 200ms;
  pointer-events: none;
}
.cookie-reopen.is-visible {
  opacity: 0.7;
  pointer-events: auto;
}
.cookie-reopen:hover {
  opacity: 1;
  color: #d4a94a;
  border-color: #d4a94a;
}

@media (max-width: 540px) {
  .cookie-banner { padding: 16px 18px; border-radius: 10px; }
  .cookie-banner__title { font-size: 16px; }
  .cookie-btn { flex: 1 1 auto; min-width: 110px; }
  .cookie-reopen { bottom: 72px; } /* avoid sticky buy bar */
}

@media (prefers-reduced-motion: reduce) {
  .cookie-banner { transition: opacity 200ms; transform: none; }
}
