/* Export Preview Modal */
.export-preview-modal {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.8);
    backdrop-filter: blur(10px);
    z-index: 10000;
    overflow-y: auto;
}

.export-preview-content {
    max-width: 1200px;
    margin: 20px auto;
    background: #fff;
    border-radius: 12px;
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.3);
    overflow: hidden;
    min-height: calc(100vh - 40px);
}

.export-preview-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 20px 30px;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
}

.export-preview-controls {
    display: flex;
    align-items: center;
    gap: 20px;
    flex-wrap: wrap;
}

.export-preview-title {
    margin: 0;
    font-size: 1.5em;
    font-weight: 600;
}

.export-preview-actions {
    display: flex;
    gap: 12px;
    align-items: center;
}

.export-close-btn {
    background: rgba(255, 255, 255, 0.2);
    border: none;
    color: white;
    font-size: 24px;
    cursor: pointer;
    padding: 8px 12px;
    border-radius: 8px;
    transition: all 0.3s ease;
    margin-left: 12px;
}

.export-close-btn:hover {
    background: rgba(255, 255, 255, 0.3);
    transform: scale(1.1);
}

.export-preview-body {
    padding: 40px;
    background: #fff;
    color: #333;
    line-height: 1.6;
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
}

/* Clean Export Layout Styles */
.export-document {
    max-width: 800px;
    margin: 0 auto;
    background: white;
    padding: 0;
}

.export-header {
    text-align: center;
    margin-bottom: 40px;
    padding-bottom: 20px;
    border-bottom: 3px solid #667eea;
}

.export-title {
    font-size: 2.2em;
    font-weight: 700;
    color: #2c3e50;
    margin: 0 0 10px 0;
    text-transform: uppercase;
    letter-spacing: 1px;
}

.export-subtitle {
    font-size: 1.2em;
    color: #667eea;
    margin: 0;
    font-weight: 500;
}

.export-meta {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 20px;
    margin-bottom: 30px;
    padding: 20px;
    background: #f8f9fa;
    border-radius: 8px;
    border-left: 4px solid #667eea;
}

.export-meta-item {
    display: flex;
    flex-direction: column;
}

.export-meta-label {
    font-weight: 600;
    color: #495057;
    font-size: 0.9em;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    margin-bottom: 4px;
}

.export-meta-value {
    color: #2c3e50;
    font-size: 1.1em;
    font-weight: 500;
}

.export-section {
    margin-bottom: 35px;
    page-break-inside: avoid;
}

.export-section-title {
    font-size: 1.4em;
    font-weight: 700;
    color: #2c3e50;
    margin: 0 0 15px 0;
    padding: 12px 0;
    border-bottom: 2px solid #e9ecef;
    display: flex;
    align-items: center;
    gap: 10px;
}

.export-section-icon {
    font-size: 1.2em;
    color: #667eea;
}

.export-field {
    margin-bottom: 20px;
}

.export-field-label {
    font-weight: 600;
    color: #495057;
    font-size: 1em;
    margin-bottom: 6px;
    display: block;
}

.export-field-value {
    color: #2c3e50;
    font-size: 1em;
    line-height: 1.6;
    padding: 12px;
    background: #f8f9fa;
    border-radius: 6px;
    border-left: 3px solid #667eea;
    min-height: 20px;
}

.export-field-value:empty::before {
    content: "Not specified";
    color: #6c757d;
    font-style: italic;
}

.export-field-row {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 20px;
    margin-bottom: 20px;
}

.export-field-row .export-field {
    margin-bottom: 0;
}

/* Print Styles */
@media print {
    .export-preview-header {
        display: none !important;
    }
    
    .export-preview-body {
        padding: 0 !important;
        margin: 0 !important;
    }
    
    .export-document {
        max-width: none !important;
        box-shadow: none !important;
        border: none !important;
    }
    
    .export-section {
        page-break-inside: avoid;
    }
    
    .export-section-title {
        page-break-after: avoid;
    }
}

/* Responsive Design */
@media (max-width: 768px) {
    .export-preview-content {
        margin: 10px;
        min-height: calc(100vh - 20px);
    }
    
    .export-preview-header {
        padding: 15px 20px;
        flex-direction: column;
        gap: 15px;
    }
    
    .export-preview-actions {
        width: 100%;
        justify-content: center;
    }
    
    .export-preview-body {
        padding: 20px;
    }
    
    .export-meta {
        grid-template-columns: 1fr;
    }
    
    .export-field-row {
        grid-template-columns: 1fr;
    }
    
    .export-preview-controls {
        flex-direction: column;
        gap: 10px;
        width: 100%;
    }
    
    .theme-toggle-container {
        width: 100%;
        justify-content: center;
    }
}

/* Theme Toggle Styles */
.theme-toggle-container {
    display: flex;
    align-items: center;
    gap: 10px;
}

.theme-toggle-label {
    font-size: 0.9em;
    font-weight: 500;
    color: rgba(255, 255, 255, 0.9);
}

