﻿/* --- Tabella Base --- */
.table {
    margin-bottom: 0;
    color: var(--bs-body-color);
    vertical-align: middle;
}

    /* Header Tabella (th) */
    .table thead th {
        background-color: var(--bs-light);
        color: var(--bs-dark);
        font-weight: 600;
        font-size: 0.85rem;
        text-transform: uppercase;
        letter-spacing: 0.5px;
        padding: 0.85rem 1rem;
        border-bottom: 2px solid var(--bs-border-color);
        white-space: nowrap;
    }

    /* Celle del corpo (td) */
    .table tbody td {
        padding: 0.85rem 1rem;
        border-bottom: 1px solid var(--bs-border-color);
        font-size: 0.925rem;
        transition: background-color 0.15s ease-in-out;
    }

    /* Hover sulle righe */
    .table tbody tr {
        transition: background-color 0.15s ease-in-out;
    }

        .table tbody tr:hover {
            background-color: rgba(var(--bs-primary-rgb), 0.035) !important;
        }

/* Effetto righe alternate (Striped custom) */
.table-striped-columns > tbody > tr > :nth-child(even) {
    background-color: rgba(var(--bs-light-rgb), 0.4);
}

/* --- Elementi Specifici per Cella --- */

/* Badge personalizzati per i bool (Sì/No) e Array */
.table .badge {
    font-weight: 600;
    font-size: 0.75rem;
    letter-spacing: 0.3px;
    border-radius: 0.35rem;
}

.table .bg-success-subtle {
    background-color: rgba(var(--bs-success-rgb), 0.12) !important;
    color: #198754 !important;
}

.table .bg-danger-subtle {
    background-color: rgba(var(--bs-danger-rgb), 0.1) !important;
    color: var(--bs-danger) !important;
}

/* --- Colonna Azioni e Bottoni di Riga --- */
.table td.text-end .btn-group,
.table th.text-end {
    white-space: nowrap;
}

/* Reset dell'ombra dei bottoni dentro la tabella per pulizia visiva */
.table .btn-group .btn {
    box-shadow: none !important;
    padding: 0.3rem 0.65rem;
    font-size: 0.8rem;
    /*border-radius: var(--bs-border-radius-sm) !important;*/
}

    /* Margine tra bottoni riga se non affiancati */
    .table .btn-group .btn:not(:last-child) {
        margin-end: 0.25rem;
    }

/* --- Footer Totali (tfoot) --- */
.table tfoot {
    background-color: var(--bs-light);
}

    .table tfoot td {
        padding: 0.85rem 1rem;
        font-size: 0.9rem;
        color: var(--bs-dark);
        border-top: 2px solid var(--bs-border-color);
    }

/* --- Responsive & Mobile Utility --- */
.table-responsive {
    border-radius: 0 0 var(--bs-border-radius-lg) var(--bs-border-radius-lg);
    scrollbar-width: thin;
    scrollbar-color: rgba(var(--bs-primary-rgb), 0.3) transparent;
}

    .table-responsive::-webkit-scrollbar {
        height: 6px;
    }

    .table-responsive::-webkit-scrollbar-thumb {
        background-color: rgba(var(--bs-primary-rgb), 0.3);
        border-radius: 10px;
    }
