/* =========================================
   DIV TABLES
   ========================================= */

.base-div-table {
    width: 100%;
    max-width: 100%;
    overflow-x: hidden;
    border: 1px solid var(--color-border);
    border-radius: 12px;
    background-color: var(--color-surface);
    box-sizing: border-box;
}

.base-div-table-header {
    display: flex;
    align-items: center;
    width: 100%;
    background-color: var(--color-table-row-bg);
    border-bottom: 1px solid var(--color-border);
    box-sizing: border-box;
}

.base-div-table-body {
    display: block;
    width: 100%;
    box-sizing: border-box;
}

.base-div-table-row {
    display: grid;
    width: 100%;
    max-width: 100%;
    box-sizing: border-box;
    border-bottom: 1px solid var(--color-border);
    background-color: var(--color-table-row-bg);
}

.base-div-table-row:last-child {
    border-bottom: 0;
}

.base-div-table-row:hover {
    background-color: var(--color-surface-hover);
}

.base-div-table-row[data-columns="1"] {
    grid-template-columns: minmax(0, 1fr);
}

.base-div-table-row[data-columns="2"] {
    grid-template-columns: repeat(2, minmax(0, 1fr));
}

.base-div-table-row[data-columns="3"] {
    grid-template-columns: repeat(3, minmax(0, 1fr));
}

.base-div-table-row[data-columns="4"] {
    grid-template-columns: repeat(4, minmax(0, 1fr));
}

.base-div-table-row[data-columns="5"] {
    grid-template-columns: repeat(5, minmax(0, 1fr));
}

.base-div-table-row[data-columns="6"] {
    grid-template-columns: repeat(6, minmax(0, 1fr));
}

.base-div-table-row[data-columns="7"] {
    grid-template-columns: repeat(7, minmax(0, 1fr));
}

.base-div-table-cell {
    min-width: 0;
    padding: 12px;
    border-right: 1px solid var(--color-border);
    white-space: normal;
    overflow: hidden;
    text-overflow: ellipsis;
    word-break: break-word;
    box-sizing: border-box;
}

.base-div-table-cell:last-child {
    border-right: 0;
}

@media (max-width: 576px) {
    .base-div-table-header {
        display: none;
    }

    .base-div-table-row {
        display: block;
        border-bottom: 1px solid var(--color-border);
        padding: 8px 0;
    }

    .base-div-table-cell {
        display: block;
        width: 100%;
        border-right: 0;
        border-bottom: 1px solid var(--color-border);
        margin-bottom: 12px;
    }

    .base-div-table-cell::before {
        content: attr(data-label) ":";
        display: block;
        font-weight: var(--font-weight-bold);
        margin-bottom: 4px;
    }

    .base-div-table-cell:last-child {
        border-bottom: 0;
        margin-bottom: 0;
    }
}
