/* ==========================================================================
   studentPostCard Component Styles
   Matches reference UI for Updates -> Posts tab:
   - Templated student posts with author avatar & first name
   - Category pill badges (WIN, PROGRESS, LEARNING, COLLABORATION, MILESTONE)
   - Title & subtitle description
   - 3-column structured template box (Questions & Answers)
   - Three dots action menu
   ========================================================================== */

/* Section Container */
.student-post-section {
  display: flex;
  flex-direction: column;
  width: 100%;
  box-sizing: border-box;
}

/* List Container */
.student-post-list {
  display: flex;
  flex-direction: column;
  gap: 14px;
  width: 100%;
  box-sizing: border-box;
}

/* Individual Post Card Container */
.student-post-card {
  background-color: #ffffff;
  border: 1px solid #e9ecef;
  border-radius: 8px;
  padding: 14px;
  display: flex;
  flex-direction: column;
  gap: 10px;
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.02);
  box-sizing: border-box;
  width: 100%;
}

/* Top Author & Category Header Row */
.student-post-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  width: 100%;
}

.student-post-author-meta {
  display: flex;
  align-items: center;
  gap: 10px;
}

/* Avatar Circle */
.student-post-avatar {
  width: 34px;
  height: 34px;
  border-radius: 50%;
  background-color: #e5e7eb;
  color: #111827;
  font-family: var(--font-inter, 'Inter', sans-serif);
  font-size: 13px;
  font-weight: 700;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  overflow: hidden;
  user-select: none;
}

.student-post-avatar-img {
  width: 100%;
  height: 100%;
  border-radius: 50%;
  object-fit: cover;
  display: block;
}

/* Author Name & Time String */
.student-post-author-info {
  display: flex;
  align-items: center;
  gap: 6px;
  font-family: var(--font-inter, 'Inter', sans-serif);
  font-size: 12px;
}

.student-post-author-name {
  font-weight: 700;
  color: #111827;
}

.student-post-meta-dot {
  color: #9ca3af;
  font-size: 10px;
}

.student-post-time {
  color: #6b7280;
  font-weight: 400;
}

/* Right Side Category Badge & Three Dots */
.student-post-header-right {
  display: flex;
  align-items: center;
  gap: 10px;
}

/* Category Tag Pill Badge */
.student-post-badge {
  display: inline-flex;
  align-items: center;
  padding: 2.5px 7.5px;
  border-radius: 4px;
  background-color: #f3f4f6;
  border: 1px solid #e5e7eb;
  color: #374151;
  font-family: var(--font-inter, 'Inter', sans-serif);
  font-size: 9.5px;
  font-weight: 600;
  letter-spacing: 0.03em;
  text-transform: uppercase;
}

/* Three Dots Menu Button */
.student-post-menu-btn {
  background: none;
  border: none;
  color: #6b7280;
  cursor: pointer;
  padding: 2px;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 4px;
  transition: color 0.15s ease, background-color 0.15s ease;
  outline: none;
}

.student-post-menu-btn:hover {
  color: #111827;
  background-color: #f3f4f6;
}

/* Post Main Title & Description */
.student-post-body {
  display: flex;
  flex-direction: column;
  gap: 3px;
}

.student-post-title {
  font-family: var(--font-inter, 'Inter', sans-serif);
  font-size: 13px;
  font-weight: 700;
  color: #111827;
  letter-spacing: -0.01em;
  line-height: 1.35;
  margin: 0;
}

.student-post-subtitle {
  font-family: var(--font-inter, 'Inter', sans-serif);
  font-size: 11.5px;
  font-weight: 400;
  color: #6b7280;
  line-height: 1.4;
  margin: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
}

/* Horizontal Scrollable Templated Answers Box (With Thin Visible Scrollbar) */
.student-post-template-box {
  background-color: #f8f9fa;
  border: 1px solid #f1f5f9;
  border-radius: 6px;
  padding: 10px 10px 8px;
  display: flex;
  gap: 10px;
  overflow-x: auto;
  scrollbar-width: thin; /* Firefox thin scrollbar */
  scrollbar-color: #cbd5e1 #f1f5f9;
  -webkit-overflow-scrolling: touch;
  box-sizing: border-box;
  margin-top: 2px;
  width: 100%;
}

.student-post-template-box::-webkit-scrollbar {
  display: block;
  height: 4px; /* Thin 4px height scrollbar */
}

.student-post-template-box::-webkit-scrollbar-track {
  background-color: #f1f5f9;
  border-radius: 2px;
}

.student-post-template-box::-webkit-scrollbar-thumb {
  background-color: #cbd5e1;
  border-radius: 2px;
}

.student-post-template-box::-webkit-scrollbar-thumb:hover {
  background-color: #94a3b8;
}

.student-post-template-col {
  display: flex;
  flex-direction: column;
  gap: 2px;
  flex: 0 0 calc(33.333% - 7px); /* Shows ~3 columns visible at once */
  min-width: 115px;
  box-sizing: border-box;
}

.student-post-template-label {
  font-family: var(--font-inter, 'Inter', sans-serif);
  font-size: 10.5px;
  font-weight: 700;
  color: #111827;
  margin: 0;
  line-height: 1.3;
}

.student-post-template-value {
  font-family: var(--font-inter, 'Inter', sans-serif);
  font-size: 10.5px;
  font-weight: 400;
  color: #4b5563;
  line-height: 1.35;
  margin: 0;
}

/* Footer Actions Row */
.student-post-footer {
  margin-top: 6px;
  padding-top: 8px;
  border-top: 1px solid #f3f4f6;
  width: 100%;
}

/* Single Row Combined Reaction Bar (Separated by Vertical Line Dividers) */
.student-post-rx-bar {
  display: flex;
  align-items: center;
  width: 100%;
  background-color: #f8fafc;
  border: 1px solid #e2e8f0;
  border-radius: 6px;
  overflow: hidden;
  box-sizing: border-box;
}

.student-post-rx-item {
  flex: 1;
  min-width: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 4.5px;
  padding: 6px 4px;
  background: transparent;
  border: none;
  border-right: 1px solid #e2e8f0;
  font-family: var(--font-inter, 'Inter', sans-serif);
  font-size: 10.5px;
  font-weight: 500;
  color: #475569;
  cursor: pointer;
  transition: background-color 0.15s ease, color 0.15s ease;
  outline: none;
  user-select: none;
  white-space: nowrap;
}

.student-post-rx-item:last-child {
  border-right: none;
}

.student-post-rx-item:hover {
  background-color: #f1f5f9;
  color: #1e293b;
}

.student-post-rx-item.is-active {
  background-color: #eff6ff;
  color: #2563eb;
  font-weight: 600;
}

.student-post-rx-item .rx-icon {
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}

.student-post-rx-item .rx-icon svg {
  width: 12px;
  height: 12px;
}

.student-post-rx-item .rx-label {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.student-post-rx-item .rx-count {
  font-size: 10px;
  font-weight: 600;
  opacity: 0.85;
  flex-shrink: 0;
}

