:root {
    --primary: #d45f11;
    --bg-dark: #181818;
    --bg-panel: #27201c;
    --border-dark: #2A2A2A;
}

html, body {
    overflow-x: hidden !important;
    max-width: 100%;
}

    html.dark, .body {
        background-color: var(--bg-dark);
        font-family: "Manrope", sans-serif;
        min-height: 100%;
    }

/* Generiche */
.my-gap-050 {
    gap: 8px;
}

.my-pad-right-25 {
    padding-right: 40px !important;
}

.my-pad-bot-050 {
    padding-bottom: 8px;
}

.my-margin-right-050 {
    margin-right: 8px;
}

.my-pad-formcheck-2 {
    padding-left: 2rem;
}

.forgotPassw:hover {
    text-decoration: underline !important;
    color: var(--primary) !important;
}

.resendEmailConfirm:hover {
    text-decoration: underline !important;
    color: var(--primary) !important;
}

/* Menù laterale */
.sidebar {
    width: 16rem;
    background: var(--bg-panel);
    border-right: 1px solid var(--border-dark);
    height: 100vh;
    display: flex;
    flex-direction: column;
}

.sidebar-icons-alignment {
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.sidebar-header {
    flex-shrink: 0;
    padding: 1rem;
}

.sidebar-nav {
    flex: 1;
    overflow-y: auto;
    overflow-x: hidden;
    padding-bottom: 1rem;
}

    .sidebar-nav::-webkit-scrollbar {
        width: 6px;
    }

    .sidebar-nav::-webkit-scrollbar-thumb {
        background: rgba(255,255,255,0.2);
        border-radius: 6px;
    }

        .sidebar-nav::-webkit-scrollbar-thumb:hover {
            background: rgba(255,255,255,0.35);
        }

.windows-main-background {
    background: rgba(212,95,17,0.2);
    color: #d45f11;
    border-color: #d45f11;
}

.nav-link-custom {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    padding: 0.5rem 0.75rem;
    border-radius: 0.5rem;
    color: #fff;
    text-decoration: none;
}

    .nav-link-custom:hover {
        background: rgba(255,255,255,0.1);
        color: var(--primary);
    }

.nav-link-active {
    background: rgba(212,95,17,0.2);
    color: var(--primary);
    border-radius: .5rem;
}

    .nav-link-active:hover {
        background: rgba(212,95,17,0.2);
        color: white;
    }

.nav-link-toggle-active {
    background: rgba(212,95,17,0.2);
    color: white;
}

.nav-link-custom.small {
    font-size: 0.9rem;
}

.sidebar-badge {
    font-size: 0.65rem;
    padding: 0.15rem 0.45rem;
    border-radius: 999px;
    font-weight: 700;
    line-height: 1;
    margin-left: auto;
}

.topbar {
    background: var(--bg-panel);
    border-bottom: 1px solid var(--border-dark);
}

.my-panel {
    background: var(--bg-panel);
    border-bottom: 1px solid var(--border-dark);
    border-radius: 8px;
}

.card-header {
    border-bottom-color: rgb(84 69 59) !important;
}

.card-panel {
    background: var(--bg-panel);
    border: 1px solid var(--border-dark);
    border-radius: .5rem;
}

/* Tabelle */
.table-dark-custom thead {
    background: var(--border-dark);
}

.table-dark-custom tbody tr:hover {
    background: #252525;
}

.table-dark-panel {
    background-color: var(--bg-panel);
    border: 1px solid var(--border-dark);
    border-radius: 8px;
    overflow: hidden;
}

    .table-dark-panel thead th {
        background-color: var(--bg-panel);
        border-bottom: 1px solid var(--border-dark);
        color: #fff;
        font-weight: 600;
        white-space: nowrap;
        border-bottom-color: rgb(84 69 59) !important;
    }

    .table-dark-panel tbody tr {
        border-bottom: 1px solid var(--border-dark);
    }

        .table-dark-panel tbody tr:hover {
            background: rgba(255, 255, 255, 0.03);
        }

    .table-dark-panel td {
        border-color: var(--border-dark);
        vertical-align: middle;
    }

    .table-dark-panel small {
        color: var(--text-muted);
    }

tr.object-inactive td:not(.td-actions) {
    opacity: 0.45;
    filter: brightness(0.6);
}

/* Bottoni */
.btn-outline-white {
    color: #fff;
    border: 1px solid rgba(255,255,255,0.4);
    background: transparent;
}

.btn-outline-white-rounded {
    color: #fff;
    border: 1px solid rgba(255,255,255,0.4);
    background: transparent;
    border-radius: .5rem;
}

.btn-outline-white:hover {
    background: rgba(255,255,255,0.1);
    color: var(--primary);
    border-color: var(--primary);
}

.btn-outline-white-rounded:hover {
    background: rgba(255,255,255,0.1);
    color: var(--primary);
    border-color: var(--primary);
}

.btn-main {
    background: var(--primary);
    color: white;
    border-radius: .5rem;
}

.btn-main-sm {
    background: var(--primary);
    color: white;
    border-radius: .5rem;
    height: 35px;
}

.btn-main:hover {
    background-color: rgb(212 95 17 / 0.9);
    color: white;
    border-radius: .5rem;
}

.bg-success {
    background: #238b35 !important;
    color: white !important;
}

/* Bottoni tab galleria/banner */
.btn-custom-left,
.btn-custom-right,
.btn-custom-mid {
    background-color: #d45f11;
    color: white;
    border: 1px solid #d45f11;
}

    .btn-custom-left:hover,
    .btn-custom-right:hover,
    .btn-custom-mid:hover {
        background-color: #b85010;
        border-color: #b85010;
        color: white;
    }

    .btn-custom-left:focus,
    .btn-custom-right:focus,
    .btn-custom-mid:focus {
        background-color: #d45f11;
        border-color: #d45f11;
        color: white;
        box-shadow: 0 0 0 0.25rem rgba(212, 95, 17, 0.5);
    }

.btn-custom-left-active,
.btn-custom-right-active,
.btn-custom-mid-active {
    background-color: #27201c;
    border-color: #d45f11;
    color: #d45f11;
}


.btn-custom-left {
    border-top-left-radius: 0.75rem;
    border-bottom-left-radius: 0;
    border-top-right-radius: 0.75rem;
    border-bottom-right-radius: 0;
}

.btn-custom-right {
    border-top-left-radius: 0.75rem;
    border-bottom-left-radius: 0;
    border-top-right-radius: 0.75rem;
    border-bottom-right-radius: 0;
}

.btn-custom-mid {
    border-top-left-radius: 0.75rem;
    border-bottom-left-radius: 0;
    border-top-right-radius: 0.75rem;
    border-bottom-right-radius: 0;
}

/* Bottoni up and down media */
.btn-icon {
    background: none;
    border: none;
    padding: 0;
    cursor: pointer;
    display: inline-flex;
    align-items: center;
}

    .btn-icon:hover {
        opacity: 0.7;
    }

    .btn-icon:focus {
        outline: 2px solid #0d6efd;
        outline-offset: 2px;
    }

    .btn-icon:active {
        transform: scale(0.95);
    }

.avatar {
    width: 2.5rem;
    height: 2.5rem;
    border-radius: 50%;
    background-size: cover;
    background-position: center;
}

input[type="checkbox"] {
    appearance: none !important;
    -webkit-appearance: none !important;
    width: 1em;
    height: 1em;
    border: 2px solid #d45f11;
    border-radius: 0.25em;
    background-color: transparent;
    background-repeat: no-repeat;
    background-position: center;
    background-size: 1em;
    cursor: pointer;
}

    /* CHECKED */
    input[type="checkbox"]:checked {
        background-color: #d45f11 !important;
        border-color: #d45f11 !important;
        background-image: url("data:image/svg+xml,%3csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 20 20'%3e%3cpath fill='none' stroke='%23ffffff' stroke-linecap='round' stroke-linejoin='round' stroke-width='3' d='m6 10 3 3 6-6'/%3e%3c/svg%3e") !important;
    }

    /* DISABLED unchecked */
    input[type="checkbox"]:disabled {
        border-color: #d45f11 !important;
        background-color: transparent !important;
        opacity: 0.4 !important;
        cursor: not-allowed !important;
    }

        /* DISABLED checked */
        input[type="checkbox"]:disabled:checked {
            background-color: #d45f11 !important;
            border-color: #d45f11 !important;
            opacity: 0.4 !important;
            background-image: url("data:image/svg+xml,%3csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 20 20'%3e%3cpath fill='none' stroke='%23ffffff' stroke-linecap='round' stroke-linejoin='round' stroke-width='3' d='m6 10 3 3 6-6'/%3e%3c/svg%3e") !important;
        }

.avatar-initials {
    display: flex;
    align-items: center;
    justify-content: center;
    background-color: var(--primary);
    color: #fff;
    font-weight: 700;
    font-size: 1rem;
    flex-shrink: 0;
}

.negMargMezzoRem {
    margin-left: -.5rem;
}

@media (max-width: 576px) {
    .myMargForRuoloImgMobile {
        margin-left: -.5rem;
        margin-top: 1rem;
    }
}

/* Caselle input */
.my-dropdown {
    background-color: rgb(24 20 17);
    color: white;
    border-color: rgb(84 69 59);
    border-radius: .5rem;
    padding: 15px;
}

    .my-dropdown:disabled {
        background-color: rgb(24 20 17); /* stesso colore */
        color: white;
        border-color: rgb(84 69 59);
        opacity: 1; /* evita l'effetto grigio del browser */
        cursor: not-allowed;
    }

    .my-dropdown:focus {
        background-color: rgb(24 20 17);
        color: white;
    }

.my-dropdown-menu.show .my-dropdown-item:hover,
.my-dropdown-menu.show .my-dropdown-item:focus {
    /* Background-color: rgb(24 20 17); */
    background-color: rgb(84 69 59);
    color: white;
}

.dropdown-menu.show {
    background-color: rgb(24 20 17);
    border-color: rgb(84 69 59);
}

    .dropdown-menu.show .dropdown-item {
        color: white;
    }

        .dropdown-menu.show .dropdown-item:hover,
        .dropdown-menu.show .dropdown-item:focus {
            background-color: rgb(84 69 59);
            color: white;
        }

.dropdown-menu {
    opacity: 0;
    transform: translateY(5px);
    transition: all 0.15s ease;
}

    .dropdown-menu.show {
        opacity: 1;
        transform: translateY(0);
    }

/* =====================================
   SELECT2 - TEMA PERSONALIZZATO DARK
===================================== */

/* Forza la stessa altezza degli altri input */
.select2-container--bootstrap-5 .select2-selection--single {
    height: auto !important;
    min-height: 52px !important; /* Adatta al valore degli altri input */
    display: flex !important;
    align-items: center !important;
    padding: 15px !important;
}

    /* Fix testo selezionato - allineamento verticale */
    .select2-container--bootstrap-5 .select2-selection--single .select2-selection__rendered {
        display: flex !important;
        align-items: center !important;
        padding: 0 !important;
        margin: 0 !important;
        line-height: 1.5 !important;
        width: 100% !important;
        overflow: hidden !important;
        text-overflow: ellipsis !important;
        white-space: nowrap !important;
    }

    /* Fix freccia - centratura verticale */
    .select2-container--bootstrap-5 .select2-selection--single .select2-selection__arrow {
        position: absolute !important;
        top: 50% !important;
        right: 15px !important;
        transform: translateY(-50%) !important;
        height: auto !important;
        width: auto !important;
    }

/* Fix larghezza container - problema comune con col Bootstrap */
.select2-container {
    width: 100% !important;
    display: block !important;
}

/* Fix quando è dentro una col Bootstrap */
.col .select2-container,
.col-md-3 .select2-container,
.col-md-4 .select2-container,
.col-md-6 .select2-container {
    width: 100% !important;
}

/* Container principale */
.select2-container--bootstrap-5 .select2-selection {
    background-color: rgb(24 20 17) !important;
    border-color: rgb(84 69 59) !important;
    border-radius: .5rem !important;
    padding: 15px !important;
    min-height: auto !important;
    color: white !important;
}

/* Testo selezionato */
.select2-container--bootstrap-5 .select2-selection__rendered {
    color: white !important;
    padding: 0 !important;
    line-height: normal !important;
}

/* Placeholder */
.select2-container--bootstrap-5 .select2-selection__placeholder {
    color: rgba(255, 255, 255, 0.5) !important;
}

/* Freccia dropdown */
.select2-container--bootstrap-5 .select2-selection__arrow {
    height: 100% !important;
}

    .select2-container--bootstrap-5 .select2-selection__arrow b {
        border-color: white transparent transparent transparent !important;
    }

/* Quando aperto */
.select2-container--bootstrap-5.select2-container--open .select2-selection__arrow b {
    border-color: transparent transparent white transparent !important;
}

/* Focus */
.select2-container--bootstrap-5.select2-container--focus .select2-selection,
.select2-container--bootstrap-5.select2-container--open .select2-selection {
    background-color: rgb(24 20 17) !important;
    border-color: rgb(84 69 59) !important;
    box-shadow: none !important;
    outline: none !important;
}

/* Dropdown menu */
.select2-container--bootstrap-5 .select2-dropdown {
    background-color: rgb(24 20 17) !important;
    border-color: rgb(84 69 59) !important;
    border-radius: .5rem !important;
    margin-top: 4px !important;
    overflow: hidden !important;
}

/* Campo di ricerca nel dropdown */
.select2-container--bootstrap-5 .select2-search--dropdown .select2-search__field {
    background-color: rgb(24 20 17) !important;
    border-color: rgb(84 69 59) !important;
    border-radius: .5rem !important;
    color: white !important;
    padding: 10px 15px !important;
}

    .select2-container--bootstrap-5 .select2-search--dropdown .select2-search__field:focus {
        background-color: rgb(24 20 17) !important;
        border-color: rgb(84 69 59) !important;
        outline: none !important;
    }

/* Risultati */
.select2-container--bootstrap-5 .select2-results__options {
    background-color: rgb(24 20 17) !important;
    overflow-y: auto !important;
    overflow-x: hidden !important;
    max-height: 200px !important;
}

/* Singola opzione */
.select2-container--bootstrap-5 .select2-results__option {
    background-color: rgb(24 20 17) !important;
    color: white !important;
    padding: 12px 15px !important;
}

/* Opzione in hover/focus */
.select2-container--bootstrap-5 .select2-results__option--highlighted,
.select2-container--bootstrap-5 .select2-results__option--highlighted.select2-results__option--selectable {
    background-color: rgb(84 69 59) !important;
    color: white !important;
}

/* Opzione selezionata */
.select2-container--bootstrap-5 .select2-results__option--selected {
    background-color: rgb(84 69 59) !important;
    color: white !important;
}

/* Testo "Nessun risultato" */
.select2-container--bootstrap-5 .select2-results__message {
    color: rgba(255, 255, 255, 0.7) !important;
    background-color: rgb(24 20 17) !important;
}

/* Pulsante "X" per cancellare */
.select2-container--bootstrap-5 .select2-selection__clear {
    color: white !important;
    background-color: transparent !important;
    font-size: 1.2em !important;
    margin-right: 5px !important;
}

    .select2-container--bootstrap-5 .select2-selection__clear:hover {
        color: rgb(84 69 59) !important;
    }

/* Loading spinner */
.select2-container--bootstrap-5 .select2-results__option--loading {
    color: rgba(255, 255, 255, 0.7) !important;
}

/* Disabled state */
.select2-container--bootstrap-5.select2-container--disabled .select2-selection {
    background-color: rgb(24 20 17) !important;
    border-color: rgb(84 69 59) !important;
    opacity: 1 !important;
    cursor: not-allowed !important;
}

.select2-container--bootstrap-5.select2-container--disabled .select2-selection__rendered {
    color: rgba(255, 255, 255, 0.5) !important;
}

/* Scrollbar personalizzata nel dropdown */
.select2-results__options::-webkit-scrollbar {
    width: 8px;
}

.select2-results__options::-webkit-scrollbar-track {
    background: rgb(24 20 17);
}

.select2-results__options::-webkit-scrollbar-thumb {
    background: rgb(84 69 59);
    border-radius: 4px;
}

    .select2-results__options::-webkit-scrollbar-thumb:hover {
        background: rgb(104 89 79);
    }

/* Scrollbar per Chrome / Edge / Safari */
/* .dropdown-menu::-webkit-scrollbar {
    width: 8px;
}

.dropdown-menu::-webkit-scrollbar-track {
    background: rgb(24 20 17);
    border-radius: 10px;
}

.dropdown-menu::-webkit-scrollbar-thumb {
    background-color: rgb(84 69 59);
    border-radius: 10px;
    border: 2px solid rgb(24 20 17);
}

.dropdown-menu::-webkit-scrollbar-thumb:hover {
    background-color: rgb(110 90 80);
} */

.my-searchinput {
    background-color: rgb(24 20 17);
    border-color: rgb(84 69 59);
    color: ghostwhite;
    border-radius: .5rem;
    padding: 15px;
}

    .my-searchinput:focus,
    .my-searchinput:focus-within {
        background-color: rgb(24 20 17) !important;
        color: white;
        border-color: rgb(84 69 59);
        box-shadow: none;
        outline: none;
    }

    .my-searchinput:disabled,
    .my-searchinput[disabled] {
        background-color: rgb(24 20 17) !important;
        color: ghostwhite;
        border-color: rgb(84 69 59);
        opacity: 1; /* Bootstrap abbassa l'opacità sugli elementi disabled */
        cursor: not-allowed; /* opzionale, indica visivamente che è disabilitato */
    }

/* Tasto "scegli file" su input*/
/*.my-searchinput::file-selector-button {
    -webkit-appearance: none;
    appearance: none;
    background-color: #d45f11;
    color: white;
    border: none;
    border-radius: .5rem;
    padding: 0.375rem 1rem;*/ /* stesso padding verticale di .form-control */
/*margin-right: 0.75rem;
    line-height: 1.5;
    vertical-align: middle;
    cursor: pointer;
}

.my-searchinput:hover::file-selector-button,
.my-searchinput:focus-within::file-selector-button {
    background-color: rgb(212 95 17 / 0.9);
}

.my-searchinput:active::file-selector-button {
    background-color: #9f430c;
}*/

.form-control.my-searchinput::file-selector-button {
    -webkit-appearance: none;
    appearance: none;
    background-color: #d45f11;
    color: white;
    border: none;
    border-radius: .5rem;
    padding: 0.375rem 1rem;
    margin-right: 0.75rem;
    line-height: 1.5;
    vertical-align: middle;
    cursor: pointer;
}

.form-control.my-searchinput:hover::file-selector-button,
.form-control.my-searchinput:focus-within::file-selector-button {
    background-color: rgb(212 95 17 / 0.9) !important;
}

.form-control.my-searchinput:active::file-selector-button {
    background-color: #9f430c !important;
}

/* Icona calendario su input */
.my-searchinput[type="date"]::-webkit-calendar-picker-indicator {
    filter: invert(54%) sepia(65%) saturate(600%) hue-rotate(3deg);
    cursor: pointer;
}

    .my-searchinput[type="date"]::-webkit-calendar-picker-indicator:hover {
        filter: invert(40%) sepia(80%) saturate(900%) hue-rotate(3deg);
    }

/* Paginazione */
.pagination {
    gap: 4px;
}

    .pagination .page-link {
        background: transparent;
        border: 1px solid var(--border-dark);
        color: white;
        border-radius: 6px;
        min-width: 38px;
        text-align: center;
    }

        .pagination .page-link:hover {
            background: rgba(255,255,255,0.1);
            color: var(--primary);
        }

    .pagination .active .page-link,
    .nav-link-active {
        background: rgba(212,95,17,0.2);
        color: var(--primary);
        border-color: var(--primary);
    }

        .pagination .active .page-link:hover,
        .nav-link-active:hover {
            background: rgba(212,95,17,0.2);
            color: white;
        }

    .pagination .page-item disabled {
        opacity: 0.6;
        pointer-events: none;
        font-weight: bold !important;
    }

/* Offcanvas */
.offcanvas-custom {
    background: var(--bg-panel);
    width: 16rem;
}

.footer {
    background-color: var(--bg-panel);
    font-family: "Manrope", sans-serif;
}

/* Modal e toast dark */
.modal-dark .modal-content {
    background: var(--bg-panel);
    border: 1px solid var(--border-dark);
    color: white;
}

.modal-dark .modal-header {
    border-bottom-color: var(--border-dark);
}

.modal-dark .modal-footer {
    border-top-color: var(--border-dark);
}

.toast-dark {
    background: var(--bg-panel);
    border: 1px solid var(--border-dark);
    color: white;
}

    .toast-dark .toast-header {
        background: var(--bg-panel);
        border-bottom-color: var(--border-dark);
        color: white;
    }

/* =========================
   CROPPER.JS DARK THEME
========================= */
.cropper-view-box {
    outline: 2px solid var(--primary);
    outline-color: rgba(212, 95, 17, 0.75);
}

.cropper-line {
    background-color: var(--primary);
}

.cropper-point {
    background-color: var(--primary);
}

.cropper-modal {
    background-color: #000;
    opacity: 0.6;
}

@import url('https://fonts.googleapis.com/css2?family=DM+Serif+Display:ital@0;1&display=swap');

.profile-handle {
    color: #d45f11;
    font-family: 'DM Serif Display', serif;
}

/* =========================
   TOPBAR SEARCH
========================= */
.topbar-search-input {
    background-color: rgba(255,255,255,.06);
    border: 1px solid var(--border-dark);
    border-radius: .75rem;
    color: #fff;
    padding: 8px 12px 8px 40px;
    font-size: .875rem;
    transition: all .25s ease;
    height: 40px;
}

    .topbar-search-input::placeholder {
        color: rgba(255,255,255,.3);
    }

    .topbar-search-input:focus {
        background-color: rgba(255,255,255,.1);
        border-color: var(--primary);
        box-shadow: 0 0 0 3px rgba(212,95,17,.15);
        outline: none;
        color: #fff;
    }

.topbar-search-results {
    position: absolute;
    top: 100%;
    left: 0;
    right: 0;
    margin-top: 4px;
    background: var(--bg-panel);
    border: 1px solid var(--border-dark);
    border-radius: .75rem;
    max-height: 360px;
    overflow-y: auto;
    z-index: 1050;
    box-shadow: 0 8px 32px rgba(0,0,0,.5);
    opacity: 0;
    transform: translateY(4px);
    transition: opacity .15s ease, transform .15s ease;
}

    .topbar-search-results.show {
        opacity: 1;
        transform: translateY(0);
    }

    .topbar-search-results.d-none {
        display: none !important;
    }

.topbar-search-result {
    display: flex;
    align-items: center;
    gap: .75rem;
    padding: .625rem 1rem;
    color: #fff;
    text-decoration: none;
    cursor: pointer;
    transition: background .1s ease;
}

    .topbar-search-result:hover,
    .topbar-search-result.active {
        background: rgba(255,255,255,.08);
        color: #fff;
    }

    .topbar-search-result .search-avatar {
        width: 32px;
        height: 32px;
        border-radius: 50%;
        background: var(--primary);
        color: #fff;
        display: flex;
        align-items: center;
        justify-content: center;
        font-weight: 700;
        font-size: .75rem;
        flex-shrink: 0;
    }

.topbar-search-empty {
    padding: 1rem;
    text-align: center;
    color: rgba(255,255,255,.4);
    font-size: .875rem;
}

.topbar-search-results::-webkit-scrollbar {
    width: 6px;
}

.topbar-search-results::-webkit-scrollbar-thumb {
    background: rgba(255,255,255,.15);
    border-radius: 6px;
}

/* =========================
   AVATAR DROPDOWN
========================= */
.dropdown-toggle-no-caret::after {
    display: none !important;
}

#userDropdown {
    border: none;
    cursor: pointer;
    transition: box-shadow .2s ease;
}

    #userDropdown:hover,
    #userDropdown:focus {
        box-shadow: 0 0 0 2px var(--primary);
        outline: none;
    }

