/* Status Functions Window Styles
 *
 * Win11 chrome retrofit (Phase 1 desktop redesign, §D.3) — see call-log-
 * window.css's header comment for the shared frame-acrylic/opaque-content
 * pattern this file (and the other hand-rolled windows) now follows.
 * Border-theme unification pass (2026-08-25): this window's previously
 * distinctive blue title bar / orange subtitle bar identity has been
 * converted to full CAD-parity dark chrome (solid #202020 background,
 * no border, light `#f3f3f3` text) — no longer preserved as a special
 * case, per that run's explicit human-approved decision. Visual-only;
 * zero JS/DOM/behavior changes.
 */

.status-window {
    position: absolute !important;
    width: 400px;
    height: 200px;
    background: var(--win11-bg-solid-dark, #202020);
    border: none;
    border-radius: var(--win11-radius-lg, 12px);
    box-shadow: var(--win11-shadow-window, 0 32px 80px rgba(0, 0, 0, 0.7), 0 0 0 1px rgba(255, 255, 255, 0.08));
    z-index: 2100;
    top: 50% !important;
    left: 50% !important;
    transform: translate(-50%, -50%) !important;
    display: none;
    overflow: hidden;
    /* Round-2 runtime fix (Runtime Finding #6): !important is required
     * because frontend/css/fonts.css's pre-existing, untouched blanket rule
     * (`:root, body, body * { font-family: 'Courier New',... !important; }`)
     * always beats a non-!important declaration regardless of specificity —
     * scoped narrowly to this window's own frame selector, not a blanket
     * override of fonts.css for the rest of the app.
     */
    font-family: var(--win11-font, 'Consolas', monospace) !important;
}

.status-window.show {
    display: block;
}

.status-window.minimized {
    display: none;
}

/* Round-2 runtime fix, must-not-regress: this window previously always
 * rendered fully uppercase only because it was a descendant of
 * .mdc-window, which force-uppercases every descendant (styles.css'
 * `.mdc-window, .mdc-window * { text-transform: uppercase; }`). Moving
 * this window out of .mdc-window (Runtime Finding #1 fix) removed that
 * free ride, so it now declares its own equivalent rule to preserve the
 * exact same rendered appearance as before, for any current or future
 * text content.
 */
.status-window,
.status-window * {
    text-transform: uppercase;
}

/* Title Bar (frame — acrylic, tinted with the window's own blue identity)
 *
 * Title-bar unification (RUN_ID 20260904-unify-title-bar-across-windows):
 * renamed to the shared mdc-status-titlebar BEM shape (Implementation Plan
 * §1(b)) and now renders via the shared WindowTitleBar.jsx component. Color
 * values are DELIBERATELY kept as this window's own existing, already-
 * shipped values rather than switched to Settings' literal light "Day"
 * palette: `.status-window` itself (this file, unmodified by this run) has
 * been unconditionally dark since the 2026-08-25 "Border-theme unification
 * pass" (see this file's own top-of-file comment) — it has no light
 * variant to match. Applying Settings' light title-bar colors here would
 * create an immediate, always-visible light-header-on-dark-body mismatch,
 * independent of any Day/Night toggle. See Implementation Notes for the
 * full disclosure — this is a considered deviation from design spec §4's
 * literal Day-column values, not an oversight.
 */
.mdc-status-titlebar {
    background: var(--win11-bg-solid-dark, #202020);
    color: #f3f3f3;
    padding: 0 8px;
    display: flex;
    align-items: center;
    cursor: move;
    user-select: none;
    height: 20px;
    font-size: 11px;
    font-weight: 600;
    border-bottom: 1px solid currentColor;
}

/* Round-2 runtime fix (Runtime Finding #6): fonts.css's `body *` blanket
 * !important rule directly matches every descendant of the title/subtitle
 * bars too (icon/text/buttons) — inheriting alone isn't enough, a
 * directly-matching declaration always wins over an inherited one. Scoped
 * to .mdc-status-titlebar's/.status-subtitle-bar's own subtrees only.
 */
.mdc-status-titlebar,
.mdc-status-titlebar * {
    font-family: var(--win11-font, 'Segoe UI', 'Segoe UI Variable', Tahoma, Geneva, Verdana, sans-serif) !important;
}

.mdc-status-titlebar__icon {
    width: 16px;
    height: 16px;
    flex-shrink: 0;
}

.mdc-status-titlebar__label {
    font-weight: bold;
    font-size: 11px;
    text-align: left;
    flex: 1;
    margin-left: 4px;
    /* Design spec §15 edge case — required before this becomes a shared
     * contract, harmless here since this window's own label is short. */
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
    min-width: 0;
}

.mdc-status-titlebar__buttons {
    display: flex;
    gap: 2px;
}

.mdc-status-titlebar__btn {
    width: 18px;
    height: 16px;
    border: none;
    border-radius: var(--win11-radius-sm, 6px);
    background: transparent;
    color: #f3f3f3;
    font-size: 10px;
    font-weight: bold;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 0;
    position: relative;
    z-index: 1;
    user-select: none;
    transition: background 0.12s ease;
}

.mdc-status-titlebar__btn:hover {
    background: rgba(255, 255, 255, 0.08);
}

.mdc-status-titlebar__btn--close:hover {
    background: #e81123;
    color: #fff;
}

.mdc-status-titlebar .mdc-status-titlebar__btn:focus-visible {
    outline: 2px solid #fff;
    outline-offset: 2px;
}

/* Subtitle Bar (frame — keeps its orange identity, tokenized geometry only) */
.status-subtitle-bar {
    background: var(--win11-bg-solid-dark, #202020);
    color: #f3f3f3;
    padding: 4px 8px;
    display: flex;
    align-items: center;
    height: 20px;
    font-size: 11px;
    font-weight: bold;
    border-bottom: 1px solid currentColor;
}

.status-subtitle-text {
    font-weight: bold;
    font-size: 11px;
    color: #f3f3f3;
}

/* Round-2 runtime fix (Runtime Finding #6): same reasoning as the
 * .status-title-bar wildcard rule above, applied to the subtitle bar.
 */
.status-subtitle-bar,
.status-subtitle-bar * {
    font-family: var(--win11-font, 'Consolas', monospace) !important;
}

/* Button Grid (content — stays opaque) - 2x3 layout */
.status-button-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    grid-template-rows: repeat(2, 1fr);
    gap: 0;
    padding: 0;
    height: calc(100% - 40px); /* Subtract both title bars */
    width: 100%;
    background: #c0c0c0;
}

/* Function Buttons */
.status-function-btn {
    background: #c0c0c0;
    color: black;
    border: 1px solid #7a7a7a;
    padding: 10px;
    font-size: 11px;
    font-weight: bold;
    cursor: pointer;
    transition: all 0.1s;
    font-family: var(--win11-font, 'Consolas', monospace);
}

.status-function-btn:hover {
    background: #d0d0d0;
    transform: scale(1.02);
}

.status-function-btn:active {
    border: 1px solid #7a7a7a;
    transform: scale(0.98);
}
