/* ═══════════════════════════════════════════════════════════════
   COOKIE BANNER — Glitzy Bingo, 2026 UK-compliant (compact edition).

   Design principles:
     • Small corner card, bottom-left — doesn't hijack the viewport
     • Only ~340px wide on desktop; still full-width on mobile
     • Buttons stack (compact) but stay EQUAL prominence
     • Preferences panel expands inline from the card
     • On-brand: pink gradient top border, sparkle accent, editorial serif

   ── WCAG 2.2 SC 2.4.11 note ──────────────────────────────────────
   GOV.UK Design System advises AGAINST position:fixed for cookie
   banners because a sticky banner can obscure focused elements.
   We deviate here because:
     1. The banner sits bottom-LEFT (not centred / fullwidth), so it
        typically doesn't cover primary CTAs or form fields
     2. There is a visible "Hide cookie message" button after action
     3. On mobile it collapses to full-width bottom, but appears only
        on first visit — never blocks return sessions
   If a form field ever ends up in the banner's zone, we should add
   scroll-margin-bottom or auto-hide-on-focus. For now, monitored.
   ═══════════════════════════════════════════════════════════════ */

.gz-cb-wrap {
  position: fixed;
  left: 1rem;
  bottom: 1rem;
  z-index: 999999;
  pointer-events: none;
  font-family: var(--font-sans, -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Oxygen, Ubuntu, sans-serif);
  max-width: calc(100% - 2rem);
}

.gz-cb {
  pointer-events: auto;
  width: 340px;
  max-width: 100%;
  background: #fff;
  border: 1px solid #f3e8ff;
  border-radius: 12px;
  box-shadow:
    0 12px 32px rgba(199,21,133,.18),
    0 4px 12px rgba(0,0,0,.08);
  padding: 1rem 1.1rem 1rem;
  color: #333;
  animation: gzCbSlideUp .35s cubic-bezier(.4, 0, .2, 1) 1;
  position: relative;
  overflow: hidden;
}