.dropdown-menu .dropdown-divider {
    border-color: var(--border-dark);
}

.dropdown-menu .dropdown-header {
    padding: .5rem 1rem;
}

/* =========================
   BREADCRUMBS
========================= */
.bo-breadcrumbs {
    font-size: .8125rem;
    line-height: 1.5;
}

.bo-breadcrumb-link {
    color: rgba(255,255,255,.45);
    text-decoration: none;
    transition: color .15s ease;
}

    .bo-breadcrumb-link:hover {
        color: var(--primary);
    }

.bo-breadcrumb-sep {
    color: rgba(255,255,255,.2);
    margin: 0 .5rem;
}

.bo-breadcrumb-active {
    color: var(--primary);
    font-weight: 500;
}

/* =========================
   BACKOFFICE FOOTER
========================= */
.bo-footer {
    background-color: var(--bg-panel);
    font-family: "Manrope", sans-serif;
}

    .bo-footer .footer-link {
        color: #9ca3af;
        font-size: .875rem;
        text-decoration: none;
    }

        .bo-footer .footer-link:hover {
            color: #fff;
        }

    .bo-footer .text-muted-custom {
        color: rgba(255,255,255,.4);
    }

/* ===============================================
   MIGLIORIE GRAFICHE E RESPONSIVE DI CLAUDIO L.
=============================================== */
@media (max-width: 576px) {
    .btn-primary-custom {
        padding: 0.25rem 0.5rem; /* dimensioni ridotte tipo btn-sm */
        font-size: 0.875rem;
    }

    .btn-secondary-custom {
        padding: 0.25rem 0.5rem; /* dimensioni ridotte tipo btn-sm */
        font-size: 0.875rem;
    }

    .my-panel {
        padding: 0.25rem 0.5rem; /* dimensioni ridotte tipo btn-sm */
        font-size: 0.875rem;
    }
}

