/* ═══════════════════════════════════════════════════════════
   mensagens.css — lista (mensagens.html) e leitura (mensagem.html)
   Padrão 2a: cards planos com borda 1px, título serifado, tag de tema dourada.
   Cores e medidas: boa-semente-tokens.css. Componentes comuns: style.css.
   ═══════════════════════════════════════════════════════════ */

/* ── Card de mensagem ── */
.msg-card { display: flex; flex-direction: column; gap: 10px; padding: 20px; background: var(--surface-bg); border: 1px solid var(--border); border-radius: var(--radius); color: var(--text); min-width: 0; transition: background-color .15s, border-color .15s; }
.msg-card:hover { background: var(--surface-hover); border-color: var(--primary); }
.msg-card-topo { display: flex; align-items: center; justify-content: space-between; gap: 8px; }
.msg-data { font-size: var(--fs-xs); color: var(--text-muted); white-space: nowrap; font-variant-numeric: tabular-nums; }
.msg-card-titulo { font-family: var(--font-heading); font-weight: var(--heading-weight); letter-spacing: var(--heading-tracking); color: var(--heading); font-size: 21px; line-height: 1.25; overflow-wrap: anywhere; }
.msg-card-resumo { font-size: var(--fs-base); line-height: 1.6; color: var(--text-muted); display: -webkit-box; -webkit-line-clamp: 3; -webkit-box-orient: vertical; overflow: hidden; }
.msg-card-rodape { display: flex; align-items: center; gap: 8px; margin-top: auto; padding-top: 12px; border-top: 1px solid var(--border); font-size: var(--fs-sm); color: var(--text-muted); }
.msg-card-rodape .msi { font-size: 18px; }

/* tags usadas por mensagem.js e cultos.js */
.badge-tema { display: inline-flex; align-items: center; padding: 3px 10px; border-radius: var(--radius-pill); background: var(--accent-soft-bg); color: var(--accent-text); font-size: var(--fs-xs); font-weight: var(--fw-bold); border: 0; font-family: inherit; }
.badge-tipo { display: inline-flex; align-items: center; padding: 3px 10px; border-radius: var(--radius-pill); background: var(--primary-soft-bg); color: var(--heading-green); font-size: var(--fs-xs); font-weight: var(--fw-bold); }
html[data-site-theme="escuro"] .badge-tipo { color: var(--success-text); }

/* ── Leitura da mensagem ── */
.article-wrap { max-width: var(--content-max); margin: 0 auto; padding: 24px var(--gutter) 48px; display: grid; grid-template-columns: 1fr; gap: 32px; }
@media (min-width: 960px) { .article-wrap { grid-template-columns: 260px minmax(0, 1fr); gap: 48px; padding-top: 40px; } }
.article-sidebar { display: flex; flex-direction: column; gap: 20px; order: 2; }   /* no celular o texto vem primeiro */
.article-content { order: 1; }
@media (min-width: 960px) { .article-sidebar { order: 0; position: sticky; top: 84px; align-self: start; } .article-content { order: 0; } }
.back-link { display: inline-flex; align-items: center; gap: 6px; min-height: var(--tap); padding: 0 16px; align-self: flex-start; border: 1.5px solid var(--ghost-border); border-radius: var(--radius-pill); color: var(--accent-text); font-weight: var(--fw-semibold); font-size: var(--fs-base); }
.back-link:hover { background: var(--accent-soft-bg); }
.sidebar-block { display: flex; flex-direction: column; gap: 10px; }
.sidebar-block-title { font-size: var(--fs-xs); font-weight: var(--fw-bold); letter-spacing: .14em; text-transform: uppercase; color: var(--accent-text); }
.recent-list { list-style: none; display: flex; flex-direction: column; gap: 8px; }
.recent-loading { font-size: var(--fs-sm); color: var(--text-muted); }
.recent-link { display: flex; gap: 10px; align-items: flex-start; padding: 10px; background: var(--surface-bg); border: 1px solid var(--border); border-radius: var(--radius); color: var(--text); transition: background-color .15s, border-color .15s; }
.recent-link:hover { background: var(--surface-hover); border-color: var(--primary); }
.recent-link > div { display: flex; flex-direction: column; gap: 3px; min-width: 0; }
.recent-thumb { width: 72px; aspect-ratio: 16 / 9; object-fit: cover; border-radius: var(--radius-sm); flex-shrink: 0; background: var(--media-bg); }
.recent-badge { font-size: var(--fs-xs); font-weight: var(--fw-bold); color: var(--accent-text); }
.recent-title { font-family: var(--font-heading); font-weight: var(--heading-weight); color: var(--heading); font-size: var(--fs-md); line-height: 1.3; }
.recent-link small { font-size: var(--fs-xs); color: var(--text-muted); }

