/* Professional Export Dialog Styles */
.export-dialog-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0);
    z-index: 999999;
    backdrop-filter: blur(0px);
    -webkit-backdrop-filter: blur(0px);
    animation: overlayFadeIn 0.4s cubic-bezier(0.25, 0.46, 0.45, 0.94) forwards;
}

.export-dialog {
    position: fixed;
    top: 50%;
    left: 50%;
    background: white;
    border-radius: 12px;
    padding: 24px;
    width: 460px;
    max-width: 90vw;
    max-height: 85vh;
    overflow-y: auto;
    box-shadow: 
        0 20px 40px rgba(0, 0, 0, 0.15),
        0 10px 20px rgba(0, 0, 0, 0.1),
        0 0 0 1px rgba(255, 255, 255, 0.1);
    /* Initial state for animation */
    opacity: 0;
    transform: translate(-50%, -50%) scale(0.7) rotateX(5deg);
    filter: blur(2px);
    animation: dialogSlideIn 0.5s cubic-bezier(0.175, 0.885, 0.32, 1.275) forwards;
}

/* Professional overlay fade-in with blur effect */
@keyframes overlayFadeIn {
    0% { 
        opacity: 0;
        background: rgba(0, 0, 0, 0);
        backdrop-filter: blur(0px);
        -webkit-backdrop-filter: blur(0px);
    }
    100% { 
        opacity: 1;
        background: rgba(0, 0, 0, 0.6);
        backdrop-filter: blur(4px);
        -webkit-backdrop-filter: blur(4px);
    }
}

/* Smooth overlay fade-out */
@keyframes overlayFadeOut {
    0% { 
        opacity: 1;
        background: rgba(0, 0, 0, 0.6);
        backdrop-filter: blur(4px);
        -webkit-backdrop-filter: blur(4px);
    }
    100% { 
        opacity: 0;
        background: rgba(0, 0, 0, 0);
        backdrop-filter: blur(0px);
        -webkit-backdrop-filter: blur(0px);
    }
}

/* Professional dialog slide-in with smooth scaling and rotation */
@keyframes dialogSlideIn {
    0% { 
        opacity: 0;
        transform: translate(-50%, -50%) scale(0.7) rotateX(5deg);
        filter: blur(2px);
    }
    60% {
        opacity: 0.8;
        transform: translate(-50%, -50%) scale(1.02) rotateX(0deg);
        filter: blur(0px);
    }
    100% { 
        opacity: 1;
        transform: translate(-50%, -50%) scale(1) rotateX(0deg);
        filter: blur(0px);
    }
}

/* Smooth dialog slide-out */
@keyframes dialogSlideOut {
    0% { 
        opacity: 1; 
        transform: translate(-50%, -50%) scale(1) rotateX(0deg);
        filter: blur(0px);
    }
    40% {
        opacity: 0.6;
        transform: translate(-50%, -50%) scale(0.98) rotateX(-2deg);
        filter: blur(1px);
    }
    100% { 
        opacity: 0; 
        transform: translate(-50%, -50%) scale(0.8) rotateX(-5deg);
        filter: blur(3px);
    }
}

.export-header h2 {
    margin: 0 0 8px 0;
    color: #333;
    font-size: 20px;
    font-weight: 600;
}

.export-header p {
    margin: 0 0 16px 0;
    color: #666;
    font-size: 13px;
    line-height: 1.3;
}

/* Format-related styles moved to dropdown implementation */

.export-options h3,
.export-formats h3 {
    margin: 0 0 8px 0;
    color: #333;
    font-size: 16px;
    font-weight: 500;
}

#exportFormat {
    width: 100%;
    padding: 12px 16px;
    border: 2px solid #e0e0e0;
    border-radius: 6px;
    background: white;
    color: #333;
    font-size: 14px;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.2s ease;
    margin-bottom: 10px;
}

#exportFormat:focus {
    outline: none;
    border-color: #4CAF50;
    box-shadow: 0 0 0 2px rgba(76, 175, 80, 0.2);
}

#exportFormat:hover {
    border-color: #4CAF50;
}

