.tabbed {
    display: flex;
    flex-direction: column;
    flex-grow: 1;
    width: 100%;
}

.tabbed [type="radio"] {
    display: none;
}

.tabs {
    display: flex;
    list-style: none;
    padding: 0;
}

ul.tab-ul {
    justify-content: left;
}

.tab > label.tab-label {
    display: flex;
    margin-top: 6px;
    margin-bottom: -3px;
    padding: 14px 21px;
    background: #2A2A2A;
    color: #FFFFFF;
    font-size: 1.0em;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 1px;
    cursor: pointer;
    border-radius: 4px 4px 0 0;
    transition: all 0.2s ease-in-out;
}

.tab:hover label {
    color: #333;
}

.tab-content {
    display: none;
    background-color: #666666;
    flex-grow: 1;
    overflow-y: auto;
    overflow-x: hidden;
}

/* As we cannot replace the numbers with variables or calls to element properties, the number of this selector parts is our tab count limit */
.tabbed > [type="radio"]:nth-of-type(1):checked ~ .tabs > .tab:nth-of-type(1) > label,
.tabbed > [type="radio"]:nth-of-type(2):checked ~ .tabs > .tab:nth-of-type(2) > label,
.tabbed > [type="radio"]:nth-of-type(3):checked ~ .tabs > .tab:nth-of-type(3) > label,
.tabbed > [type="radio"]:nth-of-type(4):checked ~ .tabs > .tab:nth-of-type(4) > label,
.tabbed > [type="radio"]:nth-of-type(5):checked ~ .tabs > .tab:nth-of-type(5) > label,
.tabbed > [type="radio"]:nth-of-type(6):checked ~ .tabs > .tab:nth-of-type(6) > label,
.tabbed > [type="radio"]:nth-of-type(7):checked ~ .tabs > .tab:nth-of-type(7) > label,
.tabbed > [type="radio"]:nth-of-type(8):checked ~ .tabs > .tab:nth-of-type(8) > label{
    background: #666666;
    color: #FFFFFF;
    margin-top: 0;
}

.tabbed > [type="radio"]:nth-of-type(1):checked ~ .tab-content:nth-of-type(1),
.tabbed > [type="radio"]:nth-of-type(2):checked ~ .tab-content:nth-of-type(2),
.tabbed > [type="radio"]:nth-of-type(3):checked ~ .tab-content:nth-of-type(3),
.tabbed > [type="radio"]:nth-of-type(4):checked ~ .tab-content:nth-of-type(4),
.tabbed > [type="radio"]:nth-of-type(5):checked ~ .tab-content:nth-of-type(5),
.tabbed > [type="radio"]:nth-of-type(6):checked ~ .tab-content:nth-of-type(6),
.tabbed > [type="radio"]:nth-of-type(7):checked ~ .tab-content:nth-of-type(7),
.tabbed > [type="radio"]:nth-of-type(8):checked ~ .tab-content:nth-of-type(8){
    display: flex;
    background: #666666;
    color: #FFFFFF;
}
