html.cookies-lock,
body.cookies-lock {
  overflow: hidden;
  overscroll-behavior: none;
}

/* ── Cookies Overlay ─────────────────────────── */
#cookies-overlay {
  position: fixed;
  inset: 0;
  z-index: 99999;
  display: flex;
  align-items: flex-end;
  justify-content: center;
  background: rgba(6, 8, 15, 0);
  pointer-events: none;
  opacity: 0;
  transition: opacity 0.25s cubic-bezier(0.16,1,0.3,1);
  will-change: opacity;
}
#cookies-overlay.active {
  background: rgba(6, 8, 15, 0.58);
  opacity: 1;
  pointer-events: auto;
}

/* ── Cookies Panel (bottom bar) ──────────────── */
.cookies-panel {
  width: 100%;
  max-width: 100%;
  background: rgba(6, 6, 8, 0.82);
  backdrop-filter: blur(24px) saturate(1.3);
  -webkit-backdrop-filter: blur(24px) saturate(1.3);
  border-top: 1px solid rgba(255, 255, 255, 0.10);
  border-radius: 18px 18px 0 0;
  padding: 1.2rem 2rem 1.4rem;
  box-shadow: 0 -8px 40px rgba(0, 0, 0, 0.5), inset 0 1px 0 rgba(255, 255, 255, 0.04);
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.85rem;
  transform: translateY(100%);
  transition: transform 0.32s cubic-bezier(0.16,1,0.3,1);
  will-change: transform;
}
#cookies-overlay.active .cookies-panel {
  transform: translateY(0);
}

/* ── Text ────────────────────────────────────── */
.cookies-text {
  font-family: 'Inter', system-ui, sans-serif;
  font-size: 0.82rem;
  line-height: 1.55;
  color: #d4d4d4;
  text-align: center;
  max-width: 760px;
  margin: 0;
}
.cookies-text a {
  color: #d4d4d4;
  text-decoration: underline;
  text-underline-offset: 2px;
}

/* ── Buttons row ─────────────────────────────── */
.cookies-buttons {
  display: flex;
  flex-direction: row;
  justify-content: center;
  gap: 0.6rem;
  flex-wrap: wrap;
}

.cookies-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 0.7rem 1.5rem;
  font-size: 0.85rem;
  font-weight: 600;
  letter-spacing: 0.02em;
  border-radius: 10px;
  cursor: pointer;
  transition: transform 0.2s cubic-bezier(0.16,1,0.3,1), background-color 0.2s cubic-bezier(0.16,1,0.3,1);
  text-decoration: none !important;
  border: 1px solid rgba(255, 255, 255, 0.15);
  font-family: 'Inter', system-ui, sans-serif;
  line-height: 1;
  white-space: nowrap;
  background: rgba(255, 255, 255, 0.06);
  color: #fff;
  box-shadow: 0 2px 12px rgba(0, 0, 0, 0.2), inset 0 1px 0 rgba(255, 255, 255, 0.08);
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
}
.cookies-btn:hover {
  background: rgba(255, 255, 255, 0.13);
  border-color: rgba(255, 255, 255, 0.28);
  transform: translateY(-2px);
}

/* Primary (Accept all) button variant */
.cookies-btn-primary {
  background: #fff;
  color: #0a0a0f;
  border-color: rgba(255, 255, 255, 0.9);
  font-weight: 700;
}
.cookies-btn-primary:hover {
  background: #f0f0f0;
  border-color: #fff;
  color: #0a0a0f;
}

/* ── Settings Panel ──────────────────────────── */
.cookies-settings {
  display: none;           /* shown via .open */
  grid-template-columns: 1fr;
  gap: 0.6rem;
  width: 100%;
  max-width: 620px;
  align-items: start;
}
.cookies-settings.open {
  display: grid;
}

.cookies-category {
  display: flex;
  align-items: flex-start;
  gap: 0.8rem;
  padding: 0.6rem 0.9rem;
  border-radius: 10px;
  border: 1px solid rgba(255, 255, 255, 0.07);
  background: rgba(255, 255, 255, 0.03);
}

.cookies-category.is-necessary {
  grid-column: 1 / -1;
}

.cookies-cat-toggle {
  flex-shrink: 0;
  width: 42px;
  height: 24px;
  margin-top: 2px;
  position: relative;
}
.cookies-cat-toggle input {
  opacity: 0;
  width: 0;
  height: 0;
}
.cookies-cat-slider {
  position: absolute;
  inset: 0;
  background: rgba(255, 255, 255, 0.15);
  border-radius: 12px;
  cursor: pointer;
  transition: background 0.3s;
}
.cookies-cat-slider::before {
  content: '';
  position: absolute;
  top: 3px; left: 3px;
  width: 18px; height: 18px;
  background: #fff;
  border-radius: 50%;
  transition: transform 0.3s;
  box-shadow: 0 1px 3px rgba(0,0,0,0.3);
}
.cookies-cat-toggle input:checked + .cookies-cat-slider {
  background: #4ade80;
}
.cookies-cat-toggle input:checked + .cookies-cat-slider::before {
  transform: translateX(18px);
}
.cookies-cat-toggle input:disabled + .cookies-cat-slider {
  cursor: not-allowed;
  opacity: 0.6;
  background: #4ade80;
}
.cookies-cat-toggle input:disabled + .cookies-cat-slider::before {
  transform: translateX(18px);
}

.cookies-cat-info {
  flex: 1;
  display: flex;
  flex-direction: column;
  gap: 0.15rem;
}
.cookies-cat-name {
  font-family: 'Inter', system-ui, sans-serif;
  font-size: 0.78rem;
  font-weight: 600;
  color: #fff;
}
.cookies-cat-desc {
  font-family: 'Inter', system-ui, sans-serif;
  font-size: 0.67rem;
  color: rgba(255, 255, 255, 0.5);
  line-height: 1.4;
}

.cookies-cat-badge {
  flex-shrink: 0;
  font-size: 0.6rem;
  font-weight: 600;
  letter-spacing: 0.05em;
  text-transform: uppercase;
  padding: 0.2rem 0.45rem;
  border-radius: 5px;
  margin-top: 2px;
}
.cookies-cat-badge.always {
  color: #4ade80;
  background: rgba(74, 222, 128, 0.1);
}
.cookies-cat-badge.optional {
  color: rgba(255, 255, 255, 0.45);
  background: rgba(255, 255, 255, 0.06);
}

/* ── Settings divider ────────────────────────── */
.cookies-divider {
  width: 100%;
  height: 1px;
  background: rgba(255, 255, 255, 0.07);
  margin: 0.15rem 0;
  grid-column: 1 / -1;
}

.cookies-settings .cookies-buttons {
  grid-column: 1 / -1;
}

/* ── Hide banner text when settings open ─────── */
.cookies-panel.settings-open .cookies-text,
.cookies-panel.settings-open > .cookies-buttons {
  display: none;
}

/* ── Responsive ──────────────────────────────── */
@media (max-width: 700px) {
  .cookies-panel {
    padding: 1rem 1rem 1.2rem;
    gap: 0.7rem;
  }
  .cookies-text {
    font-size: 0.74rem;
    max-width: none;
  }
  .cookies-buttons {
    flex-direction: column;
    align-items: stretch;
    width: 100%;
  }
  .cookies-btn {
    width: 100%;
    padding: 0.65rem 1rem;
    font-size: 0.82rem;
  }
  .cookies-settings {
    max-width: none;
    grid-template-columns: 1fr;
  }
}

@media (max-width: 480px) {
  .cookies-settings {
    grid-template-columns: 1fr;
  }
}
