/* ==========================================================
   Fórum (js/social/forum.js)
   ========================================================== */

.forum-head { grid-template-columns: 1fr auto; align-items: end; gap: 12px; }
.forum-head-actions { display: flex; flex-wrap: wrap; gap: 8px; }
.forum-loading { padding: 40px 0; display: grid; place-items: center; }
.forum-empty { padding: 28px 16px; text-align: center; color: var(--text-3); display: flex; align-items: center; justify-content: center; gap: 8px; }
.forum-empty svg { width: 18px; height: 18px; }

.crumbs { display: flex; align-items: center; flex-wrap: wrap; gap: 8px; font-size: 13.5px; color: var(--text-3); margin-bottom: 10px; }
.crumbs a { color: var(--text-2); text-decoration: none; }
.crumbs a:hover { color: var(--text); text-decoration: underline; }
.crumbs b { color: var(--text-2); font-weight: 600; }

/* kategóriák */
.cat-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(240px, 1fr)); gap: 12px; }
.cat-card {
  display: grid; gap: 6px; align-content: start; padding: 18px;
  border-radius: var(--r-lg); background: var(--surface); border: 1px solid var(--line);
  text-decoration: none; transition: border-color .15s, transform .15s, background .15s;
}
.cat-card:hover { border-color: var(--line-2); background: var(--surface-2); transform: translateY(-2px); }
.cat-card b { font-size: 16.5px; font-weight: 700; }
.cat-card span { font-size: 13.5px; color: var(--text-3); line-height: 1.45; }

/* témalista */
.thread-list { list-style: none; display: grid; gap: 6px; }
.thread-row {
  display: flex; align-items: center; gap: 14px; padding: 12px 14px;
  border-radius: var(--r-md); background: var(--surface); border: 1px solid var(--line);
  text-decoration: none; transition: background .15s, border-color .15s;
}
.thread-row:hover { background: var(--surface-2); border-color: var(--line-2); }
.thread-main { flex: 1; min-width: 0; display: grid; gap: 3px; }
.thread-title-line { display: flex; align-items: center; gap: 6px; min-width: 0; }
.thread-title-line b { font-size: 15px; font-weight: 650; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.thread-sub { font-size: 12.5px; color: var(--text-3); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.thread-cat { color: var(--text-2); font-weight: 600; }
.thread-flag { display: inline-grid; place-items: center; flex-shrink: 0; color: var(--text-3); }
.thread-flag svg { width: 15px; height: 15px; }
.thread-flag.is-pin { color: #f5a524; }
.thread-stats { display: flex; align-items: center; gap: 16px; flex-shrink: 0; }
.thread-count { display: inline-flex; align-items: center; gap: 5px; font-size: 13px; font-weight: 600; color: var(--text-2); }
.thread-count svg { width: 15px; height: 15px; }
.thread-last { font-size: 12px; color: var(--text-3); text-align: right; min-width: 74px; line-height: 1.35; }

/* téma */
.narrow-forum { max-width: 860px; }
.thread-head { display: flex; flex-direction: column; align-items: flex-start; gap: 12px; }
.thread-head h1 { overflow-wrap: anywhere; }
.thread-head h1 .thread-flag { display: inline-grid; vertical-align: middle; margin-right: 6px; }
.thread-head h1 .thread-flag svg { width: 22px; height: 22px; }
.thread-tools { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; }
.move-cat { display: inline-flex; align-items: center; gap: 6px; font-size: 13px; color: var(--text-3); }
.move-cat select, .forum-modal select {
  height: 34px; padding: 0 10px; border-radius: var(--r-sm);
  background: var(--surface-2); color: var(--text); border: 1px solid var(--line-2); font: inherit; font-size: 13.5px;
}

.post-list { list-style: none; display: grid; gap: 10px; }
.post {
  display: flex; gap: 14px; padding: 16px;
  border-radius: var(--r-lg); background: var(--surface); border: 1px solid var(--line);
}
.post.is-op { border-color: rgba(229, 72, 77, .28); background: linear-gradient(180deg, rgba(229, 72, 77, .06), transparent 60%), var(--surface); }
.post.is-deleted { padding: 10px 16px; }
.post-main { flex: 1; min-width: 0; }
.post-text { margin-top: 6px; font-size: 15px; line-height: 1.6; white-space: pre-wrap; overflow-wrap: anywhere; color: #e3e3e8; }
.op-badge { font-size: 11px; font-weight: 700; padding: 1px 7px; border-radius: 999px; background: rgba(229, 72, 77, .14); color: var(--accent-2); }

.reply-box { margin-top: 18px; padding-bottom: 20px; }
.reply-box .section-label { margin-top: 10px; }
.reply-box .cm-form-actions { display: flex; }

/* új téma ablak */
.forum-modal { width: min(620px, 100%); }
.forum-modal .field { display: grid; gap: 6px; }
.forum-modal .field span { font-size: 13px; font-weight: 600; color: var(--text-2); }
.forum-modal textarea {
  width: 100%; resize: vertical; min-height: 120px; padding: 10px 12px;
  background: rgba(255, 255, 255, .04); border: 1px solid var(--line-2); border-radius: var(--r-md);
  outline: none; font: inherit; color: inherit; line-height: 1.5;
}
.forum-modal textarea:focus, .modal-card .field input:focus { border-color: var(--accent); }

@media (max-width: 640px) {
  .forum-head { grid-template-columns: 1fr; }
  .thread-row { padding: 10px; gap: 10px; }
  .thread-row > .avatar { display: none; }
  .thread-last { display: none; }
  .post { padding: 12px; gap: 10px; }
  .post-side .avatar { --s: 32px !important; }
}

.post-text blockquote {
  margin: 4px 0 8px; padding: 8px 12px;
  border-left: 3px solid var(--line-2); border-radius: 0 var(--r-sm) var(--r-sm) 0;
  background: rgba(255, 255, 255, .04); color: var(--text-2); font-size: 14px;
}