.article-content { min-width: 0; max-width: 760px; }
.article-loading { padding: 48px 0; color: var(--text-muted); }
.article-video { position: relative; aspect-ratio: 16 / 9; background: var(--media-bg); border-radius: var(--radius-lg); overflow: hidden; margin-bottom: 24px; }
.article-video iframe { position: absolute; inset: 0; width: 100%; height: 100%; border: 0; }
.article-meta-badges { display: flex; flex-wrap: wrap; gap: 8px; margin-bottom: 12px; }
.article-title { font-family: var(--font-heading); font-weight: var(--heading-weight); letter-spacing: var(--heading-tracking); color: var(--heading); font-size: clamp(30px, 5vw, var(--fs-h1)); line-height: 1.1; margin-bottom: 12px; text-wrap: balance; overflow-wrap: anywhere; }
.article-desc { font-size: 18px; line-height: 1.6; color: var(--text-muted); margin-bottom: 20px; }
.article-meta { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 12px; padding-bottom: 16px; border-bottom: var(--rule) solid var(--border-strong); }
.article-autor { display: flex; align-items: center; gap: 12px; }
.article-autor-foto { width: 48px; height: 48px; border-radius: 50%; object-fit: cover; flex-shrink: 0; display: inline-flex; align-items: center; justify-content: center; }
.article-autor-ini { background: var(--primary-soft-bg); color: var(--heading-green); font-weight: var(--fw-bold); font-size: var(--fs-md); }
.article-autor strong { display: block; font-size: var(--fs-md); color: var(--text); }
.article-autor small { color: var(--text-muted); font-size: var(--fs-xs); }
.article-date { font-size: var(--fs-base); color: var(--text-muted); }
.article-divider { height: 24px; }

.ql-content { font-size: 17px; line-height: 1.75; color: var(--text); overflow-wrap: anywhere; }
.ql-content h2 { font-family: var(--font-heading); font-weight: var(--heading-weight); color: var(--heading); font-size: 26px; margin: 32px 0 12px; }
.ql-content h3 { font-family: var(--font-heading); font-weight: var(--heading-weight); color: var(--heading); font-size: 21px; margin: 24px 0 10px; }
.ql-content p { margin-bottom: 16px; }
.ql-content ul, .ql-content ol { margin: 0 0 16px 24px; }
.ql-content li { margin-bottom: 6px; }
.ql-content blockquote { margin: 20px 0; padding: 4px 0 4px 18px; border-left: 3px solid var(--accent-gold); font-family: var(--font-heading); font-style: italic; font-size: 19px; color: var(--text); }
.ql-content a { color: var(--primary); text-decoration: underline; }
.ql-content img { max-width: 100%; height: auto; border-radius: var(--radius); }
.ql-content strong { font-weight: var(--fw-bold); }

.article-share { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; margin-top: 32px; padding-top: 20px; border-top: 1px solid var(--border); font-size: var(--fs-sm); color: var(--text-muted); }
.share-btn { display: inline-flex; align-items: center; gap: 6px; min-height: 40px; padding: 0 16px; border: 1px solid var(--border-strong); border-radius: var(--radius-pill); background: transparent; color: var(--text); font: inherit; font-size: var(--fs-base); font-weight: var(--fw-semibold); cursor: pointer; white-space: nowrap; }
.share-btn:hover { background: var(--surface-hover); }
.share-wa:hover { background: var(--brand-whatsapp); border-color: var(--brand-whatsapp); color: #FFFFFF; }
.share-fb:hover { background: var(--brand-facebook); border-color: var(--brand-facebook); color: #FFFFFF; }
.article-nav { margin-top: 32px; }
.back-link-bottom { display: inline-flex; align-items: center; min-height: var(--tap); color: var(--primary); font-weight: var(--fw-bold); }
.back-link-bottom:hover { text-decoration: underline; }
