/* =========================================
   Workspace navigation - icon rail
   workspace-nav-architecture.md "Rendering", Risks 4 and 11.
   The rail sits in the sidebar header between the logo and the Company
   Filter. Icon-only buttons, one per eligible workspace, capped at four so
   the 44px hit targets fit across the 250px sidebar at every breakpoint.
   ========================================= */

.aw-workspace-rail-container {
    padding: .4rem .75rem;
    border-bottom: 1px solid var(--aw-divider);
}

.aw-workspace-rail {
    display: flex;
    align-items: center;
    justify-content: center;
    flex-wrap: nowrap;
    gap: .5rem;
}

/* Each rail icon is its own mini POST form (WorkspaceController.Set); lay
   the forms out inline so the flex row above controls spacing, not the
   forms themselves. */
.aw-workspace-rail-form {
    display: contents;
}

.aw-workspace-rail-btn {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 32px;
    height: 32px;
    min-width: 32px;
    min-height: 32px;
    padding: 0;
    background: transparent;
    border: 1px solid transparent;
    border-radius: 8px;
    color: var(--aw-muted);
    font-size: .85rem;
    line-height: 1;
    cursor: pointer;
    transition: background .15s ease, color .15s ease, border-color .15s ease;
}

    .aw-workspace-rail-btn:hover {
        background: rgba(255, 255, 255, .12);
        color: var(--aw-white);
    }

    .aw-workspace-rail-btn:focus-visible {
        outline: 2px solid var(--aw-gold-500);
        outline-offset: 2px;
    }

    .aw-workspace-rail-btn.is-active {
        background: var(--aw-gold-500);
        border-color: var(--aw-gold-500);
        color: #0b3a23;
    }

        .aw-workspace-rail-btn.is-active:hover {
            background: var(--aw-gold-500);
            color: #0b3a23;
        }

/* Touch widths keep the 44px hit target the spec requires (Risks 4 and 11);
   desktop uses the smaller 32px buttons above at the owner's direction (2026-09-16). */
@media (max-width: 991.98px) {
    .aw-workspace-rail-container {
        padding-left: .5rem;
        padding-right: .5rem;
    }

    .aw-workspace-rail {
        gap: .35rem;
    }

    .aw-workspace-rail-btn {
        width: 44px;
        height: 44px;
        min-width: 44px;
        min-height: 44px;
        font-size: 1.05rem;
    }
}

/* "How do workspaces work?" trigger at the end of the rail (help drawer guide "workspaces"). */
.aw-workspace-rail-help {
    background: transparent;
    border: 0;
    color: var(--secondary-color);
    opacity: 0.7;
    padding: 0.15rem 0.35rem;
    cursor: pointer;
    font-size: 0.8rem;
}
.aw-workspace-rail-help:hover { opacity: 1; color: var(--accent-color); }
