/* FILE      dist/assets/os/os.css
   CREATED   2026-10-28 by Claude (Anthropic)
   PURPOSE   Small additions to the Indigo Glass mockup CSS for the live app: empty/loading states, toasts,
             dialogs, and button/anchor versions of mockup elements. Tokens only; no new colours. */
[hidden]{display:none!important}
a.chip,a.btn,a.li,a.ev,a.kc{text-decoration:none}
a.chip{display:inline-flex;align-items:center}
button.box,button.tg{appearance:none;padding:0;font:inherit;color:inherit;cursor:pointer}
button.tg:disabled{opacity:.5;cursor:not-allowed}
button.c{font:inherit;color:inherit}
button.li{font:inherit}
.empty{display:grid;gap:8px;justify-items:start;padding:22px;border-radius:var(--r-lg);border:1px dashed var(--edge);background:var(--glass-2);color:var(--muted)}
.empty b{color:var(--heading);font:400 22px/1.2 var(--font-display)}
.empty p{margin:0}
.nd{color:var(--approval);background:var(--approval-bg);border-radius:6px;padding:1px 6px;font:500 13px/1.5 var(--font-mono);white-space:normal}
.err{color:var(--failed);margin:0 0 12px;font-size:14px}
.skel{height:240px;border-radius:var(--r-lg);background:linear-gradient(100deg,var(--glass-2) 30%,var(--glass-3) 50%,var(--glass-2) 70%);background-size:200% 100%;animation:sk 1.4s linear infinite}
@keyframes sk{to{background-position:-200% 0}}
@media (prefers-reduced-motion:reduce){.skel{animation:none}}
.toast{position:fixed;z-index:20;left:50%;transform:translateX(-50%);bottom:96px;max-width:min(92vw,520px);padding:12px 18px;border-radius:var(--r-pill);color:var(--heading);border:1px solid var(--edge);font-weight:600}
.toast.bad{border-color:var(--failed);color:var(--failed)}
dialog.qrdlg{border:1px solid var(--edge);border-radius:var(--r-xl);padding:26px;color:var(--text);background:var(--glass-solid);max-width:min(92vw,460px);width:100%}
dialog.qrdlg::backdrop{background:var(--scrim)}
dialog.qrdlg h2{margin:0 0 14px;font:400 28px/1.15 var(--font-display);color:var(--heading)}
dialog.qrdlg img{display:block;margin:0 auto 14px;border-radius:var(--r-md);background:#fff}
dialog.qrdlg textarea,dialog.qrdlg select{width:100%}
.cntin{width:150px;height:72px;text-align:center;border:1px solid var(--edge);border-radius:18px;background:var(--glass-2);font:400 46px/1 var(--font-display);color:var(--heading)}
.cntin:focus-visible{outline:2px solid var(--focus)}
textarea.inp{height:auto;padding:12px 14px;resize:vertical}
body.phone .tabbar{padding-bottom:env(safe-area-inset-bottom)}
@media (max-width:700px){.grid[style*="grid-template-columns:1."],.grid[style*="grid-template-columns:minmax"]{grid-template-columns:1fr!important}}

/* ===== Vertical / iPad nav collapse ===== */
/* On vertical screens (portrait tablets), collapse the icon rail to a skinny bar with just the AI logo and emoji bubbles */
@media (orientation: portrait) and (max-width: 1024px) {
  /* Collapse the main nav rail */
  .nav-rail {
    width: 56px;
    min-width: 56px;
    padding: 8px 0;
  }
  
  /* Hide text labels in nav */
  .nav-rail .nav-label {
    display: none;
  }
  
  /* Keep only the AI logo visible in the rail */
  .nav-rail .nav-logo {
    display: flex;
    justify-content: center;
    margin-bottom: 24px;
  }
  
  /* Nav items become emoji-only bubbles */
  .nav-rail .nav-item {
    width: 40px;
    height: 40px;
    border-radius: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 0 auto 8px;
    font-size: 18px;
    background: var(--glass-2);
    border: 1px solid var(--edge);
  }
  
  .nav-rail .nav-item.active {
    background: var(--primary);
    color: var(--on-primary);
    border-color: var(--primary);
  }
  
  .nav-rail .nav-item:hover {
    background: var(--glass-3);
  }
  
  /* Adjust the main content area for the skinny rail */
  .os-shell {
    grid-template-columns: 56px 1fr;
  }
}

/* Landscape tablets keep full nav but with smaller touch targets if needed */
@media (orientation: landscape) and (max-width: 1180px) {
  .nav-rail {
    width: 72px;
  }
  
  .nav-rail .nav-label {
    font-size: 10px;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    padding: 0 4px;
  }
}

/* Phone portrait - bottom tab bar handles nav, rail is hidden */
@media (max-width: 599px) {
  .nav-rail {
    display: none;
  }
  
  .os-shell {
    grid-template-columns: 1fr;
  }
}
