/* Custom Reports Styling - Optimized for Farsi/RTL */

body {
    background-color: #F0F2F5 !important;
    font-family: Vazirmatn !important;
}

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

.content-area.active {
    display: block;
    animation: fadeIn 0.5s ease-in-out;
}

.content-heading::after {
    content: '';
    position: absolute;
    bottom: -4px;
    right: 0;
    width: 100px;
    height: 5px;
    background: #2563eb;
    border-radius: 4px;
}

/* Rich Text Content Typography - Optimized for Farsi/RTL */
.rich-content {
    font-family: Vazirmatn, sans-serif;
    direction: rtl;
    text-align: right;
    line-height: 2;
    color: #374151;
}

/* Headings */
.rich-content h1 {
    font-size: 1.5rem;
    font-weight: 700;
    color: #111827;
    margin-top: 2rem;
    margin-bottom: 1rem;
    line-height: 1.5;
}

.rich-content h1:first-child {
    margin-top: 0;
}

.rich-content h2 {
    font-size: 1.5rem;
    font-weight: 700;
    color: #1f2937;
    margin-top: 2rem;
    margin-bottom: 1rem;
    line-height: 1.5;
    letter-spacing: -0.01em;
}

.rich-content h3 {
    font-size: 1.25rem;
    font-weight: 700;
    color: #1f2937;
    margin-top: 1.75rem;
    margin-bottom: 0.875rem;
    line-height: 1.5;
}

.rich-content h4 {
    font-size: 1.125rem;
    font-weight: 600;
    color: #374151;
    margin-top: 1.5rem;
    margin-bottom: 0.75rem;
    line-height: 1.5;
}

.rich-content h5 {
    font-size: 1rem;
    font-weight: 600;
    color: #374151;
    margin-top: 1.25rem;
    margin-bottom: 0.625rem;
    line-height: 1.6;
}

.rich-content h6 {
    font-size: 0.9375rem;
    font-weight: 600;
    color: #4b5563;
    margin-top: 1rem;
    margin-bottom: 0.5rem;
    line-height: 1.6;
}

/* Paragraphs */
.rich-content p {
    margin-bottom: 1.25rem;
    font-size: 1rem;
    line-height: 2;
}

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

/* Lists */
.rich-content ul,
.rich-content ol {
    margin-right: 2rem;
    margin-bottom: 1.5rem;
    padding-right: 0;
}

.rich-content ul {
    list-style-type: disc;
}

.rich-content ol {
    list-style-type: decimal;
}

.rich-content li {
    margin-bottom: 0.75rem;
    line-height: 1.875;
    padding-right: 0.5rem;
}

.rich-content li::marker {
    color: #2563eb;
    font-weight: 600;
}

.rich-content ul ul,
.rich-content ol ul {
    list-style-type: circle;
    margin-top: 0.5rem;
    margin-bottom: 0.5rem;
}

.rich-content ul ul ul,
.rich-content ol ul ul {
    list-style-type: square;
}

.rich-content ol ol {
    list-style-type: lower-alpha;
    margin-top: 0.5rem;
    margin-bottom: 0.5rem;
}

/* Links */
.rich-content a {
    color: #2563eb;
    text-decoration: none;
    border-bottom: 1px solid transparent;
    transition: all 0.2s;
    font-weight: 500;
}

.rich-content a:hover {
    color: #1d4ed8;
    border-bottom-color: #1d4ed8;
}

/* Blockquotes */
.rich-content blockquote {
    border-right: 4px solid #2563eb;
    padding-right: 1.5rem;
    padding-top: 0.5rem;
    padding-bottom: 0.5rem;
    margin: 1.5rem 0;
    background-color: #f8fafc;
    border-radius: 0 8px 8px 0;
    font-style: italic;
    color: #475569;
}

.rich-content blockquote p {
    margin-bottom: 0.5rem;
}

.rich-content blockquote p:last-child {
    margin-bottom: 0;
}

/* Images */
.rich-content img {
    max-width: 100%;
    height: auto;
    border-radius: 12px;
    margin: 1.5rem 0;
    box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.1);
}

/* Horizontal Rule */
.rich-content hr {
    border: none;
    border-top: 2px solid #e5e7eb;
    margin: 2rem 0;
}

/* Code */
.rich-content code {
    background-color: #f1f5f9;
    padding: 0.25rem 0.5rem;
    border-radius: 4px;
    font-family: 'Courier New', monospace;
    font-size: 0.875rem;
    color: #dc2626;
    direction: ltr;
    display: inline-block;
}

.rich-content pre {
    background-color: #1e293b;
    color: #e2e8f0;
    padding: 1.25rem;
    border-radius: 8px;
    overflow-x: auto;
    margin: 1.5rem 0;
    direction: ltr;
    text-align: left;
}

.rich-content pre code {
    background-color: transparent;
    padding: 0;
    color: inherit;
    font-size: 0.875rem;
    line-height: 1.7;
}

/* Tables */
.rich-content table {
    width: 100%;
    border-collapse: collapse;
    margin: 1.5rem 0;
    direction: rtl;
}

.rich-content th,
.rich-content td {
    padding: 0.75rem 1rem;
    border: 1px solid #e5e7eb;
    text-align: right;
}

.rich-content th {
    background-color: #f8fafc;
    font-weight: 600;
    color: #1f2937;
}

.rich-content tr:nth-child(even) {
    background-color: #f9fafb;
}

/* Strong and Emphasis */
.rich-content strong,
.rich-content b {
    font-weight: 700;
    color: #111827;
}

.rich-content em,
.rich-content i {
    font-style: italic;
}

/* Small text */
.rich-content small {
    font-size: 0.875rem;
    color: #6b7280;
}

/* Mark/Highlight */
.rich-content mark {
    background-color: #fef3c7;
    padding: 0.125rem 0.25rem;
    border-radius: 2px;
    color: #92400e;
}

/* Responsive Typography */
@media (max-width: 768px) {
    .rich-content {
        font-size: 0.9375rem;
        line-height: 1.875;
    }

    .rich-content h1 {
        font-size: 1.25rem;
    }

    .rich-content h2 {
        font-size: 1.125rem;
    }

    .rich-content h3 {
        font-size: 1rem;
    }

    .rich-content h4 {
        font-size: 0.9375rem;
    }

    .rich-content ul,
    .rich-content ol {
        margin-right: 1.5rem;
    }
}

