/* Verboo Club Community Block 1 Stylesheet */

.community-layout-container {
  display: flex;
  max-width: 1240px;
  margin: 0 auto;
  padding: 24px 20px;
  gap: 32px;
  min-height: calc(100vh - 52px);
  width: 100%;
}

/* LEFT RAIL */
.community-sidebar-rail {
  width: 270px;
  flex-shrink: 0;
  background: rgba(15, 23, 42, 0.6);
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: 12px;
  padding: 16px;
  align-self: flex-start;
  position: sticky;
  top: 76px;
}

.rail-section-header {
  font-size: 0.75rem;
  font-weight: 700;
  letter-spacing: 0.08em;
  color: #94a3b8;
  margin-bottom: 12px;
  text-transform: uppercase;
}

.space-nav-item {
  display: flex;
  align-items: center;
  gap: 10px;
  width: 100%;
  padding: 10px 12px;
  border-radius: 8px;
  background: transparent;
  border: 1px solid transparent;
  color: #cbd5e1;
  font-size: 0.9rem;
  font-weight: 500;
  cursor: pointer;
  text-align: left;
  transition: all 0.15s ease;
  margin-bottom: 4px;
}

.space-nav-item:hover {
  background: rgba(255, 255, 255, 0.05);
  color: #fff;
}

.space-nav-item.active {
  background: rgba(16, 185, 129, 0.15);
  border-color: rgba(16, 185, 129, 0.4);
  color: #10b981;
  font-weight: 600;
}

.space-nav-item.archived-item {
  opacity: 0.7;
}

.space-icon {
  font-size: 1.1rem;
}

.space-label {
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.my-groups-list {
  display: flex;
  flex-direction: column;
}

.groups-loading-placeholder {
  font-size: 0.85rem;
  color: #64748b;
  padding: 8px 12px;
}

/* MAIN FEED */
.community-feed-main {
  flex: 1;
  min-width: 0;
  max-width: 780px;
}

.feed-header-bar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 20px;
  padding-bottom: 16px;
  border-bottom: 1px solid rgba(255, 255, 255, 0.08);
}

.feed-eyebrow {
  font-size: 0.75rem;
  font-weight: 700;
  color: #10b981;
  letter-spacing: 0.05em;
  text-transform: uppercase;
}

.feed-title {
  font-size: 1.5rem;
  font-weight: 700;
  color: #f8fafc;
  margin: 4px 0 0 0;
}

.space-status-badge {
  font-size: 0.75rem;
  font-weight: 700;
  padding: 4px 10px;
  border-radius: 999px;
  text-transform: uppercase;
}

.space-status-badge.active {
  background: rgba(16, 185, 129, 0.2);
  color: #34d399;
}

.space-status-badge.archived {
  background: rgba(148, 163, 184, 0.2);
  color: #cbd5e1;
}

.read-only-banner {
  background: rgba(234, 179, 8, 0.15);
  border: 1px solid rgba(234, 179, 8, 0.4);
  color: #fef08a;
  padding: 12px 16px;
  border-radius: 8px;
  font-size: 0.88rem;
  margin-bottom: 20px;
}

.read-only-banner.is-hidden {
  display: none;
}

/* COMPOSER CARD */
.composer-card {
  background: rgba(30, 41, 59, 0.7);
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: 12px;
  padding: 16px;
  margin-bottom: 24px;
}

.composer-card.is-disabled {
  opacity: 0.5;
  pointer-events: none;
}

.composer-textarea {
  width: 100%;
  background: rgba(15, 23, 42, 0.8);
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: 8px;
  padding: 12px;
  color: #f8fafc;
  font-family: inherit;
  font-size: 0.95rem;
  resize: vertical;
  outline: none;
  transition: border-color 0.15s ease;
}

.composer-textarea:focus {
  border-color: #10b981;
}

.composer-footer {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-top: 12px;
}

.char-counter {
  font-size: 0.8rem;
  color: #64748b;
}

/* FEED CARDS */
.feed-posts-list {
  display: flex;
  flex-direction: column;
  gap: 16px;
}

