@import '../../_config';
@import '../../_utils';

.docs-nav-new {
    margin-bottom: 24px;

    &::after {
        display: block;
        content: '';
        height: 1px;
        position: absolute;
        left: 0;
        right: 0;

        background:rgba(39, 40, 44, 0.2);
    }

    & + .page-content {
        margin-bottom: 90px;
    }

    .page-old-styled & {
        margin-top: -40px;
    }

    .docs-nav-controls {
        display: flex;
        align-items: center;
        justify-content: flex-end;

        .back-to-button {
            font-weight: normal;
            font-size: 14px;
            line-height: 24px;
            color: rgba(39, 40, 44, 0.7);

            &:focus,
            &:hover,
            &:active {
                color: #6E4BF4;
                cursor: pointer;
            }
        }
    }
}

.docs-nav {
    margin-bottom: $unit*6;
    list-style-type: none;
    font-size: 0;

    .nav-item-wrap {
        display: inline-block;
        box-sizing: border-box;
        width: 25%;
        padding: 0 20px 0 0;
        vertical-align: top;

        &:last-child {
            padding-right: 0;
        }
        
        @at-root .os_linux.ua_chrome & {
            width: 19.9%;
        }
    }

    .nav-item {
        background-image: linear-gradient(#fafafa, #e4e4e4);
        display: block;
        box-sizing: border-box;
        margin-left: 0;
        box-shadow: 0 1px 2px 0 rgba(0, 0, 0, 0.3);
        background-color: #e1e1e1;
        border-radius: 3px;
        text-align: center;
        text-decoration: none;
        color: #000;
        line-height: 50px;

        @media (max-width: 750px) {
            line-height: 35px;
        }

        &:hover,
        &.is_active {
            background-image: none;
            background-color: #f9f9f9;
        }
    }

    .nav-item-text {
        $corner-width: 30px;
        position: relative;
        display: block;
        border: 2px solid transparent;
        border-radius: 4px;
        color: #3164a0;
        font-size: 16px;
        text-decoration: none;

        @media (max-width: 750px) {
            font-size: 14px;
        }

        &:before,
        &:after {
            position: absolute;
            display: none;
            top: 100%;
            left: 50%;
            width: 0;
            height: 0;
            margin-left: -$corner-width/2;
            border-style: solid;
            border-width: 19px $corner-width/2 0 $corner-width/2;
            border-color: transparent;
            content: '';
        }

        &:before {
            border-top-color: #6995d6;
        }

        &:after {
            margin-top: -3px;
            border-top-color: #f9f9f9;
        }
    }
    .nav-item:hover .nav-item-text,
    .nav-item.is_active .nav-item-text {
        border-color: #6995d6;
        text-decoration: none;
    }
    .nav-item:active .nav-item-text {
        border-color: #6995d6;
        text-decoration: none;
        box-shadow: inset 0px 2px 6px 1px rgba(0, 0, 0, 0.2);
    }
    .nav-item.is_active .nav-item-text {
        box-shadow: inset 0px 2px 6px 1px rgba(0, 0, 0, 0.2);
        color: $base-color;

        &:before,
        &:after {
            display: block;
        }
    }
}