/* stylesheet.css — chrome styling for HudView (feature 004-gnome-shell-
 * indicator, 2026-07-30 HUD redesign; hud.js). A compact pill styled after
 * GNOME's own volume/brightness OSD, positioned bottom-center (R14). The
 * wave ribbon itself is drawn in Cairo (hud.js's WaveRibbonActor, 2026-07-30
 * wave-ribbon redesign — replaces the prior segmented BarMeterActor); this
 * file styles the pill container, icon, label, and dismiss control. All of
 * this is behind the view.js seam — a redesign replaces hud.js + these
 * rules together. Replaces the prior RibbonView/`indicator.js` styling
 * entirely (deleted, not kept as an alternate).
 */

.myna-hud-pill {
    /* The gap from the bottom of the primary monitor's work area (R14/X21).
     * hud.js bottom-centres the pill inside a MonitorConstraint container
     * rather than positioning it by hand, so this margin — not a JS
     * constant — is the single place the bottom gap is defined. It has to
     * live here because St implements CSS margins by writing
     * `clutter_actor_set_margin_*`, overwriting anything JS sets, every time
     * the style resolves. */
    margin-bottom: 24px;
    padding: 10px 16px;
    spacing: 12px;
    background-color: rgba(20, 22, 28, 0.82);
    border-radius: 18px;
    border: 1px solid rgba(255, 255, 255, 0.08);
    box-shadow: 0 4px 18px rgba(0, 0, 0, 0.35);
}

.myna-hud-icon {
    color: rgba(255, 255, 255, 0.92);
}

.myna-hud-content {
    spacing: 4px;
}

.myna-hud-label {
    font-size: 11pt;
    font-weight: 600;
    letter-spacing: 0.2px;
    color: rgba(255, 255, 255, 0.92);
}

.myna-hud-ribbon {
    /* Resolve from St's native palette rather than mapping GSettings accent
     * names ourselves. This includes downstream accent choices such as
     * Ubuntu's extra colour. hud.js reads these resolved colours for Cairo. */
    -myna-ribbon-main-color: -st-accent-color;
    -myna-ribbon-highlight-color: st-lighten(-st-accent-color, 28%);
    -myna-ribbon-shadow-color: st-darken(-st-accent-color, 30%);

    /* min-height/min-width are a hard FLOOR only — the actor's actual width
     * comes from hud.js's `x_expand`/`x_align: FILL`, so it stretches to
     * fill whatever space its parent (`.myna-hud-content`) allocates,
     * reaching the pill's right edge instead of stopping at a fixed pixel
     * width (2026-07-31 fix, reported from the real installed extension:
     * the ribbon previously stopped roughly halfway across). The floor
     * still guards against the BoxLayout squeezing this actor's allocation
     * down to near-zero regardless of surrounding content — a squeeze here
     * previously made the vumeter read as permanently flat no matter the
     * real audio level (2026-07-30 manual-test follow-up: the root cause
     * of the "vumeter is flat" bug, R16a — still applicable to the wave
     * ribbon that replaced the bar meter, R17). */
    min-height: 32px;
    min-width: 160px;
}

.myna-hud-dismiss {
    color: rgba(255, 255, 255, 0.75);
}

.myna-hud-dismiss:hover {
    color: rgba(255, 255, 255, 1.0);
}

/* Severity/phase colour-coding (2026-07-30 manual-test follow-up): orange for
 * a recoverable notice, red for a critical error, and a warm tint for the
 * cold-model-load phase — so the treatment reads at a glance, not just from
 * the label text (FR-005/006/007). Toggled in hud.js via
 * hudLogic.js's `pillColorClass`. */
.myna-hud-pill.myna-hud-severity-recoverable {
    border: 1px solid rgba(245, 166, 35, 0.9);
    background-color: rgba(58, 40, 10, 0.88);
}

.myna-hud-pill.myna-hud-severity-recoverable .myna-hud-icon,
.myna-hud-pill.myna-hud-severity-recoverable .myna-hud-label {
    color: rgb(245, 166, 35);
}

.myna-hud-pill.myna-hud-severity-critical {
    border: 1px solid rgba(224, 64, 64, 0.9);
    background-color: rgba(58, 12, 12, 0.88);
}

.myna-hud-pill.myna-hud-severity-critical .myna-hud-icon,
.myna-hud-pill.myna-hud-severity-critical .myna-hud-label {
    color: rgb(224, 90, 90);
}

.myna-hud-pill.myna-hud-phase-loading {
    border: 1px solid rgba(245, 166, 35, 0.55);
}

.myna-hud-pill.myna-hud-phase-loading .myna-hud-icon,
.myna-hud-pill.myna-hud-phase-loading .myna-hud-label {
    color: rgb(245, 190, 110);
}

/* High-contrast legibility (FR-022): a brighter border/background so the
 * pill remains distinguishable from busy wallpaper without relying on the
 * icon/label colour alone. */
.hi-contrast .myna-hud-pill {
    background-color: rgba(0, 0, 0, 0.95);
    border: 2px solid rgba(255, 255, 255, 0.9);
}