.post-card {
  background: rgba(30, 41, 59, 0.6);
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: 12px;
  padding: 16px 20px;
  position: relative;
}

.post-card.pinned-post {
  border-color: rgba(16, 185, 129, 0.4);
  background: linear-gradient(180deg, rgba(16, 185, 129, 0.04), rgba(30, 41, 59, 0.6));
}

.post-card.tombstone-post {
  opacity: 0.6;
  font-style: italic;
}

.pinned-badge {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  font-size: 0.75rem;
  font-weight: 700;
  color: #10b981;
  margin-bottom: 8px;
}

.post-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 10px;
}

.author-info {
  display: flex;
  align-items: center;
  gap: 8px;
}

.author-name {
  font-weight: 600;
  color: #f1f5f9;
  font-size: 0.95rem;
}

.author-role-badge {
  font-size: 0.7rem;
  font-weight: 700;
  padding: 2px 6px;
  border-radius: 4px;
  text-transform: uppercase;
}

.author-role-badge.teacher {
  background: rgba(59, 130, 246, 0.2);
  color: #60a5fa;
}

.author-role-badge.admin {
  background: rgba(236, 72, 153, 0.2);
  color: #f472b6;
}

.post-time {
  font-size: 0.78rem;
  color: #64748b;
}

.post-content {
  color: #e2e8f0;
  font-size: 0.95rem;
  line-height: 1.5;
  white-space: pre-wrap;
  word-break: break-word;
  margin-bottom: 14px;
}

/* ACTIONS BAR */
.post-actions-bar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding-top: 10px;
  border-top: 1px solid rgba(255, 255, 255, 0.05);
}

.reactions-group {
  display: flex;
  align-items: center;
  gap: 6px;
}

.reaction-btn {
  background: rgba(255, 255, 255, 0.05);
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: 999px;
  padding: 4px 10px;
  font-size: 0.85rem;
  color: #cbd5e1;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  gap: 4px;
  transition: all 0.15s ease;
}

.reaction-btn:hover {
  background: rgba(255, 255, 255, 0.1);
}

.reaction-btn.reacted {
  background: rgba(16, 185, 129, 0.2);
  border-color: rgba(16, 185, 129, 0.5);
  color: #34d399;
}

.post-controls {
  display: flex;
  align-items: center;
  gap: 10px;
}

.action-link-btn {
  background: none;
  border: none;
  color: #94a3b8;
  font-size: 0.8rem;
  cursor: pointer;
  padding: 4px 8px;
  border-radius: 4px;
  transition: color 0.15s ease;
}

.action-link-btn:hover {
  color: #f1f5f9;
  background: rgba(255, 255, 255, 0.05);
}

.action-link-btn.delete-link:hover {
  color: #f87171;
}

/* REPLIES SECTION */
.replies-section {
  margin-top: 12px;
  padding-top: 12px;
  border-top: 1px solid rgba(255, 255, 255, 0.05);
  background: rgba(15, 23, 42, 0.4);
  border-radius: 8px;
  padding: 12px;
}

.replies-list {
  display: flex;
  flex-direction: column;
  gap: 10px;
  margin-bottom: 12px;
}

.reply-card {
  background: rgba(30, 41, 59, 0.5);
  border-radius: 6px;
  padding: 8px 12px;
}

.reply-card.tombstone-reply {
  font-style: italic;
  opacity: 0.6;
}

.reply-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 4px;
}

.reply-content {
  font-size: 0.88rem;
  color: #cbd5e1;
  white-space: pre-wrap;
}

.reply-composer {
  display: flex;
  gap: 8px;
  margin-top: 8px;
}

.reply-input {
  flex: 1;
  background: rgba(15, 23, 42, 0.8);
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: 6px;
  padding: 8px 12px;
  color: #fff;
  font-size: 0.85rem;
}

/* RESPONSIVE */
@media (max-width: 768px) {
  .community-layout-container {
    flex-direction: column;
    padding: 12px;
  }

  .community-sidebar-rail {
    width: 100%;
  }
}
