/**
 * Upload UI Styles
 * Progress indicators, loading states, and OCR results
 */

/* Upload Status Container */
.upload-status {
    padding: 12px;
    border-radius: 8px;
    margin-top: 10px;
    display: flex;
    align-items: center;
    gap: 10px;
    animation: fadeIn 0.3s ease;
}

@keyframes fadeIn {
    from { opacity: 0; transform: translateY(-10px); }
    to { opacity: 1; transform: translateY(0); }
}

/* Status Types */
.upload-status.uploading {
    background: #e3f2fd;
    border: 1px solid #2196f3;
    color: #1565c0;
}

.upload-status.success {
    background: #e8f5e9;
    border: 1px solid #4caf50;
    color: #2e7d32;
}

.upload-status.error {
    background: #ffebee;
    border: 1px solid #f44336;
    color: #c62828;
}

/* Upload Spinner */
.upload-spinner {
    width: 20px;
    height: 20px;
    border: 3px solid rgba(33, 150, 243, 0.3);
    border-top-color: #2196f3;
    border-radius: 50%;
    animation: spin 0.8s linear infinite;
}

@keyframes spin {
    to { transform: rotate(360deg); }
}

/* Upload Text */
.upload-text {
    flex: 1;
    font-size: 14px;
    font-weight: 500;
}

/* Upload Icon */
.upload-icon {
    font-size: 20px;
}

/* Upload Details */
.upload-details {
    flex: 1;
}

.ocr-number {
    font-size: 14px;
    margin-bottom: 4px;
}

.ocr-quality {
    font-size: 12px;
    opacity: 0.8;
}

/* Upload Warnings */
.upload-warnings {
    margin-top: 8px;
}

.upload-warning {
    padding: 8px 12px;
    background: #fff3cd;
    border: 1px solid #ffc107;
    border-radius: 6px;
    color: #856404;
    font-size: 13px;
    margin-top: 6px;
}

/* Retry Button */
.btn-retry {
    padding: 6px 12px;
    background: #f44336;
    color: white;
    border: none;
    border-radius: 4px;
    cursor: pointer;
    font-size: 13px;
    transition: background 0.2s;
}

.btn-retry:hover {
    background: #d32f2f;
}

/* Photo Preview */
.photo-preview {
    margin-top: 10px;
}

.photo-preview img {
    max-width: 100%;
    border-radius: 8px;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
}

/* OCR Result */
.ocr-result {
    margin-top: 8px;
}

/* Mobile Responsive */
@media (max-width: 600px) {
    .upload-status {
        flex-direction: column;
        align-items: flex-start;
    }

    .upload-icon {
        font-size: 18px;
    }

    .ocr-number {
        font-size: 13px;
    }

    .ocr-quality {
        font-size: 11px;
    }
}

/* Loading Overlay (for form submission) */
.loading-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.7);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 9999;
    transition: opacity 0.3s;
}

.loading-overlay.hidden {
    opacity: 0;
    pointer-events: none;
}

.loading-content {
    background: white;
    padding: 30px;
    border-radius: 12px;
    text-align: center;
    max-width: 300px;
}

.spinner {
    width: 50px;
    height: 50px;
    border: 5px solid rgba(33, 150, 243, 0.3);
    border-top-color: #2196f3;
    border-radius: 50%;
    animation: spin 1s linear infinite;
    margin: 0 auto 20px;
}

.loading-text {
    font-size: 16px;
    color: #333;
    font-weight: 500;
}
