/* Remove elevation from top bar */
.mud-elevation-4 {
    box-shadow: none !important;
}

/* Hide AppBar immediately when in embedded mode to prevent startup glitch */
.embedded-mode .mud-appbar {
    display: none !important;
}

.embedded-mode .mud-main-content {
    padding-top: 0 !important;
}

/* Add top padding to content */
@media (min-width: 600px) {
    .mud-main-content {
        padding-top: 88px !important;
        padding-bottom: 88px !important;
    }
}

/* Mobile responsive adjustments */
@media (max-width: 768px) {
    .nut-hidden {
        display: none !important;
    }

    /* Reduce padding on mobile */
    .mud-container {
        padding-left: 12px !important;
        padding-right: 12px !important;
    }

    /* Stack processing options below upload on mobile */
    .mud-grid-item {
        padding: 8px !important;
    }

    /* Improve touch targets on mobile */
    .mud-button {
        min-height: 44px;
    }

    /* Better spacing for mobile file upload */
    .mud-paper {
        padding: 16px !important;
    }

    /* Reduce font sizes slightly on mobile for better fit */
    .mud-typography-h4 {
        font-size: 1.75rem !important;
    }

    .mud-typography-h6 {
        font-size: 1.125rem !important;
    }
}

/* Tablet responsive adjustments */
@media (min-width: 769px) and (max-width: 1024px) {
    .mud-grid-item {
        padding: 12px !important;
    }
}

/* Improve drag and drop area */
.drag-hover {
    background-color: rgba(242, 94, 69, 0.08) !important;
    border-color: #F25E45 !important;
    border-width: 2px !important;
    border-style: dashed !important;
    transform: scale(1.02);
}

/* Upload area styling */
.upload-area {
    border: 2px dashed #e0e0e0;
    border-radius: 12px;
    transition: all 0.3s ease;
}

.upload-area:hover {
    border-color: #F25E45;
    background-color: rgba(242, 94, 69, 0.02);
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
}

/* Better focus states for accessibility */
.mud-input-root:focus-within {
    outline: 2px solid #F25E45;
    outline-offset: 2px;
}

/* Smooth transitions */
.mud-paper,
.mud-button,
.mud-input {
    transition: all 0.2s ease-in-out;
}

/* Loading states */
.mud-overlay {
    backdrop-filter: blur(4px);
}

/* Alert styling improvements */
.mud-alert {
    border-radius: 8px;
}

/* File grid responsive improvements */
@media (max-width: 600px) {
    .file-grid-mobile {
        grid-template-columns: 1fr !important;
    }

    /* Make upload area more mobile-friendly */
    .upload-area {
        min-height: 200px !important;
        padding: 24px !important;
    }

    .upload-area:hover {
        transform: none; /* Disable transform on mobile for better performance */
    }
}

@media (min-width: 601px) and (max-width: 900px) {
    .file-grid-tablet {
        grid-template-columns: repeat(2, 1fr) !important;
    }
}

/* Loading animation for upload */
@keyframes uploadPulse {
    0% { opacity: 1; }
    50% { opacity: 0.7; }
    100% { opacity: 1; }
}

.upload-loading {
    animation: uploadPulse 1.5s ease-in-out infinite;
}

/* Enhance chip appearance */
.mud-chip {
    border-radius: 16px;
    transition: all 0.2s ease;
}

.mud-chip:hover {
    transform: translateY(-1px);
}

/* Processing page enhancements */
@keyframes processingPulse {
    0%, 100% {
        opacity: 1;
        transform: scale(1);
    }
    50% {
        opacity: 0.7;
        transform: scale(1.1);
    }
}

.processing-pulse {
    animation: processingPulse 2s ease-in-out infinite;
}

/* Staggered animation delay */
.processing-pulse:nth-child(1) {
    animation-delay: 0s;
}

.processing-pulse:nth-child(3) {
    animation-delay: 0.5s;
}

.processing-pulse:nth-child(5) {
    animation-delay: 1s;
}

/* Fixed progress bar styling */
.fixed-top {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    z-index: 1000;
}

/* Enhanced gradient backgrounds */
.processing-hero-bg {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
}

