/**
 * Tipografia editorial + conteúdo rico (callouts, compare-table, code,
 * video, figure) que o the_content() renderiza dentro do .article-body
 * via shortcodes do child theme.
 */

/* === Article body tipografia ===
 * Aplica em .article-body (Custom Class) OU diretamente no widget
 * Theme Post Content como fallback se a class não foi marcada. */
.article-body,
.elementor-widget-theme-post-content > .elementor-widget-container {
    font-size: 1.0625rem;
    line-height: 1.7;
    color: var(--slate-700);
}
.article-body > * + *,
.elementor-widget-theme-post-content > .elementor-widget-container > * + * { margin-top: 1.25rem; }
.article-body h2,
.elementor-widget-theme-post-content h2 {
    font-size: clamp(1.75rem, 3vw, 2.25rem);
    font-weight: 800;
    letter-spacing: -0.025em;
    line-height: 1.2;
    color: var(--slate-900);
    margin-top: 3rem;
    margin-bottom: 1rem;
    scroll-margin-top: 5rem;
}
.article-body h3 {
    font-size: clamp(1.25rem, 2vw, 1.5rem);
    font-weight: 700;
    letter-spacing: -0.015em;
    line-height: 1.3;
    color: var(--slate-900);
    margin-top: 2rem;
    margin-bottom: 0.75rem;
    scroll-margin-top: 5rem;
}
.article-body p { color: var(--slate-700); }
.article-body strong { color: var(--slate-900); font-weight: 600; }
.article-body em { font-style: italic; }
.article-body a {
    color: var(--blue);
    text-decoration: underline;
    text-decoration-thickness: 1px;
    text-underline-offset: 3px;
    transition: color 0.15s;
}
.article-body a:hover { color: var(--blue-dark); }

.article-body ul,
.article-body ol {
    padding-left: 1.5rem;
}
.article-body ul { list-style: disc; }
.article-body ol { list-style: decimal; }
.article-body li + li { margin-top: 0.5rem; }
.article-body li::marker { color: var(--slate-400); }

.article-body blockquote {
    border-left: 3px solid var(--blue);
    padding: 0.5rem 0 0.5rem 1.5rem;
    font-size: 1.125rem;
    line-height: 1.6;
    font-style: italic;
    color: var(--slate-700);
    margin-top: 2rem;
    margin-bottom: 2rem;
}
.article-body blockquote cite {
    display: block;
    margin-top: 0.875rem;
    font-size: 0.875rem;
    font-style: normal;
    color: var(--slate-500);
}

.article-body code {
    font-family: 'JetBrains Mono', ui-monospace, SFMono-Regular, Menlo, monospace;
    font-size: 0.875em;
    background: var(--slate-100);
    color: var(--slate-800);
    padding: 0.125rem 0.375rem;
    border-radius: 0.25rem;
}

/* === Callout === */
.callout {
    display: grid;
    grid-template-columns: 1.75rem 1fr;
    gap: 1rem;
    padding: 1.125rem 1.25rem;
    border-radius: 0.875rem;
    border: 1px solid;
    margin-top: 2rem;
    margin-bottom: 2rem;
}
.callout--info {
    background: var(--blue-50);
    border-color: var(--blue-100);
    color: var(--slate-700);
}
.callout--tip {
    background: var(--accent-green-bg);
    border-color: var(--accent-green-bd);
    color: var(--slate-700);
}
.callout--warning {
    background: var(--accent-amber-bg);
    border-color: var(--accent-amber-bd);
    color: var(--slate-700);
}
.callout-icon {
    width: 1.75rem;
    height: 1.75rem;
    border-radius: 9999px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 800;
    color: #fff;
    flex-shrink: 0;
    margin-top: 0.125rem;
}
.callout--info .callout-icon { background: var(--blue); }
.callout--tip .callout-icon { background: var(--accent-green); }
.callout--warning .callout-icon { background: var(--accent-amber); }
.callout-title {
    font-size: 0.875rem;
    font-weight: 700;
    color: var(--slate-900);
    margin-bottom: 0.375rem;
}
.callout-body { font-size: 0.9375rem; line-height: 1.6; }
.callout-body > p { margin: 0; }
.callout-body > p + p { margin-top: 0.625rem; }

