/* ================================================
   INW Forum Styles
   ================================================ */

.fw-page {
  padding: 32px 24px 80px;
  max-width: 1100px;
}

/* Breadcrumb */
.fw-breadcrumb {
  font-size: 13px;
  color: var(--text-muted);
  margin-bottom: 20px;
}
.fw-breadcrumb a { color: var(--blue-600); text-decoration: none; }
.fw-breadcrumb a:hover { text-decoration: underline; }

.fw-title { font-size: clamp(1.3rem,3vw,1.8rem); color: var(--blue-900); margin-bottom: 6px; font-weight: 700; }
.fw-desc  { color: var(--text-muted); font-size: 14px; margin-bottom: 20px; }
.fw-loading { color: var(--text-muted); font-size: 14px; padding: 40px 0; }
.fw-error   { color: #c0392b; font-size: 14px; padding: 20px 0; }
.fw-empty   { color: var(--text-muted); font-size: 14px; padding: 40px 0; text-align: center; }

/* ── Forum index ─────────────────────────────────── */
.fw-category { margin-bottom: 32px; }
.fw-cat-title {
  font-size: 11px; font-weight: 700; letter-spacing: .1em;
  text-transform: uppercase; color: var(--blue-700);
  border-bottom: 2px solid var(--blue-100);
  padding-bottom: 8px; margin-bottom: 2px;
}

.fw-board-list { border: 1px solid var(--gray-200); border-radius: var(--radius-md); overflow: hidden; }
.fw-board-row {
  display: flex; align-items: center; gap: 16px;
  padding: 16px 20px; text-decoration: none; color: inherit;
  border-bottom: 1px solid var(--gray-100);
  background: #fff; transition: background var(--transition);
}
.fw-board-row:last-child { border-bottom: none; }
.fw-board-row:hover { background: var(--gray-50); }

.fw-board-icon { font-size: 22px; flex-shrink: 0; }
.fw-board-info { flex: 1; min-width: 0; }
.fw-board-name { font-weight: 600; font-size: 15px; color: var(--blue-700); margin-bottom: 3px; }
.fw-board-desc { font-size: 13px; color: var(--text-muted); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; max-width: 560px; }
.fw-last-post  { font-size: 12px; color: var(--gray-500); margin-top: 4px; display: block; }

.fw-board-stats {
  display: flex; flex-direction: column; align-items: flex-end;
  gap: 4px; font-size: 12px; color: var(--text-muted);
  flex-shrink: 0; min-width: 90px; text-align: right;
}
.fw-board-stats strong { color: var(--text); }

/* ── Board header ────────────────────────────────── */
.fw-board-header { display: flex; align-items: flex-start; justify-content: space-between; gap: 16px; margin-bottom: 24px; }
.fw-new-topic-btn { white-space: nowrap; flex-shrink: 0; }

/* ── Topic list ──────────────────────────────────── */
.fw-topic-list { border: 1px solid var(--gray-200); border-radius: var(--radius-md); overflow: hidden; }

.fw-topic-header {
  display: grid; grid-template-columns: 1fr 80px 80px 160px;
  padding: 10px 16px; background: var(--gray-50);
  border-bottom: 1px solid var(--gray-200);
  font-size: 11px; font-weight: 700; letter-spacing: .06em;
  text-transform: uppercase; color: var(--text-muted);
}

.fw-topic-row {
  display: grid; grid-template-columns: 1fr 80px 80px 160px;
  align-items: center; padding: 14px 16px;
  border-bottom: 1px solid var(--gray-100);
  text-decoration: none; color: inherit; background: #fff;
  transition: background var(--transition);
}
.fw-topic-row:last-child { border-bottom: none; }
.fw-topic-row:hover { background: var(--gray-50); }

.fw-topic-main  { display: flex; align-items: center; gap: 12px; min-width: 0; }
.fw-topic-icon  { font-size: 18px; flex-shrink: 0; }
.fw-topic-title { font-weight: 500; font-size: 14px; color: var(--blue-800); margin-bottom: 3px; }
.fw-topic-meta  { font-size: 12px; color: var(--text-muted); }
.fw-topic-replies, .fw-topic-views { font-size: 14px; color: var(--text-muted); text-align: center; }
.fw-topic-last  { font-size: 12px; color: var(--text-muted); line-height: 1.5; }
.fw-muted       { color: var(--gray-500); }

.fw-badge { display: inline-block; font-size: 10px; font-weight: 700; letter-spacing: .05em; text-transform: uppercase; padding: 1px 6px; border-radius: 4px; margin-left: 6px; vertical-align: middle; }
.fw-badge-sticky { background: var(--blue-100); color: var(--blue-700); }
.fw-badge-locked { background: var(--gray-100); color: var(--gray-500); }

/* ── Thread view ─────────────────────────────────── */
.fw-locked-notice {
  background: #fef9e7; border: 1px solid #f9ca24;
  border-radius: var(--radius-sm); padding: 10px 16px;
  font-size: 13px; margin-bottom: 20px;
}

.fw-post {
  display: grid; grid-template-columns: 160px 1fr;
  border: 1px solid var(--gray-200); border-radius: var(--radius-md);
  overflow: hidden; margin-bottom: 16px; background: #fff;
}

.fw-post-sidebar {
  background: var(--gray-50); border-right: 1px solid var(--gray-200);
  padding: 20px 16px; display: flex; flex-direction: column;
  align-items: center; gap: 8px; text-align: center;
}

.fw-avatar {
  width: 64px; height: 64px; border-radius: 50%; overflow: hidden;
  background: var(--blue-100); flex-shrink: 0;
}
.fw-avatar-img {
  width: 100%; height: 100%; object-fit: cover; display: block;
}
.fw-avatar-initials {
  width: 100%; height: 100%; display: flex; align-items: center;
  justify-content: center; font-weight: 700; font-size: 20px;
  color: var(--blue-700); background: var(--blue-100);
}

.fw-poster-name {
  font-weight: 700; font-size: 13px; color: var(--blue-700);
  text-decoration: none; word-break: break-word;
}
.fw-poster-name:hover { text-decoration: underline; }
.fw-poster-meta { font-size: 11px; color: var(--text-muted); }

.fw-post-body { padding: 20px 24px; min-width: 0; }
.fw-post-meta {
  display: flex; justify-content: space-between; align-items: center;
  font-size: 12px; color: var(--text-muted); margin-bottom: 14px;
  padding-bottom: 10px; border-bottom: 1px solid var(--gray-100);
}
.fw-post-num { color: var(--gray-300); }
.fw-post-content {
  font-size: 14px; line-height: 1.75; color: var(--text);
  word-break: break-word; overflow-wrap: anywhere;
}
.fw-post-content a { color: var(--blue-600); }
.fw-post-content blockquote.fw-quote {
  border-left: 3px solid var(--blue-200); margin: 12px 0;
  padding: 8px 14px; background: var(--gray-50); border-radius: 0 4px 4px 0;
  font-size: 13px; color: var(--text-muted);
}
.fw-post-content blockquote.fw-quote cite {
  display: block; font-weight: 600; font-style: normal;
  font-size: 12px; margin-bottom: 4px; color: var(--blue-700);
}
.fw-post-content pre.fw-code {
  background: var(--gray-50); border: 1px solid var(--gray-200);
  border-radius: 4px; padding: 12px; overflow-x: auto;
  font-size: 13px; line-height: 1.5; margin: 10px 0;
}

/* ── Compose / reply form ────────────────────────── */
.fw-compose {
  background: var(--gray-50); border: 1px solid var(--gray-200);
  border-radius: var(--radius-md); padding: 24px; margin: 24px 0;
}
.fw-compose-title { font-size: 16px; font-weight: 700; color: var(--blue-900); margin-bottom: 16px; }
.fw-input, .fw-textarea {
  width: 100%; padding: 11px 14px; border: 1.5px solid var(--gray-200);
  border-radius: var(--radius-sm); font-size: 14px; font-family: var(--font-body);
  background: #fff; color: var(--text); outline: none; margin-bottom: 12px;
  transition: border-color var(--transition);
}
.fw-input:focus, .fw-textarea:focus { border-color: var(--blue-500); }
.fw-textarea { resize: vertical; min-height: 120px; }
.fw-compose-actions { display: flex; gap: 10px; }

.fw-login-prompt {
  text-align: center; padding: 28px; color: var(--text-muted);
  font-size: 14px; border: 1px dashed var(--gray-200); border-radius: var(--radius-md);
  margin: 24px 0;
}
.fw-login-prompt a { color: var(--blue-600); font-weight: 600; }

/* ── Pagination ──────────────────────────────────── */
.fw-pagination { display: flex; gap: 6px; padding: 24px 0 0; flex-wrap: wrap; }
.fw-page-btn {
  padding: 7px 14px; border-radius: var(--radius-sm); border: 1px solid var(--gray-200);
  background: #fff; font-size: 14px; cursor: pointer; transition: all var(--transition);
  color: var(--text);
}
.fw-page-btn:hover { background: var(--gray-50); border-color: var(--blue-300); }
.fw-page-btn.active { background: var(--blue-600); color: #fff; border-color: var(--blue-600); }

/* ── Responsive ──────────────────────────────────── */
@media (max-width: 768px) {
  .fw-topic-header,
  .fw-topic-row { grid-template-columns: 1fr 60px; }
  .fw-topic-views, .fw-topic-last { display: none; }

  .fw-post { grid-template-columns: 1fr; }
  .fw-post-sidebar {
    flex-direction: row; border-right: none;
    border-bottom: 1px solid var(--gray-200);
    padding: 14px 16px; text-align: left;
  }
  .fw-board-stats { display: none; }
}
