/* Employee account drawer: shared portal colors, compact navigation and a quiet footer. */
@media screen and (min-width: 901px) {
    .employee-drawer-workspace, .employee-drawer-footer { display: none !important; }
}

@media screen and (max-width: 900px) {
    .page:has(.employee-mobile-tabbar) #hris-side-menu .nav-scrollable {
        width: min(82vw, 336px);
        height: calc(100dvh - 72px - env(safe-area-inset-bottom, 0px));
        bottom: calc(72px + env(safe-area-inset-bottom, 0px));
        overflow-y: auto;
        overscroll-behavior: contain;
        border-radius: 22px 0 0 0;
        background: var(--surface, #fff) !important;
        /* Move a composited layer; do not repaint the shadow during navigation. */
        transform: translate3d(104%, 0, 0);
        will-change: transform;
        visibility: hidden;
        box-shadow: -14px 0 32px #0f172a24;
        transition: transform 140ms cubic-bezier(.4, 0, 1, 1), visibility 0s linear 140ms;
    }
    .page:has(.employee-mobile-tabbar) #hris-side-menu .navbar-toggler:checked ~ .nav-scrollable {
        transform: translate3d(0, 0, 0);
        visibility: visible;
        box-shadow: -14px 0 32px #0f172a24;
        transition: transform 180ms cubic-bezier(.16, 1, .3, 1), visibility 0s;
    }
    .page:has(.employee-mobile-tabbar) #hris-side-menu::after {
        content: "";
        position: fixed;
        inset: 0;
        z-index: 82;
        background: #0f172a70;
        backdrop-filter: none;
        opacity: 0;
        pointer-events: none;
        transition: opacity 120ms ease-out;
    }
    .page:has(.employee-mobile-tabbar) #hris-side-menu:has(.navbar-toggler:checked)::after {
        opacity: 1;
        pointer-events: auto;
    }
    .page:has(.employee-mobile-tabbar) #hris-side-menu .nav-scrollable nav {
        display: flex;
        flex-direction: column;
        min-height: 100%;
        padding: 0 0 12px;
        background: var(--surface, #fff) !important;
    }
    .page:has(.employee-mobile-tabbar) #hris-side-menu .employee-drawer-profile {
        display: flex !important;
        flex: 0 0 auto;
        align-items: center !important;
        gap: 12px;
        min-height: 148px !important;
        padding: 52px 20px 22px !important;
        background: linear-gradient(125deg, #134e4a, #0f766e) !important;
        border-bottom: 3px solid #93c9bb;
    }
    .page:has(.employee-mobile-tabbar) #hris-side-menu .employee-drawer-profile::after { display: none; }
    .page:has(.employee-mobile-tabbar) #hris-side-menu .employee-drawer-profile .employee-drawer-avatar {
        width: 52px !important; height: 52px !important;
        min-width: 52px !important; min-height: 52px !important;
        max-width: 52px !important; max-height: 52px !important;
        flex: 0 0 52px;
        margin: 0 !important;
        border: 2px solid #ffffffbd !important;
    }
    .employee-drawer-identity { min-width: 0; }
    .employee-drawer-eyebrow { display: block; margin-bottom: 6px; color: #c7e8df; font-size: 9px; letter-spacing: .12em; text-transform: uppercase; }
    .page:has(.employee-mobile-tabbar) #hris-side-menu .employee-drawer-profile strong { color: #fff; font-size: 14px; line-height: 1.45; overflow-wrap: anywhere; }
    .page:has(.employee-mobile-tabbar) #hris-side-menu .employee-drawer-profile small { color: #d2eae5; font-size: 11px; margin-top: 4px; }
    .page:has(.employee-mobile-tabbar) #hris-side-menu .navbar-toggler:checked {
        width: 34px !important; height: 34px !important;
        min-width: 34px !important; min-height: 34px !important;
        top: 12px; right: 14px;
        border: 1px solid #ffffff38 !important;
        border-radius: 10px !important;
        background: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' fill='none' stroke='white' stroke-width='1.8' stroke-linecap='round' viewBox='0 0 24 24'%3E%3Cpath d='m6 6 12 12M18 6 6 18'/%3E%3C/svg%3E") center / 19px no-repeat #ffffff14 !important;
    }
    .page:has(.employee-mobile-tabbar) #hris-side-menu .employee-drawer-section-title { margin: 20px 24px 8px; color: var(--muted, #64748b); font-size: 9px; letter-spacing: .14em; }
    .page:has(.employee-mobile-tabbar) #hris-side-menu .employee-drawer-item { padding: 2px 12px; margin: 0; }
    .page:has(.employee-mobile-tabbar) #hris-side-menu .employee-drawer-item .nav-link {
        min-height: 44px !important;
        gap: 12px !important;
        padding: 10px 12px !important;
        border-radius: 10px !important;
        color: var(--text, #374151) !important;
        font-size: 12px !important;
        line-height: 1.4;
        white-space: normal;
    }
    .page:has(.employee-mobile-tabbar) #hris-side-menu .employee-drawer-item .nav-link > .solar-icon,
    .page:has(.employee-mobile-tabbar) #hris-side-menu .employee-drawer-icon { width: 19px; height: 19px; flex: 0 0 19px; color: var(--primary, #0f766e); }
    .page:has(.employee-mobile-tabbar) #hris-side-menu .employee-drawer-item .nav-link.active,
    .page:has(.employee-mobile-tabbar) #hris-side-menu .employee-drawer-item .nav-link:not(:disabled):hover {
        color: var(--primary-hover, #115e59) !important;
        background: var(--teal-soft, #e6f3ef) !important;
    }
    .page:has(.employee-mobile-tabbar) #hris-side-menu .employee-drawer-item .nav-link:focus-visible { outline: 2px solid var(--primary); outline-offset: 1px; }
    .page:has(.employee-mobile-tabbar) #hris-side-menu .employee-drawer-button:disabled { opacity: .65; cursor: default; }
    .page:has(.employee-mobile-tabbar) #hris-side-menu .employee-drawer-chevron { color: var(--muted); }
    .employee-drawer-footer { margin-top: auto; padding-top: 24px; }
    .page:has(.employee-mobile-tabbar) #hris-side-menu .employee-drawer-help .nav-link { background: var(--teal-soft, #e6f3ef) !important; min-height: 62px !important; }
    .employee-drawer-help strong, .employee-drawer-help small { display: block; }
    .employee-drawer-help small { margin-top: 3px; color: var(--muted, #64748b); font-size: 10px; }
    .page:has(.employee-mobile-tabbar) #hris-side-menu .employee-drawer-logout { margin-top: 10px; padding-top: 10px; border-top: 1px solid var(--border, #e2e8f0); }
    .page:has(.employee-mobile-tabbar) #hris-side-menu .employee-drawer-logout :is(.nav-link, .employee-drawer-icon) { color: #c14e55 !important; }
    html[data-theme="dark"] .page:has(.employee-mobile-tabbar) #hris-side-menu .employee-drawer-logout :is(.nav-link, .employee-drawer-icon) { color: #f49a9f !important; }
}

@media screen and (max-width: 900px) and (prefers-reduced-motion: reduce) {
    .page:has(.employee-mobile-tabbar) #hris-side-menu .nav-scrollable,
    .page:has(.employee-mobile-tabbar) #hris-side-menu .navbar-toggler:checked ~ .nav-scrollable,
    .page:has(.employee-mobile-tabbar) #hris-side-menu::after { transition: none !important; }
}
