/* UI polish pass (2026-10). Loaded after site.css + messages.css. Kept separate so master's site.css edits overlay cleanly. */

/* Admin top bar: on phones the left cluster (menu + brand + DEMO badge) was flex-shrink:0 and pushed the account menu ~43px off-screen. */
@media (max-width: 767.98px) {
    .page > main > .nav-row.admin-nav-row > .flex-shrink-0:first-child {
        flex-shrink: 1;
        min-width: 0;
        overflow: hidden;
    }

    .page > main > .nav-row.admin-nav-row .admin-nav-brand {
        min-width: 0;
    }
}

@media (max-width: 419.98px) {
    /* Very narrow phones: the drawer header already says "Admin Menu"; drop the brand text to keep the account menu reachable. */
    .page > main > .nav-row.admin-nav-row .admin-nav-brand {
        display: none;
    }
}

/* Visible keyboard focus everywhere (MudBlazor resets outlines on some controls). */
:where(a, button, [role="button"], [role="tab"], input, select, textarea, .mud-button-root):focus-visible {
    outline: 2px solid var(--theme-green, #FFE566);
    outline-offset: 2px;
}

/* WCAG AA contrast: white on MudBlazor's default error (#f44336, 3.7:1) and success (#00c853) fills is too faint. */
.mud-button-filled.mud-button-filled-error,
.mud-chip.mud-chip-filled.mud-chip-color-error {
    background-color: #c62828 !important;
    color: #fff !important;
}

.mud-chip.mud-chip-filled.mud-chip-color-success {
    background-color: #1b7f3b !important;
    color: #fff !important;
}

/* Inline code on the dark admin/public theme (Bootstrap pink #d63384 misses AA on near-black). */
[data-theme="dark"] code {
    color: #ff8fc7;
}

/* Warning/info fills: site.css forces white chip labels on the dark admin theme, so darken the fills to keep white text >= 4.5:1. */
.mud-chip.mud-chip-filled.mud-chip-color-warning,
.mud-button-filled.mud-button-filled-warning {
    background-color: #8a5a00 !important;
    color: #fff !important;
}

.mud-chip.mud-chip-filled.mud-chip-color-info {
    background-color: #0b5cad !important;
    color: #fff !important;
}
/* Filled Success buttons/chips (e.g. Admin Content "Publish"): Mud default green + white text failed WCAG AA (axe color-contrast). Darker green, same as success snackbars. */
.mud-button-filled.mud-button-filled-success,
.mud-chip-filled.mud-chip-color-success {
    background-color: #116630 !important;
    color: #fff !important;
}

.mud-button-filled.mud-button-filled-success:hover {
    background-color: #0d5226 !important;
}