.theme-toggle-buttons {
    display: flex;
    gap: 5px;
    background: rgba(255, 255, 255, 0.1);
    border-radius: 8px;
    padding: 4px;
}

.theme-btn {
    background: transparent;
    border: none;
    color: rgba(255, 255, 255, 0.8);
    padding: 8px 12px;
    border-radius: 6px;
    cursor: pointer;
    font-size: 0.85em;
    font-weight: 500;
    transition: all 0.3s ease;
    white-space: nowrap;
}

.theme-btn:hover {
    background: rgba(255, 255, 255, 0.2);
    color: white;
}

.theme-btn.active {
    background: rgba(255, 255, 255, 0.3);
    color: white;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.2);
}

/* Dark Theme Styles */
.export-preview-content.dark-theme .export-preview-body {
    background: #1a1a1a;
    color: #e0e0e0;
}

.export-preview-content.dark-theme .export-document {
    background: #1a1a1a;
}

.export-preview-content.dark-theme .export-title {
    color: #ffffff;
}

.export-preview-content.dark-theme .export-subtitle {
    color: #8ab4f8;
}

.export-preview-content.dark-theme .export-meta {
    background: #2d2d2d;
    border-left-color: #8ab4f8;
}

.export-preview-content.dark-theme .export-meta-label {
    color: #b0b0b0;
}

.export-preview-content.dark-theme .export-meta-value {
    color: #ffffff;
}

.export-preview-content.dark-theme .export-section-title {
    color: #ffffff;
    border-bottom-color: #404040;
}

.export-preview-content.dark-theme .export-section-icon {
    color: #8ab4f8;
}

.export-preview-content.dark-theme .export-field-label {
    color: #b0b0b0;
}

.export-preview-content.dark-theme .export-field-value {
    background: #2d2d2d;
    color: #e0e0e0;
    border-left-color: #8ab4f8;
}

.export-preview-content.dark-theme .export-field-value:empty::before {
    color: #808080;
}

/* Print styles override - always light theme for print */
@media print {
    .export-preview-content.dark-theme .export-preview-body,
    .export-preview-content.dark-theme .export-document,
    .export-preview-content.dark-theme .export-title,
    .export-preview-content.dark-theme .export-subtitle,
    .export-preview-content.dark-theme .export-meta,
    .export-preview-content.dark-theme .export-meta-label,
    .export-preview-content.dark-theme .export-meta-value,
    .export-preview-content.dark-theme .export-section-title,
    .export-preview-content.dark-theme .export-section-icon,
    .export-preview-content.dark-theme .export-field-label,
    .export-preview-content.dark-theme .export-field-value {
        background: white !important;
        color: #333 !important;
        border-color: #667eea !important;
    }
    
    .export-preview-content.dark-theme .export-meta {
        background: #f8f9fa !important;
    }
    
    .export-preview-content.dark-theme .export-field-value {
        background: #f8f9fa !important;
    }
}

/* Media Gallery Styles */
.export-note {
    background: #e3f2fd;
    color: #1565c0;
    padding: 12px 16px;
    border-radius: 8px;
    margin: 10px 0;
    border-left: 4px solid #2196f3;
    font-size: 0.9em;
}

.export-media-gallery {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 20px;
    padding: 20px 0;
}

.export-media-item {
    background: #f8f9fa;
    border-radius: 12px;
    padding: 15px;
    text-align: center;
    border: 2px solid #e9ecef;
    transition: all 0.3s ease;
}

.export-media-item:hover {
    border-color: #667eea;
    box-shadow: 0 4px 12px rgba(102, 126, 234, 0.15);
}

.export-media-item img,
.export-media-item video {
    max-width: 100%;
    height: auto;
    border-radius: 8px;
    margin-bottom: 10px;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
}

.export-media-caption {
    margin: 10px 0 0 0;
    font-size: 0.9em;
    color: #666;
    font-weight: 500;
    word-break: break-word;
}

/* Dark theme for media gallery */
.export-preview-content.dark-theme .export-note {
    background: #1a237e;
    color: #bbdefb;
    border-left-color: #3f51b5;
}

.export-preview-content.dark-theme .export-media-item {
    background: #2d2d2d;
    border-color: #404040;
}

.export-preview-content.dark-theme .export-media-item:hover {
    border-color: #8ab4f8;
    box-shadow: 0 4px 12px rgba(138, 180, 248, 0.15);
}

.export-preview-content.dark-theme .export-media-caption {
    color: #b0b0b0;
}

/* Print styles for media */
@media print {
    .export-media-gallery {
        grid-template-columns: repeat(2, 1fr);
        gap: 15px;
    }
    
    .export-media-item {
        break-inside: avoid;
        page-break-inside: avoid;
    }
    
    .export-note {
        background: #f0f0f0 !important;
        color: #333 !important;
        border-left-color: #666 !important;
    }
}