

/* Table Wrap */

.table-wrap {
    overflow: scroll;

    table {
        width: 100%;
    }
}



/* Table */

table {

    --table-padding-y: 0;
    --table-padding-x: 10px;
    --table-border-radius: 8px;
    --table-border-radius-left: var(--table-border-radius, 4px) 0 0 var(--table-border-radius, 4px);
    --table-border-radius-right: 0 var(--table-border-radius, 4px) var(--table-border-radius, 4px) 0;
    --table-border-radius-bottom: 0 0 var(--table-border-radius, 4px) var(--table-border-radius, 4px);
    --table-border-radius-top: var(--table-border-radius, 4px) var(--table-border-radius, 4px) 0 0;

    th, td {
        padding-top: var(--table-padding-y);
        padding-bottom: var(--table-padding-y);
        padding-right: var(--table-padding-x);
        text-align: left;
    }

    th:first-child,
    td:first-child {
        padding-left: var(--table-padding-x);
    }

    th, strong, b {
        font-weight: 400;
    }

}



/* Table */

table.striped {

    --table-padding-y: 12px;
    --table-padding-x: 16px;

    th:first-child,
    td:first-child {
        border-radius: var(--table-border-radius-left);
    }

    th:last-child,
    td:last-child {
        border-radius: var(--table-border-radius-right);
    }

    tbody {
        tr:nth-child(odd) th,
        tr:nth-child(odd) td {
            background-color: rgba(255, 255, 255, 0.5);
        }
    }

}



/* Table Compare */

table.compare {

    --table-compare-padding-x: 20px;
    --table-compare-padding-y: 10px;

    thead,
    tbody {

        tr th:nth-last-child(1),
        tr td:nth-last-child(1),
        tr th:nth-last-child(2),
        tr td:nth-last-child(2) {
            width: 100px;
            position: relative;
            text-align: center;
            white-space: nowrap;
            padding: var(--table-compare-padding-y) var(--table-compare-padding-x);
        }

        tr th:nth-last-child(2),
        tr td:nth-last-child(2) {
            background-color: rgba(255, 255, 255, 1);
        }

    }


    thead tr:first-child {
        th:nth-last-child(2),
        td:nth-last-child(2) {
            border-radius: var(--table-border-radius-top);
        }
    }


    tbody tr:last-child {
        th:nth-last-child(2),
        td:nth-last-child(2) {
            border-radius: var(--table-border-radius-bottom);
        }
    }


    .icon.status {
        border-radius: 999px;
        color: #fff;
    }


    tbody tr:not(:last-child) .icon.status {
        position: absolute;
        top: 50%;
        left: 50%;
        transform: translateX(-50%) translateY(-50%);
    }



    &.hover-effect {

        td > * {
            transition: opacity 0.2s;
        }

        tbody:hover tr:not(:hover) td > * {
            opacity: 0.325;
        }

        tbody:hover tr:hover td > .icon.status {
            transform: scale(1.25);
        }

        tbody:hover tr:not(:last-child):hover td > .icon.status {
            transform: translateX(-50%) translateY(-50%) scale(1.25);
        }

        tbody:hover tr:hover td > strong,
        tbody:hover tr:hover td > span {
            text-shadow: 0.01em 0.01em currentColor;
        }

    }


}






