/* ============================================================================
   brandos-admin-panel.css — Phase 10 steward-only UI (public users see nothing)
   ---------------------------------------------------------------------------
   Contract:
   • Panel HTML is injected ONLY if isSteward === true (see brandos-admin-panel.js).
   • Everything below is scoped to #brandos-admin-panel. Zero global side-effects.
   • Reduced-data browsers can drop this file via media="(prefers-reduced-data:
     no-preference)" on the <link>.
   ========================================================================== */

#brandos-admin-panel {
  position: fixed;
  top: 24px;
  right: 24px;
  width: 320px;
  max-height: calc(100vh - 48px);
  z-index: 2147483000;                 /* above everything except modals */
  background: rgba(43, 36, 24, 0.94);  /* ink @ 94% */
  color: #F6EFDF;                      /* parchment */
  font-family: system-ui, -apple-system, "Inter", sans-serif;
  font-size: 13px;
  line-height: 1.5;
  border-radius: 10px;
  box-shadow: 0 20px 60px rgba(0, 0, 0, 0.4);
  border: 1px solid rgba(180, 135, 72, 0.32); /* gold @ 32% */
  overflow: hidden;
  transform: translateX(360px);
  transition: transform 200ms cubic-bezier(0.2, 0.9, 0.3, 1);
}

#brandos-admin-panel[data-open="1"] {
  transform: translateX(0);
}

#brandos-admin-panel header {
  padding: 12px 16px;
  background: rgba(107, 31, 46, 0.72); /* wax burgundy */
  display: flex;
  align-items: center;
  justify-content: space-between;
  border-bottom: 1px solid rgba(180, 135, 72, 0.24);
}

#brandos-admin-panel h1 {
  font-size: 13px;
  font-weight: 600;
  margin: 0;
  letter-spacing: 0.02em;
  text-transform: uppercase;
}

#brandos-admin-panel button.close {
  background: transparent;
  color: inherit;
  border: 0;
  cursor: pointer;
  font-size: 18px;
  line-height: 1;
  padding: 0 4px;
  opacity: 0.7;
}
#brandos-admin-panel button.close:hover { opacity: 1; }

#brandos-admin-panel .body {
  max-height: calc(100vh - 48px - 44px);
  overflow-y: auto;
  padding: 12px 16px 16px;
}

#brandos-admin-panel .row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 8px 0;
  border-bottom: 1px dashed rgba(180, 135, 72, 0.14);
}
#brandos-admin-panel .row:last-child { border-bottom: 0; }

#brandos-admin-panel label {
  color: rgba(246, 239, 223, 0.85);
  flex: 1 1 auto;
}

#brandos-admin-panel .toggle {
  position: relative;
  width: 40px;
  height: 22px;
  background: rgba(246, 239, 223, 0.18);
  border-radius: 999px;
  cursor: pointer;
  flex: 0 0 auto;
  transition: background 160ms ease;
}
#brandos-admin-panel .toggle::after {
  content: "";
  position: absolute;
  top: 2px;
  left: 2px;
  width: 18px;
  height: 18px;
  border-radius: 50%;
  background: #F6EFDF;
  transition: transform 160ms ease;
}
#brandos-admin-panel .toggle[aria-checked="true"] {
  background: rgba(180, 135, 72, 0.72); /* gold @ 72% */
}
#brandos-admin-panel .toggle[aria-checked="true"]::after {
  transform: translateX(18px);
}

#brandos-admin-panel .scope {
  display: flex;
  gap: 6px;
  padding: 12px 0 4px;
}
#brandos-admin-panel .scope button {
  flex: 1;
  padding: 6px 8px;
  background: rgba(246, 239, 223, 0.08);
  color: inherit;
  border: 1px solid rgba(180, 135, 72, 0.24);
  border-radius: 6px;
  font-size: 11px;
  cursor: pointer;
}
#brandos-admin-panel .scope button[aria-pressed="true"] {
  background: rgba(180, 135, 72, 0.24);
  border-color: rgba(180, 135, 72, 0.6);
}

#brandos-admin-panel .footer {
  display: flex;
  gap: 8px;
  padding-top: 12px;
  border-top: 1px solid rgba(180, 135, 72, 0.24);
  margin-top: 8px;
}
#brandos-admin-panel .footer button {
  flex: 1;
  padding: 8px 10px;
  background: rgba(246, 239, 223, 0.06);
  color: inherit;
  border: 1px solid rgba(180, 135, 72, 0.32);
  border-radius: 6px;
  font-size: 12px;
  cursor: pointer;
}
#brandos-admin-panel .footer button.reset {
  background: rgba(107, 31, 46, 0.4);
  border-color: rgba(107, 31, 46, 0.6);
}
#brandos-admin-panel .footer button:hover { opacity: 0.9; }

/* ── Class hooks the panel writes onto <html>. Consumed by overlay.css.
      Kept here so the visual truth-table lives with the panel. ────────── */
html.brandos-off [data-brandos-mark] { display: none; }
html.brandos-no-seal [data-brandos-mark="seal"] { display: none; }
html.brandos-no-monogram [data-brandos-mark="monogram"] { display: none; }
html.brandos-no-wordmark .brandos-wordmark {
  font-family: inherit;
  letter-spacing: inherit;
}
html.brandos-no-motion .brandos-motion-breath,
html.brandos-no-motion .brandos-motion-arrival,
html.brandos-no-motion .brandos-motion-reveal { animation: none !important; }
html.brandos-dry-run [data-brandos-mark][data-brandos-blocked="true"] {
  outline: 2px dashed rgba(107, 31, 46, 0.5);
  outline-offset: 4px;
  display: inline-block !important;
}

@media (prefers-reduced-motion: reduce) {
  #brandos-admin-panel,
  #brandos-admin-panel .toggle,
  #brandos-admin-panel .toggle::after {
    transition: none;
  }
}
