﻿body {
}
.hidden {
    display:none !important;
}

.dataTables_length [name='tblData_length'] {
    width:80px !important;
}

.tox-promotion {
    display: none;
}

.tox-editor-container .tox-menubar {
    visibility: hidden;
    height: 20px;
}
.table-responsive .form-control {
    min-width:unset !important;
}

.immaginiCell:has(#imagePreviewContainer:empty) {
    display: none;
}
.documentiCell:has(#documentPreviewContainer:empty) {
    display: none;
}

#documentPreviewContainer .caption-inputs .form-control,
#imagePreviewContainer .caption-inputs .form-control {
    padding: 4px;
    padding-right:10px;
    padding-left: 44px;
}

#documentPreviewContainer .caption-inputs .flag-icon,
#imagePreviewContainer .caption-inputs .flag-icon {
    margin-top: -23px !important;
    margin-bottom: 15px;
    margin-left: 8px;
    display: block;
}
#documentPreviewContainer .caption-inputs label,
#imagePreviewContainer .caption-inputs label {
    display: none;
}

.caption-inputs.noflag .flag-icon {
    display:none !important;
}

.caption-inputs.noflag .didascalia {
    padding-left:10px !important;
}

#imagePreviewContainer .file-preview img {
    width: 150px; /* Occupa tutta la larghezza disponibile */
    height: 150px; /* Rende l'immagine alta quanto larga */
    object-fit: cover; /* Cattura la parte centrale dell'immagine se non è quadrata */
    border-radius: 4px; /* Aggiungi angoli arrotondati se necessario */
}

#imagePreviewContainer .primary-checkbox {
    margin-top: -40px;
    margin-bottom:18px;
    left: 10px;
    display:block;
    z-index:100;
    position:relative;
    visibility: hidden; /* Lo spunta è nascosto fino a quando non viene attivato */
    background-color: rgba(255, 255, 255, 0.7); /* Sfondo semitrasparente per visibilità */
    border-radius: 50%; /* Forma circolare */
    width: 30px;
    height: 30px;
    cursor: pointer;
}

#imagePreviewContainer .file-preview .img-thumbnail:hover ~ .primary-checkbox,
#imagePreviewContainer .file-preview .primary-checkbox:hover {
    visibility: visible;
}

#imagePreviewContainer .primary-checkbox.checked {
    background-color: #007bff; /* Colore di background quando è selezionato */
    color: white;
    visibility: visible;
    align-items: center;
    justify-content: center;
}

#documentPreviewContainer .file-preview .border.rounded {
    min-height: 80px;
    max-width:220px !important;
    margin-bottom: 10px;
}

.filelist .dropify-wrapper .dropify-preview {
    visibility: hidden !important;
}

.delete-attachment {
    float: right;
    border: 1px solid #000000;
    font-size: 20px;
    padding: 5px;
    width: auto;
    margin-right: 14px;
    background-color: #ffffff;
    margin-top: -50px;
    border-radius: var(--bs-border-radius) !important;
}
#imagePreviewContainer .delete-attachment {
    /* Qui le tue modifiche specifiche, per esempio: */
    margin-right: 86px;
    position: relative;
    border: 1px solid #ffffff !important;
    background-color: rgba(255, 255, 255, 0.7);
    /* ... altri stili che vuoi modificare ... */
}

.delete-attachment:hover {
    background-color: #ffffff !important;
    cursor:pointer;
}

    @media screen and (max-width: 768px) {
        .table-responsive .dataTables_wrapper .col-sm-12 {
            padding-top: 20px;
            width: 50% !important;
        }

        .dataTables_length label,
        .dataTables_length [name='tblData_length'] {
            width: 100% !important;
        }

        .dataTables_filter .form-control-sm {
            width: 100% !important;
        }
    }












/* Container principale della selezione */
.select2-container .select2-selection--single ,
.select2-container--bootstrap-5 .select2-selection--single {
    display: block;
    width: 100%;
    padding: 0.8rem 2rem 0.8rem 0.75rem; /* come la tua form-select */
    font-size: 0.875rem;
    font-weight: 400;
    line-height: 1.5;
    color: #5B6B79;
    background-color: #ffffff;
    border: 1px solid #DBE0E5;
    border-radius: 8px;
    height: auto; /* evita altezze fisse di Bootstrap */
    transition: border-color 0.15s ease-in-out, box-shadow 0.15s ease-in-out;
    height: 49px !important; /* Altezza standard per form-select di Bootstrap 5 */
}

/* Testo renderizzato */
.select2-container .select2-selection__rendered ,
.select2-container--bootstrap-5 .select2-selection__rendered {
    padding-left: 0;
    padding-right: 0;
    line-height: 1.5;
    color: #5B6B79;
    border: 1px solid transparent;
}

/* Placeholder */
.select2-container .select2-selection__placeholder ,
.select2-container--bootstrap-5 .select2-selection__placeholder {
    color: #5B6B79;
    opacity: 0.7;
    padding-left: 0;
    padding-right: 0;
    line-height: 1.5;
    border: 1px solid transparent;
}

/* Freccia custom come la tua */
.select2-container .select2-selection__arrow b ,
.select2-container--bootstrap-5 .select2-selection__arrow b {
    width: 16px;
    height: 12px;
    background-image: url("data:image/svg+xml,%3csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 16 16'%3e%3cpath fill='none' stroke='%231D2630' stroke-linecap='round' stroke-linejoin='round' stroke-width='2' d='M2 5l6 6 6-6'/%3e%3c/svg%3e");
    background-repeat: no-repeat;
    background-size: 16px 12px;
    background-position: center;
    display: block;
    float: right;
    margin-top: -18px;
    margin-right:0px;
}

/* Focus */
.select2-container.select2-container--focus .select2-selection ,
.select2-container--bootstrap-5.select2-container--focus .select2-selection {
    border-color: #86b7fe;
    box-shadow: 0 0 0 0.25rem rgba(13,110,253,.25);
}

/* Dropdown */
.select2-container .select2-dropdown ,
.select2-container--bootstrap-5 .select2-dropdown {
    border-color: #DBE0E5;
    border-radius: 8px;
}

.select2-selection .select2-selection__clear {
    display: block;
    float: right;
}

/* [Nasconde le freccine di incremento/decremento sui campi input[type=number] su tutto il gestionale /] */
input[type='number']::-webkit-outer-spin-button,
input[type='number']::-webkit-inner-spin-button {
    -webkit-appearance: none;
    margin: 0;
}

input[type='number'] {
    -moz-appearance: textfield;
}

/* [Il tema usa per bg-success un verde troppo tenue: poco contrasto col testo bianco dei
   badge, praticamente illeggibile (es. badge "Entrata" nei promemoria Prima Nota). Qui si
   sovrascrive su tutto il gestionale con la tinta piena standard di Bootstrap 5, coerente
   col verde già usato per il pulsante "Registra selezionati" (vedi Prima_Nota.css) /] */
.badge.bg-success {
    background-color: #198754 !important;
    color: #fff !important;
}

/* [Stesso problema, stessa soluzione: il tema rende anche .btn-success troppo tenue /] */
.btn-success {
    background-color: #198754 !important;
    border-color: #198754 !important;
    color: #fff !important;
}

.btn-success:hover,
.btn-success:focus {
    background-color: #146c43 !important;
    border-color: #13653f !important;
    color: #fff !important;
}

.btn-success:disabled,
.btn-success.disabled {
    background-color: #a3cfbb !important;
    border-color: #a3cfbb !important;
    color: #f0f0f0 !important;
}
