// (C) 2007-2020 GoodData Corporation
@import "./variables";

@mixin flex-layout($type: "") {
    .gd-flex-wrapper#{$type} {
        display: flex;
        width: 100%;
        height: 100%;
        flex-direction: column;
    }

    .gd-flex-list-container#{$type} {
        flex: 1 1 auto;
    }

    .gd-flex-container#{$type} {
        display: flex;
        justify-content: flex-start;
        align-items: stretch;
        flex-flow: row wrap;
        align-content: stretch;
    }

    .gd-flex-row-container#{$type} {
        display: flex;
        justify-content: flex-start;
        align-items: stretch;
        height: 100%;
        flex-flow: column nowrap;
        align-content: stretch;
    }

    .gd-flex-item#{$type} {
        flex: 0 0 auto;
    }

    .gd-flex-item-stretch#{$type} {
        flex: 1 1 auto;
        overflow-y: auto;
    }
}

@include flex-layout();

@media #{$small-only} {
    @include flex-layout("-mobile");
}
