/*
 * File:         gahpi-jabee-agi-mode.css
 * Folder:       View_Frontend_CSS
 * Project:      Jabee — WOA (GAHPI Specification §§1, 11, 11.1)
 * Author:       Claude Code, per human lead direction
 * Date Created: 2026-11-16
 * Last Updated: 2026-11-16
 * Style:        Sequential
 *
 * Purpose:
 *   What GAHPI in Jabee AGI mode adds to GAHPI's own look
 *   (View_Frontend_JVWRenderer/style.css) at both addresses (Brief "GAHPI in
 *   Jabee AGI Mode", Parts C and D): the opaque page, the sign-in screen,
 *   the conversation at the center, the portrait place, the character
 *   count, the crisis card, and the rule that hidden stays hidden.
 *
 * Dependencies:
 *   - View_Frontend_JVWRenderer/style.css, loaded first: every color, font
 *     and shadow here is one of its own variables.
 *
 * Notes:
 *   - Opaque, with no world (GAHPI §1, Jabee AGI mode): the page's own
 *     background, never a see-through overlay.
 *   - [hidden] wins over every display rule in style.css (its round
 *     buttons and dock are display: flex), so an element the page hides is
 *     never shown (Part D, item 4).
 *   - No new palette or font: GAHPI's own.
 */

[hidden] { display: none !important; }

/* Opaque, with no world behind it. */
body.gahpi-jabee-agi-mode { background: var(--bg); }

/* The layout fills the space under the title line. */
.gahpi-layout { flex: 1; min-height: 0; display: flex; flex-direction: column; }

/* ---- Title line: the portrait place beside the name ---- */
.tl-portrait { display: inline-flex; align-items: center; justify-content: center; width: 28px; height: 28px; flex-shrink: 0; }
.tl-portrait:empty { width: 0; }
.tl-portrait-img { width: 28px; height: 28px; border-radius: 50%; object-fit: cover; border: 1px solid var(--border); }

/* ---- The sign-in screen ---- */
.sign-in { flex: 1; overflow-y: auto; display: flex; align-items: flex-start; justify-content: center; padding: 48px 16px; }
.sign-in-panel { width: 100%; max-width: 380px; display: flex; flex-direction: column; gap: 14px; }
.sign-in-title { font-family: 'Space Grotesk', sans-serif; font-size: 1.25rem; font-weight: 700; margin: 0; line-height: 1.2; }
.sign-in-step { display: flex; flex-direction: column; gap: 10px; }
.sign-in-label { font-size: 0.8rem; font-weight: 600; color: var(--fg-muted); }
.sign-in-input { background: var(--surface-2); border: 1px solid var(--border); border-radius: 999px; padding: 10px 16px; color: var(--fg); font-family: inherit; font-size: 0.92rem; }
.sign-in-text, .sign-in-official { margin: 0; font-size: 0.85rem; line-height: 1.4; color: var(--fg-muted); }
.sign-in-notice { margin: 0; font-size: 0.85rem; line-height: 1.4; color: var(--fg); background: var(--amber-dim); border: 1px solid var(--amber); border-radius: 10px; padding: 9px 12px; }
.sign-in-action { align-self: stretch; }
.sign-in-admissions { font-size: 0.82rem; color: var(--teal); text-decoration: none; }
.sign-in-admissions:hover { text-decoration: underline; }

/* A plain text action, in GAHPI's muted color. */
.link-btn { background: none; border: none; padding: 4px 2px; color: var(--fg-muted); font-family: inherit; font-size: 0.8rem; font-weight: 600; cursor: pointer; text-align: left; }
.link-btn:hover:not(:disabled) { color: var(--fg); text-decoration: underline; }
.link-btn:disabled { opacity: 0.35; cursor: default; }

/* ---- The conversation at the center ---- */
.conversation-panel { min-height: 200px; }
.conversation-thread { max-height: none; min-height: 160px; overflow-y: visible; font-size: 0.9rem; }
.conversation-thread .msg { align-items: flex-start; }
.conversation-thread .msg .txt { color: var(--fg); white-space: pre-wrap; overflow-wrap: anywhere; }
.conversation-thread .msg .who.jabee { display: inline-flex; align-items: center; gap: 4px; }

/* The status line above the composer: GAHPI's own note, in its muted tone. */
.gahpi-jabee-agi-mode .composer-note { color: var(--fg-muted); }

/* The character count under the field. */
.composer-meta { display: flex; justify-content: flex-end; padding-top: 4px; }
.char-count { font-size: 0.7rem; color: var(--fg-muted); font-variant-numeric: tabular-nums; }
.char-count.over { color: var(--rec); font-weight: 700; }

/* Close, and signing out. */
.conversation-actions { display: flex; align-items: center; justify-content: space-between; gap: 12px; flex-wrap: wrap; }
.sign-out-actions { display: inline-flex; align-items: center; gap: 6px; }
.sign-out-separator { color: var(--fg-muted); font-size: 0.8rem; }

/* ---- The crisis card (its own data only) ---- */
.crisis-card { margin: 6px 0 10px; padding: 10px 12px; border: 1px solid var(--teal); border-radius: 10px; background: var(--teal-dim); font-size: 0.84rem; line-height: 1.4; }
.crisis-card p { margin: 0 0 6px; }
.crisis-card p:last-child { margin-bottom: 0; }
.crisis-emergency a { font-family: 'Space Grotesk', sans-serif; font-weight: 700; font-size: 1.05rem; color: var(--fg); }
.crisis-service { padding: 6px 0; border-top: 1px dashed var(--border); }
.crisis-service:first-child { border-top: none; }
.crisis-service-name { font-weight: 700; }
.crisis-service-detail { color: var(--fg-muted); font-size: 0.78rem; }
.crisis-ways { margin: 4px 0; padding-left: 18px; }
