
html, body {
    margin: 0;
    padding: 0;
    width: 100%;
    height: 100%;
    font-size: 20px;
    background-color: #f8f9fa;
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    font-family: 'Calibri light', Calibri, sans-serif;
}

.loading-container {
    border-radius: 30px;
    margin-top: 120px;
    margin-bottom: 40px;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    height: 90vh;
    background-color: #f8f9fa;
    font-family: Arial, sans-serif;
}

.spinner {
    width: 60px;
    height: 60px;
    border: 8px solid rgba(0, 0, 0, 0.1);
    border-top: 8px solid #3498db;
    border-radius: 50%;
    animation: spin 1s linear infinite;
    margin-bottom: 20px;
}

@keyframes spin {
    0% {
        transform: rotate(0deg);
    }

    100% {
        transform: rotate(360deg);
    }
}

@keyframes slideIn {
    from {
        opacity: 0;
        transform: translateY(-50px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.card-body {
    border-radius: 20px;
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.2);
    padding: 1.5rem;
    margin-top: 100px;
    height: auto;
    background-color: #f8f9fa;
}

    .card-body dominio {
        border-radius: 20px;
        box-shadow: 0 4px 8px rgba(0, 0, 0, 0.2);
        padding: 1.5rem;
        margin-top: 100px;
        height: 510px;
        background-color: #f8f9fa;
    }

.tabFiltro {
    margin-top: 130px;
    background-color: #f8f9fa;
    font-family: Arial, sans-serif;
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.2);
    padding: 5px;
    border-radius: 15px;
}

    .tabFiltro .rounded-pill {
        border-radius: 10px !important;
    }

.addRapporto {
    /* Aggiunge un effetto di transizione per l'interazione */
    transition: transform 0.2s;
}

    .addRapporto:hover {
        transform: scale(1.1);
    }

/*Sezione Tabella*/
.tab thead th {
    background-color: #f8f9fa;
    color: #333;
    font-weight: bold;
    text-transform: uppercase;
    border-bottom: 3px solid #dee2e6;
}

.tab tbody tr:nth-child(odd) {
    background-color: #f9f9f9;
}

.tab tbody tr:nth-child(even) {
    background-color: #ffffff;
}

.tab tbody tr:hover {
    background-color: #f1f1f1;
    transition: background-color 0.2s ease-in-out;
}

.tab img {
    vertical-align: central;
}

.tab .edit-link img {
    filter: brightness(1.2);
    transition: transform 0.2s ease-in-out;
}

    .tab .edit-link img:hover {
        transform: scale(1.1);
    }

.tab .delete-link img {
    filter: brightness(1.2) contrast(1.2);
    transition: transform 0.2s ease-in-out;
}

    .tab .delete-link img:hover {
        transform: scale(1.1);
        filter: brightness(0.9);
    }


.allegatoAdd {
    transition: transform 0.2s;
}

    .allegatoAdd:hover {
        transform: scale(1.1);
    }

.esportaExc {
    transition: transform 0.2s;
}

    .esportaExc:hover {
        transform: scale(1.1);
    }

.tooltip-container {
    position: relative;
    display: inline-block;
}

    .tooltip-container .tooltip-text {
        visibility: hidden;
        width: 120px;
        background-color: black;
        color: #fff;
        text-align: center;
        padding: 4px;
        border-radius: 4px;
        font-size: 12px;
        position: absolute;
        bottom: 130%;
        left: 50%;
        transform: translateX(-50%);
        opacity: 0;
        transition: opacity 0.3s;
        white-space: nowrap;
    }

        .tooltip-container .tooltip-text::after {
            content: "";
            position: absolute;
            top: 100%;
            left: 50%;
            transform: translateX(-50%);
            border-width: 5px;
            border-style: solid;
            border-color: black transparent transparent transparent;
        }

    .tooltip-container .tooltip-left {
        bottom: 110%;
        left: -100px;
        transform: translateX(0);
    }

        .tooltip-container .tooltip-left::after {
            top: 30px;
            left: 85%;
            transform: translateY(-50%);
        }

    .tooltip-container:hover .tooltip-text {
        visibility: visible;
        opacity: 1;
    }

.table-responsive {
    overflow-x: hidden !important;
}


/*----------------------STYLE ACTIONPLAN------------------------------------------/*/
.modalAction {
    margin-top: 30px;
}

input, select, textarea {
    background: linear-gradient(to right, #f7f7f7, #e9ecef);
    border: 1px solid #ccc;
    border-radius: 5px;
    padding: 10px;
    font-size: 1rem;
}

    input::placeholder, textarea::placeholder {
        color: #6c757d;
    }

.text-danger {
    min-height: 1.2em;
    display: block;
}

button {
    text-transform: uppercase;
}

/*----------------------STYLE ACTIONADD MODAL--------------------------------------/*/
.modalAddAction {
    margin-top: 30px;
}

.modal-custom .modal-content {
    height: 90vh !important; /* Altezza */
    border-radius: 15px;
}

input, select, textarea {
    background: linear-gradient(to right, #f7f7f7, #e9ecef);
    border: 1px solid #ccc;
    border-radius: 5px;
    padding: 10px;
    font-size: 1rem;
}

    input::placeholder, textarea::placeholder {
        color: #6c757d;
    }

.text-danger {
    min-height: 1.2em;
    display: block;
}

button {
    text-transform: uppercase;
}

.icon-container {
    display: flex;
    justify-content: center;
    align-items: center;
    height: 100%;
}

.tooltip-container {
    display: flex;
    justify-content: center;
    align-items: center;
    padding: 0px;
}

.icon-grid {
    display: flex;
    grid-template-columns: repeat(4, 1fr);
    column-gap: 5px;
    row-gap: 5px;
    justify-content: center;
    align-items: center;
}

.header {
    padding-top: 15px;
    padding-left: 30px;
    padding-bottom: 0px;
}

.salva2 {
    padding-top: 20px;
    padding-left: 0px;
    margin-bottom: 10px;
}

.titleDelete {
    padding: 20px;
}

.modal-backdrop {
    transition: opacity 0.3s ease;
}

.smallTable th,
.smallTable td {
    padding-top: 5px !important;
    padding-bottom: 5px !important;
    padding-left: 2px !important;
    padding-right: 2px !important;
    font-size: 17px !important;
    vertical-align: middle !important;
}

.smallTable .addRapporto {
    width: 30px !important;
    height: 30px !important;
    max-width: 30px;
    max-height: 30px;
}

.smallTable .esportaExc {
    width: 29px !important;
}

.scrollable-table {
    max-height: 300px;
    overflow-y: auto;
    overflow-x: hidden;
}

.modalEditScroll {
    max-height: 450px;
    overflow-y: auto;
    overflow-x: hidden;
}

.modalEdit {
    overflow-y: hidden;
}

.modalAction {
    overflow-y: hidden;
}

.table2 {
    width: 100%;
    table-layout: fixed;
}

    .table2 th,
    .table2 td {
        border: 1px solid #ccc;
        padding: 10px;
        overflow: hidden;
        text-overflow: ellipsis;
        white-space: nowrap;
    }

    .table2 .fixed-col {
        width: 60%;
    }

    .table2 .text-ellipsis {
        display: block;
        overflow: hidden;
        text-overflow: ellipsis;
        white-space: nowrap;
        width: 100%;
    }

.table3 {
    width: 100%;
    table-layout: fixed;
    margin-bottom: 23px;
}

    .table3 th,
    .table3 td {
        border: 1px solid #ccc;
        padding: 8px;
        overflow: hidden;
        text-overflow: ellipsis;
        white-space: nowrap;
    }

    .table3 .fixed-col {
        width: 60%;
    }

    .table3 .text-ellipsis {
        display: block;
        overflow: hidden;
        text-overflow: ellipsis;
        white-space: nowrap;
        width: 100%;
    }

input.form-control:disabled,
textarea.form-control:disabled,
select.form-control:disabled {
    background-color: #e9ecef !important;
    color: #6c757d !important;
    cursor: not-allowed;
}

#ActionFormModal {
    top: -25px;
}

#ActionAddFormModal {
    top: -25px;
}


.swal-toast-custom {
    width: 600px !important;
    font-size: 15px;
    padding: 1rem 1.5rem;
    text-align: left;
    box-shadow: 0 0 8px rgba(0, 0, 0, 0.2);
}

.table td,
.table th {
    padding: 9px 10px !important;
}

#codiceRapporto,
#filtroCodice,
#filtroFornitore,
#filtroData {
    background: white !important;
}

