/* Visual Diagnostic Styles */

/* Upload Area */
.upload-area {
    border: 2px dashed #ccc;
    border-radius: 8px;
    padding: 2rem;
    text-align: center;
    cursor: pointer;
    transition: all 0.3s ease;
    margin: 1.5rem 0;
    background-color: #f9f9f9;
}

.upload-area:hover, .upload-area.dragover {
    border-color: #4CAF50;
    background-color: #f0f8f0;
}

.upload-area.dragover {
    transform: scale(1.02);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
}

.upload-content {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    min-height: 200px;
}

.upload-icon {
    font-size: 3rem;
    color: #4CAF50;
    margin-bottom: 1rem;
}

.upload-area h3 {
    margin: 0.5rem 0;
    color: #333;
}

.upload-area p {
    color: #666;
    margin: 0.5rem 0 1.5rem;
}

.upload-info {
    margin-top: 1rem;
    font-size: 0.85rem;
    color: #888;
}

/* Image Preview */
#image-preview {
    display: flex;
    flex-wrap: wrap;
    gap: 1rem;
    margin: 1.5rem 0;
    display: none; /* Hidden by default */
}

.image-preview-item {
    position: relative;
    width: 150px;
    height: 150px;
    border-radius: 6px;
    overflow: hidden;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
    transition: transform 0.2s ease;
}

.image-preview-item:hover {
    transform: translateY(-3px);
}

.image-preview-item img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.btn-remove-image {
    position: absolute;
    top: 5px;
    right: 5px;
    width: 24px;
    height: 24px;
    border-radius: 50%;
    background-color: rgba(255, 0, 0, 0.8);
    color: white;
    border: none;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    opacity: 0;
    transition: opacity 0.2s ease;
}

.image-preview-item:hover .btn-remove-image {
    opacity: 1;
}

/* Analysis Results */
.analysis-results {
    margin-top: 2rem;
    padding: 1.5rem;
    background-color: #f8f9fa;
    border-radius: 8px;
    border-left: 4px solid #4CAF50;
}

.analysis-results h3 {
    margin-top: 0;
    color: #2e7d32;
}

.analysis-meta {
    display: flex;
    justify-content: space-between;
    margin-bottom: 1rem;
    font-size: 0.9rem;
    color: #666;
}

.confidence-meter {
    height: 6px;
    background-color: #e0e0e0;
    border-radius: 3px;
    margin: 1rem 0;
    overflow: hidden;
}

.confidence-fill {
    height: 100%;
    background: linear-gradient(90deg, #4CAF50, #8BC34A);
    width: 0%;
    transition: width 0.5s ease;
}

/* Recommendations */
.recommendations {
    margin-top: 2rem;
}

.recommendations h3 {
    color: #1565C0;
    margin-bottom: 1rem;
}

.recommendation-list {
    list-style: none;
    padding: 0;
    margin: 0;
}

.recommendation-item {
    display: flex;
    align-items: flex-start;
    margin-bottom: 0.75rem;
    padding: 0.75rem;
    background-color: #f5f9ff;
    border-radius: 6px;
    transition: transform 0.2s ease;
}

.recommendation-item:hover {
    transform: translateX(5px);
}

.recommendation-item i {
    color: #1976D2;
    margin-right: 0.75rem;
    margin-top: 0.2rem;
}

/* Responsive Adjustments */
@media (max-width: 768px) {
    .upload-area {
        padding: 1.5rem 1rem;
    }
    
    .image-preview-item {
        width: calc(50% - 0.5rem);
        height: 120px;
    }
    
    .analysis-results {
        padding: 1rem;
    }
}

/* Loading State */
.loading-state {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: 2rem;
    text-align: center;
}

.loading-spinner {
    width: 40px;
    height: 40px;
    border: 4px solid rgba(0, 0, 0, 0.1);
    border-radius: 50%;
    border-top-color: #4CAF50;
    animation: spin 1s ease-in-out infinite;
    margin-bottom: 1rem;
}

@keyframes spin {
    to { transform: rotate(360deg); }
}

/* Error State */
.error-state {
    padding: 1rem;
    background-color: #ffebee;
    border-left: 4px solid #f44336;
    border-radius: 4px;
    margin: 1rem 0;
    color: #c62828;
    display: flex;
    align-items: center;
}

.error-state i {
    margin-right: 0.5rem;
}

/* Action Buttons */
.action-buttons {
    display: flex;
    gap: 1rem;
    margin: 1.5rem 0;
}

.btn {
    padding: 0.75rem 1.5rem;
    border: none;
    border-radius: 4px;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.2s ease;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
}

.btn-primary {
    background-color: #4CAF50;
    color: white;
}

.btn-primary:hover {
    background-color: #3d8b40;
    transform: translateY(-2px);
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.1);
}

.btn-secondary {
    background-color: #f5f5f5;
    color: #333;
    border: 1px solid #ddd;
}

.btn-secondary:hover {
    background-color: #e0e0e0;
    transform: translateY(-2px);
    box-shadow: 0 2px 6px rgba(0, 0, 0, 0.1);
}

.btn:disabled {
    opacity: 0.6;
    cursor: not-allowed;
    transform: none !important;
    box-shadow: none !important;
}
