/* Forum scoped styles */

/* Thread row */
.forum-row {
  display: flex;
  gap: 0.75rem;
  padding: 0.75rem 1rem;
  border-bottom: 1px solid #f3f4f6;
  transition: background-color 0.12s ease;
}
.forum-row:hover { background-color: #f9fafb; }
.forum-row:last-child { border-bottom: none; }

.forum-row-left {
  width: 4.5rem; min-width: 4.5rem;
  border: 1px solid #e5e7eb; border-radius: 6px;
  background: #f9fafb; text-align: center; padding: 0.5rem;
  display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 0.15rem;
}
.forum-reply-count { font-size: 1.1rem; font-weight: 700; color: #374151; line-height: 1; }

.forum-row-main {
  flex: 1; min-width: 0;
  display: flex; flex-direction: column; gap: 0.35rem;
}

.forum-thread-title {
  font-size: 0.95rem; font-weight: 600; color: #111827; line-height: 1.35;
  text-decoration: none; display: block;
}
.forum-thread-title:hover { color: #d97706; }

.forum-meta {
  font-size: 0.75rem; color: #6b7280;
  display: flex; flex-wrap: wrap; align-items: center; gap: 0.35rem;
}

.forum-excerpt {
  font-size: 0.8rem; color: #6b7280; line-height: 1.4;
  display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden;
}

/* Post cards */
.forum-post-card {
  border: 1px solid #e5e7eb; border-radius: 8px; background: #fff; overflow: hidden;
}
.forum-post-header {
  display: flex; align-items: center; justify-content: space-between;
  gap: 0.75rem; padding: 0.6rem 0.75rem;
  background: #f9fafb; border-radius: 8px 8px 0 0;
  border-bottom: 1px solid #e5e7eb;
}
.forum-post-zone { padding: 0.75rem; }

.forum-post-body {
  color: #1f2937; line-height: 1.65; font-size: 0.95rem;
}
.forum-post-body p { margin: 0 0 0.85rem 0; }
.forum-post-body p:last-child { margin-bottom: 0; }
.forum-post-body ul, .forum-post-body ol { margin: 0 0 0.85rem 1.25rem; }
.forum-post-body li { margin: 0.2rem 0; }
.forum-post-body a { color: #d97706; text-decoration: underline; text-underline-offset: 3px; word-break: break-all; overflow-wrap: break-word; }
.forum-post-body code { background: #f3f4f6; padding: 0.1rem 0.3rem; border-radius: 4px; font-size: 0.9em; }
.forum-post-body pre { background: #1f2937; color: #f9fafb; padding: 0.85rem; border-radius: 8px; overflow-x: auto; margin: 0 0 0.85rem 0; }
.forum-post-body pre code { background: transparent; padding: 0; color: inherit; }
.forum-post-body blockquote { border-left: 3px solid #e5e7eb; padding-left: 1rem; margin: 0 0 0.85rem 0; color: #6b7280; }
.forum-post-body h1, .forum-post-body h2, .forum-post-body h3 { font-weight: 700; color: #111827; margin: 1.2rem 0 0.5rem; }
.forum-post-body h1 { font-size: 1.35rem; }
.forum-post-body h2 { font-size: 1.15rem; }
.forum-post-body h3 { font-size: 1rem; }

/* Sidebar */
.forum-sidebar-section {
  border: 1px solid #e5e7eb; border-radius: 8px; background: #fff; padding: 1rem;
}

.forum-topic-pill {
  display: inline-block;
  font-size: 0.65rem; font-weight: 600; text-transform: uppercase; letter-spacing: 0.03em;
  color: #6b7280; background: #f3f4f6; padding: 0.15rem 0.5rem; border-radius: 4px;
}

.forum-authority-link {
  display: block; font-size: 0.8rem; color: #374151; padding: 0.3rem 0;
  text-decoration: none; border-bottom: 1px solid #f3f4f6;
}
.forum-authority-link:hover { color: #d97706; }
.forum-authority-link:last-child { border-bottom: none; }

/* Forms */
.forum-input {
  width: 100%; border: 1px solid #e5e7eb; border-radius: 6px; padding: 0.6rem 0.75rem;
  font-size: 0.9rem; color: #1f2937; background: #fff;
  transition: border-color 0.15s ease;
}
.forum-input:focus { outline: none; border-color: #d97706; }

.forum-btn {
  display: inline-flex; align-items: center; gap: 0.4rem;
  padding: 0.5rem 1rem; border-radius: 6px; font-size: 0.85rem; font-weight: 600;
  transition: all 0.15s ease; cursor: pointer; border: none;
}
.forum-btn-primary {
  background: #f59e0b; color: #1f2937;
}
.forum-btn-primary:hover { background: #d97706; color: #fff; }

/* Flag button */
.forum-flag {
  font-size: 0.7rem; color: #9ca3af; background: none; border: none; cursor: pointer; padding: 0.2rem 0.4rem;
}
.forum-flag:hover { color: #ef4444; }

/* Mobile: sidebar above feed */
@media (max-width: 1023px) {
  .forum-sidebar { order: -1; }
}
