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

html:not(.is-popup-cf-open) {
    overflow-y: scroll;
    height: 100%;
}

@keyframes page-line-decor {
    0% {
        transform: translateX(-50%) scaleY(0);
    }
    100% {
        transform: translateX(-50%) scaleY(1);
    }
}

body {
    background-color: $base-background-color;
    position: relative;
    text-rendering: optimizeLegibility;
    min-height: 100vh;
    display: flex;
    flex-direction: column;

    @include media('>=desktop') {
        &:before {
            @include xcenter;
            position: fixed;
            z-index: 4;
            content: '';
            pointer-events: none;
            top: 0;
            height: 100vh;
            width: 480px;
            border: solid rgba($font-cr-tertiary, .1);
            border-width: 0 1px;
            transform-origin: 50% 0;
            transform: translateX(-50%) scaleY(0);
        }
        &.is-loaded {
            &:before {
                animation-name: page-line-decor;
                animation-duration: $animation-speed * 11;
                animation-timing-function: ease-out;
                animation-fill-mode: forwards;
            }
        }
    }
    &.is-loading,
    &.is-menu-open,
    .is-popup-cf-open & {
        overflow-y: hidden;
        //height: 100vh;
    }
    &.lock-scroll{
        overflow: hidden;
    }
}

.wrapper {
    overflow: hidden;
}

.main-wrapper {
    border-radius: 8px;
    border: 1px solid #232831;
    background: #1a1e26 url(../images/bg-dots.png) repeat 50% 0;
    padding: 23px 11px 21px;
    margin-bottom: 25px;

    @include media('>=desktop') {
        padding: 20px 17px 25px 31px;

        margin-bottom: 50px;
    }
}

.main {
    flex-grow: 1;
    width: 100%;
    display: flex;
    flex-direction: column;

    @include media('>=tablet') {
        flex-direction: row;
        justify-content: space-between;
    }
}

.container {
    margin-left: auto;
    margin-right: auto;
    width: 100%;
    max-width: $container;

    &:not(.container--xl):not(.no-gutters) {
        padding-left: $side-gutters-sm;
        padding-right: $side-gutters-sm;
    }
    &--xl {
        @extend .container;
        max-width: $container-xl;
    }
    &--md {
        @extend .container;
        max-width: $container-md;
    }
    &--cms {
        @extend .container;
        max-width: $container-cms;
    }
    &--cms-sm {
        @extend .container;
        max-width: $container-cms-sm;
    }
    &--xs {
        @extend .container;
        max-width: $container-xs;
    }
    & &,
    .wrapped {
        padding-left: 0 !important;
        padding-right: 0 !important;
    }
}

.main-container.main-container {
    @include media('<tablet') {
        padding-left: 6px !important;
        padding-right: 6px !important;
    }

    &.single {
        padding-top: 36px;
    }
}

.main-content {
    @include media('<tablet') {
        order: 2;
    }

    @include media('>=tablet') {
        max-width: calc(100% - 213px);
        flex-basis: calc(100% - 213px);
        flex-shrink: 0;
        padding-right: 35px;
    }
}

.sidebar {
    @include media('>=tablet') {
        max-width: 213px;
        flex: 0 0 213px;
    }
}

.sm-txt-overflow {
    overflow: hidden;
    position: relative;
}

.sm-txt-overflow__line {
    @include anim($dur: $animation-speed * 3.5);
    transform: translateY(101%);
    display: block;
    .is-enter & {
        transform: translateY(0);
    }
}

.sm-show-fade {
    @include anim($dur: $animation-speed-slow * 2);
    opacity: 0;
    .is-enter & {
        opacity: 1;
    }
}

div.wpcf7 .ajax-loader {
    background-image: url('../images/ajax-loader.gif');
    width: 26px;
    height: 26px;
}
