/* ============================================================
   CSS Purger — Cookie Banner v2 (Discrete Bottom Bar)
   ============================================================ */

:root {
  --cb-bg:         #1c1c1e;
  --cb-bg-panel:   #2c2c2e;
  --cb-bg-item:    #3a3a3c;
  --cb-border:     rgba(255,255,255,0.10);
  --cb-text:       #e5e5e7;
  --cb-text-muted: #98989f;
  --cb-accent:     #30d158;
  --cb-accent-h:   #25a244;
  --cb-radius-sm:  6px;
  --cb-radius-md:  10px;
  --cb-radius-lg:  14px;
  --cb-font:       -apple-system, 'Segoe UI', system-ui, sans-serif;
}

/* ── Bar ─────────────────────────────────────────────────── */
#cb-bar {
  position: fixed;
  bottom: 0; left: 0; right: 0;
  z-index: 999990;
  background: var(--cb-bg);
  border-top: 1px solid var(--cb-border);
  padding: 13px 24px;
  display: flex;
  align-items: center;
  gap: 20px;
  box-shadow: 0 -4px 24px rgba(0,0,0,0.45);
  font-family: var(--cb-font);
  transform: translateY(100%);
  transition: transform 0.3s cubic-bezier(.4,0,.2,1);
}
#cb-bar.cb-show { transform: translateY(0); }

#cb-bar-text {
  flex: 1;
  font-size: 13px;
  line-height: 1.5;
  color: var(--cb-text-muted);
  min-width: 0;
}
#cb-bar-text a {
  color: var(--cb-accent);
  text-decoration: none;
}
#cb-bar-text a:hover { text-decoration: underline; }

#cb-bar-btns {
  display: flex;
  gap: 8px;
  flex-shrink: 0;
}

/* ── Buttons ─────────────────────────────────────────────── */
.cb-btn {
  padding: 8px 18px;
  border-radius: var(--cb-radius-sm);
  font-size: 13px;
  font-weight: 600;
  font-family: var(--cb-font);
  border: 1px solid transparent;
  cursor: pointer;
  white-space: nowrap;
  transition: opacity 0.15s, background 0.15s;
}
.cb-btn:hover { opacity: 0.88; }

.cb-btn-accept {
  background: var(--cb-accent);
  color: #fff;
  border-color: var(--cb-accent);
}
.cb-btn-reject {
  background: transparent;
  color: var(--cb-text);
  border-color: rgba(255,255,255,0.22);
}
.cb-btn-reject:hover { background: rgba(255,255,255,0.06); }
.cb-btn-options {
  background: transparent;
  color: var(--cb-text-muted);
  border-color: rgba(255,255,255,0.13);
}
.cb-btn-options:hover { background: rgba(255,255,255,0.05); color: var(--cb-text); }

/* ── Options panel (slides up above bar) ─────────────────── */
#cb-panel {
  position: fixed;
  bottom: 0; left: 0; right: 0;
  z-index: 999991;
  background: var(--cb-bg-panel);
  border-top: 1px solid var(--cb-border);
  border-radius: var(--cb-radius-lg) var(--cb-radius-lg) 0 0;
  box-shadow: 0 -8px 40px rgba(0,0,0,0.55);
  font-family: var(--cb-font);
  max-width: 640px;
  margin: 0 auto;
  /* left/right already 0 but we use max-width trick with margin: */
  left: 50%; right: auto;
  transform: translateX(-50%) translateY(100%);
  width: 100%;
  transition: transform 0.32s cubic-bezier(.4,0,.2,1);
}
#cb-panel.cb-show {
  transform: translateX(-50%) translateY(0);
}

#cb-panel-inner {
  padding: 20px 22px 18px;
}

#cb-panel-title {
  font-size: 15px;
  font-weight: 700;
  color: var(--cb-text);
  margin-bottom: 4px;
}
#cb-panel-desc {
  font-size: 12.5px;
  color: var(--cb-text-muted);
  line-height: 1.55;
  margin-bottom: 16px;
}
#cb-panel-desc a { color: var(--cb-accent); text-decoration: none; }

/* ── Toggle rows ─────────────────────────────────────────── */
.cb-toggle-row {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 16px;
  padding: 12px 14px;
  background: var(--cb-bg-item);
  border-radius: var(--cb-radius-md);
  margin-bottom: 8px;
}
.cb-toggle-row:last-of-type { margin-bottom: 0; }

.cb-toggle-info { flex: 1; min-width: 0; }
.cb-toggle-name {
  font-size: 13.5px;
  font-weight: 600;
  color: var(--cb-text);
  margin-bottom: 2px;
}
.cb-toggle-desc {
  font-size: 12px;
  color: var(--cb-text-muted);
  line-height: 1.45;
}
.cb-badge-required {
  display: inline-block;
  font-size: 10.5px;
  font-weight: 600;
  color: var(--cb-accent);
  background: rgba(48,209,88,0.13);
  border-radius: 4px;
  padding: 1px 7px;
  margin-left: 6px;
  vertical-align: middle;
}

/* ── iOS-style toggle ────────────────────────────────────── */
.cb-switch {
  position: relative;
  flex-shrink: 0;
  width: 44px;
  height: 26px;
  margin-top: 1px;
}
.cb-switch input {
  opacity: 0; width: 0; height: 0; position: absolute;
}
.cb-switch-track {
  position: absolute;
  inset: 0;
  border-radius: 13px;
  background: #48484a;
  transition: background 0.2s;
  cursor: pointer;
}
.cb-switch-track::after {
  content: '';
  position: absolute;
  top: 3px; left: 3px;
  width: 20px; height: 20px;
  border-radius: 50%;
  background: #fff;
  box-shadow: 0 1px 4px rgba(0,0,0,0.35);
  transition: transform 0.2s;
}
.cb-switch input:checked + .cb-switch-track {
  background: var(--cb-accent);
}
.cb-switch input:checked + .cb-switch-track::after {
  transform: translateX(18px);
}
.cb-switch input:disabled + .cb-switch-track {
  background: var(--cb-accent);
  opacity: 0.55;
  cursor: not-allowed;
}
.cb-switch input:disabled + .cb-switch-track::after {
  transform: translateX(18px);
}

/* ── Panel footer buttons ────────────────────────────────── */
#cb-panel-btns {
  display: flex;
  gap: 8px;
  margin-top: 16px;
}
#cb-panel-btns .cb-btn { flex: 1; padding: 10px 14px; font-size: 13.5px; text-align: center; }

/* ── Responsive ──────────────────────────────────────────── */
@media (max-width: 560px) {
  #cb-bar { flex-direction: column; align-items: flex-start; gap: 12px; padding: 14px 16px; }
  #cb-bar-btns { width: 100%; }
  #cb-bar-btns .cb-btn { flex: 1; text-align: center; }
  #cb-panel { max-width: 100%; border-radius: var(--cb-radius-md) var(--cb-radius-md) 0 0; }
  #cb-panel-btns { flex-wrap: wrap; }
}
