.ast-above-header {
    z-index: 5;
}

.ast-above-header-wrap {
    position: relative;

    .ast-search-box.header-cover {
        .search-form .search-field {
            font-size: 1.3em;
        }

        button.button,
        #close {
            font-size: 1.5em;
        }
    }
    /* Search widget. */
    .widget_search {
        .search-field,
        .search-field:focus {
            width: 100%;
            padding: .66666em 3em .66666em 1em;
        }
    }

    .ast-button-wrap {
        display: none;
    }
}

.ast-above-header-section { 
    flex: auto;
    align-items: center;
    .widget{
        margin: 0 .5em;
        display: inline-block;
        vertical-align: middle;
        p,
        a {
            margin-bottom: 0;
        }
    }
    .ast-no-widget-row{
        .widget-title{
            text-transform: capitalize;
        }
        .no-widget-text{
            margin:0;
        }
    }
    .user-select {
        text-align: center;
    }
}

.ast-above-header {
    background: #fff;
    border-bottom: 1px solid #eaeaea;
    margin-left: auto;
    margin-right: auto;
    position: relative;
    @include ast-transition();

    .menu-item-has-children > a:after {
        @include ast-has-child-menu-item();
        line-height: normal;
    }

    .user-select {
        position: relative;

    }

    .ast-search-icon {
        display: block;
    }
    
    .astra-search-icon {
        display: flex;
    }

    .slide-search .search-field {
        background-color: white;
        &:focus {
            background-color: white;
        }
    }

    /* Woocommerce Above Header cart*/
    .ast-addon-cart-wrap {
        margin-top: .3em;
        padding: 0 .6em;
    }
}

.ast-above-header-section-1 {
    .ast-search-menu-icon {
        &.ast-inline-search {
            left: 0;
        }

        .search-form {
            padding-left: 3em;
            padding-right: 0;
            right: auto;
            left: -1em;
        }
    }
}

/* Above Header menu li class */

.ast-above-header-menu-items,
.ast-above-header-custom-menu-items{
    display: none;
}

.ast-above-header-section-2 .search-field {
    padding-right: 0;
}

.ast-above-header-section-1 .search-field {
    padding-left: 0;
}

