.games-layout {
    --safe-area-inset-bottom: env(safe-area-inset-bottom);
    display: grid;
    background-color: var(--borders-main);
    grid-template-areas: "header header header" "nav nav nav" "matches stream sidebar";
    grid-gap: 1px;
    grid-template-rows: -webkit-min-content -webkit-min-content 1fr;
    grid-template-rows: min-content min-content 1fr;
    grid-template-columns: 273px 1fr 321px;
    height: 100vh;
    height: calc(var(--vh, 1vh)*100 - var(--safe-area-inset-bottom));
    margin: 0
}

.games-layout._live_view .games-matches {
    transform: translateX(-273px)
}

.games-layout._live_view .games-stream {
    position: relative;
    margin-left: -273px;
    padding-bottom: 10px
}

.games-layout._live_view .games-nav {
    transform: translateX(-273px)
}

.games-layout._live_view .broadcast-pane__container {
    width: 100%;
    height: 100%
}

.games-layout._live_view .broadcast-pane__item._active {
    height: 100%
}

@media(min-width: 981px) {
    .games-layout._wide_layout .lobby-content {
        grid-column:1/4 !important;
        padding: 0 10px
    }
}

@media(min-width: 1281px) {
    .games-layout._wide_layout .lobby-content {
        grid-column:2/4 !important;
        padding-right: 10px
    }

    .games-layout._wide_layout .lobby-content.crash-layout {
        grid-column: 1/4 !important;
        padding: 0 !important
    }
}

@media(min-width: 981px) {
    .games-layout._legal_layout .games-sidebar {
        overflow-y:auto
    }
}

@media(min-width: 981px) {
    .games-layout._top-nav-orientation {
        grid-template-areas:"nav nav nav" "matches stream sidebar";
        grid-template-rows: -webkit-min-content -webkit-min-content 1fr;
        grid-template-rows: min-content min-content 1fr
    }

    .games-layout._top-nav-orientation._live_view .games-stream {
        margin-left: 0
    }

    .games-layout._top-nav-orientation._live_view .games-nav {
        transform: translateX(0)
    }

    .games-layout._top-nav-orientation .lobby-content,.games-layout._top-nav-orientation .preloader-wrapper {
        grid-column: 1/3 !important;
        height: calc(100vh - 68px)
    }

    .games-layout._top-nav-orientation .games-sidebar {
        height: calc(100vh - 58px)
    }

    .games-layout._top-nav-orientation .games-nav {
        display: flex;
        width: auto;
        height: 50px;
        padding: 5px 10px;
        margin-top: 1px
    }

    .games-layout._top-nav-orientation .games-nav__group {
        flex-direction: row;
        width: auto;
        box-shadow: unset;
        margin-right: 0
    }

    .games-layout._top-nav-orientation .games-nav__group:not(:last-child) {
        margin-bottom: 0
    }

    .games-layout._top-nav-orientation .games-nav__item {
        padding: 5px 10px 5px 5px;
        margin-right: 8px;
        border-bottom: unset;
        width: auto;
        height: 40px;
        border-radius: 4px
    }

    .games-layout._top-nav-orientation .games-nav__item:last-child {
        margin-right: 8px
    }

    .games-layout._top-nav-orientation .games-nav__item.search-button {
        padding: 5px
    }

    .games-layout._top-nav-orientation .games-nav__item.search-button .discipline-icon {
        margin-right: 0
    }

    .games-layout._top-nav-orientation .games-nav__item.search-button .games-nav__item-info {
        display: none
    }

    .games-layout._top-nav-orientation .games-nav__item._dropdown {
        margin: 0
    }

    .games-layout._top-nav-orientation .games-nav__events-count {
        top: 0;
        left: 25px
    }

    .games-layout._top-nav-orientation .games-nav .nav-more__list .games-nav__item {
        margin-right: 0
    }

    .games-layout._top-nav-orientation .games-stream {
        grid-column: 1/3 !important;
        height: calc(100vh - 68px);
        margin-left: 0
    }
}

.games-layout .header__controls {
    display: none
}

.games-header {
    grid-area: header
}

.games-menu {
    grid-area: menu
}

.games-nav {
    grid-area: nav
}