.collapse,
.collapse.show {
    transition: height 0.25s ease-in-out;
}

.filtro {
    margin-top: 130px;
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.2);
    padding: 30px;
    border-radius: 15px;
    width: auto;
    margin-left: auto;
    margin-right: auto;
    background-color: #f8f9fa;
}

.main {
    margin-top: 130px;
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.2);
    padding: 30px;
    border-radius: 15px;
    width: 600px;
    margin-left: auto;
    margin-right: auto;
    background-color: #f8f9fa;
}

.title {
    text-align: center;
    padding-bottom: 40px;
}

/* XS/SM: mostra SOLO colonne 2,3,9 (Codice Rapporto, Data Inserimento, Azioni) */
@media (max-width: 576px) {

    /* mostra solo 2, 3 e 9 */
    #reportTable th:nth-child(1),
    #reportTable td:nth-child(1),
    #reportTable th:nth-child(4),
    #reportTable td:nth-child(4),
    #reportTable th:nth-child(5),
    #reportTable td:nth-child(5),
    #reportTable th:nth-child(6),
    #reportTable td:nth-child(6),
    #reportTable th:nth-child(7),
    #reportTable td:nth-child(7),
    #reportTable th:nth-child(8),
    #reportTable td:nth-child(8) {
        display: none !important;
    }

    /* rinomina SOLO la colonna 2 */
    #reportTable th:nth-child(2) {
        position: relative;
        color: transparent; /* nasconde il testo originale */
    }

        #reportTable th:nth-child(2)::after {
            content: "Codice";
            position: absolute;
            left: 0;
            right: 0;
            top: 50%;
            transform: translateY(-50%);
            color: #000;
            font-size: 17px;
            text-align: center;
        }

    /* navbar fissa */
    .navbar {
        position: fixed !important;
        top: 0 !important;
        left: 0;
        right: 0;
        transition: none !important;
    }

        .navbar .navbar-collapse {
            display: block !important;
            padding: 0;
        }

        /* logout a destra nella navbar */
        .navbar .cardHome {
            position: absolute;
            right: 8px;
            top: 50%;
            transform: translateY(-50%);
            margin: 0;
            box-shadow: none;
        }

            .navbar .cardHome .nav-link {
                padding: .35rem .5rem;
            }

    body {
        padding-top: 0px;
    }

    .container-fluid {
        padding-right: calc(var(--bs-gutter-x) * .1) !important;
        padding-left: calc(var(--bs-gutter-x) * .1) !important;
    }

    /* nascondi gli altri filtri */
    .hide-xs {
        display: none !important;
    }


    /* riduce larghezza colonna "Codice" */
    #reportTable th:nth-child(2),
    #reportTable td:nth-child(2) {
        width: 15% !important; 
        max-width: 15% !important;
    }

    /* aumenta larghezza colonna "Azioni" */
    #reportTable th:nth-child(9),
    #reportTable td:nth-child(9) {
        width: 30% !important;
        max-width: 30% !important;
    }
    .table-responsive {
        overflow-x: hidden !important;
    }

    .modal fade modalEdit {
        width: 15% !important;
        max-width: 15% !important;
    }
}