/* ==============================
   RESPONSIVE DI My di Profiles
============================== */
@media (max-width: 576px) {
    .bo-my-header .btn {
        width: 100%;
    }
}

/* ==============================
   RESPONSIVE MY - FILTRI MOBILE
============================== */
@media (max-width: 576px) {

    .my-panel {
        padding: 1rem !important;
    }

    .my-searchinput,
    .my-dropdown,
    .select2-container--bootstrap-5 .select2-selection {
        padding: 10px !important;
        min-height: 44px !important;
    }
}

/* ==============================
   RESPONSIVE MY - PAGINAZIONE
============================== */
@media (max-width: 576px) {

    .pagination {
        flex-wrap: wrap;
        gap: 6px;
    }

        .pagination .page-link {
            min-width: 34px;
            padding: 6px 10px;
            font-size: 0.875rem;
        }
}

@media (max-width: 576px) {

    .select2-container--bootstrap-5 .select2-selection__rendered {
        font-size: 0.9rem !important;
    }
}

/* ===================================
   RESPONSIVE DI Create di Profiles
=================================== */
@media (max-width: 576px) {

    .justify-center {
        justify-content: center;
    }
}

/* ==========================================
   RESPONSIVE DI Edit di Profiles - HEADER
========================================== */
@media (max-width: 576px) {

    .bo-edit-header .btn {
        width: 100%;
    }
}

