table.primary,
table.cool,
table.soothing,
table.neutral,
table.energetic {

    thead {

        th {
            color: #fff;
        }
    }

    th {

        a {
            color: #fff;
        }
    }
}

table.primary {
    /* Primary Table */
    border-color: lighten(@brand,50%);

    th {
        background-color: fadeout(@brand,20%);
    }

    tbody {

        th {
            color: darken(@brand,10%);
            background-color: lighten(@brand,55%);

            a {
                color: inherit;
                border-bottom: 1px dotted darken(@brand, 14%);;
            }
        }

        tr {

            &:nth-of-type(even) {
                background-color: lighten(@brand,58%);
            }
        }

        th,
        td {
            border-color: lighten(@brand,50%);
        }
    }
}

table.cool {
    /* Cool Table */
    border-color: lighten(@dark-triad,45%);

    th {
        background-color: @triad;
    }

    tbody {

        th {
            color: darken(@triad,10%);
            background-color: lighten(@dark-triad,52%);

            a {
                color: inherit;
                border-bottom: 1px dotted darken(@triad, 15%);
            }
        }

        tr {

            &:nth-of-type(even) {
                background-color: lighten(@dark-triad,58%);
            }
        }

        th,
        td {
            border-color: lighten(@dark-triad,45%);
        }
    }
}

table.soothing {
    /* Soothing Table */
    border-color: lighten(@dark-complement,50%);

    th {
        background-color: @complement;
    }

    tbody {

        th {
            color: darken(@complement,10%);
            background-color: lighten(@dark-complement,59%);

            a {
                color: inherit;
                border-bottom: 1px dotted darken(@complement, 8%);
            }
        }

        tr {

            &:nth-of-type(even) {
                background-color: lighten(@dark-complement,64%);
            }
        }

        th,
        td {
            border-color: lighten(@dark-complement,50%);
        }
    }
}

table.neutral {
    /* Neutral Table */
    border-color: lighten(@dark-neutral,60%);

    th {
        background-color: fadeout(@neutral,15%);
    }

    tbody {
        // no background-color needed for tbody tr:nth-of-type(even), same as inherited color

        th {
            color: @neutral;
            background-color: lighten(@dark-neutral,70%);

            a {
                color: inherit;
                border-bottom: 1px dotted lighten(@neutral, 7%);
            }
        }

        th,
        td {
            border-color: lighten(@dark-neutral,60%);
        }
    }
}

table.energetic {
    /* Energetic Table */
    border-color: lighten(@dark-energetic,44%);

    th {
        background-color: @energetic;
    }

    tbody {

        th {
            color: darken(@energetic,10%);
            background-color: lighten(@dark-energetic,50%);

            a {
                color: inherit;
                border-bottom: 1px dotted darken(@energetic, 14%);
            }
        }

        tr {

            &:nth-of-type(even) {
                background-color: lighten(@dark-energetic,55%);
            }
        }

        th,
        td {
            border-color: lighten(@dark-energetic,44%);
        }
    }
}

@media screen and (max-width: 47.99em) {

    table.wdn_responsive_table.primary,
    table.wdn_responsive_table.cool,
    table.wdn_responsive_table.soothing,
    table.wdn_responsive_table.neutral,
    table.wdn_responsive_table.energetic {

        tbody {

            tr {

                &:nth-of-type(even) {
                    background-color: transparent;
                }
            }
        }
    }

    table.wdn_responsive_table {

        &.primary {

            tbody {

                td {

                    &:nth-of-type(even) {
                        background-color: lighten(@brand,58%);
                    }
                }
            }
        }

        &.cool {

            tbody {

                td {

                    &:nth-of-type(even) {
                        background-color: lighten(@dark-triad,58%);
                    }
                }
            }
        }

        &.soothing {

            tbody {

                td {

                    &:nth-of-type(even) {
                        background-color: lighten(@dark-complement,64%);
                    }
                }
            }
        }

        &.neutral {

            tbody {

                td {

                    &:nth-of-type(even) {
                        background-color: lighten(@dark-neutral,75%);
                    }
                }
            }
        }

        &.energetic {

            tbody {

                td {

                    &:nth-of-type(even) {
                        background-color: lighten(@dark-energetic,55%);
                    }
                }
            }
        }
    }
}
