/* Document Viewer Styles */

body {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, 'Helvetica Neue', Arial, sans-serif;
    max-width: 900px;
    margin: 0 auto;
    padding: 40px 20px;
    background: #f8f9fa;
    color: #212529;
    line-height: 1.6;
}

.header {
    background: linear-gradient(135deg, #6366f1 0%, #8b5cf6 100%);
    color: white;
    padding: 24px;
    border-radius: 12px;
    margin-bottom: 32px;
    box-shadow: 0 4px 6px rgba(0,0,0,0.1);
}

.header h1 {
    margin: 0 0 8px 0;
    font-size: 28px;
    font-weight: 700;
}

.header .meta {
    font-size: 14px;
    opacity: 0.9;
}

.content {
    background: white;
    padding: 32px;
    border-radius: 12px;
    box-shadow: 0 1px 3px rgba(0,0,0,0.1);
    border: 1px solid rgba(0,0,0,0.05);
}

.back-link {
    display: inline-block;
    background: #6366f1;
    color: white;
    padding: 10px 20px;
    text-decoration: none;
    border-radius: 8px;
    font-weight: 600;
    margin-bottom: 20px;
    transition: all 0.2s;
}

.back-link:hover {
    background: #4f46e5;
    transform: translateY(-1px);
}

/* Content Sections (for demarcated email content) */
.content-section {
    margin-bottom: 24px;
    border-radius: 8px;
    border: 1px solid #e5e7eb;
    overflow: hidden;
}

.content-section:last-child {
    margin-bottom: 0;
}

.section-header {
    padding: 12px 16px;
    font-weight: 600;
    font-size: 14px;
    border-bottom: 1px solid #e5e7eb;
}

.section-header a {
    color: inherit;
    word-break: break-all;
}

.section-content {
    padding: 16px;
    font-size: 15px;
    line-height: 1.7;
    max-height: 600px;
    overflow-y: auto;
}

/* Email Body Section */
.section-body {
    background: #f0fdf4;
    border-color: #bbf7d0;
}

.section-body .section-header {
    background: #dcfce7;
    color: #166534;
    border-color: #bbf7d0;
}

/* Link Section */
.section-link {
    background: #eff6ff;
    border-color: #bfdbfe;
}

.section-link .section-header {
    background: #dbeafe;
    color: #1e40af;
    border-color: #bfdbfe;
}

.section-link .section-header a {
    color: #2563eb;
    text-decoration: underline;
}

.section-link .section-header a:hover {
    color: #1d4ed8;
}

/* Attachment Section */
.section-attachment {
    background: #fefce8;
    border-color: #fef08a;
}

.section-attachment .section-header {
    background: #fef9c3;
    color: #854d0e;
    border-color: #fef08a;
}

/* Error/Blocked content */
.section-content:has(> br:first-child) {
    color: #6b7280;
    font-style: italic;
}