/* ========================================
   RESPONSIVE EDIT PROFILE - CARD HEADER
======================================== */
@media (max-width: 576px) {

    .bo-edit-card-header {
        flex-direction: column;
        align-items: stretch !important;
        gap: 10px;
    }

        .bo-edit-card-header .btn {
            width: 100%;
        }
}

/* ==============================
   RESPONSIVE EDIT PROFILE - MAP
============================== */
@media (max-width: 576px) {

    #profileMap {
        height: 260px !important;
    }
}

/* ===================================
   RESPONSIVE EDIT PROFILE - ACTIONS
=================================== */
@media (max-width: 576px) {

    .bo-edit-actions .btn {
        width: 100%;
    }
}

/* =====================================
   RESPONSIVE DI Delete di Profiles
===================================== */
.bo-danger-panel {
    background: rgba(212,95,17,0.15);
    border: 1px solid rgba(212,95,17,0.4);
    border-left: 4px solid var(--primary);
    border-radius: .5rem;
}

.bo-delete-actions .btn {
    min-width: 160px;
}

@media (max-width: 576px) {
    .bo-delete-actions {
        flex-direction: column;
    }

        .bo-delete-actions .btn {
            width: 100%;
        }
}

.btn-main-danger {
    background: linear-gradient(180deg, #d45f11 0%, #b85010 100%);
    color: white;
    border-radius: .5rem;
    font-weight: 600;
}

    .btn-main-danger:hover {
        background: linear-gradient(180deg, #b85010 0%, #9f430c 100%);
    }

/* ========================================
   RESPONSIVE DI Index di profile_media
======================================== */
@media (min-width: 768px) {

    .bo-filter-row {
        display: flex;
        flex-wrap: nowrap;
        gap: 0.5rem;
    }

        .bo-filter-row > div {
            flex: 1 1 auto;
        }

        .bo-filter-row .btn {
            white-space: nowrap;
        }

        .bo-filter-row > div:last-child {
            flex: 0 0 auto;
            margin-left: auto;
        }
}

@media (max-width: 576px) {

    .bo-index-header .btn {
        width: 100%;
    }

    .btn-custom-left, .btn-custom-mid, .btn-custom-right {
        padding: 0.25rem 0.5rem; /* dimensioni ridotte tipo btn-sm */
        font-size: 0.875rem;
    }
}

/* ========================================
   RESPONSIVE DI Edit di profile_media
======================================== */
.card-body-edit_media {
    flex: 1 1 auto;
    padding: 1rem .5rem;
}

.bo-media-summary {
    background: rgba(255,255,255,0.02);
    border: 1px solid var(--border-dark);
    border-bottom-right-radius: .5rem !important;
    border-bottom-left-radius: .5rem !important;
    padding-bottom: 1rem;
    padding-left: 1rem;
    padding-right: 1rem;
}

.bo-cropper-panel {
    background: rgba(255,255,255,0.02);
    border: 1px solid var(--border-dark);
    border-radius: .5rem;
    padding: 1rem;
}

.bo-media-preview {
    max-width: 360px;
    width: 100%; /* ← aggiunto */
    max-height: 360px;
    border-radius: .5rem;
    border: 1px solid var(--border-dark);
}

.bo-media-current-preview {
    max-width: 360px;
    width: 100%; /* ← aggiunto */
    max-height: 240px;
    border-radius: .5rem;
    border: 1px solid var(--border-dark);
}

.bo-form-actions .btn {
    min-width: 150px;
}

@media (max-width: 576px) {

    .bo-form-actions {
        flex-direction: column;
    }

        .bo-form-actions .btn {
            width: 100%;
        }

    #edit-profile_mediaFileInput {
        padding-left: 1rem !important;
    }
}

/* ========================================
   STILE DI Create di profile_media
======================================== */
/* Cropper container */
.media-cropper-wrapper-create-profile_media {
    max-height: 500px;
    background: #1a1a1a;
    border: 1px solid var(--border-dark);
    border-radius: .75rem;
    overflow: hidden;
}

    .media-cropper-wrapper-create-profile_media img {
        max-width: 100%;
        display: block;
    }

/* Preview galleria */
.media-preview-wrapper-create-profile_media {
    max-width: 420px;
}

    .media-preview-wrapper-create-profile_media img {
        max-width: 100%;
        max-height: 360px;
        border-radius: .75rem;
        display: block;
    }

@media (max-width: 576px) {
    #create-profile_mediaFileInput {
        padding-left: 1rem !important;
    }
}

