/* ════════════════════════════════════════════════════════
   Cookie consent banner — shared base
   Used by both enksider.no (gold) and teeservice.no (amber)
   Site-specific overrides at bottom via .cookie-banner--gold
════════════════════════════════════════════════════════ */

/* ── Shared variables (amber/tee defaults) ───────────── */
:root {
  --ck-accent:      #d4873a;
  --ck-accent2:     #f0a855;
  --ck-accent3:     #a8621e;
  --ck-bg:          rgba(18,16,11,.97);
  --ck-border:      rgba(212,135,58,.28);
  --ck-border-soft: rgba(212,135,58,.08);
  --ck-text:        #ede8df;
  --ck-muted:       rgba(237,232,223,.65);
  --ck-panel:       rgba(255,255,255,.04);
  --ck-panel-b:     rgba(255,255,255,.07);
  --ck-heading:     'Syne', system-ui, sans-serif;
}

/* Gold overrides for enksider.no */
.cookie-banner--gold,
.cookie-settings-btn--gold {
  --ck-accent:      #c9a96e;
  --ck-accent2:     #e8c98a;
  --ck-accent3:     #a8843e;
  --ck-bg:          rgba(11,13,15,.97);
  --ck-border:      rgba(201,169,110,.28);
  --ck-border-soft: rgba(201,169,110,.07);
  --ck-heading:     'Cormorant Garamond', Georgia, serif;
}

/* ── Banner ──────────────────────────────────────────── */
.cookie-banner {
  position: fixed;
  bottom: 24px;
  left: 50%;
  transform: translateX(-50%);
  width: min(680px, calc(100vw - 32px));
  z-index: 9999;
  border-radius: 20px;
  border: 1px solid var(--ck-border);
  background: var(--ck-bg);
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  box-shadow: 0 24px 80px rgba(0,0,0,.75), 0 0 0 1px var(--ck-border-soft);
  animation: bannerIn .35s cubic-bezier(.34,1.56,.64,1) both;
}
.cookie-banner[hidden] { display: none; }

@keyframes bannerIn {
  from { opacity: 0; transform: translateX(-50%) translateY(20px) scale(.97); }
  to   { opacity: 1; transform: translateX(-50%) translateY(0) scale(1); }
}

.cookie-banner__inner {
  padding: 22px 24px 20px;
  display: flex; flex-direction: column; gap: 18px;
}

/* Top row */
.cookie-banner__top {
  display: flex; gap: 14px; align-items: flex-start;
}
.cookie-banner__icon { font-size: 26px; flex-shrink: 0; margin-top: 1px; }
.cookie-banner__text h2 {
  font-family: var(--ck-heading);
  font-size: 17px; font-weight: 600;
  color: var(--ck-text);
  margin-bottom: 6px; letter-spacing: -.01em;
}
.cookie-banner--gold .cookie-banner__text h2 {
  font-size: 20px; font-weight: 500; font-style: italic;
}
.cookie-banner__text p {
  font-size: 13px; line-height: 1.6;
  color: var(--ck-muted);
}
.cookie-banner__text a {
  color: var(--ck-accent);
  text-decoration: underline; text-underline-offset: 2px;
}
.cookie-banner__text a:hover { opacity: .8; }

/* Category toggles */
.cookie-banner__cats {
  display: flex; flex-direction: column; gap: 10px;
  padding: 14px 16px;
  border-radius: 12px;
  background: var(--ck-panel);
  border: 1px solid var(--ck-panel-b);
}

.cookie-cat {
  display: flex; align-items: center; gap: 14px;
  cursor: pointer;
}
.cookie-cat--required { cursor: default; }

/* Locked checkmark */
.cookie-cat__check--locked {
  width: 36px; height: 20px;
  border-radius: 999px;
  background: rgba(255,255,255,.06);
  border: 1px solid var(--ck-border);
  display: flex; align-items: center; justify-content: center;
  flex-shrink: 0;
  color: var(--ck-accent);
}

