/**
 * CSS Customizado para Customização de Assessorias
 * Estilos para Dropzone e Pickr seguindo o padrão AdminLTE
 */

/* =====================================================
 * Dropzone Customizado
 * ===================================================== */

.dropzone {
    border: 2px dashed #007bff;
    border-radius: 8px;
    background: #f8f9fa;
    transition: all 0.3s ease;
    cursor: pointer;
}

.dropzone:hover {
    border-color: #0056b3;
    background: #e9ecef;
}

.dropzone .dz-message {
    text-align: center;
    padding: 40px 20px;
    margin: 0;
}

.dropzone .dz-message .dz-message-icon {
    margin-bottom: 15px;
}

.dropzone .dz-message h5 {
    font-weight: 600;
    color: #495057;
    margin-bottom: 5px;
}

.dropzone .dz-message p {
    font-size: 0.9rem;
}

.dropzone .dz-preview {
    margin: 10px;
}

.dropzone .dz-preview .dz-image {
    border-radius: 8px;
    overflow: hidden;
}

.dropzone .dz-preview .dz-details {
    background: rgba(255, 255, 255, 0.9);
    padding: 8px;
    border-radius: 0 0 8px 8px;
}

.dropzone .dz-preview .dz-remove {
    font-size: 0.85rem;
    color: #dc3545;
    border: 1px solid #dc3545;
    padding: 4px 12px;
    border-radius: 4px;
    background: white;
    margin-top: 8px;
    transition: all 0.2s;
}

.dropzone .dz-preview .dz-remove:hover {
    background: #dc3545;
    color: white;
    text-decoration: none;
}

.dropzone.dz-drag-hover {
    border-color: #28a745;
    background: #d4edda;
}

/* =====================================================
 * Pickr Color Picker Customizado
 * ===================================================== */

.color-picker-button {
    width: 50px;
    height: 50px;
    border: 2px solid #dee2e6;
    border-radius: 8px;
    cursor: pointer;
    transition: all 0.2s;
    box-shadow: 0 2px 4px rgba(0,0,0,0.1);
}

.color-picker-button:hover {
    border-color: #007bff;
    box-shadow: 0 4px 8px rgba(0,123,255,0.2);
    transform: translateY(-2px);
}

/* Customizar o tema nano do Pickr */
.pcr-app[data-theme='nano'] {
    border-radius: 8px;
    box-shadow: 0 8px 20px rgba(0,0,0,0.15);
    border: 1px solid #dee2e6;
}

.pcr-app[data-theme='nano'] .pcr-swatches {
    padding: 12px;
}

.pcr-app[data-theme='nano'] .pcr-swatches > button {
    border-radius: 6px;
    margin: 4px;
    transition: all 0.2s;
}

.pcr-app[data-theme='nano'] .pcr-swatches > button:hover {
    transform: scale(1.1);
    box-shadow: 0 2px 8px rgba(0,0,0,0.2);
}

.pcr-app[data-theme='nano'] .pcr-interaction .pcr-result {
    border-radius: 6px;
    border: 1px solid #dee2e6;
    padding: 8px;
    font-family: 'Source Sans Pro', sans-serif;
}

.pcr-app[data-theme='nano'] .pcr-interaction .pcr-save {
    background: #007bff;
    color: white;
    border-radius: 6px;
    border: none;
    padding: 8px 16px;
    font-weight: 600;
    transition: all 0.2s;
}

.pcr-app[data-theme='nano'] .pcr-interaction .pcr-save:hover {
    background: #0056b3;
}

/* =====================================================
 * Preview das Cores
 * ===================================================== */

#color_preview_primary {
    transition: all 0.3s ease;
}

#color_preview_primary:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(0,0,0,0.15);
}

#color_preview_secondary {
    transition: all 0.3s ease;
    text-decoration: none;
}

#color_preview_secondary:hover {
    text-decoration: underline;
    transform: scale(1.05);
}

/* =====================================================
 * Cards de Imagens Atuais
 * ===================================================== */

.card-header h6 {
    margin: 0;
    font-weight: 600;
    color: #495057;
}

.card-footer .custom-checkbox {
    margin: 0;
}

/* Animação para opacidade das imagens */
#current_logo_preview,
#current_background_preview {
    transition: opacity 0.3s ease;
}

/* =====================================================
 * Alertas e Dicas
 * ===================================================== */

.alert-info {
    border-left: 4px solid #17a2b8;
}

/* =====================================================
 * Responsividade
 * ===================================================== */

@media (max-width: 768px) {
    .dropzone .dz-message {
        padding: 30px 15px;
    }

    .dropzone .dz-message h5 {
        font-size: 1rem;
    }

    .color-picker-button {
        width: 40px;
        height: 40px;
    }

    #cor_primaria_display,
    #cor_secundaria_display {
        max-width: 80px !important;
        font-size: 0.85rem;
    }
}

/* =====================================================
 * Ícones e Detalhes
 * ===================================================== */

h5 i.fas {
    color: #007bff;
}

.text-muted.small {
    font-size: 0.875rem;
    line-height: 1.4;
}

/* =====================================================
 * Melhorias de Acessibilidade
 * ===================================================== */

.dropzone:focus {
    outline: 2px solid #007bff;
    outline-offset: 2px;
}

.color-picker-button:focus {
    outline: 2px solid #007bff;
    outline-offset: 2px;
}

/* Prefers reduced motion */
@media (prefers-reduced-motion: reduce) {
    .dropzone,
    .color-picker-button,
    #color_preview_primary,
    #color_preview_secondary,
    #current_logo_preview,
    #current_background_preview {
        transition: none;
    }
}
