
.pagination-lg {
    --bs-pagination-padding-x: 1.25rem;
    --bs-pagination-padding-y: 1.12rem;
    --bs-pagination-font-size: 1.0625rem;
    --bs-pagination-border-radius: 50%;
}

.card-header .me-5.ms-n2 {
    margin-left: 0 !important;
    margin-right: 0 !important;
}


/* ========================================
   CUSTOM SIDEBAR TOGGLE BUTTON
   ======================================== */

@font-face {
    font-family: 'Space Grotesk';
    src: url('/vendor/fonts/Space_Grotesk/SpaceGrotesk.woff2') format('woff2');
    font-weight: 400;
    font-display: swap;
}

/* inter-regular - latin */
@font-face {
    font-display: swap; /* Check https://developer.mozilla.org/en-US/docs/Web/CSS/@font-face/font-display for other options. */
    font-family: 'Inter';
    font-style: normal;
    font-weight: 400;
    src: url('/vendor/fonts/inter/inter-v20-latin-regular.woff2') format('woff2');
}

/* Sidebar con transizione */
#layout-menu {
    width: 260px;
    transition: width 0.3s ease;
}

    /* Sidebar collassata */
    #layout-menu.menu-collapsed {
        width: 80px;
    }

    /* FORZA MASSIMA la visibilità quando la sidebar è APERTA - con selettori multipli */
    .layout-menu:not(.menu-collapsed) .menu-link > div,
    #layout-menu:not(.menu-collapsed) .menu-link > div,
    aside#layout-menu:not(.menu-collapsed) .menu-link > div,
    .layout-menu:not(.menu-collapsed) .app-brand-text,
    #layout-menu:not(.menu-collapsed) .app-brand-text,
    aside#layout-menu:not(.menu-collapsed) .app-brand-text {
        opacity: 1 !important;
        visibility: visible !important;
        display: block !important;
    }

    /* Nascondi quando collassato */
    #layout-menu.menu-collapsed .app-brand-text,
    #layout-menu.menu-collapsed .menu-link > div {
        opacity: 0 !important;
        visibility: hidden !important;
    }

/* Toggle Button Custom - A cavallo tra sidebar e contenuto */
#menuToggle {
    position: fixed;
    left: 260px;
    top: 32px;
    transform: translateX(-50%);
    z-index: 1100;
    background: transparent;
    border: none;
    width: 46px;
    height: 46px;
    cursor: pointer;
    transition: left 0.3s ease;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 0;
    pointer-events: auto;
}

/* Toggle button quando sidebar è collassata - USA ID per essere più specifico */
#layout-menu.menu-collapsed ~ #menuToggle {
    left: 80px;
}

/* Hover del toggle button */
#menuToggle:hover {
    opacity: 0.8;
}

/* Icona del toggle - SVG */
.menu-toggle-icon {
    width: 46px;
    height: 46px;
    display: block;
    transition: transform 0.3s ease;
}

/* Ruota l'icona quando collassato */
#layout-menu.menu-collapsed ~ #menuToggle .menu-toggle-icon {
    transform: rotate(180deg);
}

/* Layout page con margine */
.layout-page {
    margin-left: 260px;
    transition: margin-left 0.3s ease;
}

/* Layout page quando menu è collassato */
#layout-menu.menu-collapsed ~ * .layout-page,
body:has(#layout-menu.menu-collapsed) .layout-page {
    margin-left: 80px;
}

/* ========================================
   RESPONSIVE
   ======================================== */

/* Per tablet e mobile - NASCONDI IL TOGGLE CUSTOM */
@media (max-width: 1199px) {
    #menuToggle {
        display: none !important;
    }

    #layout-menu {
        position: fixed;
        transform: translateX(-260px);
    }

        #layout-menu.menu-open {
            transform: translateX(0);
        }

    .layout-page {
        margin-left: 0 !important;
    }
}

/* Per schermi molto piccoli */
@media (max-width: 767px) {
    #menuToggle {
        width: 36px;
        height: 36px;
        top: 24px;
    }

    .menu-toggle-icon {
        font-size: 1.125rem;
    }
}


    .template-customizer-open-btn {
        visibility: hidden !important;
    }

    .title_page {
        /* Situazione fornitori */

        width: 226px;
        height: 34px;
        padding-left: 1rem;
        /* Desktop/H5 */
        font-family: 'Space Grotesk';
        font-style: normal;
        font-weight: 700;
        font-size: 24px;
        line-height: 140%;
        /* identical to box height, or 34px */

        color: #231826;
    }

    .title_combo {
        height: 30px;
        font-family: 'Inter';
        font-style: normal;
        font-weight: 700;
        font-size: 20px;
        line-height: 150%;
        color: #231826;
        flex: none;
        order: 0;
        flex-grow: 0;
        padding-left: 0pt !important;
    }

    .title_date {
        /* Stato */
        height: 21px;
        /* Text/Small Bold */
        font-family: 'Inter';
        font-style: normal;
        font-weight: 700;
        font-size: 14px;
        line-height: 150%;
        /* identical to box height, or 21px */

        color: #232323;
        /* Inside auto layout */
        flex: none;
        order: 0;
        flex-grow: 0;
    }


    .flatpickr-monthSelect-month {
        padding: 10px;
        text-align: center;
        border-radius: 4px;
        transition: background-color 0.2s, color 0.2s;
        width: 100% !important;
    }

    .flatpickr-monthSelect-month.today {
        background-color: #0d6efd;
        color: white;
        font-weight: 600;
    }

    .flatpickr-monthSelect-month:hover:not(.today) {
        background-color: #e8f0f7;
        cursor: pointer;
    }

    .flatpickr-monthSelect-month:focus {
        outline: 2px solid #0d6efd;
        outline-offset: 2px;
    }


    .btn-backbutton {
        align-items: center;
        background: #FAEDFF !important;
        border-radius: 10px;
        color: #231826;
        display: flex;
        flex: none;
        flex-grow: 0;
        flex-direction: row;
        font-family: 'Inter';
        font-style: normal;
        font-weight: 400;
        font-size: 14px;
        gap: 10px;
        height: 45px;
        justify-content: center;
        line-height: 150%;
        padding: 12px;
        order: 1;
    }