.ast-header-break-point {

    .ast-above-header-mobile-inline,
    .ast-above-header-mobile-stack{
        .above-header-2{
            .ast-above-header-section-1{
                padding: 1em 0 1em 0;
            }
        }
    }

    &.ast-header-custom-item-outside{
        .ast-primary-menu-disabled {
            &.ast-above-header-merged-responsive {
                .ast-mobile-menu-buttons {
                    display: block;
                }
            }
        }
    }

    /* Hide Above Header for mobile devices  */
    &.ast-above-header-hide-on-mobile{
        .ast-above-header-wrap{
            display: none;
        }
    }
    
    .ast-above-header-merged-responsive {
        .ast-above-header-wrap {
            order: initial;
            @media (max-width: $mx-col-sm) {
                .ast-above-header-section {
                    width: 100%;
                    display: block;
                    text-align: center;
                    &.menu-above-header{
                        display:none;        
                    }
                }
                .ast-above-header{
                    padding-top: 0;
                }
            }
        }

        .ast-above-header-section {
            padding-top: .66em;
            padding-bottom: .66em;
             .widget{
                margin: 0 .5em;
                display: inline-block;
            }
        }

        .ast-above-header {
            line-height: 1.6;
            display: block;
            border-bottom-width: 0;
        }
        
        .menu-above-header {
            display:none;
        }

    }

    /* Separate Header Sectons*/
    .ast-above-header-section-separated{

        .ast-above-header-navigation {
            display: none;
            position: absolute;
            padding: 0 20px;
            bottom: 0;
            transform: translateY(100%);
            left: 0;
            z-index: 9;
            overflow-y: auto;
        }
        
        .ast-above-header-menu {
            border-top-width: 1px;
            border-style: solid;
            border-color: #dadada;
            background: #fff;
        }
        .ast-above-header {
            .ast-button-wrap {
                display: inline-block;

                .menu-above-header-toggle .mobile-menu {
                    font-size: 15px;
                    font-size: 1rem;
                    font-weight: 600;
                    }
                }
            }

        .ast-above-header-menu.submenu-with-border ul ul {
            top: 0px;
        }

        &.ast-above-header-mobile-stack{
            .ast-above-header .ast-container {
                padding: 0;
            }

            .ast-above-header-section-wrap {
                flex-direction: column;
            }

            .ast-above-header-section-1 {
                z-index: 5;
            }
            
            .ast-above-header-section-1,
            .ast-above-header-section-2 {
                justify-content: center;
                text-align: left;
                width: 100%;
            }
            .ast-above-header-section-2 {
                padding: 1em 0em 1em 0em;
            }
            &.ast-swap-above-header-sections .ast-above-header-section-2 {
                padding: 1em 0 1em 0;
            }

            &.ast-swap-above-header-sections .ast-above-header-section-1 {
                padding: 0 0 1em 0;
            }

            &.ast-swap-above-header-sections {
                .ast-above-header-1 {
                    .ast-above-header-section-1 {
                        padding: 0 0 1em 0;
                    }
                }
            }

            .ast-above-header-1 {
                .ast-above-header-section-1{
                    padding: 1em 0 0 0;
                }
            }
        }
        
    }

    .ast-above-header-menu {
        display: block;
        margin: 0 -20px;
     }
    .menu-item-has-children > a:after {
        display: none;
    }


    /* Above Header menu li class*/
    .ast-above-header-menu-items,
    .ast-above-header-custom-menu-items{
        display: block;
        width: 100%;
    }
    .ast-above-header-menu-items {
        ul{
            list-style: none;
            margin: 0;
            padding-left: 0;
            position: relative;
        }
        li {
            list-style: none;
            position: relative;
            a {
                padding: 0 20px;
                display: inline-block;
                width: 100%;
                border-bottom-width: 1px;
                border-style: solid;
                border-color: #dadada;
            }
        }
    }

    .ast-above-header-menu-items {
        &.main-header-menu{
            border-top: 0;
        }
    }

    .ast-above-header-section-wrap {
        min-height: initial;
    }
    
    .site-header {
        display: flex;
        flex-direction: column;
    }

    .main-header-bar-wrap {
        order: 0;
    }

    .ast-button-wrap .menu-above-header-toggle.toggled .menu-toggle-icon:before{
        content: "\e5cd";
    }

    .menu-above-header-toggle{
        padding: 0 .5em;
        width: auto;
        text-align: center;
    }
    .header-main-layout-2{
        .menu-above-header-toggle{
            margin-right: 0;
        }
    }

    .ast-above-header {
        line-height: 3;

        .ast-search-menu-icon .search-field {
            max-height: initial;
        }

         /* Woocommerce Above Header cart*/
        .ast-addon-cart-wrap {
            display: inline-block;
        }
    }

    .ast-above-header-section-2 {
        padding-top: .66em;
        padding-bottom: .66em;
    }
    .ast-above-header-section {
        .widget{
            margin: .5em 0;
            display: block;
        }
    }

     &.ast-woocommerce-cart-menu {
        .ast-above-header{
            .ast-site-header-cart {
                padding: 0;
            }
        }
    }
}

@media (max-width: $mx-col-sm) {
    .ast-above-header{
        padding-top: 0.5em;
    }
}


/* EDD cart for Below Header Section 1 */
.ast-above-header-section-1 {
    .ast-edd-site-header-cart {
        &:focus .widget_edd_cart_widget, &:hover .widget_edd_cart_widget {
            right: auto;
            left: 0;
        }
        .widget_edd_cart_widget{
            right: -999em;
            left: auto;
            &:before, &:after {
                left: 8px;
                right: auto;
            }
            &:after {
                margin-left: -2px;
            }
        }
    }
}