/* ====================================================
   RESPONSIVE DI Edit e Delete di profile_contacts
==================================================== */
@media (max-width: 576px) {
    .centered-btns {
        justify-content: center !important;
    }

    .ms-3-cancel {
        margin-left: 0 !important;
    }
}

/* ==========================================
   RESPONSIVE DI Index di categories
========================================== */
@media (max-width: 576px) {
    .pb-0da576px {
        padding-bottom: 0 !important;
    }
}

/* ==========================================
   RESPONSIVE DI Edit di categories
========================================== */
@media (max-width: 576px) {
    #fileInput {
        padding-left: 1.2rem !important;
    }
}

/* ========================================
   PREVIEW IMMAGINE - Edit categories
======================================== */
.bo-category-preview {
    max-width: 360px;
    max-height: 240px;
    width: auto;
    height: auto;
    border-radius: .5rem;
    border: 1px solid var(--border-dark);
}

/* ======================================
   STILE DI Details di reviews
====================================== */
#profileNameBtn:hover {
    text-decoration: underline !important;
}

/* ==========================================
   RESPONSIVE DI Details di reports
========================================== */
@media (max-width: 576px) {
    .row-responsive-details-reports {
        display: flex !important; /* Flexbox per allineare le colonne orizzontalmente */
        flex-wrap: wrap !important; /* Le colonne che non entrano nella riga successiva vanno a capo */
        margin-left: -0.75rem !important; /* Margini negativi per compensare il padding delle colonne */
        margin-right: -0.75rem !important; /* stesso ragionamento */
        justify-content: center !important;
    }

    .mt-2a576px {
        margin-top: 1rem !important;
    }
}

