/* Page-level actions share the Projects directory's compact 42px sizing.
   The layer takes precedence over legacy theme !important rules; modal, card,
   editor and filter controls keep their own component styling. */
@layer athena-page-commands {
    html[data-theme] body :where(
        .projects-command-bar__actions, .workflow-command-bar__actions,
        .athena-page-hero__actions, .leave-hero__actions, .settings-hero > .hero-actions,
        .portfolio-command-actions, .vault-workspace-actions, .release-board-actions > div,
        .release-history-actions, .support-hub__actions, .db-command-actions, .page-command-actions
    ) {
        display: flex !important;
        flex-wrap: wrap !important;
        align-items: center !important;
        gap: 8px !important;
        min-width: 0 !important;
        max-width: 100% !important;

        & > form, & > .employee-export-menu {
            display: flex !important;
            flex-wrap: wrap !important;
            align-items: center !important;
            gap: 8px !important;
            min-width: 0 !important;
            max-width: 100% !important;
            margin: 0 !important;
        }
    }

    html[data-theme] body :where(
        .projects-command-bar__actions, .workflow-command-bar__actions,
        .athena-page-hero__actions, .leave-hero__actions, .settings-hero > .hero-actions,
        .portfolio-command-actions, .vault-workspace-actions, .release-board-actions,
        .release-history-actions, .support-hub__actions, .db-command-actions, .page-command-actions,
        .perf-page-header, .agents-header, .support-usage-header__month
    ) :where(a, button):not(.athena-select__trigger, .athena-select__option, .week-navigator-btn) {
        box-sizing: border-box !important;
        display: inline-flex !important;
        align-items: center !important;
        justify-content: center !important;
        flex: 0 0 auto !important;
        width: auto !important;
        min-width: 0 !important;
        max-width: 100% !important;
        height: auto !important;
        min-height: 42px !important;
        padding: 10px 14px !important;
        margin: 0 !important;
        gap: 8px !important;
        border: 1px solid var(--theme-accent) !important;
        border-radius: 8px !important;
        background: var(--theme-accent) !important;
        color: #fff !important;
        -webkit-text-fill-color: currentColor !important;
        font-family: inherit !important;
        font-size: 13.44px !important;
        font-weight: 600 !important;
        line-height: 1.2 !important;
        letter-spacing: normal !important;
        text-transform: none !important;
        text-decoration: none !important;
        text-align: center !important;
        white-space: normal !important;
        box-shadow: none !important;
        text-shadow: none !important;
        transform: none !important;
        filter: none !important;
        transition: background-color 150ms ease, border-color 150ms ease !important;

        &::before, &::after { box-shadow: none !important; }
        & :is(i, svg) {
            flex-shrink: 0 !important;
            font-size: 13px !important;
            margin: 0 !important;
            color: inherit !important;
            -webkit-text-fill-color: currentColor !important;
        }
        & :is(span, strong) {
            min-width: 0 !important;
            font-size: inherit !important;
            font-weight: inherit !important;
            line-height: inherit !important;
            color: inherit !important;
            -webkit-text-fill-color: currentColor !important;
        }
        &:hover:not(:disabled, [aria-disabled="true"]),
        &[aria-selected="true"], &.is-active {
            background: var(--theme-accent-strong, var(--theme-accent)) !important;
            border-color: var(--theme-accent-strong, var(--theme-accent)) !important;
        }
        &:focus-visible { outline: 2px solid var(--theme-accent) !important; outline-offset: 3px !important; }
        &[hidden] { display: none !important; }
    }
    @media (prefers-reduced-motion: reduce) {
        html[data-theme] body :where(.projects-command-bar__actions, .workflow-command-bar__actions, .page-command-actions) :is(a, button) { transition: none !important; }
    }
}
