/* Table of Contents
==================================================
    #Base 960 Grid
    #Tablet (Portrait)
    #Mobile (Portrait)
    #Mobile (Landscape)
    #Clearing */

/* #Base 960 Grid
================================================== */
html.responsive {
    min-width: 0px;
}

.boxed#top {
    margin: 0 auto;
    overflow: visible; /* position:relative; z-index: 3; */
    width: 1010px;
}

.html_boxed.html_header_sticky #header {
    width: 1010px;
}

.container {
    position: relative;
    margin: 0 auto;
    clear: both;
    max-width: 1010px;

    .av-content-full.units {
        width: 100%;
    }

    .av-content-small.units {
        width: 73%;
    }

    &::after {
        content: "\0020";
        display: block;
        height: 0;
        clear: both;
        visibility: hidden;
    }
}

.inner-container {
    position: relative;
    width: 100%;
    min-height: 128px;
}

/*no z-index for container_wrap or fixed bgs start disapearing when other elements transition -> weird chrome bug*/
.container_wrap {
    clear: both;
    position: relative;
}

.unit,
.units {
    float: left;
    display: inline;
    margin-left: 50px;
    position: relative;
    z-index: 1;
    min-height: 1px;
}

.row {
    position: relative;
    margin-bottom: 20px;
    clear: both;
}

#wrap_all {
    width: 95%;
    margin: 0 auto;
    position: static; /*fixes chrome 40 issue with fixed section bgs*/
    z-index: 2;
    overflow: hidden;

    .boxed & {
        overflow: visible; /*needed for cart icon */
    }
}

/* Nested Column Classes */
body {
    .unit.alpha,
    .units.alpha,
    div .first {
        margin-left: 0;
        clear: left;
    }

    .unit.alpha,
    .units.alpha {
        width: 100%;
    }
}

div {
    .first,
    .no_margin {
        margin-left: 0;
    }

    .flex_column {
        z-index: 1;
        float: left;
        position: relative;
        min-height: 1px;
        width: 100%;

        &::before,
        &::after {
            content: '\0020';
            display: block;
            overflow: hidden;
            visibility: hidden;
            width: 0;
            height: 0;
        }

        &::after {
            clear: both;
        }
    }

    .av_one_fifth {
        margin-left: 6%;
        width: 15.2%;
    }

    .av_one_fourth {
        margin-left: 6%;
        width: 20.5%;
    }

    .av_one_third {
        margin-left: 6%;
        width: 29.333333333333332%;
    }

    .av_two_fifth {
        margin-left: 6%;
        width: 36.4%;
    }

    .av_one_half {
        margin-left: 6%;
        width: 47%;
    }

    .av_three_fifth {
        margin-left: 6%;
        width: 57.599999999999994%;
    }

    .av_two_third {
        margin-left: 6%;
        width: 64.66666666666666%;
    }

    .av_three_fourth {
        margin-left: 6%;
        width: 73.5%;
    }

    .av_four_fifth {
        margin-left: 6%;
        width: 78.8%;
    }

    .av_one_sixth {
        margin-left: 6%;
        width: 11.666666666666666%;
    }

    .av_one_seventh {
        margin-left: 6%;
        width: 9.142857142857142%;
    }

    .av_one_eighth {
        margin-left: 6%;
        width: 7.25%;
    }

    .av_one_nineth {
        margin-left: 6%;
        width: 5.777777777777778%;
    }

    .av_one_tenth {
        margin-left: 6%;
        width: 4.6%;
    }
}

#top {
    div .no_margin {
        margin-left: 0;
        margin-top: 0;
    }

    .no_margin.av_one_fifth {
        width: 20%;
    }

    .no_margin.av_one_fourth {
        width: 25%;
    }

    .no_margin.av_one_third {
        width: 33.3%;
    }

    .no_margin.av_two_fifth {
        width: 40%;
    }

    .no_margin.av_one_half {
        width: 50%;
    }

    .no_margin.av_three_fifth {
        width: 60%;
    }

    .no_margin.av_two_third {
        width: 66.6%;
    }

    .no_margin.av_three_fourth {
        width: 75%;
    }

    .no_margin.av_four_fifth {
        width: 80%;
    }

    .no_margin.av_one_sixth {
        width: 16.666666666666668%;
    }

    .no_margin.av_one_seventh {
        width: 14.285714285714286%;
    }

    .no_margin.av_one_eighth {
        width: 12.5%;
    }

    .no_margin.av_one_nineth {
        width: 11.11111111111111%;
    }

    .no_margin.av_one_tenth {
        width: 10%;
    }

    .flex_column_table {
        display: table;
        table-layout: fixed;
        width: 100%;
    }

    .flex_column_table_cell {
        float: none;
        display: table-cell;
    }

    .av-flex-placeholder {
        display: table-cell;
        width: 6%;
    }
}

.av-align-top {
    vertical-align: top;
}

.av-align-middle {
    vertical-align: middle;
}

.av-align-bottom {
    vertical-align: bottom;
}

/* #Clearing
================================================== */
/* Self Clearing Goodness */
/* Use clearfix class on parent to clear nested units,
    or wrap each row of units in a <div class="row"> */
.clearfix {
    zoom: 1;

    &::before,
    &::after {
        content: '\0020';
        display: block;
        overflow: hidden;
        visibility: hidden;
        width: 0;
        height: 0;
    }

    &::after {
        clear: both;
    }
}

.widget {
    &::before,
    &::after {
        content: '\0020';
        display: block;
        overflow: hidden;
        visibility: hidden;
        width: 0;
        height: 0;
    }
}

