/* ============================================================
   selecao.art — Forum CSS
   ============================================================ */

/* ---- Stats bar ---- */
.forum-stats {
  display: flex; gap: 24px; flex-wrap: wrap;
  padding: 16px 20px;
  background: var(--azul);
  border-radius: var(--radius-lg);
  margin-bottom: 28px;
}
.forum-stat { text-align: center; color: #fff; }
.forum-stat .num { font-size: 1.5rem; font-weight: 900; color: var(--amarelo); }
.forum-stat .lbl { font-size: .72rem; font-weight: 700; text-transform: uppercase; letter-spacing: .06em; color: rgba(255,255,255,.6); }

/* ---- Categoria card ---- */
.forum-category {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  overflow: hidden;
  margin-bottom: 16px;
}
.forum-category-header {
  display: flex; align-items: center; gap: 16px;
  padding: 16px 20px;
  border-bottom: 1px solid var(--border);
  background: var(--bg);
}
.forum-category-icon {
  width: 44px; height: 44px;
  background: var(--azul);
  border-radius: var(--radius);
  display: flex; align-items: center; justify-content: center;
  font-size: 1.3rem; flex-shrink: 0;
}
.forum-category-info { flex: 1; min-width: 0; }
.forum-category-info h3 { font-size: 1rem; font-weight: 800; margin-bottom: 2px; }
.forum-category-info p  { font-size: .8rem; color: var(--text-muted); margin: 0; }
.forum-category-meta { text-align: right; flex-shrink: 0; }
.forum-category-meta .count { font-size: 1.1rem; font-weight: 800; color: var(--verde); }
.forum-category-meta .label { font-size: .7rem; color: var(--text-muted); }

/* Últimos tópicos dentro da categoria */
.forum-category-topics { padding: 0; }
.forum-topic-row {
  display: flex; align-items: center; gap: 12px;
  padding: 12px 20px;
  border-bottom: 1px solid var(--border);
  transition: background var(--transition);
  text-decoration: none; color: inherit;
}
.forum-topic-row:last-child { border-bottom: none; }
.forum-topic-row:hover { background: var(--bg); }
.topic-avatar { flex-shrink: 0; }
.topic-info { flex: 1; min-width: 0; }
.topic-title {
  font-size: .9rem; font-weight: 700;
  display: -webkit-box; -webkit-line-clamp: 1;
  -webkit-box-orient: vertical; overflow: hidden;
  margin-bottom: 3px;
}
.topic-title:hover { color: var(--verde); }
.topic-meta { font-size: .72rem; color: var(--text-muted); display: flex; gap: 10px; flex-wrap: wrap; }
.topic-stats { display: flex; gap: 12px; flex-shrink: 0; text-align: center; }
.topic-stat { font-size: .75rem; color: var(--text-muted); }
.topic-stat .n { display: block; font-weight: 700; color: var(--text-primary); font-size: .9rem; }
.topic-status-badge {
  font-size: .65rem; font-weight: 800;
  padding: 2px 7px; border-radius: 10px;
  text-transform: uppercase; letter-spacing: .04em;
}
.badge-pinned  { background: var(--azul-light);  color: var(--azul); }
.badge-closed  { background: #fee2e2; color: #991b1b; }
.badge-open    { background: var(--verde-light); color: var(--verde-dark); }

/* ---- Topic page ---- */
.topic-header {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 24px;
  margin-bottom: 20px;
}
.topic-header h1 { font-size: 1.4rem; margin-bottom: 10px; }
.topic-breadcrumb {
  font-size: .8rem; color: var(--text-muted);
  display: flex; align-items: center; gap: 6px;
  margin-bottom: 12px;
}
.topic-breadcrumb a { color: var(--verde); }

/* Postagem (OP e respostas) */
.forum-post {
  display: flex; gap: 0;
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  overflow: hidden;
  margin-bottom: 12px;
}
.forum-post.is-op { border-left: 3px solid var(--verde); }
.post-aside {
  width: 120px; flex-shrink: 0;
  background: var(--bg);
  border-right: 1px solid var(--border);
  padding: 16px 12px;
  text-align: center;
  display: flex; flex-direction: column; align-items: center; gap: 6px;
}
.post-aside .avatar { margin-bottom: 4px; }
.post-aside .uname  { font-size: .78rem; font-weight: 700; word-break: break-word; }
.post-aside .urole  { font-size: .65rem; }
.post-aside .uposts { font-size: .65rem; color: var(--text-muted); }
.post-aside .member-since { font-size: .62rem; color: var(--text-muted); }

.post-main { flex: 1; min-width: 0; padding: 16px 20px; }
.post-header-row {
  display: flex; align-items: center; justify-content: space-between;
  margin-bottom: 12px; padding-bottom: 10px;
  border-bottom: 1px solid var(--border);
  flex-wrap: wrap; gap: 8px;
}
.post-time { font-size: .75rem; color: var(--text-muted); }
.post-content { font-size: .95rem; line-height: 1.75; white-space: pre-wrap; word-break: break-word; }

/* Votos */
.post-footer {
  display: flex; align-items: center; gap: 12px;
  margin-top: 14px; padding-top: 12px;
  border-top: 1px solid var(--border);
}
.vote-btn {
  display: inline-flex; align-items: center; gap: 4px;
  padding: 4px 10px;
  border: 1.5px solid var(--border-dark);
  border-radius: 20px;
  font-size: .78rem; font-weight: 700;
  cursor: pointer; background: none;
  font-family: var(--font);
  transition: all var(--transition);
}
.vote-btn:hover     { border-color: var(--verde); color: var(--verde); }
.vote-btn.voted-up  { background: var(--verde); color: #fff; border-color: var(--verde); }
.vote-btn.voted-down{ background: #fee2e2; color: #991b1b; border-color: #fecaca; }
.vote-count { font-size: .82rem; font-weight: 700; color: var(--verde); }

.post-actions { margin-left: auto; display: flex; gap: 8px; }
.post-action-btn {
  font-size: .75rem; color: var(--text-muted);
  background: none; border: none; cursor: pointer;
  font-family: var(--font); padding: 0;
}
.post-action-btn:hover { color: var(--verde); }

/* Reply form */
.reply-form {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 20px;
  margin-top: 20px;
}
.reply-form h3 { font-size: 1rem; font-weight: 800; margin-bottom: 14px; color: var(--azul); }
.reply-form textarea { min-height: 120px; }

/* Moderação */
.mod-bar {
  background: var(--azul-light);
  border: 1px solid #c7d5f0;
  border-radius: var(--radius);
  padding: 10px 16px;
  display: flex; align-items: center; gap: 10px;
  flex-wrap: wrap;
  margin-bottom: 16px;
  font-size: .82rem;
}
.mod-bar span { font-weight: 700; color: var(--azul); }

/* ---- Notificações ---- */
.notif-bell {
  position: relative;
  cursor: pointer;
  background: none; border: none;
  color: #fff; font-size: 1.2rem;
  padding: 4px;
  flex-shrink: 0;
}
.notif-badge {
  position: absolute; top: -2px; right: -4px;
  background: #ff4444; color: #fff;
  font-size: .6rem; font-weight: 800;
  min-width: 16px; height: 16px;
  border-radius: 8px; padding: 0 4px;
  display: flex; align-items: center; justify-content: center;
  line-height: 1;
}
.notif-dropdown {
  position: absolute; right: 0; top: calc(100% + 8px);
  background: #fff;
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-lg);
  width: 320px;
  z-index: 300;
  display: none;
}
.notif-bell-wrap.open .notif-dropdown { display: block; }
.notif-dropdown-header {
  display: flex; align-items: center; justify-content: space-between;
  padding: 12px 16px;
  border-bottom: 1px solid var(--border);
  font-size: .85rem; font-weight: 800;
  color: var(--azul);
}
.notif-dropdown-header a { font-size: .75rem; font-weight: 600; color: var(--verde); }
.notif-item {
  display: flex; gap: 10px;
  padding: 12px 16px;
  border-bottom: 1px solid var(--border);
  text-decoration: none; color: inherit;
  transition: background var(--transition);
}
.notif-item:last-child { border-bottom: none; }
.notif-item:hover { background: var(--bg); }
.notif-item.unread { background: var(--verde-light); }
.notif-icon { font-size: 1.1rem; flex-shrink: 0; margin-top: 2px; }
.notif-content .notif-title { font-size: .83rem; font-weight: 700; margin-bottom: 2px; }
.notif-content .notif-body  { font-size: .75rem; color: var(--text-secondary); line-height: 1.4; }
.notif-content .notif-time  { font-size: .7rem; color: var(--text-muted); margin-top: 3px; }
.notif-empty { padding: 24px 16px; text-align: center; color: var(--text-muted); font-size: .85rem; }

/* ---- Responsivo ---- */
@media (max-width: 768px) {
  .forum-post { flex-direction: column; }
  .post-aside { width: 100%; flex-direction: row; border-right: none; border-bottom: 1px solid var(--border); padding: 12px 16px; }
  .topic-stats { display: none; }
  .notif-dropdown { width: 280px; right: -60px; }
}
@media (max-width: 480px) {
  .forum-stats { gap: 12px; }
  .forum-category-icon { display: none; }
}

/* Fixes */
.section-header .btn-verde { color: #fff !important; }
.forum-category { background: #fff; }
.forum-category-header { background: #fff; }
.forum-category-topics { background: #fff; }
.forum-category > div:last-child { background: #f8fafc; }
/* ============================================================
   selecao.art — Forum 5B: badges, níveis, ranking
   Adicionar ao final de forum.css
   ============================================================ */

/* ---- Nível do usuário ---- */
.user-level {
  display: inline-block;
  font-size: .65rem;
  font-weight: 800;
  padding: 2px 8px;
  border-radius: 10px;
  text-transform: uppercase;
  letter-spacing: .05em;
  background: var(--verde-light);
  color: var(--verde-dark);
}
.user-level.lenda  { background: #fffbcc; color: #7a6800; }
.user-level.idolo  { background: var(--azul-light); color: var(--azul); }
.user-level.craque { background: var(--azul-light); color: var(--azul); }

/* ---- Reputação ---- */
.rep-score {
  font-size: .72rem;
  font-weight: 700;
  color: var(--verde);
}
.rep-score::before { content: '⭐ '; }

/* ---- Badges ---- */
.badges-list {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  margin-top: 8px;
}
.badge-pill {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  padding: 3px 10px;
  border-radius: 20px;
  font-size: .7rem;
  font-weight: 700;
  border: 1.5px solid;
  cursor: default;
  position: relative;
}
.badge-pill .badge-icon { font-size: .85rem; }
.badge-pill:hover .badge-tooltip {
  display: block;
}
.badge-tooltip {
  display: none;
  position: absolute;
  bottom: calc(100% + 6px);
  left: 50%;
  transform: translateX(-50%);
  background: var(--azul);
  color: #fff;
  font-size: .7rem;
  padding: 4px 10px;
  border-radius: 6px;
  white-space: nowrap;
  z-index: 10;
  pointer-events: none;
}
.badge-tooltip::after {
  content: '';
  position: absolute;
  top: 100%; left: 50%;
  transform: translateX(-50%);
  border: 5px solid transparent;
  border-top-color: var(--azul);
}

/* ---- Melhor resposta ---- */
.forum-post.best-answer {
  border-left: 3px solid var(--verde);
  background: #f0fdf4;
}
.best-answer-badge {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  background: var(--verde);
  color: #fff;
  font-size: .72rem;
  font-weight: 800;
  padding: 3px 10px;
  border-radius: 20px;
  margin-bottom: 8px;
}

/* Botão marcar melhor resposta */
.btn-best-answer {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  font-size: .75rem;
  color: var(--verde);
  background: none;
  border: 1.5px solid var(--verde);
  border-radius: 20px;
  padding: 3px 10px;
  cursor: pointer;
  font-family: var(--font);
  font-weight: 700;
  transition: all var(--transition);
}
.btn-best-answer:hover {
  background: var(--verde);
  color: #fff;
}

/* ---- Denúncia ---- */
.report-form {
  background: var(--bg);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 14px;
  margin-top: 10px;
  display: none;
}
.report-form.open { display: block; }

/* ---- Edição ---- */
.edit-form {
  background: var(--bg);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 14px;
  margin-top: 10px;
  display: none;
}
.edit-form.open { display: block; }
.edited-marker {
  font-size: .68rem;
  color: var(--text-muted);
  font-style: italic;
}

/* ---- Ranking page ---- */
.ranking-table {
  width: 100%;
  border-collapse: collapse;
}
.ranking-table th {
  background: var(--azul);
  color: #fff;
  padding: 10px 14px;
  font-size: .8rem;
  font-weight: 700;
  text-align: left;
}
.ranking-table td {
  padding: 10px 14px;
  border-bottom: 1px solid var(--border);
  font-size: .88rem;
}
.ranking-table tr:hover td { background: var(--bg); }
.rank-pos {
  font-size: 1rem;
  font-weight: 900;
  color: var(--text-muted);
  width: 40px;
  text-align: center;
}
/* ============================================================
   selecao.art — Forum CSS 5C+5D
   Quote, embed, menção, upload, busca
   ============================================================ */

/* ---- Quote (citação) ---- */
.quote-block {
  background: var(--bg);
  border-left: 3px solid var(--verde);
  border-radius: 0 var(--radius) var(--radius) 0;
  padding: 10px 14px;
  margin-bottom: 12px;
  font-size: .88rem;
}
.quote-block .quote-header {
  font-size: .72rem;
  font-weight: 800;
  color: var(--verde-dark);
  margin-bottom: 4px;
}
.quote-block .quote-text {
  color: var(--text-secondary);
  font-style: italic;
  display: -webkit-box;
  -webkit-line-clamp: 3;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

/* Preview do quote no formulário */
.quote-preview {
  background: var(--verde-light);
  border: 1px solid #b7dfc5;
  border-radius: var(--radius);
  padding: 10px 14px;
  margin-bottom: 10px;
  display: flex;
  align-items: flex-start;
  gap: 10px;
  font-size: .83rem;
}
.quote-preview .quote-icon { font-size: 1.1rem; flex-shrink: 0; }
.quote-preview .quote-info { flex: 1; }
.quote-preview .quote-author { font-weight: 800; color: var(--verde-dark); }
.quote-preview .quote-text   { color: var(--text-secondary); margin-top: 2px; }
.btn-remove-quote {
  background: none; border: none; cursor: pointer;
  color: var(--text-muted); font-size: 1rem;
  padding: 0; flex-shrink: 0;
}
.btn-remove-quote:hover { color: #c0392b; }

/* ---- Embed de vídeo ---- */
.forum-embed {
  margin: 12px 0;
  border-radius: var(--radius);
  overflow: hidden;
  background: #000;
  aspect-ratio: 16/9;
}
.forum-embed iframe {
  width: 100%;
  height: 100%;
  border: 0;
  display: block;
}
.forum-link-embed {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 8px 14px;
  background: var(--bg);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  font-size: .85rem;
  color: var(--verde);
  text-decoration: none;
  margin: 6px 0;
  word-break: break-all;
}
.forum-link-embed:hover { background: var(--verde-light); }

/* ---- Imagem no post ---- */
.post-image {
  margin-top: 12px;
  max-width: 100%;
  border-radius: var(--radius);
  cursor: pointer;
  transition: opacity .15s;
}
.post-image:hover { opacity: .92; }

/* Upload preview */
.upload-area {
  display: flex;
  align-items: center;
  gap: 10px;
  flex-wrap: wrap;
  margin-top: 10px;
}
.upload-label {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 6px 14px;
  border: 1.5px dashed var(--border-dark);
  border-radius: var(--radius);
  font-size: .8rem;
  font-weight: 700;
  color: var(--text-secondary);
  cursor: pointer;
  transition: all var(--transition);
}
.upload-label:hover { border-color: var(--verde); color: var(--verde); }
#image-preview {
  display: none;
  width: 60px; height: 60px;
  object-fit: cover;
  border-radius: var(--radius-sm);
  border: 1px solid var(--border);
}

/* ---- Menção @usuario ---- */
.mention-user {
  display: inline-block;
  background: var(--azul-light);
  color: var(--azul);
  font-weight: 700;
  padding: 1px 6px;
  border-radius: 4px;
  font-size: .9em;
  text-decoration: none;
}
.mention-user:hover { background: var(--azul); color: #fff; }

/* ---- Busca no fórum ---- */
.forum-search-bar {
  display: flex;
  gap: 8px;
  margin-bottom: 20px;
}
.forum-search-bar input  { flex: 1; }
.forum-search-bar button { flex-shrink: 0; }

.search-result-item {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 14px 18px;
  margin-bottom: 10px;
  transition: box-shadow var(--transition);
}
.search-result-item:hover { box-shadow: var(--shadow-sm); }
.search-result-item h3 { font-size: .95rem; font-weight: 700; margin-bottom: 4px; }
.search-result-item h3 a { color: var(--text-primary); }
.search-result-item h3 a:hover { color: var(--verde); }
.search-result-meta { font-size: .75rem; color: var(--text-muted); display: flex; gap: 10px; }

/* ---- Ordenação ---- */
.order-tabs {
  display: flex;
  gap: 4px;
  margin-bottom: 16px;
  flex-wrap: wrap;
}
.order-tab {
  padding: 5px 14px;
  font-size: .78rem;
  font-weight: 700;
  border: 1.5px solid var(--border-dark);
  border-radius: 20px;
  color: var(--text-secondary);
  text-decoration: none;
  transition: all var(--transition);
}
.order-tab:hover  { border-color: var(--verde); color: var(--verde); }
.order-tab.active { background: var(--verde); border-color: var(--verde); color: #fff; }

/* ---- Marcador de edição ---- */
.edited-marker {
  font-size: .68rem;
  color: var(--text-muted);
  font-style: italic;
  margin-left: 8px;
}

/* ---- Melhor resposta ---- */
.forum-post.best-answer {
  border-left: 3px solid var(--verde);
}
.best-answer-label {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  background: var(--verde);
  color: #fff;
  font-size: .7rem;
  font-weight: 800;
  padding: 2px 10px;
  border-radius: 10px;
  margin-bottom: 8px;
}

.forum-topic-row { background: #fff; }
.forum-topic-row:hover { background: var(--bg); }

/* Fix padding do header no fórum */
.has-subnav .site-main { padding-top: calc(var(--header-h) + 42px); }

.layout-sidebar .card { margin-bottom: 16px; }
.layout-sidebar .widget { margin-bottom: 16px; }

.post-image { max-width: 100%; border-radius: 8px; cursor: pointer; display: block; }
.post-image-caption { font-size: .82rem; color: var(--text-muted); text-align: left; margin-top: 6px; font-style: italic; max-width: 380px; }

/* Listas nas postagens do fórum */
.post-body-text ul, .post-content ul { list-style: disc !important; padding-left: 1.5em !important; margin-bottom: 8px; }
.post-body-text ol, .post-content ol { list-style: decimal !important; padding-left: 1.5em !important; margin-bottom: 8px; }
.post-body-text li, .post-content li { margin-bottom: 4px; display: list-item !important; }
.post-body-text ul li { list-style-type: disc !important; }
.post-body-text ol li { list-style-type: decimal !important; }
.post-body-text p, .post-content p { margin-bottom: 8px; }
