/**
 * Help Article Typography Styles
 *
 * Beautiful, readable typography for help articles and documentation.
 * Based on Tailwind Typography but customized for Sonic Bloom brand.
 */

.article-content {
    font-family: var(--brand-font-family, 'Inter', sans-serif);
    font-size: 1.0625rem; /* 17px - optimal for reading */
    line-height: 1.75;
    color: var(--brand-gray-900, #111827);
}

/* Headings */
.article-content h1 {
    font-size: 2.25rem;
    font-weight: 800;
    line-height: 1.2;
    margin-top: 0;
    margin-bottom: 1.5rem;
    color: var(--brand-gray-900, #111827);
}

.article-content h2 {
    font-size: 1.875rem;
    font-weight: 700;
    line-height: 1.3;
    margin-top: 2.5rem;
    margin-bottom: 1.25rem;
    color: var(--brand-gray-900, #111827);
    border-bottom: 2px solid var(--brand-gray-200, #e5e7eb);
    padding-bottom: 0.5rem;
}

.article-content h3 {
    font-size: 1.5rem;
    font-weight: 600;
    line-height: 1.4;
    margin-top: 2rem;
    margin-bottom: 1rem;
    color: var(--brand-gray-900, #111827);
}

.article-content h4 {
    font-size: 1.25rem;
    font-weight: 600;
    line-height: 1.5;
    margin-top: 1.5rem;
    margin-bottom: 0.75rem;
    color: var(--brand-gray-800, #1f2937);
}

.article-content h5 {
    font-size: 1.125rem;
    font-weight: 600;
    line-height: 1.5;
    margin-top: 1.5rem;
    margin-bottom: 0.75rem;
    color: var(--brand-gray-800, #1f2937);
}

.article-content h6 {
    font-size: 1rem;
    font-weight: 600;
    line-height: 1.5;
    margin-top: 1.5rem;
    margin-bottom: 0.75rem;
    color: var(--brand-gray-700, #374151);
}

/* Paragraphs */
.article-content p {
    margin-top: 0;
    margin-bottom: 1.25rem;
}

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

/* Links */
.article-content a {
    color: var(--brand-purple-primary, #667eea);
    text-decoration: underline;
    text-decoration-color: rgba(102, 126, 234, 0.3);
    text-underline-offset: 2px;
    transition: all 0.2s;
}

.article-content a:hover {
    color: var(--brand-purple-secondary, #764ba2);
    text-decoration-color: var(--brand-purple-secondary, #764ba2);
}

/* Lists */
.article-content ul,
.article-content ol {
    margin-top: 1.25rem;
    margin-bottom: 1.25rem;
    padding-left: 1.75rem;
}

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

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

.article-content li {
    margin-top: 0.5rem;
    margin-bottom: 0.5rem;
    padding-left: 0.5rem;
}

.article-content li::marker {
    color: var(--brand-purple-primary, #667eea);
    font-weight: 600;
}

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

.article-content ul ol,
.article-content ol ol {
    list-style-type: lower-roman;
    margin-top: 0.5rem;
    margin-bottom: 0.5rem;
}

/* Blockquotes */
.article-content blockquote {
    border-left: 4px solid var(--brand-purple-primary, #667eea);
    padding-left: 1.5rem;
    padding-top: 0.5rem;
    padding-bottom: 0.5rem;
    margin: 1.5rem 0;
    font-style: italic;
    color: var(--brand-gray-700, #374151);
    background: var(--brand-gray-50, #f9fafb);
    border-radius: 0 0.5rem 0.5rem 0;
}

.article-content blockquote p {
    margin-bottom: 0.75rem;
}

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

/* Code */
.article-content code {
    font-family: 'Monaco', 'Menlo', 'Courier New', monospace;
    font-size: 0.875em;
    background: var(--brand-gray-100, #f3f4f6);
    color: var(--brand-purple-secondary, #764ba2);
    padding: 0.2em 0.4em;
    border-radius: 0.25rem;
    font-weight: 500;
}

.article-content pre {
    background: var(--brand-gray-900, #111827);
    color: var(--brand-gray-50, #f9fafb);
    padding: 1.5rem;
    border-radius: 0.5rem;
    overflow-x: auto;
    margin: 1.5rem 0;
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
}

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

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

.article-content thead {
    border-bottom: 2px solid var(--brand-gray-300, #d1d5db);
}

.article-content th {
    padding: 0.75rem 1rem;
    text-align: left;
    font-weight: 600;
    color: var(--brand-gray-900, #111827);
    background: var(--brand-gray-50, #f9fafb);
}

.article-content td {
    padding: 0.75rem 1rem;
    border-bottom: 1px solid var(--brand-gray-200, #e5e7eb);
}

.article-content tbody tr:last-child td {
    border-bottom: none;
}

.article-content tbody tr:hover {
    background: var(--brand-gray-50, #f9fafb);
}

/* Horizontal Rule */
.article-content hr {
    border: none;
    border-top: 2px solid var(--brand-gray-200, #e5e7eb);
    margin: 2.5rem 0;
}

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

.article-content figure {
    margin: 1.5rem 0;
}

.article-content figcaption {
    font-size: 0.875rem;
    color: var(--brand-gray-600, #4b5563);
    text-align: center;
    margin-top: 0.75rem;
    font-style: italic;
}

/* Strong and Emphasis */
.article-content strong {
    font-weight: 700;
    color: var(--brand-gray-900, #111827);
}

.article-content em {
    font-style: italic;
}

/* Definition Lists */
.article-content dl {
    margin: 1.5rem 0;
}

.article-content dt {
    font-weight: 600;
    color: var(--brand-gray-900, #111827);
    margin-top: 1rem;
}

.article-content dd {
    margin-left: 1.5rem;
    margin-top: 0.5rem;
    color: var(--brand-gray-700, #374151);
}

/* Alert Boxes (for special callouts) */
.article-content .alert {
    padding: 1rem 1.5rem;
    border-radius: 0.5rem;
    margin: 1.5rem 0;
    border-left: 4px solid;
}

.article-content .alert-info {
    background: #dbeafe;
    border-color: #3b82f6;
    color: #1e40af;
}

.article-content .alert-warning {
    background: #fef3c7;
    border-color: #f59e0b;
    color: #92400e;
}

.article-content .alert-success {
    background: #d1fae5;
    border-color: #10b981;
    color: #065f46;
}

.article-content .alert-error {
    background: #fee2e2;
    border-color: #ef4444;
    color: #991b1b;
}

/* Keyboard Keys */
.article-content kbd {
    font-family: 'Monaco', 'Menlo', 'Courier New', monospace;
    font-size: 0.875em;
    background: var(--brand-gray-100, #f3f4f6);
    border: 1px solid var(--brand-gray-300, #d1d5db);
    border-radius: 0.25rem;
    padding: 0.125rem 0.375rem;
    box-shadow: 0 2px 0 var(--brand-gray-300, #d1d5db);
}

/* Abbreviations */
.article-content abbr {
    text-decoration: underline dotted;
    cursor: help;
}

/* Subscript and Superscript */
.article-content sub,
.article-content sup {
    font-size: 0.75em;
}

/* Mark/Highlight */
.article-content mark {
    background: #fbbf24;
    color: var(--brand-gray-900, #111827);
    padding: 0.1em 0.3em;
    border-radius: 0.125rem;
}

/* Mobile Responsiveness */
@media (max-width: 768px) {
    .article-content {
        font-size: 1rem;
    }

    .article-content h1 {
        font-size: 1.875rem;
    }

    .article-content h2 {
        font-size: 1.5rem;
    }

    .article-content h3 {
        font-size: 1.25rem;
    }

    .article-content pre {
        padding: 1rem;
        font-size: 0.8125rem;
    }

    .article-content table {
        font-size: 0.875rem;
    }
}