.games-sidebar {
    grid-area: sidebar;
    overflow: hidden;
    border-radius: 6px;
    padding: 10px
}

.games-matches {
    grid-area: matches
}

.games-stream {
    grid-area: stream;
    transition: .1s linear;
    overflow-y: auto
}

.games-matches,.games-stream {
    color: var(--text-highlighted)
}

.lobby {
    margin-top: 10px
}

.lobby-content {
    position: relative;
    grid-column: 1/3;
    overflow-y: auto
}

.lobby-content.crash-layout {
    grid-row: 1/4;
    padding: 0 !important
}

.demo-icon {
    display: none;
    padding: 5px;
    align-items: center;
    justify-content: center;
    background-color: var(--bg-main-elements-active);
    border-radius: 4px;
    border: 1px solid var(--borders-main);
    color: var(--text-active);
    margin-left: -15px
}

.demo-app .demo-icon {
    display: flex
}

@media(min-width: 1281px) {
    .games-layout {
        grid-template-areas:"header header header" "nav stream sidebar";
        grid-template-rows: -webkit-min-content 1fr;
        grid-template-rows: min-content 1fr;
        grid-template-columns: 273px 1fr 321px
    }

    .lobby-content {
        grid-column: 2/3 !important
    }

    .games-header {
        margin: 0
    }
}

@media(max-width: 980px) {
    .games-layout {
        display:block;
        height: 100vh;
        overflow-y: auto;
        overflow: -moz-scrollbars-none;
        -ms-overflow-style: -ms-autohiding-scrollbar;
        scrollbar-width: none
    }

    .games-layout::-webkit-scrollbar {
        width: 0;
        height: 0;
        display: none;
        background: transparent
    }

    .games-layout#content browser {
        margin-right: -14px !important;
        overflow-y: scroll;
        margin-bottom: -14px !important;
        overflow-x: scroll
    }

    .games-layout .header__controls {
        height: 0;
        display: flex
    }

    .games-layout .header__controls .betslip__head--box {
        z-index: -1
    }

    .games-header__mybets {
        display: flex
    }

    .games-menu {
        display: none
    }

    .games-sidebar {
        display: none
    }

    .games-stream {
        height: auto !important;
        overflow: unset
    }

    .games-stream .broadcast {
        height: auto
    }

    .games-stream .broadcast__preview--active {
        padding-bottom: 56.25%;
        padding-top: 0
    }

    .games-stream .broadcast__preview.with-stub {
        background-color: var(--bg-main-body);
        background-image: none;
        border-top: 1px solid var(--bg-main-elements);
        border-bottom: 1px solid var(--borders-main)
    }

    .games-layout .board__line._prematch .board-row__head,.games-layout .board__line._live .board-row__head {
        flex-direction: row;
        height: auto
    }

    .games-layout .board__line._prematch .board-row .match-info__comment,.games-layout .board__line._live .board-row .match-info__comment {
        top: -2px
    }

    .games-layout .board__line._live .board-row .board-col:first-child {
        flex-basis: auto
    }

    .games-layout .board__line._prematch .event__title--icon {
        display: block
    }

    .games-layout .board__line._prematch .board-row .board-col__match-markets .board-col__totals {
        right: 10px
    }

    .modal__box-mybets .games-matches {
        position: relative;
        display: block;
        height: calc(100% - 60px);
        padding-top: 0
    }

    .modal__box-mybets .games-matches__item-team {
        text-align: left
    }

    .lobby-content {
        overflow-y: unset
    }

    .lobby-content.crash-layout {
        grid-row: 2/4
    }

    .games-nav+.crash-layout {
        margin-top: 0
    }

    .demo-icon {
        position: absolute;
        top: 17px;
        left: 195px
    }
}

.dynamic-height {
    height: 100%;
    min-height: auto
}

.dynamic-height body {
    height: 100%;
    min-height: auto
}

.dynamic-height body #app,.dynamic-height body .games-layout {
    height: auto;
    min-height: 100%;
    overflow-y: unset
}

.dynamic-height body #app .grid,.dynamic-height body .games-layout .grid {
    position: relative
}

.dynamic-height body #app .games-sidebar,.dynamic-height body .games-layout .games-sidebar {
    position: relative;
    will-change: transform;
    transition: transform 0ms ease-in-out
}