/* ==========================================
   RESPONSIVE DI Edit di CmsMenus
========================================== */
@media (max-width: 576px) {
    .w-100a576 {
        width: 100% !important;
    }

    /* Contenitore bottoni Modifica/Elimina full-width */
    .btn-group-a576 {
        display: flex !important;
        flex-direction: column !important;
        gap: 0.5rem;
        width: 100%;
        margin-left: 0 !important; /* rimuove ms-auto */
    }
}

/* ===============================================
   RESPONSIVE DI Edit di profile_languages
=============================================== */
.profile_languagesParagraphResp {
    font-size: smaller;
}

/* ==========================================
   RESPONSIVE DI Index di CmsWidgets
========================================== */

/* Prevent long text from breaking layout inside widget cards */
.drag-item .min-w-0 {
    min-width: 0;
}

/* Header: bottone "Nuovo Widget" full-width su mobile */
@media (max-width: 576px) {
    .bo-index-header .btn {
        width: 100%;
    }

    /* Il select zona occupa tutta la larghezza su mobile */
    .bo-index-header form {
        width: 100%;
    }

        .bo-index-header form select.my-dropdown {
            min-width: 0 !important;
            width: 100% !important;
        }
}

/* ==========================================
   RESPONSIVE DI Index di CmsCookieServices
========================================== */
@media (max-width: 576px) {
    #editBtnda576pxdiIndexdiCookie {
        margin-bottom: .25rem !important;
    }
}

/* ==============================
   MAP SEARCH INPUT ALIGNMENT
============================== */
.map-search-group .my-searchinput {
    padding-top: 0;
    padding-bottom: 0;
    height: 35px;
}

/* ==============================
   MAP SEARCH INPUT ALIGNMENT
============================== */
.map-search-group .my-searchinput {
    padding-top: 0;
    padding-bottom: 0;
    height: 35px;
}

@media (max-width: 576px) {
    .map-search-group .my-searchinput {
        padding-top: 0 !important;
        padding-bottom: 0 !important;
        height: 35px !important;
        min-height: 35px !important;
    }

    .map-search-group .btn-main-sm {
        height: 35px !important;
    }
}