/**
 * Global Image Upload Modal CSS
 * Stili specifici per il modal globale di upload immagini
 * 
 * Utilizza le classi standardizzate da _commons.css per:
 * - Header modal (.modal-header-bg, .modal-title-container, .modal-icon-wrapper)
 * - Sezioni (.detail-section, .section-title, .icon-circle)
 * - Pulsanti (.driver-modal-button)
 * 
 * Qui sono definiti solo gli stili specifici per l'upload delle immagini
 */

/* ==========================================================================
   MODAL GLOBALE UPLOAD IMMAGINI
   ========================================================================== */

/* Nessun override di position: Bootstrap gestisce correttamente position:fixed sul .modal */

/* Dimensioni del modal */
#globalImageUploadModal .modal-dialog {
    max-width: 800px;
    
}

/* Area di upload drag & drop */
.upload-area {
    background: #f8f9fa;
    border-color: #dee2e6 !important;
    cursor: pointer;
    transition: all 0.3s ease;
    min-height: 200px;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
}

.upload-area:hover {
    background: #e9ecef;
    border-color: #007bff !important;
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(0, 123, 255, 0.15);
}

.upload-area.dragover {
    background: #e3f2fd;
    border-color: #2196f3 !important;
    transform: scale(1.02);
    box-shadow: 0 6px 20px rgba(33, 150, 243, 0.25);
}

.upload-area.has-file {
    background: #d4edda;
    border-color: #28a745 !important;
    box-shadow: 0 4px 12px rgba(40, 167, 69, 0.15);
}

/* Progress bar personalizzata */
.progress {
    height: 8px;
    border-radius: 4px;
    background-color: #e9ecef;
    overflow: hidden;
}

.progress-bar {
    background: linear-gradient(45deg, #007bff, #0056b3);
    transition: width 0.6s ease;
    border-radius: 4px;
}

/* Preview delle varianti */
.variant-preview {
    text-align: center;
    padding: 1rem;
    border: 1px solid #dee2e6;
    border-radius: 8px;
    background: #f8f9fa;
    transition: all 0.3s ease;
    min-height: 120px;
    display: flex;
    flex-direction: column;
    justify-content: center;
}

.variant-preview:hover {
    border-color: #007bff;
    box-shadow: 0 2px 8px rgba(0, 123, 255, 0.15);
    transform: translateY(-2px);
}

.variant-preview img {
    max-width: 100%;
    height: auto;
    border-radius: 4px;
    box-shadow: 0 2px 4px rgba(0,0,0,0.1);
    margin-bottom: 0.5rem;
}

.variant-name {
    font-size: 0.875rem;
    font-weight: 600;
    color: #495057;
    margin-bottom: 0.25rem;
}

.variant-size {
    font-size: 0.75rem;
    color: #6c757d;
    margin-bottom: 0.5rem;
}

.variant-info {
    display: flex;
    justify-content: center;
    gap: 0.5rem;
    margin-top: 0.5rem;
}

.variant-info i {
    font-size: 0.875rem;
}

/* Progress container */
#globalProgressContainer {
    background: #f8f9fa;
    border-radius: 8px;
    padding: 1rem;
    border: 1px solid #e9ecef;
}

#globalProgressText {
    font-weight: 500;
    color: #495057;
}

#globalProgressPercent {
    font-weight: 600;
    color: #007bff;
}

/* Form controls personalizzati */
#globalImageCaption {
    border-radius: 8px;
    border: 1px solid #ced4da;
    padding: 0.75rem;
    transition: all 0.3s ease;
}

#globalImageCaption:focus {
    border-color: #007bff;
    box-shadow: 0 0 0 0.2rem rgba(0, 123, 255, 0.25);
}

/* Checkbox personalizzate */
.form-check {
    border-radius: 6px;
    transition: background-color 0.3s ease;
}

.form-check:hover {
    background-color: #f8f9fa;
}

.form-check-input:checked {
    background-color: #007bff;
    border-color: #007bff;
}

.form-check-label {
    font-weight: 500;
    color: #495057;
    cursor: pointer;
}

/* Pulsanti personalizzati */
.btn.driver-modal-button {
    border-radius: 8px;
    padding: 0.75rem 1.5rem;
    font-weight: 600;
    transition: all 0.3s ease;
}

.btn.driver-modal-button:hover {
    transform: translateY(-1px);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
}

.btn-primary.driver-modal-button {
    background: linear-gradient(135deg, #007bff 0%, #0056b3 100%);
    border: none;
}

.btn-primary.driver-modal-button:hover {
    background: linear-gradient(135deg, #0056b3 0%, #004085 100%);
}

.btn-primary.driver-modal-button:disabled {
    background: #6c757d;
    opacity: 0.6;
    transform: none;
    box-shadow: none;
}

/* Animazioni */
@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(20px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

#globalUploadPreview {
    animation: fadeInUp 0.5s ease;
}

/* Icons personalizzate */
.upload-area i.fa-cloud-upload-alt {
    color: #007bff;
    filter: drop-shadow(0 2px 4px rgba(0, 123, 255, 0.3));
}

.upload-area.has-file i.fa-check-circle {
    color: #28a745;
    filter: drop-shadow(0 2px 4px rgba(40, 167, 69, 0.3));
}

/* Responsive design */
@media (max-width: 768px) {
    #globalImageUploadModal .modal-dialog {
        max-width: 95%;
        margin: 1rem auto;
    }
    
    .upload-area {
        min-height: 150px;
        padding: 2rem 1rem !important;
    }
    
    .upload-area h4 {
        font-size: 1.1rem;
    }
    
    .variant-preview {
        min-height: 100px;
        padding: 0.75rem;
    }
    
    .variant-name {
        font-size: 0.8rem;
    }
    
    .variant-size {
        font-size: 0.7rem;
    }
}

@media (max-width: 576px) {
    .upload-area {
        min-height: 120px;
        padding: 1.5rem 0.5rem !important;
    }
    
    .upload-area h4 {
        font-size: 1rem;
        margin-bottom: 0.5rem;
    }
    
    .upload-area p {
        font-size: 0.875rem;
    }
    
    .upload-area i.fa-3x {
        font-size: 2rem !important;
        margin-bottom: 1rem !important;
    }
}

/* Dark mode support (se implementato in futuro) */
@media (prefers-color-scheme: dark) {
    .upload-area {
        background: #2d3748;
        border-color: #4a5568 !important;
        color: #e2e8f0;
    }
    
    .upload-area:hover {
        background: #374151;
        border-color: #3182ce !important;
    }
    
    .variant-preview {
        background: #2d3748;
        border-color: #4a5568;
        color: #e2e8f0;
    }
    
    #globalProgressContainer {
        background: #2d3748;
        border-color: #4a5568;
    }
}