/* Copyright © 2026 TeamSmith Enterprises LLC d/b/a SurgeXi Business Intelligence. Licensed under the Vertirite Software License — see LICENSE. */
/* Vertirite web console — browser-only styling.
 * Layered on top of styles.css (the shared renderer stylesheet). Covers three
 * things the desktop app doesn't need: the token login overlay, hiding
 * Electron-only nav, and tablet/touch responsiveness for on-LAN devices. */

/* ── hide desktop-only surfaces in the browser ──────────────────────────── */
/* Theatre + any desktop-feature nav item: the IPC bridge can't drive these in
 * a browser, so don't offer them. */
.vr-nav-feature { display: none !important; }
/* Theatre CTAs (home, plus the approvals empty/error states) point to
 * theatre.html, which the broker does NOT serve in web mode — a dead
 * internal-demo link. Hide every one so a customer never sees it. */
a[href="./theatre.html"] { display: none !important; }

/* ── login overlay ──────────────────────────────────────────────────────── */
#vrt-login {
  position: fixed;
  inset: 0;
  z-index: 9999;
  display: flex;
  flex-direction: column;
  overflow-y: auto;
  align-items: center;
  justify-content: center;
  justify-content: safe center;   /* a short screen scrolls instead of clipping the top of the card */
  background: radial-gradient(120% 120% at 50% 0%, #0d1424 0%, #070b14 60%, #04060c 100%);
  padding: 24px;
}
.vrt-login-card {
  width: 100%;
  max-width: 380px;
  background: rgba(18, 24, 40, 0.92);
  border: 1px solid rgba(120, 140, 190, 0.18);
  border-radius: 16px;
  padding: 32px 28px;
  box-shadow: 0 24px 64px rgba(0, 0, 0, 0.5);
  text-align: center;
}
.vrt-login-mark {
  font-weight: 800;
  letter-spacing: 0.14em;
  font-size: 22px;
  color: #eaf0ff;
}
.vrt-login-mark span { color: #5b8cff; }
.vrt-login-tag {
  margin: 8px 0 24px;
  color: #9fb0d0;
  font-size: 13px;
}
.vrt-login-label {
  display: block;
  text-align: left;
  font-size: 12px;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: #8092b4;
  margin-bottom: 6px;
}
#vrt-login-token {
  width: 100%;
  box-sizing: border-box;
  padding: 12px 14px;
  border-radius: 10px;
  border: 1px solid rgba(120, 140, 190, 0.25);
  background: #0b1120;
  color: #eaf0ff;
  font-size: 15px;
  outline: none;
}
#vrt-login-token:focus { border-color: #5b8cff; }
.vrt-login-err {
  text-align: left;
  color: #ff8a8a;
  font-size: 12.5px;
  margin: 10px 0 0;
}
.vrt-login-btn {
  width: 100%;
  margin-top: 18px;
  padding: 12px 14px;
  border: 0;
  border-radius: 10px;
  background: linear-gradient(180deg, #5b8cff, #3f6fe0);
  color: #fff;
  font-weight: 600;
  font-size: 15px;
  cursor: pointer;
}
.vrt-login-btn:disabled { opacity: 0.6; cursor: default; }
.vrt-login-hint {
  margin: 16px 0 0;
  color: #6f80a2;
  font-size: 11.5px;
  line-height: 1.5;
}

/* The sign-in screen's Legal links and the rev 219 notice (rev 228: the first screen a visitor sees had
 * neither). Outside the card, so the password-change card that replaces it keeps them. Brand tokens only
 * (Vertirite docs/BRAND.md, rev 230): gold on this dark ground. */
.vrt-login-legal {
  max-width: 380px;
  margin-top: 18px;
  text-align: center;
  font-size: 12px;
  line-height: 1.6;
  color: var(--vr-gold);
}
.vrt-login-legal a { color: var(--vr-gold-bright); text-decoration: underline; text-underline-offset: 2px; }
.vrt-login-legal .vrt-login-legal-co { font-size: 0.8em; color: var(--vr-gold); opacity: 0.75; }   /* muted, still readable on the dark ground */

/* ── mode authority: view only in the browser (rev 228) ─────────────────── */
/* app.js only fakes a mode switch on the client, so index.html disables the cards; show that they are. */
.vr-mode-viewonly {
  margin: 0 0 16px;
  padding: 10px 14px;
  border: 1px solid var(--vr-info);
  border-radius: 8px;
  background: var(--vr-info-soft);
  color: var(--vr-info);
  font-size: 0.9rem;
}
.vr-mode-card:disabled { cursor: default; }
.vr-mode-card:disabled:hover { box-shadow: none; transform: none; }
.vr-mode-card:disabled:not(.vr-mode-active) { opacity: 0.72; }

/* ── tablet / touch responsiveness (iPad, Galaxy Tab on the same LAN) ───── */
@media (max-width: 900px) {
  /* Collapse the fixed sidebar into a top strip so the console is usable on a
   * tablet in portrait without a desktop-width layout.
   * rev 228: this never took effect. styles.css lays .vr-app out as a GRID (so
   * flex-direction did nothing: 700-900px showed a squeezed, overlapping
   * sidebar) and hides .vr-sidebar outright below 700px, which took the whole
   * nav, the Legal menu and the rev 219 notice off phones. Below 900px the page
   * is now one scrolling column: the sidebar as a wrapped strip on top (Legal
   * label, entries and the notice included), the view below. */
  html, body { height: auto; overflow: auto; }
  .vr-app { display: flex; flex-direction: column; height: auto; width: 100%; }
  .vr-sidebar {
    display: flex !important;
    flex-direction: column;
    width: 100% !important;
    height: auto !important;
    overflow: visible;
    border-right: 0;
    border-bottom: 2px solid var(--vr-gold);
  }
  .vr-sidebar-brand { padding: 12px 16px; }
  .vr-sidebar-nav {
    flex: none;
    flex-direction: row;
    flex-wrap: wrap;
    gap: 4px;
    padding: 8px;
    overflow: visible;
  }
  .vr-sidebar-nav .vr-nav-item { padding: 6px 10px; font-size: 0.85rem; }
  .vr-nav-section { display: none; }
  /* Keep the Legal label (a full-width row, so its six entries read as one group) and the notice. */
  .vr-nav-section.vr-nav-section-legal { display: block; width: 100%; padding: 8px 6px 0; }
  .vr-sidebar-footer { width: 100%; padding: 8px 16px; }
  .vr-main { overflow: visible; padding: 16px !important; }
  .vr-view { padding: 8px 0 40px; }
  .vr-home-grid { grid-template-columns: 1fr !important; }
  .vr-mode-grid { grid-template-columns: 1fr !important; }
}

/* Larger touch targets on coarse pointers. */
@media (pointer: coarse) {
  .vr-nav-item, .vr-btn { min-height: 44px; }
}
