/*
 * BuildersBids Universal Mobile Portal Shell V6
 * GC + Sub + Sales Rep + Admin
 * UI ONLY
 */

.bb-v6-mobile-header,
.bb-v6-menu-overlay {
    display: none;
}

@media (max-width: 1180px) {

    body.bb-v6-portal-shell {
        overflow-x: hidden !important;
    }

    .bb-v6-mobile-header {
        display: flex !important;
        align-items: center !important;
        justify-content: space-between !important;
        gap: 16px !important;

        position: sticky !important;
        top: 0 !important;
        z-index: 10050 !important;

        width: 100% !important;
        min-height: 76px !important;
        padding: 12px 18px !important;

        background: #061a36 !important;
        border-bottom: 1px solid rgba(255,255,255,.12) !important;
        box-shadow: 0 8px 24px rgba(0,18,45,.16) !important;
    }

    .bb-v6-mobile-brand {
        display: flex !important;
        align-items: center !important;
        min-width: 0 !important;
    }

    .bb-v6-mobile-logo {
        display: block !important;
        width: auto !important;
        height: auto !important;
        max-width: 210px !important;
        max-height: 50px !important;
        min-width: 0 !important;
        object-fit: contain !important;
        margin: 0 !important;
        padding: 0 !important;
        transform: none !important;
    }

    .bb-v6-menu-button {
        flex: 0 0 auto !important;
        min-height: 48px !important;
        padding: 10px 17px !important;

        border: 1px solid rgba(255,255,255,.28) !important;
        border-radius: 14px !important;

        background: rgba(255,255,255,.06) !important;
        color: #fff !important;

        font: inherit !important;
        font-size: 17px !important;
        font-weight: 800 !important;
        line-height: 1 !important;

        cursor: pointer !important;
    }

    body.bb-v6-portal-shell .bb-v6-layout {
        display: block !important;
        grid-template-columns: minmax(0,1fr) !important;

        width: 100% !important;
        max-width: 100% !important;
        min-width: 0 !important;

        margin: 0 !important;
    }

    body.bb-v6-portal-shell .bb-v6-main {
        display: block !important;

        width: 100% !important;
        max-width: 100% !important;
        min-width: 0 !important;

        margin-left: 0 !important;
        margin-right: 0 !important;
    }

    body.bb-v6-portal-shell .bb-v6-sidebar {
        position: fixed !important;

        top: 0 !important;
        left: 0 !important;
        bottom: 0 !important;

        z-index: 10060 !important;

        width: min(340px, 88vw) !important;
        max-width: 88vw !important;
        min-width: 0 !important;

        height: 100vh !important;
        height: 100dvh !important;

        margin: 0 !important;

        overflow-y: auto !important;
        overflow-x: hidden !important;

        transform: translate3d(-105%,0,0) !important;
        transition: transform .22s ease !important;

        box-shadow: 18px 0 50px rgba(0,18,45,.30) !important;
    }

    body.bb-v6-portal-shell.bb-v6-menu-open .bb-v6-sidebar {
        transform: translate3d(0,0,0) !important;
    }

    .bb-v6-menu-overlay {
        position: fixed !important;
        inset: 0 !important;

        z-index: 10055 !important;

        background: rgba(0,12,30,.58) !important;
        backdrop-filter: blur(2px) !important;
    }

    body.bb-v6-menu-open .bb-v6-menu-overlay {
        display: block !important;
    }

    body.bb-v6-menu-open {
        overflow: hidden !important;
    }
}

@media (min-width: 1181px) {
    .bb-v6-mobile-header,
    .bb-v6-menu-overlay {
        display: none !important;
    }
}

/* ==========================================================
   BUILDERSBIDS V6 MOBILE MENU SHARP FIX
   Overlay darkens page only.
   Sidebar/menu always remains above overlay and stays sharp.
   ========================================================== */

@media (max-width: 1180px) {

    body.bb-v6-portal-shell .bb-v6-menu-overlay {
        z-index: 10040 !important;

        background: rgba(0, 12, 30, .58) !important;

        -webkit-backdrop-filter: none !important;
        backdrop-filter: none !important;

        filter: none !important;
    }

    body.bb-v6-portal-shell .layout > .sidebar {
        z-index: 10060 !important;

        -webkit-filter: none !important;
        filter: none !important;

        -webkit-backdrop-filter: none !important;
        backdrop-filter: none !important;
    }

    body.bb-v6-portal-shell .bb-v6-mobile-header {
        z-index: 10070 !important;

        -webkit-filter: none !important;
        filter: none !important;

        -webkit-backdrop-filter: none !important;
        backdrop-filter: none !important;
    }
}


/* =========================================================
   BUILDERSBIDS V6 MOBILE MENU CLEANUP
   Hide duplicate sidebar logo + invisible scrollbar
   ========================================================= */

@media (max-width: 1180px) {

    /* The mobile header already contains the BuildersBids logo.
       Do not show the original desktop/sidebar logo underneath it. */
    body.bb-v6-portal-shell .layout > .sidebar > .brand {
        display: none !important;
    }

    /* Keep menu vertically scrollable without showing the ugly
       browser scrollbar/white strip. */
    body.bb-v6-portal-shell .layout > .sidebar {
        overflow-y: auto !important;
        overflow-x: hidden !important;

        scrollbar-width: none !important;
        -ms-overflow-style: none !important;
    }

    body.bb-v6-portal-shell .layout > .sidebar::-webkit-scrollbar {
        width: 0 !important;
        height: 0 !important;
        display: none !important;
    }
}


/* =========================================================
   BUILDERSBIDS V6 MOBILE SIDEBAR HEADER OFFSET FIX
   Keep mobile drawer completely below the 76px header.
   ========================================================= */

@media (max-width: 1180px) {

    body.bb-v6-portal-shell .layout > .sidebar {
        top: 76px !important;
        bottom: auto !important;

        height: calc(100dvh - 76px) !important;
        max-height: calc(100dvh - 76px) !important;

        overflow-y: auto !important;
        overflow-x: hidden !important;
    }
}

/* =========================================================
   BUILDERSBIDS V6 MOBILE DRAWER SCROLLBAR CLEANUP
   ========================================================= */

@media (max-width: 1180px) {
    body.bb-v6-portal-shell .layout > .sidebar {
        scrollbar-width: none !important;
        -ms-overflow-style: none !important;
    }

    body.bb-v6-portal-shell .layout > .sidebar::-webkit-scrollbar {
        width: 0 !important;
        height: 0 !important;
        display: none !important;
    }
}
