/* ==========================================================================
   HVAC Community Q&A & Solved Case Files Styling
   ========================================================================== */

.forum-container {
  max-width: 1000px;
  margin: 0 auto;
  padding: 24px 20px;
}

.community-top-bar {
  background: #0B132B;
  color: #FFFFFF;
  font-size: 0.82rem;
  padding: 8px 16px;
  border-bottom: 1px solid rgba(255, 255, 255, 0.1);
}

.community-top-bar .header-container {
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex-wrap: wrap;
  gap: 8px;
  max-width: 1200px;
  margin: 0 auto;
}

.community-thread-row {
  background: #FFFFFF;
  border: 1px solid #E2E8F0;
  border-radius: 12px;
  padding: 20px;
  margin-bottom: 16px;
  display: flex;
  gap: 20px;
  align-items: flex-start;
  transition: all 0.2s ease;
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.04);
}

.community-thread-row:hover {
  border-color: #CBD5E1;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.08);
}

.thread-stat-box {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  min-width: 75px;
  text-align: center;
  border-right: 1px solid #F1F5F9;
  padding-right: 16px;
  flex-shrink: 0;
}

.thread-stat-votes {
  font-size: 1.25rem;
  font-weight: 900;
  color: #0F172A;
}

.thread-stat-label {
  font-size: 0.72rem;
  color: #64748B;
  font-weight: 700;
  text-transform: uppercase;
}

.thread-stat-answers {
  margin-top: 10px;
  font-size: 0.82rem;
  font-weight: 800;
  color: #16A34A;
  background: #DCFCE7;
  padding: 2px 8px;
  border-radius: 12px;
  white-space: nowrap;
}

.thread-content-area {
  flex-grow: 1;
}

.thread-badge-strip {
  display: flex;
  gap: 8px;
  align-items: center;
  margin-bottom: 8px;
  flex-wrap: wrap;
}

.badge-geo {
  background: #E0F2FE;
  color: #0369A1;
  font-size: 0.75rem;
  font-weight: 800;
  padding: 2px 10px;
  border-radius: 12px;
}

.badge-category {
  background: #FEF3C7;
  color: #92400E;
  font-size: 0.75rem;
  font-weight: 800;
  padding: 2px 10px;
  border-radius: 12px;
}

.thread-views {
  font-size: 0.78rem;
  color: #94A3B8;
}

.thread-title-link {
  font-size: 1.15rem;
  font-weight: 800;
  margin: 0 0 8px 0;
  line-height: 1.4;
}

.thread-title-link a {
  color: #0F172A;
  text-decoration: none;
}

.thread-title-link a:hover {
  color: #ff6b00;
}

.thread-excerpt {
  font-size: 0.88rem;
  color: #475569;
  line-height: 1.5;
  margin: 0 0 12px 0;
}

.thread-meta-footer {
  display: flex;
  justify-content: space-between;
  align-items: center;
  font-size: 0.8rem;
  color: #64748B;
  flex-wrap: wrap;
  gap: 8px;
}

.user-avatar-small {
  width: 24px;
  height: 24px;
  border-radius: 50%;
  background: #64748B;
  color: #FFFFFF;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 0.75rem;
  font-weight: 900;
}

/* Discussion Post Styling */
.forum-thread-card {
  background: #FFFFFF;
  border: 1px solid #E2E8F0;
  border-radius: 12px;
  padding: 28px;
  margin-bottom: 24px;
  box-shadow: 0 1px 4px rgba(0, 0, 0, 0.05);
}

.forum-question-header {
  border-bottom: 1px solid #F1F5F9;
  padding-bottom: 20px;
  margin-bottom: 20px;
}

.forum-user-meta {
  display: flex;
  align-items: center;
  gap: 14px;
  flex-wrap: wrap;
}

.user-avatar-circle {
  width: 48px;
  height: 48px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: 800;
  font-size: 1.1rem;
  color: #FFFFFF;
  flex-shrink: 0;
}

.user-avatar-tech { background: linear-gradient(135deg, #0A192F, #ff6b00); }
.user-avatar-homeowner { background: linear-gradient(135deg, #0284C7, #38BDF8); }

.user-role-badge {
  font-size: 0.75rem;
  font-weight: 700;
  padding: 2px 8px;
  border-radius: 12px;
  display: inline-block;
  margin-left: 6px;
}

.badge-tech { background: #DCFCE7; color: #166534; border: 1px solid #BBF7D0; }
.badge-homeowner { background: #F1F5F9; color: #475569; border: 1px solid #E2E8F0; }

.forum-reply-card {
  background: #FFFFFF;
  border: 1px solid #E2E8F0;
  border-radius: 12px;
  padding: 24px;
  margin-bottom: 20px;
  position: relative;
}

.forum-reply-accepted {
  border: 2px solid #10B981;
  background: #F0FDF4;
}

.accepted-answer-banner {
  display: flex;
  align-items: center;
  gap: 8px;
  background: #10B981;
  color: #FFFFFF;
  font-size: 0.8rem;
  font-weight: 800;
  padding: 6px 14px;
  border-radius: 6px;
  margin-bottom: 16px;
  width: fit-content;
}

@media (max-width: 640px) {
  .community-thread-row {
    flex-direction: column;
    padding: 16px;
  }
  .thread-stat-box {
    flex-direction: row;
    border-right: none;
    border-bottom: 1px solid #F1F5F9;
    padding-right: 0;
    padding-bottom: 12px;
    margin-bottom: 12px;
    width: 100%;
    justify-content: flex-start;
    gap: 16px;
  }
  .thread-stat-answers {
    margin-top: 0;
  }
}
