/* ═══════════════════════════════════════════════════════════════════════
   viewer-lockdown.css — Bartolo lobby read-only display rules
   Stage 10.6.12 (Paul's Lobby Lockdown — A: strict reading)

   PURPOSE:
     When the active user has role 'viewer' (currently only the lobby
     account), every interactive control across the platform is hidden
     and a quiet ribbon at the top of viewport sets context for the
     visitor: "You are viewing The Lobby — a read-only demonstration."

   MECHANISM:
     A single body-level class — `viewer-locked` — toggles the entire
     lockdown. Controls tagged with `v-hide` disappear when the body
     carries the class. The ribbon appears at the top of viewport. No
     other CSS rules need to change anywhere else in the codebase.

   DESIGN INTENT (Paul, April 2026):
     - "No ability to engage the platform"
     - "No extra tools available"
     - "Just the default tickers view"

     Search is a tool. Add/remove are tools. Manage is a tool. Portfolio
     selection is a tool (lobby has only one portfolio anyway). All hidden.
     What remains: pure viewing of the seeded Watchlist (SPY, QQQ, YUM,
     AAPL) across Dashboard, News (read-only), Signal Analyzer, Gap
     Analysis, and Point & Figure.

   APPLICATION:
     - The body class is set by an inline init snippet on each page that
       awaits window.currentUserReady (from auth-state.js) and adds the
       class if user.role === 'viewer'.
     - Controls are tagged with class="v-hide" in their HTML markup.
     - The ribbon is rendered as <div class="lobby-ribbon">…</div> at the
       top of every page; it is hidden by default and shown by the body class.

   RELATIONSHIP TO THE SECURITY BOUNDARY:
     This stylesheet is a UI courtesy, not a security boundary. The actual
     enforcement lives in portfolio_service.py, which rejects every viewer-
     role write attempt with PermissionDeniedError regardless of UI state.
     If this file fails to load, the platform is still secure — the user
     would just see write controls that 403 when clicked.
   ═══════════════════════════════════════════════════════════════════════ */

/* ─── The hide rule ─────────────────────────────────────────────────── */
/* Single source of truth. Every write control across the platform that
   carries class="v-hide" disappears when the body is in lockdown mode. */
body.viewer-locked .v-hide {
  display: none !important;
}

/* ─── The lobby ribbon ──────────────────────────────────────────────── */
/* Hidden by default; visible only when the body is in lockdown mode.
   Sits above the existing nav, full-width, gold-on-dark, quiet typography.
   Sets the visitor's expectation before they wonder why buttons are missing. */
.lobby-ribbon {
  display: none;
}

body.viewer-locked .lobby-ribbon {
  display: block;
  background: linear-gradient(
    to bottom,
    rgba(212, 162, 78, 0.08),
    rgba(212, 162, 78, 0.03)
  );
  border-bottom: 1px solid rgba(212, 162, 78, 0.25);
  color: #D4A24E;
  font-family: var(--mono, 'Menlo', monospace);
  font-size: 0.75rem;
  letter-spacing: 0.04em;
  text-align: center;
  padding: 0.55rem 1rem;
  line-height: 1.5;
}

body.viewer-locked .lobby-ribbon a {
  color: #D4A24E;
  text-decoration: underline;
  text-underline-offset: 2px;
  margin-left: 0.5em;
}

body.viewer-locked .lobby-ribbon a:hover {
  color: #E5B86E;
}

/* ─── Defensive: prevent click events on hidden controls ───────────── */
/* Even with display:none, defense-in-depth — if a future CSS regression
   restores visibility accidentally, the controls remain inert in lobby mode. */
body.viewer-locked .v-hide,
body.viewer-locked .v-hide * {
  pointer-events: none !important;
}
