@import "../../../node_modules/fundamental-styles/scss/helpers.scss";

// flex container with vertically aligned items
.fd-master-details__wrapper {
    display: -webkit-box;
    display: -ms-flexbox;
    display: flex;
    -webkit-box-orient: vertical;
    -webkit-box-direction: normal;
    -ms-flex-direction: column;
    flex-direction: column;
    width: 100%;
    overflow: hidden;
}

// make direct children flex items that take as much space as they need
.fd-master-details__wrapper>* {
    -webkit-box-flex: 0;
    -ms-flex: 0 1 auto;
    flex: 0 1 auto;
}

// override the default flex-basis (auto) assigned by the parent and take
// up all the available space + turn into flex container with horizontally aligned items
.fd-master-details__content-wrapper {
    -webkit-box-flex: 1;
    -ms-flex-positive: 1;
    flex-grow: 1;
    display: -webkit-box;
    display: -ms-flexbox;
    display: flex;
    -webkit-box-align: stretch;
    -ms-flex-align: stretch;
    align-items: stretch;
    -webkit-box-orient: horizontal;
    -webkit-box-direction: normal;
    -ms-flex-direction: row;
    flex-direction: row;
    overflow: hidden;
}

// flex item with default base size set to auto
// + flex container with vertically aligned items
.fd-master-details__column {
    padding: 5px;
    display: -webkit-box;
    display: -ms-flexbox;
    display: flex;
    -webkit-box-orient: vertical;
    -webkit-box-direction: normal;
    -ms-flex-direction: column;
    flex-direction: column;
    max-height: 100%;
    -webkit-box-flex: 0;
    -ms-flex: 0 1 50%;
    flex: 0 1 auto;
}

// the details section will automatically fill up the remaining space
.fd-master-details__column--details {
    -webkit-box-flex: 1;
    -ms-flex-positive: 1;
    flex-grow: 1;
}

// flex item with auto sizing
.fd-master-details__column-title {
    -webkit-box-flex: 0;
    -ms-flex: 0 100% auto;
    flex: 0 100% auto;
}

// flex item that takes up all the available space
.fd-master-details__column-content {
    -webkit-box-flex: 0;
    -ms-flex: 0 1 100%;
    flex: 0 1 100%;
    max-height: 100%;
    overflow-y: auto;
}

.fd-master-details__master-list-item:hover {
    cursor: pointer;
}

.fd-master-details__column-content>.fdv-virtualized-list {
    height: 100% !important;
}

// let the master column take up 100% of the row
.fd-master-details__column--mobile {
    flex-basis: 100% !important;
    -ms-flex-preferred-size: 100% !important;
}


// full screen layout only

body.full-master-details-layout {
    overflow-y: hidden;
}

.fd-master-details__wrapper--fullscreen {
    width: 100vw;
    height: 100vh;
    max-height: 100vh;
}