/* ============================================================
   GSMUnlockUSA Submit Orders V6.1.2.64
   Adaptive Browse Services + smooth downward Secure Connection sidebar.

   V63 behavior:
   - default/collapsed Secure: combined sidebar stays sticky
   - Browse Services keeps a stable viewport-aware tree height
   - Secure details expand to full natural height, no inner scroll
   - Secure Connection header remains the top row
   - if expanded Secure + Browse fits viewport: sidebar remains sticky
   - if it does NOT fit: sidebar is anchored at its current visual
     position and scrolls naturally with the page (no jump/overlap)
   - legacy ServiceTreeCache / mnbulk.js down()/up() remain untouched
   ============================================================ */

@media (min-width: 768px) {
    .gsm-service-sidebar-layout-row-v61 {
        display: -webkit-flex;
        display: flex;
        -webkit-align-items: stretch;
        align-items: stretch;
    }

    .gsm-service-sidebar-layout-row-v61 > [class*="col-sm-"] {
        float: none !important;
        min-width: 0;
    }

    .gsm-service-sidebar-layout-row-v61 > .col-sm-3 {
        -webkit-flex: 0 0 25%;
        flex: 0 0 25%;
        max-width: 25%;
    }

    .gsm-service-sidebar-layout-row-v61 > .col-sm-9 {
        -webkit-flex: 0 0 75%;
        flex: 0 0 75%;
        max-width: 75%;
    }

    #unlockSidebarV58.gsm-service-sidebar-v58 {
        position: relative;
        width: 100%;
        height: 100%;
        min-width: 0;
        box-sizing: border-box;
    }

    /* Normal mode: Browse + Secure float together. */
    #unlockServiceSidebarSticky.gsm-service-sidebar-sticky-v61 {
        position: -webkit-sticky;
        position: sticky;
        top: 8px;
        z-index: 4;
        width: 100%;
        min-width: 0;
        box-sizing: border-box;
    }

    #unlockServiceSidebarSticky #unlockFastServiceTreeWidget {
        margin-bottom: 8px !important;
    }

    #unlockServiceSidebarSticky #unlockSidebarSecurityV57.gsm-sidebar-security-v57 {
        position: relative !important;
        top: auto !important;
        z-index: 1;
        margin: 0 0 8px 0 !important;
        display: -webkit-flex;
        display: flex;
        -webkit-flex-direction: column;
        flex-direction: column;
        overflow: hidden;
    }

    /* V64: Secure Connection header stays on TOP. */
    #unlockServiceSidebarSticky #unlockSidebarSecurityV57 .gsm-sidebar-security-toggle-v57 {
        -webkit-order: 1;
        order: 1;
        position: relative;
        z-index: 2;
        -webkit-flex: 0 0 auto;
        flex: 0 0 auto;
    }

    /*
     * Details expand gently DOWNWARD below the header.
     * JS supplies the measured max-height during the transition, then returns
     * to natural height. overflow is only hidden while animating; there is
     * never an inner Secure scrollbar.
     */
    #unlockServiceSidebarSticky #unlockSidebarSecurityV57 .gsm-sidebar-security-details-v57 {
        -webkit-order: 2;
        order: 2;
        height: auto !important;
        max-height: 0;
        opacity: 0;
        overflow: hidden;
        overscroll-behavior: auto;
        -webkit-overflow-scrolling: auto;
        transition: max-height 280ms ease, opacity 180ms ease;
        will-change: max-height, opacity;
    }

    #unlockServiceSidebarSticky #unlockSidebarSecurityV57.gsm-security-expanded-v64 .gsm-sidebar-security-details-v57 {
        opacity: 1;
    }

    /*
     * Adaptive V63 flow mode.
     * JS applies this only when the fully expanded combined sidebar cannot
     * fit the viewport. It converts the sticky offset into normal-flow margin
     * space, preserving the current visual location without using absolute/
     * fixed positioning. The expanded sidebar therefore still contributes to
     * page height and cannot overlap the footer.
     */
    #unlockSidebarV58.gsm-service-sidebar-flow-host-v63 {
        position: relative !important;
        height: auto !important;
    }

    #unlockServiceSidebarSticky.gsm-service-sidebar-adaptive-flow-v63 {
        position: relative !important;
        top: auto !important;
        left: auto !important;
        right: auto !important;
        width: 100%;
        max-height: none !important;
        z-index: 4;
    }

    /* Safe fallback if JS is delayed/disabled. JS finalizes the exact value. */
    #unlockServiceSidebarSticky #unlockFastServiceTreeWidget #unlockFastServiceTree,
    #unlockServiceSidebarSticky #unlockFastServiceTreeWidget .gsm-service-browser-results-v57 {
        max-height: calc(100vh - 300px) !important;
    }
}

@media (max-width: 767px) {
    #unlockServiceSidebarSticky.gsm-service-sidebar-sticky-v61,
    #unlockServiceSidebarSticky.gsm-service-sidebar-adaptive-flow-v63 {
        position: static !important;
        top: auto !important;
        left: auto !important;
        right: auto !important;
        max-height: none !important;
    }

    #unlockSidebarSecurityV57.gsm-sidebar-security-v57 {
        display: -webkit-flex;
        display: flex;
        -webkit-flex-direction: column;
        flex-direction: column;
        overflow: hidden;
    }

    #unlockSidebarSecurityV57 .gsm-sidebar-security-toggle-v57 {
        -webkit-order: 1;
        order: 1;
    }

    #unlockSidebarSecurityV57 .gsm-sidebar-security-details-v57 {
        -webkit-order: 2;
        order: 2;
        height: auto !important;
        max-height: 0;
        opacity: 0;
        overflow: hidden;
        transition: max-height 280ms ease, opacity 180ms ease;
    }

    #unlockSidebarSecurityV57.gsm-security-expanded-v64 .gsm-sidebar-security-details-v57 {
        opacity: 1;
    }
}

