
// CUSTOM START
// CUSTOM END

// ###REPLACE_CUSTOMS###

////////////////////////////////////////
// START OF base_end
////////////////////////////////////////

// Main css / less

*, *:before, *:after {
    box-sizing: border-box; // Really important
}

html {
    font-size: 100%; // Do not use 62.5%! See: http://www.filamentgroup.com/lab/how-we-learned-to-leave-body-font-size-alone.html
    height: 100%; // Needed so footers stay at the bottom of the viewport if the main content is not very high
//    overflow-x: hidden;
}

body {
    .swifty_mixin_area(body);
    margin: 0;

    .swifty_mixin_flex();
    .swifty_mixin_flex_direction('vertical');
    min-height:100%;
}

.swifty_area {
    // Make long words that do not fit the area break; some issues in Firefox though
    word-wrap: break-word;

//    -webkit-hyphens: auto;
//       -moz-hyphens: auto;
//        -ms-hyphens: auto;
//            hyphens: auto;
}


.swifty_area_frame {
    .swifty_mixin_area(frame);

//    margin: 0;
//    padding: 0;
    min-height:100%;

    .swifty_mixin_frame_width(@swifty_cfg_width,@swifty_cfg_boxed);

    .swifty_area_inner_frame {
//////        .swifty_mixin_flex_stretch('1 1 auto');
//////        .swifty_mixin_flex();
//////        .swifty_mixin_flex_direction('vertical');

        margin-left: auto;
        margin-right: auto;

//        max-width: @swifty_cfg_width;

        .swifty_area_inner_content_frame {
            .swifty_mixin_flex_stretch('1 1 auto');
            .swifty_mixin_flex();
            .swifty_mixin_flex_direction('vertical');
        }
    }
}

.swifty_area_topbar {
    .swifty_mixin_area(topbar);
}

.swifty_area_header {
//    background-image: xurl('@{swifty_area_header_background_image}');
    .swifty_mixin_area(header);
}

.swifty_area_navbar {
    .swifty_mixin_area(navbar);
}

.swifty_area_hub {
    .swifty_mixin_area(hub);

    position: relative;
//    height: 300px; // dorh

//    overflow-x: hidden;

    .swifty_area_inner_content_hub {
        .swifty_mixin_flex_stretch('1 1 auto');
        .swifty_mixin_flex();
        .swifty_mixin_flex_direction('horizontal');
    }
}

.swifty_area_sidebar {
    .swifty_mixin_area(sidebar);
//    overflow-x: hidden;

    .swifty_mixin_flex_stretch(~'0 0 @{swifty_area_sidebar_width}');
    width: @swifty_area_sidebar_width;
}

.swifty_area_main {
    .swifty_mixin_area(main);
//    overflow-x: hidden;

    .swifty_mixin_flex_stretch('1 1 auto');
}

.swifty_area_extrasidebar {
    .swifty_mixin_area(extrasidebar);
//    overflow-x: hidden;

    .swifty_mixin_flex_stretch(~'0 0 @{swifty_area_extrasidebar_width}');
    width: @swifty_area_extrasidebar_width;
}

.swifty_area_footer {
    .swifty_mixin_area(footer);
}

.swifty_area_bottombar {
    .swifty_mixin_area(bottombar);
}

.swifty_ssd_item_mainmenu{
    .swifty_mixin_display_item(@swifty_item_mainmenu_on);
}

.swifty_ssd_item_logo {
    .swifty_mixin_display_item(@swifty_item_logo_on);
}

.swifty_ssd_item_title {
    .swifty_mixin_display_item(@swifty_item_title_on);
}

.swifty_ssd_item_slogan {
    .swifty_mixin_display_item(@swifty_item_slogan_on);
}

////////////////
// MENU
////////////////

//.ssb_menu_collapse_button {
//    display: none;
//}
//.flexnav .touch-button {
//    display: none;
//}

////////////////
// SMALL SCREENS
////////////////

.swifty_mixin_small_screen() {

//    .swifty_area_inner_hub.swifty_area_inner {
    .swifty_area_inner_content_hub.swifty_area_inner_content {
        .swifty_mixin_flex_direction('vertical');
    }

    .swifty_area_sidebar, .swifty_area_extrasidebar {
        .swifty_mixin_flex_stretch(~'0 0 auto');
        width: 100% !important;
//        flex: 1 1;

        & > .swifty_area_inner {
            max-width: 100% !important;
        }

        //.swifty_main_menu {
        //    .swifty_mixin_menu_toggled();
        //}
        //.menu-toggle {
        //    display: none;
        //}
    }

    .swifty_area_sidebar {
        .swifty_mixin_flex_order( @swifty_area_main_flex_order + 10 );
    }

    .swifty_area_extrasidebar {
        .swifty_mixin_flex_order( @swifty_area_main_flex_order + 20 );
    }

    .swifty_area_header {
        min-height: 160px !important;
    }

    .swifty_ssd_item_logo, .swifty_ssd_item_title, .swifty_ssd_item_slogan {
        width: 100% !important;
        position: static !important;
        text-align: center;
        float: left;
    }

    .swifty_ssd_item_logo {
        margin-top: 8px;
        max-width: none;
        max-height: none;

        & div, & img {
            max-width: 75vw !important;
            max-height: 10vh !important;
            text-align: center;
            display: inline;
            float: none !important;
        }
    }

}

@media all and (max-width: 639px) {
    .swifty_mixin_small_screen();
}

.swc_display_small {
    .swifty_mixin_small_screen();
}

// TESTS

//.swifty_c5_bid_261 {
//    margin-left: -9999px;
//    padding-left: 9999px;
//    margin-right: -9999px;
//    padding-right: 9999px;
//    background-color: green;
//}