.results-section {
    background: linear-gradient(135deg, #f093fb 0%, #f5576c 100%);
}

/* Tab enhancements */
.mud-tabs .mud-tab {
    border-radius: 8px 8px 0 0;
    transition: all 0.2s ease;
}

.mud-tabs .mud-tab:hover {
    background-color: rgba(25, 118, 210, 0.04);
}

.mud-tabs .mud-tab.mud-tab-active {
    background-color: rgba(25, 118, 210, 0.08);
}

/* Card hover effects for better interactivity */
.mud-card {
    transition: all 0.2s ease;
    border-radius: 12px;
}

.mud-card:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(0, 0, 0, 0.1);
}

/* Progress bar enhancements */
.mud-progress-linear {
    border-radius: 4px;
    overflow: hidden;
}

.mud-progress-linear .mud-progress-linear-bar {
    transition: all 0.3s ease;
}

/* Responsive improvements for Process page */
@media (max-width: 768px) {
    .processing-hero-bg {
        padding: 32px 16px !important;
        min-height: 300px !important;
    }

    .processing-steps {
        flex-direction: column;
        gap: 16px;
    }

    .fixed-top {
        padding: 8px 0;
    }

    .pt-8 {
        padding-top: 80px !important;
    }
}

/* Alert styling improvements */
.mud-alert-filled-info {
    background: linear-gradient(135deg, #64b5f6 0%, #1976d2 100%);
    color: white;
}

.mud-alert-filled-info .mud-alert-icon {
    color: white;
}

/* Badge improvements */
.mud-badge {
    font-weight: 600;
    padding: 2px 8px;
    border-radius: 12px;
}

/* Smooth page transitions */
.page-content {
    animation: fadeInUp 0.5s ease-out;
}

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

/* FileResult page enhancements */
.file-result-container {
    animation: fadeInUp 0.5s ease-out;
}

.document-viewer-container {
    border-radius: 8px;
    overflow: hidden;
    box-shadow: inset 0 1px 3px rgba(0,0,0,0.1);
    background: #f8f9fa;
}

.field-card {
    transition: all 0.2s ease;
    border-radius: 8px !important;
}

.field-card:hover {
    transform: translateY(-1px);
    box-shadow: 0 4px 12px rgba(0,0,0,0.15) !important;
}

.validation-border-valid {
    border-left: 4px solid #4caf50;
}

.validation-border-warning {
    border-left: 4px solid #ff9800;
}

.validation-border-info {
    border-left: 4px solid #2196f3;
}

.validation-border-default {
    border-left: 4px solid #9e9e9e;
}

/* Enhanced breadcrumb styling */
.mud-breadcrumbs {
    padding: 8px 0;
}

.mud-breadcrumbs .mud-breadcrumb-item {
    display: flex;
    align-items: center;
}

/* Document info section */
.document-info-header {
    background: linear-gradient(135deg, #f5f7fa 0%, #c3cfe2 100%);
    border-radius: 12px;
    padding: 16px;
}

/* Field value display */
.field-value-container {
    background: #f8f9fa;
    border: 1px solid #e9ecef;
    border-radius: 6px;
    padding: 8px;
    word-break: break-word;
    font-family: 'Roboto Mono', monospace;
    font-size: 0.875rem;
}

/* Loading animation for document viewer */
.document-loading {
    background: linear-gradient(90deg, #f0f0f0 25%, transparent 37%, transparent 63%, #f0f0f0 75%);
    background-size: 400% 100%;
    animation: shimmer 1.5s ease-in-out infinite;
}

@keyframes shimmer {
    0% { background-position: 100% 50%; }
    100% { background-position: -100% 50%; }
}

/* Export button styling */
.export-button {
    transition: all 0.2s ease;
}

.export-button:hover {
    transform: translateY(-1px);
    box-shadow: 0 2px 8px rgba(0,0,0,0.15);
}

/* Validation alerts */
.validation-alert {
    border-radius: 6px;
    margin-top: 8px;
}

/* Responsive adjustments for FileResult */
@media (max-width: 1200px) {
    .document-viewer-container {
        min-height: 50vh;
    }
}

@media (max-width: 768px) {
    .file-result-container {
        padding: 8px;
    }

    .field-card {
        margin-bottom: 12px;
    }

    .document-info-header {
        padding: 12px;
    }

    /* Stack breadcrumbs vertically on mobile */
    .mud-breadcrumbs {
        flex-direction: column;
        align-items: flex-start;
        gap: 4px;
    }
}

/* Status chip enhancements */
.status-chip {
    font-weight: 600;
    border-radius: 12px;
    transition: all 0.2s ease;
}

.status-chip:hover {
    transform: scale(1.05);
}

/* Enhanced document viewer styling */
.document-viewer-content {
    height: 100%;
    width: 100%;
}