/* CUSTOM datatable */
    .table-header th,
    .dataTable thead th {
        background-color: #FAEDFF !important;
        color: #231826 !important;
        font-family: 'Inter' !important;
        font-style: normal !important;
        font-weight: 700 !important;
        font-size: 16px !important;
        line-height: 150% !important;
        text-transform: none !important;
    }

    .row_data {
        --bs-gutter-x: 1.5rem;
        --bs-gutter-y: 0;
        flex-wrap: wrap;
        margin-top: calc(-1 * var(--bs-gutter-y));
        margin-right: calc(-0.5 * var(--bs-gutter-x));
        margin-left: calc(-0.5 * var(--bs-gutter-x));
    }

    .documento_tipo .form-select,
    .documento_stato .form-select,
    .dataTables_filter .form-control {
        height: 53px; /* Stessa altezza per tutti gli input */
    }

    .dataTables_filter input[type="search"] {
        border-radius: 12px;
    }

    .dataTables_filter {
        width: 100%;
    }

    .dataTables_filter label {
        width: 100%;
        display: block;
    }

    .dataTables_filter input[type="search"] {
        width: 100% !important;
    }

    .dataTables_wrapper .card-header {
        padding: 0 !important;
    }

    .dataTables_length select.form-select {
        align-items: flex-start;
        border-radius: 14px;
        display: flex;
        flex-direction: column;
        gap: 4px;
        margin-right: 10px;
        min-width: 60px;
        padding: 0px;
        padding-left: 10px;
        padding-right: 20px;
        width: auto;
    }

    .dataTables_paginate {
        align-items: center;
        display: flex;
        flex: none;
        flex-direction: row;
        flex-grow: 0;
        gap: 8px;
        height: 52px !important;
        padding: 0px;
    }

    .dataTables_paginate .pagination {
        margin: 0;
        gap: 8px;
    }

    .dataTables_paginate .page-link {
        border-radius: 8px !important;
        min-width: 40px;
        height: 40px;
        display: flex !important;
        align-items: center;
        justify-content: center;
    }

.dataTable tbody tr td {
    color: #231826;
    flex: none;
    flex-grow: 0;
    font-family: 'Inter';
    font-style: normal;
    font-size: 16px;
    font-weight: 400;
    line-height: 150%;
    padding: 0.5rem 0.5rem 0rem 0.5rem;
}
/* CUSTOM datatable */

/* Tooltip personalizzato - sfondo chiaro */
.tooltip-documento .tooltip-inner {
    background-color: #9447AF;
    color: #FFFFFF;
    border: 1px solid #000000;
    box-shadow: 0 0.25rem 0.5rem rgba(0, 0, 0, 0.15);
    max-width: 350px; /* Larghezza maggiore (default è 200px) */
    padding: 8px 12px;
    font-size: 0.875rem;
}

/* Freccia tooltip chiara */
.tooltip-documento.bs-tooltip-top .tooltip-arrow::before {
    border-top-color: #dee2e6;
}

.tooltip-documento.bs-tooltip-bottom .tooltip-arrow::before {
    border-bottom-color: #dee2e6;
}

.tooltip-documento.bs-tooltip-start .tooltip-arrow::before {
    border-left-color: #dee2e6;
}

.tooltip-documento.bs-tooltip-end .tooltip-arrow::before {
    border-right-color: #dee2e6;
}

.btn_download {
    background: #9447AF;
    border-radius: 10px;
    display: flex;
    flex-direction: row;
    align-items: center;
    justify-content: center;
    padding: 16px;
    gap: 4px;
    max-width: 250px;
}

.documento {
    font-family: 'Inter';
    font-style: normal;
    font-weight: 400;
    font-size: 16px;
    line-height: 150%;
    color: #FFFFFF;
    display: flex;
    flex-direction: row;
    align-items: center;
    justify-content: center;
    gap: 4px;
    text-decoration: none;
}

    .documento:hover {
        color: #FFFFFF;
    }