.tabs__list {
    white-space: nowrap;
    overflow-x: auto;
    display: flex;

    &::after {
        clear: both;
        content: "";
        display: table;
    }
}

.tabs__label {
    border: 1px @gray-light solid;
    border-right: 0;
    padding: 0.5em 1em;
    margin: 0;
    cursor: pointer;
    transition: 0.25s all ease-in-out;
    user-select: none;
    z-index: 1;
    position: relative;
    float: left;

    &:hover {
        background: @gray-lightest;
        border-bottom: 1px @gray-lightest solid;
    }

    &:last-child {
        border-right: 1px @gray-light solid;
    }
}

.tabs__block {
    display: none;
    width: 100%;
    margin-top: -1px;
}

.active-tabs(@counter) when (@counter > 0) {
    .active-tabs((@counter - 1));    // next iteration

    &:nth-child(@{counter}):checked ~ .tabs__list > .tabs__label:nth-child(@{counter}) {
        background-color: #333;
        color: #fff;
        border-bottom: 1px #333 solid;
    }

    &:nth-child(@{counter}):checked ~ .tabs__blocks .tabs__block:nth-child(@{counter}) {
        display: block;
    }
}

.tabs__trigger[type=radio] {
    display: none;
    .active-tabs(10);
}