/* ════════════════════════════════════════════════════════
   TEE Service — Cookie consent banner
   GDPR / ePrivacy compliant for Norway & EU
════════════════════════════════════════════════════════ */

/* ── 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 rgba(212,135,58,.28);
  background: rgba(18,16,11,.97);
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  box-shadow: 0 24px 80px rgba(0,0,0,.75), 0 0 0 1px rgba(212,135,58,.08);
  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: 'Syne', system-ui, sans-serif;
  font-size: 16px; font-weight: 700;
  color: #ede8df;
  margin-bottom: 6px; letter-spacing: -.01em;
}
.cookie-banner__text p {
  font-size: 13px; line-height: 1.6;
  color: rgba(237,232,223,.65);
}
.cookie-banner__text a {
  color: #d4873a; 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: rgba(255,255,255,.04);
  border: 1px solid rgba(255,255,255,.07);
}

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

/* Locked checkmark for required */
.cookie-cat__check--locked {
  width: 36px; height: 20px;
  border-radius: 999px;
  background: rgba(212,135,58,.25);
  border: 1px solid rgba(212,135,58,.4);
  display: flex; align-items: center; justify-content: center;
  flex-shrink: 0;
  color: #d4873a;
}

/* Toggle switch */
.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,.12);
  border: 1px solid rgba(255,255,255,.15);
  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,.5);
  transition: transform .2s, background .2s;
}
.cookie-cat__toggle input:checked + .cookie-cat__slider {
  background: rgba(212,135,58,.35);
  border-color: rgba(212,135,58,.5);
}
.cookie-cat__toggle input:checked + .cookie-cat__slider::after {
  transform: translateX(16px);
  background: #d4873a;
}
.cookie-cat__toggle input:focus-visible + .cookie-cat__slider {
  outline: 2px solid #d4873a;
  outline-offset: 2px;
}

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

/* Action 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: 'Syne', system-ui, sans-serif;
  font-size: 13px; font-weight: 700;
  cursor: pointer; border: none;
  transition: transform .15s, opacity .15s, box-shadow .15s;
  letter-spacing: .01em;
}
.cookie-btn:hover { transform: translateY(-1px); opacity: .9; }
.cookie-btn:active { transform: translateY(0); }

.cookie-btn--reject {
  background: transparent;
  border: 1px solid rgba(255,255,255,.14);
  color: rgba(237,232,223,.6);
}
.cookie-btn--reject:hover {
  border-color: rgba(255,255,255,.25);
  color: #ede8df;
  opacity: 1;
}

.cookie-btn--custom {
  background: rgba(255,255,255,.08);
  border: 1px solid rgba(255,255,255,.14);
  color: #ede8df;
}

.cookie-btn--accept {
  background: linear-gradient(135deg, #a8621e, #d4873a, #f0a855);
  color: #0c0b09;
  box-shadow: 0 4px 16px rgba(212,135,58,.25);
}
.cookie-btn--accept:hover {
  box-shadow: 0 8px 24px rgba(212,135,58,.38);
  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: rgba(18,16,11,.9);
  border: 1px solid rgba(212,135,58,.28);
  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;
  }
}