.format-description {
    padding: 8px 12px;
    background: #f8f9fa;
    border-radius: 4px;
    font-size: 12px;
    color: #666;
    font-style: italic;
    border-left: 3px solid #4CAF50;
}

.option-group {
    margin-bottom: 12px;
}

.option-group label {
    display: block;
    margin-bottom: 8px;
    color: #333;
    font-weight: 500;
}

.option-group h4 {
    margin: 0 0 10px 0;
    font-size: 14px;
    color: #325C86;
    font-weight: 600;
}

.option-group input[type="radio"] {
    margin-right: 8px;
    accent-color: #4CAF50;
}

.range-input {
    margin-top: 8px;
    font-size: 12px;
    color: #666;
}

.range-input input[type="number"] {
    border: 1px solid #ddd;
    border-radius: 3px;
    padding: 4px 6px;
    margin: 0 4px;
}

.option-group input[type="checkbox"] {
    margin-right: 8px;
    accent-color: #4CAF50;
}

.option-group select {
    width: 100%;
    padding: 8px 12px;
    border: 1px solid #ddd;
    border-radius: 6px;
    background: white;
    color: #333;
    font-size: 14px;
}

.option-group select:focus {
    outline: none;
    border-color: #4CAF50;
    box-shadow: 0 0 0 2px rgba(76, 175, 80, 0.2);
}

.export-progress {
    margin-bottom: 16px;
}

.export-progress > div:first-child {
    background: #f0f0f0;
    border-radius: 10px;
    overflow: hidden;
    margin-bottom: 8px;
    height: 20px;
}

#progressBar {
    height: 100%;
    background: linear-gradient(90deg, #4CAF50, #45a049);
    width: 0%;
    transition: width 0.3s ease;
    border-radius: 10px;
}

#progressText {
    text-align: center;
    color: #666;
    font-size: 14px;
    font-weight: 500;
}

.export-actions {
    display: flex;
    gap: 12px;
    justify-content: flex-end;
    margin-top: 24px;
}

.export-actions button {
    padding: 10px 20px;
    border-radius: 6px;
    font-size: 14px;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.2s ease;
    border: none;
}

#cancelExport {
    background: white;
    color: #666;
    border: 1px solid #ddd !important;
}

#cancelExport:hover {
    background: #f5f5f5;
    border-color: #bbb !important;
}

#startExport {
    background: #4CAF50;
    color: white;
}

#startExport:hover {
    background: #45a049;
    transform: translateY(-1px);
    box-shadow: 0 4px 8px rgba(76, 175, 80, 0.3);
}

#startExport:disabled {
    background: #ccc;
    cursor: not-allowed;
    transform: none;
    box-shadow: none;
}

/* Professional Export Button */
#professionalExport {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    border: none;
    padding: 8px 16px;
    border-radius: 6px;
    font-weight: 500;
    transition: all 0.2s ease;
}

#professionalExport:hover {
    transform: translateY(-1px);
    box-shadow: 0 4px 12px rgba(102, 126, 234, 0.4);
}

#professionalExport i {
    margin-right: 6px;
}

/* Responsive Design */
@media (max-width: 768px) {
    .export-dialog {
        min-width: 300px;
        margin: 20px;
        padding: 16px;
    }
    
    /* Dropdown scales automatically */
    
    .export-actions {
        flex-direction: column;
    }
    
    .export-actions button {
        width: 100%;
    }
}

/* Professional closing animations */
.export-dialog.closing {
    animation: dialogSlideOut 0.4s cubic-bezier(0.55, 0.055, 0.675, 0.19) forwards;
}

.export-dialog-overlay.closing {
    animation: overlayFadeOut 0.4s cubic-bezier(0.55, 0.055, 0.675, 0.19) forwards;
}

/* Dropdown format selection - no additional styling needed */

/* Loading animation for progress bar */
@keyframes progressPulse {
    0%, 100% { opacity: 1; }
    50% { opacity: 0.7; }
}

.export-progress.loading #progressBar {
    animation: progressPulse 1.5s ease-in-out infinite;
}

/* Success state */
.export-success #progressText {
    color: #4CAF50;
    font-weight: 600;
}

/* Error state */
.export-error #progressText {
    color: #f44336;
    font-weight: 600;
} 