/* Toggle */
.cookie-cat__toggle { position: relative; flex-shrink: 0; }
.cookie-cat__toggle input { position: absolute; opacity: 0; width: 0; height: 0; }
.cookie-cat__slider {
  display: block;
  width: 36px; height: 20px;
  border-radius: 999px;
  background: rgba(255,255,255,.10);
  border: 1px solid rgba(255,255,255,.14);
  position: relative;
  transition: background .2s, border-color .2s;
  cursor: pointer;
}
.cookie-cat__slider::after {
  content: '';
  position: absolute; top: 2px; left: 2px;
  width: 14px; height: 14px;
  border-radius: 999px;
  background: rgba(255,255,255,.45);
  transition: transform .2s, background .2s;
}
.cookie-cat__toggle input:checked + .cookie-cat__slider {
  background: rgba(255,255,255,.08);
  border-color: var(--ck-border);
}
.cookie-cat__toggle input:checked + .cookie-cat__slider::after {
  transform: translateX(16px);
  background: var(--ck-accent);
}
.cookie-cat__toggle input:focus-visible + .cookie-cat__slider {
  outline: 2px solid var(--ck-accent); outline-offset: 2px;
}

.cookie-cat__info { display: flex; flex-direction: column; gap: 1px; }
.cookie-cat__info strong { font-size: 13px; font-weight: 600; color: var(--ck-text); }
.cookie-cat__info span  { font-size: 12px; color: rgba(237,232,223,.45); }

/* Buttons */
.cookie-banner__actions {
  display: flex; gap: 8px; flex-wrap: wrap; justify-content: flex-end;
}
.cookie-btn {
  padding: 9px 18px;
  border-radius: 10px;
  font-family: var(--ck-heading);
  font-size: 13px; font-weight: 700;
  cursor: pointer; border: none;
  transition: transform .15s, opacity .15s, box-shadow .15s;
  letter-spacing: .01em;
}
.cookie-banner--gold .cookie-btn { font-size: 12px; letter-spacing: .06em; text-transform: uppercase; }
.cookie-btn:hover { transform: translateY(-1px); }
.cookie-btn:active { transform: translateY(0); }

.cookie-btn--reject {
  background: transparent;
  border: 1px solid rgba(255,255,255,.12);
  color: rgba(237,232,223,.55);
}
.cookie-btn--reject:hover { border-color: rgba(255,255,255,.22); color: var(--ck-text); opacity: 1; }

.cookie-btn--custom {
  background: rgba(255,255,255,.06);
  border: 1px solid rgba(255,255,255,.12);
  color: var(--ck-text);
}
.cookie-btn--custom:hover { opacity: 1; background: rgba(255,255,255,.10); }

.cookie-btn--accept {
  background: linear-gradient(135deg, var(--ck-accent3), var(--ck-accent), var(--ck-accent2));
  color: #0b0d0f;
  box-shadow: 0 4px 16px rgba(201,169,110,.2);
}
.cookie-btn--accept:hover { box-shadow: 0 8px 24px rgba(201,169,110,.32); opacity: 1; }

/* ── Floating settings button ────────────────────────── */
.cookie-settings-btn {
  position: fixed;
  bottom: 20px; left: 20px;
  z-index: 9998;
  width: 40px; height: 40px;
  border-radius: 999px;
  background: var(--ck-bg);
  border: 1px solid var(--ck-border);
  font-size: 18px;
  cursor: pointer;
  display: none;
  align-items: center; justify-content: center;
  box-shadow: 0 4px 16px rgba(0,0,0,.4);
  transition: transform .18s, box-shadow .18s;
  backdrop-filter: blur(10px);
}
.cookie-settings-btn:hover { transform: scale(1.1); box-shadow: 0 8px 24px rgba(0,0,0,.5); }
.cookie-settings-btn.visible { display: flex; }

/* ── Mobile ──────────────────────────────────────────── */
@media (max-width: 520px) {
  .cookie-banner {
    bottom: 0; left: 0; right: 0;
    transform: none; width: 100%;
    border-radius: 20px 20px 0 0;
    border-bottom: none;
  }
  @keyframes bannerIn {
    from { opacity: 0; transform: translateY(30px); }
    to   { opacity: 1; transform: translateY(0); }
  }
  .cookie-banner__actions { justify-content: stretch; }
  .cookie-btn { flex: 1; text-align: center; padding: 12px 10px; }
}
