/**
 * Blog post / page content typography.
 *
 * WordPress stores the article body as Gutenberg block HTML (headings, lists,
 * tables, figures, links). The Tailwind build does not include the typography
 * plugin, so the `prose` class alone produced *no* CSS at all: tables had no
 * borders, product links were indistinguishable from body text, and images
 * were unstyled. This file supplies that missing typography using the theme's
 * own adaptive design tokens (--ll-*), so it flips with .dark automatically.
 *
 * Scoped to .ll-entry-content (single.php) and .prose (page.php) so every
 * place that renders the_content() is covered.
 */

.ll-entry-content,
.prose {
    color: var(--ll-on-surface);
    font-size: 14px;
    line-height: 1.95;
    overflow-wrap: break-word;
    word-break: break-word;
}

.ll-entry-content > * + *,
.prose > * + * {
    margin-top: 1.25rem;
}

.ll-entry-content p,
.prose p {
    margin: 0 0 1.1rem;
}

/* ---------- Headings ---------- */
.ll-entry-content h1,
.ll-entry-content h2,
.ll-entry-content h3,
.ll-entry-content h4,
.ll-entry-content h5,
.ll-entry-content h6,
.prose h1,
.prose h2,
.prose h3,
.prose h4,
.prose h5,
.prose h6 {
    font-family: 'Vazirmatn', system-ui, sans-serif;
    font-weight: 800;
    line-height: 1.45;
    color: var(--ll-on-surface);
    margin: 2rem 0 0.9rem;
}

.ll-entry-content h1,
.prose h1 { font-size: 26px; }

.ll-entry-content h2,
.prose h2 {
    font-size: 21px;
    border-right: 3px solid #D97706;
    padding-right: 0.85rem;
    margin-top: 2.5rem;
}

.ll-entry-content h3,
.prose h3 { font-size: 17px; }

.ll-entry-content h4,
.prose h4 { font-size: 15px; }

.ll-entry-content h5,
.ll-entry-content h6,
.prose h5,
.prose h6 { font-size: 14px; }

/* ---------- Links (product links must look clickable) ---------- */
.ll-entry-content a,
.prose a {
    color: #D97706;
    font-weight: 600;
    text-decoration: underline;
    text-decoration-thickness: 1px;
    text-underline-offset: 3px;
    transition: color 0.15s ease;
}

.ll-entry-content a:hover,
.prose a:hover {
    color: #F59E0B;
    text-decoration-thickness: 2px;
}

.ll-entry-content a:focus-visible,
.prose a:focus-visible {
    outline: 2px solid #D97706;
    outline-offset: 2px;
    border-radius: 2px;
}

.ll-entry-content strong,
.prose strong {
    color: var(--ll-on-surface);
    font-weight: 800;
}

/* ---------- Lists ---------- */
.ll-entry-content ul,
.ll-entry-content ol,
.prose ul,
.prose ol {
    padding-right: 1.5rem;
    padding-left: 0;
    margin: 0 0 1.2rem;
}

.ll-entry-content ul,
.prose ul { list-style: disc; }

.ll-entry-content ol,
.prose ol { list-style: decimal; }

.ll-entry-content li,
.prose li {
    margin-bottom: 0.55rem;
    padding-right: 0.25rem;
}

.ll-entry-content li::marker,
.prose li::marker { color: #D97706; }

/* ---------- Blockquote ---------- */
.ll-entry-content blockquote,
.prose blockquote {
    margin: 1.6rem 0;
    padding: 1rem 1.25rem;
    background: var(--ll-surface-container);
    border-right: 3px solid #D97706;
    border-radius: 6px 12px 12px 6px;
    color: var(--ll-on-surface-variant);
}

.ll-entry-content blockquote p:last-child,
.prose blockquote p:last-child { margin-bottom: 0; }

/* ---------- Tables (the comparison price tables) ---------- */
.ll-entry-content .wp-block-table,
.prose .wp-block-table {
    margin: 1.6rem 0;
    overflow-x: auto;
    border: 1px solid var(--ll-outline);
    border-radius: 12px;
    -webkit-overflow-scrolling: touch;
}

.ll-entry-content table,
.prose table {
    width: 100%;
    min-width: 560px;
    border-collapse: collapse;
    font-size: 12.5px;
    line-height: 1.7;
}

.ll-entry-content th,
.ll-entry-content td,
.prose th,
.prose td {
    padding: 0.7rem 0.9rem;
    text-align: right;
    vertical-align: middle;
    border-bottom: 1px solid var(--ll-outline);
    white-space: normal;
}

.ll-entry-content th,
.prose th {
    background: var(--ll-surface-container);
    color: var(--ll-on-surface);
    font-weight: 800;
    white-space: nowrap;
}

.ll-entry-content tbody tr:hover,
.prose tbody tr:hover { background: var(--ll-surface-container); }

.ll-entry-content tbody tr:last-child td,
.prose tbody tr:last-child td { border-bottom: 0; }

/* ---------- Images & figures ---------- */
.ll-entry-content figure,
.prose figure { margin: 1.6rem 0; }

.ll-entry-content img,
.prose img {
    display: block;
    max-width: 100%;
    height: auto;
    margin: 0 auto;
    border-radius: 12px;
    border: 1px solid var(--ll-outline);
    background: var(--ll-surface-container);
}

.ll-entry-content figcaption,
.prose figcaption {
    margin-top: 0.6rem;
    text-align: center;
    font-size: 12px;
    color: var(--ll-on-surface-variant);
}

/* ---------- Inline code / pre ---------- */
.ll-entry-content code,
.prose code {
    background: var(--ll-surface-container);
    border: 1px solid var(--ll-outline);
    border-radius: 4px;
    padding: 0.1rem 0.4rem;
    font-family: ui-monospace, monospace;
    font-size: 0.88em;
}

.ll-entry-content pre,
.prose pre {
    direction: ltr;
    text-align: left;
    background: var(--ll-surface-container);
    border: 1px solid var(--ll-outline);
    border-radius: 12px;
    padding: 1rem;
    overflow-x: auto;
}

/* ---------- Separators ---------- */
.ll-entry-content hr,
.prose hr {
    border: 0;
    border-top: 1px solid var(--ll-outline);
    margin: 2rem 0;
}

/* ---------- Small screens ---------- */
@media (max-width: 640px) {
    .ll-entry-content,
    .prose { font-size: 13px; line-height: 1.85; }

    .ll-entry-content h2,
    .prose h2 { font-size: 19px; }

    .ll-entry-content h3,
    .prose h3 { font-size: 16px; }

    .ll-entry-content th,
    .ll-entry-content td,
    .prose th,
    .prose td { padding: 0.6rem 0.65rem; }
}
