/* Other Functions Window
 *
 * 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.
 * Visual-only; zero JS/DOM/behavior changes.
 */
.other-functions-window {
    position: absolute;
    width: 520px;
    height: 280px;
    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%;
    left: 50%;
    transform: translate(-50%, -50%);
    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, system-ui, -apple-system, sans-serif) !important;
}

.other-functions-window.show {
    display: block;
}

.other-functions-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 — including this window's own dynamically-injected
 * message-list/locations panel text (other-functions-window.js's
 * `.textContent`/`.innerHTML` assignments), not just its static template.
 * Also supersedes the narrower .other-functions-title-text-only fix above,
 * kept as harmless redundant belt-and-suspenders.
 */
.other-functions-window,
.other-functions-window * {
    text-transform: uppercase;
}

/* Title Bar (frame — acrylic)
 *
 * Title-bar unification (RUN_ID 20260904-unify-title-bar-across-windows):
 * renamed to the shared mdc-other-functions-titlebar BEM shape, now
 * rendered via WindowTitleBar.jsx. Color values kept as this window's own
 * existing, already-shipped values rather than switched to Settings'
 * literal light "Day" palette — see status-window.css's own comment on
 * this same decision, and Implementation Notes for the full disclosure.
 */
.mdc-other-functions-titlebar {
    background: var(--win11-bg-solid-dark, #202020);
    border-bottom: 1px solid currentColor;
    color: #f3f3f3;
    padding: 0 8px;
    display: flex;
    align-items: center;
    cursor: move;
    user-select: none;
    height: 24px;
    font-size: 12px;
    font-weight: 600;
}

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

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

.mdc-other-functions-titlebar__label {
    font-size: 11px;
    font-weight: bold;
    text-align: left;
    flex: 1;
    margin-left: 4px;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
    min-width: 0;
    /* Round-2 runtime fix, must-not-regress: this label's source text
     * ("Other Functions") is typed in title case — previously always
     * rendered uppercase only because this window was a descendant of
     * .mdc-window, which force-uppercases every descendant (styles.css).
     * This window declares its own uppercase transform to preserve the
     * exact same rendered appearance as before.
     */
    text-transform: uppercase;
}

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

.mdc-other-functions-titlebar__btn {
    width: 16px;
    height: 14px;
    border: none;
    border-radius: var(--win11-radius-sm, 6px);
    background: transparent;
    color: #f3f3f3;
    font-size: 9px;
    font-weight: bold;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 0;
    transition: background 0.12s ease;
}

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

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

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

/* Button Grid (content — stays opaque) */
.other-functions-button-grid {
    display: grid;
    grid-template-columns: repeat(4, 130px);
    grid-template-rows: repeat(2, 128px);
    gap: 0;
    padding: 0;
    height: calc(100% - 24px);
    width: 100%;
    background: #d9d9d9;
}

.other-functions-function-btn {
    background: #d9d9d9;
    border: 1px solid #7a7a7a;
    color: black;
    font-size: 13px;
    font-weight: 600;
    text-transform: uppercase;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    text-align: center;
    font-family: var(--win11-font, system-ui, -apple-system, sans-serif);
    box-sizing: border-box;
    width: 130px;
    height: 128px;
}

.other-functions-function-btn:hover {
    background: #c8c8c8;
}

.other-functions-function-btn:active {
    border: 1px solid #7a7a7a;
    background: #b8b8b8;
}

.other-functions-function-btn.dark-mode-active {
    border: 1px solid #7a7a7a;
    background: #e0e0e0;
    color: black;
}

.other-functions-function-btn.sound-muted-active {
    border-color: #0067c0;
    box-shadow: inset 0 0 0 2px #0067c0;
}


.other-functions-function-btn .btn-stack {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    line-height: 1;
}

.other-functions-function-btn .btn-stack span {
    font-size: 9px;
    margin: 1px 0;
}
