/*
 * Auth-bar and pre-login gate styles for option-chain-auth.js.
 *
 * These were inline `style.cssText` assignments inside the script. They live here so the public
 * Gamma Lab surface can enforce `style-src 'self'` with no 'unsafe-inline': CSP Level 3 gates CSSOM
 * style mutations on the style policy, so an inline assignment is not something to rely on merely
 * because current browsers permit it.
 *
 * The script injects a <link> to this file itself, so every page that loads the auth client gets
 * these styles without seventeen page shells each needing an edit.
 *
 * Two placements for the auth chip, unchanged from the behavior this replaced:
 *   - INSIDE the nav bar, the BAR owns the chip's box — WebNav.css() styles `.oc-topnav #oc-auth-bar`
 *     because width and margins there are layout, not decoration. Nothing here may override that, so
 *     the free-floating rules below are scoped to `body > #oc-auth-bar`.
 *   - DETACHED (no nav on the page, e.g. the public Gamma Lab), it is a free-floating overlay that
 *     nothing else styles.
 */

/* Detached chip only: a direct child of <body> means no .oc-topnav claimed it. */
body > #oc-auth-bar {
  position: fixed;
  top: 8px;
  right: 10px;
  z-index: 99998;
  display: flex;
  align-items: center;
  gap: 8px;
  font: 12px system-ui, sans-serif;
  color: #cbd5e1;
  background: rgba(11, 14, 20, .88);
  padding: 5px 9px;
  border: 1px solid #243042;
  border-radius: 6px;
}

#oc-auth-bar .oc-auth-user {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  min-width: 0;
}

#oc-logout-btn {
  cursor: pointer;
  background: #1f2937;
  color: #e5e7eb;
  border: 1px solid #374151;
  border-radius: 4px;
  padding: 3px 9px;
  font: 12px system-ui, sans-serif;
}

/*
 * The pre-login gate: a full-viewport cover shown until the session is confirmed, so no page paints
 * its data behind an unauthenticated user for even one frame.
 */
#oc-auth-gate {
  position: fixed;
  inset: 0;
  z-index: 99999;
  display: flex;
  align-items: center;
  justify-content: center;
  background: #0b0e14;
  color: #cbd5e1;
  font: 16px system-ui, sans-serif;
  text-align: center;
  padding: 0 24px;
}

/*
 * Scroll lock while the gate is up. Replaces a documentElement.style.overflow assignment; the class
 * is added and removed by the script exactly where that assignment used to be.
 */
.oc-auth-locked {
  overflow: hidden;
}