/* === Compare table === */
.compare-table {
    margin-top: 2rem;
    margin-bottom: 2rem;
    overflow-x: auto;
    border: 1px solid var(--slate-200);
    border-radius: 0.875rem;
    background: #fff;
}
.compare-table table {
    width: 100%;
    border-collapse: collapse;
    font-size: 0.9375rem;
}
.compare-table th,
.compare-table td {
    padding: 0.875rem 1rem;
    text-align: left;
    border-bottom: 1px solid var(--slate-100);
}
.compare-table th {
    font-size: 0.75rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.06em;
    color: var(--slate-500);
    background: var(--slate-50);
}
.compare-table tbody tr:last-child td { border-bottom: 0; }
.compare-table td .yes {
    color: var(--accent-green);
    font-weight: 700;
    background: var(--accent-green-bg);
    padding: 0.1875rem 0.5rem;
    border-radius: 0.375rem;
    font-size: 0.8125rem;
}
.compare-table td .partial {
    color: var(--accent-amber);
    font-weight: 700;
    background: var(--accent-amber-bg);
    padding: 0.1875rem 0.5rem;
    border-radius: 0.375rem;
    font-size: 0.8125rem;
}
.compare-table td .no {
    color: #B91C1C;
    font-weight: 700;
    background: #FEF2F2;
    padding: 0.1875rem 0.5rem;
    border-radius: 0.375rem;
    font-size: 0.8125rem;
}

/* === Code block === */
.article-body pre {
    background: var(--slate-900);
    color: #E2E8F0;
    border-radius: 0.875rem;
    padding: 1.25rem 1.375rem;
    overflow-x: auto;
    font-family: 'JetBrains Mono', ui-monospace, SFMono-Regular, Menlo, monospace;
    font-size: 0.8125rem;
    line-height: 1.6;
    margin-top: 2rem;
    margin-bottom: 2rem;
    position: relative;
}
.article-body pre[data-lang]:not([data-lang=""])::before {
    content: attr(data-lang);
    position: absolute;
    top: 0.625rem;
    right: 0.875rem;
    font-size: 0.625rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.08em;
    color: var(--slate-400);
}
.article-body pre code {
    background: transparent;
    padding: 0;
    color: inherit;
    font-size: inherit;
}
.tok-comment { color: #64748B; font-style: italic; }
.tok-string  { color: #A5F3FC; }
.tok-num     { color: #FCD34D; }
.tok-keyword { color: #C4B5FD; font-weight: 500; }

/* === Figure === */
figure {
    margin-top: 2rem;
    margin-bottom: 2rem;
}
figure img {
    width: 100%;
    border-radius: 0.875rem;
    border: 1px solid var(--slate-200);
}
.figure-frame {
    aspect-ratio: 16 / 9;
    border-radius: 0.875rem;
    border: 1px dashed var(--slate-300);
    background: var(--slate-50);
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--slate-400);
    font-family: 'JetBrains Mono', monospace;
    font-size: 0.875rem;
}
figcaption {
    font-size: 0.8125rem;
    color: var(--slate-500);
    text-align: center;
    margin-top: 0.75rem;
}

/* === Video === */
.video-embed {
    margin-top: 2rem;
    margin-bottom: 2rem;
}
.video-embed-fake {
    aspect-ratio: 16 / 9;
    background: linear-gradient(135deg, var(--slate-100), var(--slate-200));
    border-radius: 0.875rem;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: transform 0.2s;
}
.video-embed-fake:hover { transform: scale(1.005); }
.video-play {
    width: 4rem;
    height: 4rem;
    border-radius: 9999px;
    background: rgba(255, 255, 255, 0.9);
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--blue);
    box-shadow: 0 8px 24px rgba(15, 23, 42, 0.15);
}
.video-play svg { width: 1.5rem; height: 1.5rem; margin-left: 0.25rem; }
.video-embed video,
.video-embed iframe {
    width: 100%;
    aspect-ratio: 16 / 9;
    border: 0;
    border-radius: 0.875rem;
}
.video-caption {
    font-size: 0.8125rem;
    color: var(--slate-500);
    text-align: center;
    margin-top: 0.75rem;
}
