/* ==========================================================================
   Forge command bar — global variant (.fc-gcmdbar)
   --------------------------------------------------------------------------
   The slim command line carried by the minimal navbar on every authenticated
   non-canvas page. Deliberately quieter than the canvas bar (.fc-cmdbar in
   forge/canvas/canvas.css): this is chrome on a content page, not the primary
   surface, so it reads as a field rather than a header band.

   Own class namespace, not a reskin of .fc-cmdbar — canvas.css is only loaded
   on /, so sharing class names would render this unstyled everywhere else.

   Sits as the middle child of .navbar-minimal (brand | command | auth), which
   is already display:flex; nothing about that layout changes.
   ========================================================================== */

.fc-gcmdbar {
    display: flex;
    align-items: center;
    gap: var(--space-2);
    flex: 1 1 auto;
    /* Never crowd the brand or the auth slot at narrow widths. */
    min-width: 0;
    max-width: 420px;
    padding: 0 var(--space-2);
    background: var(--bg-subtle);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-md);
    transition: border-color var(--duration-fast) var(--easing-out);
}

.fc-gcmdbar:focus-within {
    border-color: var(--accent-teal);
}

.fc-gcmdbar-input {
    flex: 1 1 auto;
    min-width: 0;
    background: transparent;
    border: 0;
    outline: 0;
    color: var(--text-main);
    font-family: var(--font-mono);
    font-size: var(--fs-sm);
    letter-spacing: 0.02em;
    padding: var(--space-2) var(--space-1);
}

/* No text-transform. The command is sent exactly as typed and normalized
   once at dispatch — displaying a case-folded value the server never sees is
   what masked the TorchID corruption on the canvas bar. */
.fc-gcmdbar-input::placeholder {
    color: var(--text-muted);
    font-family: var(--font-body);
    letter-spacing: normal;
}

/* Shortcut affordance. Muted until the field is engaged, so it teaches
   without competing with the placeholder. */
.fc-gcmdbar-key {
    flex: 0 0 auto;
    font-family: var(--font-mono);
    font-size: var(--fs-xs);
    line-height: 1;
    color: var(--text-muted);
    background: var(--bg-muted);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-sm);
    padding: var(--space-1) var(--space-2);
}

.fc-gcmdbar:focus-within .fc-gcmdbar-key {
    color: var(--accent-teal);
    border-color: var(--accent-teal);
}

/* Narrow viewports: the brand and the auth slot win. The command line is
   still reachable from the canvas itself at /. */
@media (max-width: 640px) {
    .fc-gcmdbar {
        display: none;
    }
}

@media (prefers-reduced-motion: reduce) {
    .fc-gcmdbar {
        transition: none;
    }
}