/* ============================================================
   V6.1.2.70 - Browse Services header/icon alignment polish
   Presentation only. No service-tree IDs, onclick contracts or legacy
   down()/up() behavior are changed.
   ============================================================ */
.gsm-service-browser-v57 .gsm-service-browser-header-v57{
    display:-webkit-flex!important;
    display:flex!important;
    -webkit-align-items:center!important;
    align-items:center!important;
}
.gsm-service-browser-v57 .gsm-service-browser-title-v57{
    display:-webkit-flex!important;
    display:flex!important;
    -webkit-align-items:center!important;
    align-items:center!important;
    min-width:0!important;
    line-height:1!important;
}
.gsm-service-browser-v57 .gsm-service-browser-title-v57 > .glyphicon-th-list{
    position:relative!important;
    top:0!important;
    display:inline-block!important;
    -webkit-flex:0 0 16px!important;
    flex:0 0 16px!important;
    width:16px!important;
    margin:0 8px 0 0!important;
    padding:0!important;
    line-height:1!important;
    text-align:center!important;
    vertical-align:middle!important;
}
.gsm-service-browser-v57 .gsm-service-browser-title-v57 > span:last-child{
    display:inline-block!important;
    margin:0!important;
    padding:0!important;
    line-height:18px!important;
    vertical-align:middle!important;
}
.gsm-service-browser-v57 .gsm-service-browser-toggle-v57{
    display:-webkit-inline-flex!important;
    display:inline-flex!important;
    -webkit-align-items:center!important;
    align-items:center!important;
    -webkit-justify-content:center!important;
    justify-content:center!important;
}
.gsm-service-browser-v57 .gsm-service-browser-toggle-v57 .glyphicon{
    position:relative!important;
    top:0!important;
    margin:0!important;
    line-height:1!important;
    vertical-align:middle!important;
}

/* ============================================================
   V6.1.2.73 - Shared-site dependency-free sidebar icons
   - Browse Services icon no longer requires Bootstrap Glyphicons
   - Sidebar search magnifier no longer requires Bootstrap Glyphicons
   - Keeps legacy tree / down() / up() behavior untouched
   ============================================================ */
.gsm-service-browser-v57 .gsm-service-browser-title-icon-v73{
    display:-webkit-inline-flex!important;
    display:inline-flex!important;
    -webkit-align-items:center!important;
    align-items:center!important;
    -webkit-justify-content:center!important;
    justify-content:center!important;
    -webkit-flex:0 0 16px!important;
    flex:0 0 16px!important;
    width:16px!important;
    height:16px!important;
    margin:0 8px 0 0!important;
    padding:0!important;
    color:#4b91bc!important;
    line-height:1!important;
    vertical-align:middle!important;
}
.gsm-service-browser-v57 .gsm-service-browser-title-icon-v73 svg{
    display:block!important;
    width:14px!important;
    height:14px!important;
    margin:0!important;
    padding:0!important;
    fill:currentColor!important;
}

.gsm-service-browser-v57 .gsm-service-browser-search-v57{
    position:relative!important;
}
.gsm-service-browser-v57 .gsm-service-browser-search-svg-v73{
    position:absolute!important;
    left:12px!important;
    top:50%!important;
    width:17px!important;
    height:17px!important;
    margin:0!important;
    padding:0!important;
    color:#6f8da5!important;
    line-height:1!important;
    transform:translateY(-50%)!important;
    pointer-events:none!important;
    z-index:2!important;
}
.gsm-service-browser-v57 .gsm-service-browser-search-svg-v73 svg{
    display:block!important;
    width:17px!important;
    height:17px!important;
    margin:0!important;
    padding:0!important;
}
.gsm-service-browser-v57 .gsm-service-browser-search-v57 input{
    padding-left:38px!important;
}

@media(max-width:767px){
    .gsm-service-browser-v57 .gsm-service-browser-search-svg-v73{
        left:11px!important;
        width:16px!important;
        height:16px!important;
    }
    .gsm-service-browser-v57 .gsm-service-browser-search-svg-v73 svg{
        width:16px!important;
        height:16px!important;
    }
    .gsm-service-browser-v57 .gsm-service-browser-search-v57 input{
        padding-left:36px!important;
    }
}

/* V73: dependency-free chevrons for Browse Services + Secure Connection. */
.gsm-service-browser-v57 .gsm-service-browser-chevron-v73,
#unlockSidebarSecurityV57 .gsm-service-browser-chevron-v73{
    position:relative!important;
    display:inline-block!important;
    width:9px!important;
    height:9px!important;
    margin:0!important;
    padding:0!important;
    border-right:2px solid currentColor!important;
    border-bottom:2px solid currentColor!important;
    background:none!important;
    color:#6f8da5!important;
    line-height:1!important;
    vertical-align:middle!important;
    transform-origin:50% 50%!important;
}
.gsm-service-browser-v57 .gsm-chevron-up-v73,
#unlockSidebarSecurityV57 .gsm-chevron-up-v73{
    transform:rotate(225deg)!important;
}
.gsm-service-browser-v57 .gsm-chevron-down-v73,
#unlockSidebarSecurityV57 .gsm-chevron-down-v73{
    transform:rotate(45deg)!important;
}
.gsm-service-browser-v57 .gsm-service-browser-toggle-v57:hover .gsm-service-browser-chevron-v73,
#unlockSidebarSecurityV57 .gsm-sidebar-security-toggle-v57:hover .gsm-service-browser-chevron-v73{
    color:#3f789b!important;
}