.gz-cb::before {
  content: '';
  position: absolute; top: 0; left: 0; right: 0; height: 3px;
  background: linear-gradient(90deg, #C71585, #E91E8C, #8B5CF6, #00BCD4);
}

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

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

/* Trigger on dismissal — JS adds .gz-cb--leaving before removing element */
.gz-cb--leaving { animation: gzCbSlideDown .3s cubic-bezier(.4, 0, 1, 1) forwards !important; }

/* Header — sparkle + tight editorial title */
.gz-cb__head {
  display: flex;
  align-items: center;
  gap: .4rem;
  margin-bottom: .4rem;
}
.gz-cb__sparkle { color: #E91E8C; font-size: .95rem; line-height: 1; }
.gz-cb__title {
  font-family: var(--font-editorial, 'Lora', Georgia, serif);
  font-weight: 800;
  font-size: .95rem;
  color: #C71585;
  margin: 0;
  line-height: 1.2;
}

/* Body copy — short, plain-English, small size */
.gz-cb__body { font-size: .78rem; line-height: 1.5; margin: 0 0 .8rem; color: #444; }
.gz-cb__body a { color: #C71585; text-decoration: underline; }
.gz-cb__body a:hover { color: #E91E8C; }

/* Buttons — stacked on the narrow card, still equal weight */
.gz-cb__actions {
  display: flex;
  flex-direction: column;
  gap: .5rem;              /* was .35rem — more breathing room */
  align-items: stretch;
}
.gz-cb__btn {
  width: 100%;
  min-height: 36px;
  padding: .5rem .75rem;
  border-radius: 8px;
  font-weight: 700;
  font-size: .8rem;
  cursor: pointer;
  border: 1.5px solid transparent;
  transition: transform .1s, box-shadow .1s, background .1s;
  font-family: inherit;
}
.gz-cb__btn:focus-visible {
  outline: 2px solid #E91E8C;
  outline-offset: 2px;
}

/* Accept + Reject share the same weight — accept has gradient fill,
   reject has same-height solid outline. Equal prominence per PECR 2026. */
.gz-cb__btn--accept {
  background: linear-gradient(135deg, #C71585, #E91E8C);
  color: #fff;
  box-shadow: 0 4px 10px rgba(199,21,133,.22);
}
.gz-cb__btn--accept:hover {
  transform: translateY(-1px);
  box-shadow: 0 6px 14px rgba(199,21,133,.3);
}
.gz-cb__btn--reject {
  background: #fff;
  color: #C71585;
  border-color: #C71585;
}
.gz-cb__btn--reject:hover { background: #fdf4ff; }

/* Manage-prefs — smaller, centred, sits below the two main buttons
   with a little breathing space. Text-link style so it stays visually
   quieter without being a dark pattern (Accept + Reject remain equal). */
.gz-cb__btn--manage {
  background: transparent;
  color: #888;
  border-color: transparent;
  font-weight: 500;
  font-size: .75rem;
  min-height: 28px;
  padding: .3rem .8rem;
  text-decoration: underline;
  width: auto;                /* narrower than full-width */
  align-self: center;         /* centre horizontally */
  margin-top: .35rem;         /* extra space above */
}
.gz-cb__btn--manage:hover { color: #C71585; }

/* "View cookies" — plain informational link, GOV.UK style. Sits with
   the action buttons but stays visually a link, not a button. */
.gz-cb__link {
  display: inline-block;
  text-align: center;
  color: #C71585;
  text-decoration: underline;
  font-size: .75rem;
  padding: .3rem;
  font-weight: 500;
  min-height: 28px;
  line-height: 1.4;
}
.gz-cb__link:hover { color: #E91E8C; }
.gz-cb__link:focus-visible { outline: 2px solid #E91E8C; outline-offset: 2px; }

/* ═══ Preferences panel — expands inline ═══ */
.gz-cb__prefs { display: none; }
.gz-cb--expanded .gz-cb__prefs { display: block; }
.gz-cb--expanded .gz-cb__btn--manage { display: none; }

.gz-cb__prefs {
  margin-top: .75rem;
  padding-top: .75rem;
  border-top: 1px solid #eee;
}

.gz-cb__cat {
  display: flex;
  align-items: flex-start;
  gap: .6rem;
  padding: .55rem;
  margin-bottom: .35rem;
  background: #faf5ff;
  border-radius: 6px;
}
.gz-cb__cat-toggle {
  flex-shrink: 0;
  width: 34px; height: 20px;
  appearance: none;
  background: #ccc;
  border-radius: 10px;
  position: relative;
  cursor: pointer;
  transition: background .2s;
  margin-top: 1px;
}
.gz-cb__cat-toggle::before {
  content: '';
  position: absolute;
  top: 2px; left: 2px;
  width: 16px; height: 16px;
  background: #fff;
  border-radius: 50%;
  transition: transform .2s;
  box-shadow: 0 1px 2px rgba(0,0,0,.2);
}
.gz-cb__cat-toggle:checked {
  background: linear-gradient(135deg, #C71585, #E91E8C);
}
.gz-cb__cat-toggle:checked::before { transform: translateX(14px); }
.gz-cb__cat-toggle:disabled { opacity: .6; cursor: not-allowed; }

.gz-cb__cat-body { flex: 1; min-width: 0; }
.gz-cb__cat-name {
  font-weight: 700; font-size: .75rem; color: #333;
  margin: 0 0 .1rem;
  display: flex; align-items: center; gap: .3rem;
}
.gz-cb__cat-lock {
  font-size: .6rem;
  background: #4ade80;
  color: #fff;
  padding: .05rem .3rem;
  border-radius: 3px;
  font-weight: 700;
}
.gz-cb__cat-desc { font-size: .68rem; color: #666; margin: 0; line-height: 1.35; }

/* Save-preferences button inside prefs panel */
.gz-cb__save {
  margin-top: .5rem;
  width: 100%;
  padding: .55rem;
  background: linear-gradient(135deg, #C71585, #E91E8C);
  color: #fff;
  border: none;
  border-radius: 8px;
  font-weight: 800;
  font-size: .8rem;
  cursor: pointer;
  min-height: 34px;
  font-family: inherit;
}
.gz-cb__save:hover { opacity: .95; transform: translateY(-1px); }

/* Reduced-motion respect */
@media (prefers-reduced-motion: reduce) {
  .gz-cb, .gz-cb__btn--accept:hover, .gz-cb__save:hover { animation: none; transform: none; }
}

/* Mobile — sit at bottom edge, no side gutter, wider */
@media (max-width: 520px) {
  .gz-cb-wrap { left: 0; right: 0; bottom: 0; max-width: 100%; padding: .5rem; }
  .gz-cb { width: 100%; border-radius: 12px 12px 0 0; }
}