/* You can also use a <br class="clear" /> to clear units */
.clear {
    clear: both;
    display: block;
    overflow: hidden;
    visibility: hidden;
    width: 0;
    height: 0;
}

/* #Tablet (Portrait)
================================================== */
/* Note: Design for a width of 768px, Gutter: 30px, Unit: 32px */
@media only screen and (min-width: 768px) and (max-width: 989px) {
    .responsive {
        #top {
            overflow-x: hidden;
        }

        .boxed#top,
        .html_boxed.html_header_sticky #header {
            width: 782px;
        }

        .container {
            max-width: 782px;
        }

        .html_mobile_menu_tablet .boxed #wrap_all {
            overflow: hidden; /*needed for mobile menu scrolling */
        }

        .av_one_fourth.first.el_before_av_one_fourth.flex_column_div,
        .av_one_fourth.first + .av_one_fourth.flex_column_div,
        .av_one_fourth.first + .av_one_fourth + .av_one_fourth.flex_column_div,
        .av_one_fourth.first + .av_one_fourth + .av_one_fourth + .av_one_fourth.flex_column_div,
        .av_one_half.first + .av_one_fourth.el_before_av_one_fourth.flex_column_div,
        .av_one_half.first + .av_one_fourth.el_before_av_one_fourth + .av_one_fourth.flex_column_div,
        .avia-content-slider-inner .av_one_fourth.flex_column_div {
            margin-left: 4%;
            width: 48%;
        }

        .av_one_fourth.first.el_before_av_one_fourth.flex_column_div,
        .av_one_fourth.first + .av_one_fourth + .av_one_fourth.flex_column_div,
        .av_one_half.first + .av_one_fourth.el_before_av_one_fourth.flex_column_div,
        .av_one_fourth.first + .av_one_fourth + .av_one_half.flex_column_div,
        .avia-content-slider-inner .av_one_fourth.first.flex_column_div {
            margin-left: 0%;
            clear: both;
        }

        .av_one_half.first.el_before_av_one_fourth.flex_column_div,
        .av_one_fourth.first + .av_one_fourth + .av_one_half.flex_column_div {
            width: 100%;
        }

        .av_one_half.first + .av_one_fourth.flex_column_div,
        .av_one_half.first + .av_one_fourth + .av_one_fourth.flex_column_div,
        .av_one_fourth.first + .av_one_fourth + .av_one_fourth.flex_column_div,
        .av_one_fourth.first + .av_one_fourth + .av_one_fourth + .av_one_fourth.flex_column_div,
        .av_one_fourth.first + .av_one_fourth + .av_one_half.flex_column_div {
            margin-top: 30px;
        }
    }
}

/*  #Mobile (Portrait)
================================================== */
@media only screen and (max-width: 767px) {
    .responsive {
        .boxed #wrap_all {
            overflow: hidden; /*needed for mobile menu scrolling */
        }

        #top {
            overflow-x: hidden;

            &.boxed,
            &.boxed .stretch_full {
                width: 100%;
                max-width: 100%;
            }

            .flex_column_table_cell {
                display: block;
            }

            .flex_column_table {
                display: block;
            }

            .container .av-content-small,
            #wrap_all .flex_column,
            #wrap_all .av-flex-cells .no_margin {
                margin: 0;
                margin-bottom: 20px;
                width: 100%;
            }

            #wrap_all {
                .av-flex-cells .no_margin {
                    display: block;
                    margin: 0;
                    height: auto !important;
                    overflow: hidden;
                    padding-left: 8% !important;
                    padding-right: 8% !important;

                    .flex_cell_inner {
                        width: 100%;
                        max-width: 100%;
                        margin: 0 auto;
                    }

                    &.av-zero-padding {
                        padding-left: 0% !important;
                        padding-right: 0% !important;
                    }
                }

                .flex_column:empty {
                    margin: 0;
                }
            }
        }

        .boxed#top,
        .html_boxed.html_header_sticky #header,
        .html_boxed.html_header_transparency div #header {
            width: 100%;
            max-width: 100%;
        }

        .units,
        .unit {
            margin: 0;
        }
    }

    #wrap_all {
        width: 95%;
        max-width: 95%;
        margin: 0 auto;
        padding-left: 0;
        padding-right: 0;
    }
}

/* #Mobile (Landscape)
================================================== */
/* Note: Design for a width of 480px */
@media only screen and (min-width: 480px) and (max-width: 767px) {
    /* Empty - reserved for future mobile landscape styles */
}

/* Responsive rules for #main container and its children */
@media only screen and (max-width: 639px) {
    #main {
        .container {
            max-width: 100%;
            padding-left: 1rem;
            padding-right: 1rem;
            width: 100%;
            box-sizing: border-box;
        }

        .container_wrap {
            padding-left: 0;
            padding-right: 0;
            width: 100%;
            box-sizing: border-box;
        }

        .flex_column {
            float: none;
            width: 100% !important;
            margin-left: 0 !important;
            margin-bottom: 1.5rem;
            clear: both;
            box-sizing: border-box;

            &.av_one_half,
            &.av_one_third,
            &.av_one_fourth,
            &.av_two_third,
            &.av_three_fourth,
            &.av_one_fifth,
            &.av_two_fifth,
            &.av_three_fifth,
            &.av_four_fifth {
                width: 100% !important;
                margin-left: 0 !important;
            }
        }

        .entry-content-wrapper {
            padding: 0;
            width: 100%;
            box-sizing: border-box;
        }

        .template-page.content {
            width: 100%;
            box-sizing: border-box;
        }

        .units,
        .unit {
            width: 100% !important;
            margin-left: 0 !important;
            box-sizing: border-box;
        }
    }
}
