/*
  Ext Ops Panel — cookie-consent bar and the privacy-page consent switch.
  Loaded by every static page next to landing.css / site.css; both stylesheets define the
  same token names (--surface/--fg/--border/--accent-fill/...), so this file only consumes
  them and carries literal fallbacks for anything a given page may not define.
  Markup is created by /analytics.js (CSP forbids inline styles).
*/

.consent-bar {
  position: fixed;
  z-index: 60;
  inset-inline: 0;
  bottom: 0;
  display: flex;
  flex-wrap: wrap;
  gap: 14px 20px;
  align-items: center;
  justify-content: center;
  padding: 14px 20px;
  background: var(--surface, #191510);
  color: var(--fg, #f4efe6);
  border-top: 1px solid var(--border, #342c1f);
  box-shadow: var(--sh-md, 0 6px 22px rgba(0, 0, 0, 0.45));
  animation: consent-in var(--dur-base, 200ms) var(--ease-standard, ease-out);
}

@keyframes consent-in {
  from {
    transform: translateY(100%);
  }
}

@media (prefers-reduced-motion: reduce) {
  .consent-bar {
    animation: none;
  }
}

.consent-text {
  flex: 1 1 420px;
  max-width: 760px;
  margin: 0;
  font-size: 13px;
  line-height: 1.5;
  color: var(--fg2, #ada491);
}

.consent-text a {
  color: var(--accent-text, var(--accent, #eda83c));
  text-decoration: underline;
  text-underline-offset: 2px;
}

.consent-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
}

.consent-btn {
  padding: 9px 16px;
  font: inherit;
  font-size: 13px;
  font-weight: 600;
  line-height: 1.2;
  border-radius: var(--r-md, 10px);
  border: 1px solid var(--border, #342c1f);
  cursor: pointer;
  transition: background var(--dur-fast, 120ms) var(--ease-standard, ease-out),
    border-color var(--dur-fast, 120ms) var(--ease-standard, ease-out);
}

.consent-btn-primary {
  background: var(--accent-fill, #eda83c);
  border-color: var(--accent-fill, #eda83c);
  color: var(--accent-ink, #1a1206);
}

.consent-btn-ghost {
  background: transparent;
  color: var(--fg, #f4efe6);
}

.consent-btn-primary:hover {
  filter: brightness(1.06);
}

.consent-btn-ghost:hover {
  background: var(--surface2, rgba(255, 255, 255, 0.06));
}

.consent-btn:focus-visible {
  outline: 2px solid var(--accent, #eda83c);
  outline-offset: 2px;
}

/* Privacy page: current state plus the switch that reverses the decision. */
.consent-settings {
  display: flex;
  flex-wrap: wrap;
  gap: 12px 16px;
  align-items: center;
  margin: 14px 0 0;
  padding: 14px 16px;
  background: var(--surface2, rgba(255, 255, 255, 0.04));
  border: 1px solid var(--border, #342c1f);
  border-radius: var(--r-md, 10px);
}

.consent-state {
  flex: 1 1 260px;
  margin: 0;
  font-size: 13px;
  line-height: 1.5;
  color: var(--fg2, #ada491);
}

@media (max-width: 560px) {
  .consent-bar {
    justify-content: stretch;
  }

  .consent-actions {
    width: 100%;
  }

  .consent-btn {
    flex: 1 1 auto;
  }
}
