/* ═══════════════════════════════════════════════════════
   POND FORUM — Forum-Specific Styles
   ═══════════════════════════════════════════════════════ */

/* ── Category Grid (Forum Index) ─────────────────────── */
.pond-category-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: var(--space-md);
}

@media (max-width: 768px) {
  .pond-category-grid {
    grid-template-columns: 1fr;
  }
}

.pond-category-card {
  background: var(--pond-white);
  border-radius: var(--radius-lg);
  border: 1px solid var(--pond-cloud);
  padding: var(--space-lg);
  cursor: pointer;
  transition: all var(--transition-normal);
  text-decoration: none;
  display: block;
}

.pond-category-card:hover {
  box-shadow: var(--shadow-md);
}

.pond-category-card__header {
  display: flex;
  align-items: flex-start;
  gap: var(--space-md);
  margin-bottom: var(--space-sm);
}

.pond-category-card__icon {
  font-size: 1.375rem;
  width: 40px;
  height: 40px;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: var(--radius-md);
  flex-shrink: 0;
}

.pond-category-card__name {
  font-size: 0.9375rem;
  font-weight: 700;
  color: var(--pond-ink);
  font-family: var(--font-display);
}

.pond-category-card__desc {
  font-size: 0.6875rem;
  color: var(--pond-mist);
  margin-top: 1px;
}

/* Category Stats */
.pond-category-card__stats {
  display: flex;
  gap: var(--space-lg);
  padding: var(--space-sm) 0;
  margin-top: var(--space-xs);
  border-top: 1px solid var(--pond-frost);
  font-size: 0.6875rem;
  color: var(--pond-slate);
}

.pond-category-card__stat-value {
  color: var(--pond-ink);
  font-family: var(--font-mono);
  font-weight: 600;
  font-size: 0.75rem;
}

/* Latest Activity Preview */
.pond-category-card__latest {
  display: flex;
  align-items: center;
  gap: var(--space-sm);
  margin-top: var(--space-sm);
  padding: var(--space-sm) var(--space-sm);
  background: var(--pond-frost);
  border-radius: var(--radius-md);
  font-size: 0.75rem;
}

.pond-category-card__latest-dot {
  width: 4px;
  height: 4px;
  border-radius: 50%;
  background: var(--pond-agree);
  flex-shrink: 0;
}

.pond-category-card__latest-title {
  color: var(--pond-green-mid);
  font-weight: 500;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  flex: 1;
}

.pond-category-card__latest-time {
  color: var(--pond-mist);
  font-size: 0.625rem;
  white-space: nowrap;
}

/* Sub-categories */
.pond-category-card__subs {
  display: flex;
  gap: var(--space-xs);
  margin-top: var(--space-sm);
  flex-wrap: wrap;
}

/* ── Topic List ──────────────────────────────────────── */
.pond-topic-list__controls {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: var(--space-lg);
  padding-bottom: var(--space-md);
  border-bottom: 1px solid var(--pond-cloud);
}

.pond-topic-list__items {
  display: flex;
  flex-direction: column;
  gap: var(--space-md);
}

/* ── Topic Card (Content-First Feed Item) ────────────── */
.pond-topic-card {
  background: var(--pond-white);
  border-radius: var(--radius-lg);
  border: 1px solid var(--pond-cloud);
  padding: var(--space-lg);
  cursor: pointer;
  transition: all var(--transition-fast);
  text-decoration: none;
  display: block;
}

.pond-topic-card:hover {
  border-color: rgba(45, 106, 79, 0.25);
  box-shadow: var(--shadow-md);
}

.pond-topic-card--pinned {
  border-left: 3px solid var(--pond-duck);
}

/* Topic card header */
.pond-topic-card__header {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  margin-bottom: var(--space-sm);
}

.pond-topic-card__meta {
  display: flex;
  align-items: center;
  gap: var(--space-sm);
  flex-wrap: wrap;
}

.pond-topic-card__category {
  font-size: 0.6875rem;
  color: var(--pond-mist);
}

.pond-topic-card__category a {
  color: var(--pond-green-mid);
  font-weight: 600;
}

/* Topic card title */
.pond-topic-card__title {
  font-size: 1.0625rem;
  font-weight: 700;
  color: var(--pond-ink);
  font-family: var(--font-display);
  line-height: 1.3;
  margin: 0 0 var(--space-sm) 0;
}

.pond-topic-card__title a {
  color: inherit;
  text-decoration: none;
}

.pond-topic-card__title a:hover {
  color: var(--pond-green-mid);
}

/* Topic card excerpt */
.pond-topic-card__excerpt {
  font-size: 0.8125rem;
  color: var(--pond-slate);
  line-height: 1.55;
  margin-bottom: var(--space-md);
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

/* Topic card footer */
.pond-topic-card__footer {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding-top: var(--space-md);
  border-top: 1px solid var(--pond-frost);
}

/* ── Thread View (Full Topic) ────────────────────────── */
.pond-thread {
  background: var(--pond-white);
  border-radius: var(--radius-xl);
  padding: var(--space-xl);
  border: 1px solid var(--pond-cloud);
  margin-bottom: var(--space-lg);
}

.pond-thread__header-meta {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  margin-bottom: var(--space-md);
}

.pond-thread__header-left {
  display: flex;
  gap: var(--space-sm);
  align-items: center;
  flex-wrap: wrap;
}

.pond-thread__title {
  font-size: 1.5rem;
  font-weight: 800;
  color: var(--pond-ink);
  font-family: var(--font-display);
  line-height: 1.25;
  margin: 0 0 var(--space-sm) 0;
}

.pond-thread__author {
  display: flex;
  align-items: center;
  gap: var(--space-md);
  margin-bottom: var(--space-lg);
}

.pond-thread__body {
  font-size: 0.9375rem;
  color: var(--pond-charcoal);
  line-height: 1.7;
  margin-bottom: var(--space-lg);
}

.pond-thread__body p {
  margin-bottom: var(--space-md);
}

/* ── Comment / Perspective ───────────────────────────── */
.pond-perspectives__header {
  font-size: 0.8125rem;
  font-weight: 700;
  color: var(--pond-ink);
  margin-bottom: var(--space-md);
  display: flex;
  align-items: center;
  gap: var(--space-sm);
}

.pond-perspectives__count {
  font-size: 0.6875rem;
  font-weight: 600;
  padding: 1px var(--space-sm);
  border-radius: 10px;
  background: var(--pond-frost);
  color: var(--pond-slate);
}

.pond-perspectives__list {
  display: flex;
  flex-direction: column;
  gap: var(--space-md);
}

.pond-comment {
  background: var(--pond-white);
  border-radius: var(--radius-lg);
  padding: var(--space-lg);
  border: 1px solid var(--pond-cloud);
  border-left-width: 3px;
}

/* Stance-colored left border */
.pond-comment--agree    { border-left-color: var(--pond-agree); }
.pond-comment--disagree { border-left-color: var(--pond-disagree); }
.pond-comment--perspective { border-left-color: var(--pond-perspective); }

.pond-comment__header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: var(--space-sm);
}

.pond-comment__body {
  font-size: 0.875rem;
  color: var(--pond-charcoal);
  line-height: 1.65;
  margin-bottom: var(--space-md);
}

.pond-comment__footer {
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.pond-comment__subthreads {
  font-size: 0.625rem;
  color: var(--pond-mist);
}

/* Stance tag on comment */
.pond-stance-tag {
  font-size: 0.6875rem;
  font-weight: 600;
  padding: 2px var(--space-sm);
  border-radius: var(--radius-sm);
}

.pond-stance-tag--agree {
  background: var(--pond-agree-bg);
  color: var(--pond-agree);
  border: 1px solid rgba(45, 106, 79, 0.15);
}

.pond-stance-tag--disagree {
  background: var(--pond-disagree-bg);
  color: var(--pond-disagree);
  border: 1px solid rgba(196, 30, 58, 0.15);
}

.pond-stance-tag--perspective {
  background: var(--pond-perspective-bg);
  color: var(--pond-perspective);
  border: 1px solid rgba(212, 160, 23, 0.15);
}

/* ── Reply Form ──────────────────────────────────────── */
.pond-reply-form {
  background: var(--pond-white);
  border-radius: var(--radius-lg);
  border: 1px solid var(--pond-cloud);
  padding: var(--space-lg);
  margin-top: var(--space-lg);
}

.pond-reply-form__stance-select {
  display: flex;
  gap: var(--space-sm);
  margin-bottom: var(--space-md);
}

.pond-reply-form textarea {
  width: 100%;
  min-height: 120px;
  padding: var(--space-md);
  border: 1px solid var(--pond-cloud);
  border-radius: var(--radius-md);
  font-family: var(--font-body);
  font-size: 0.875rem;
  color: var(--pond-ink);
  resize: vertical;
  transition: border-color var(--transition-fast);
}

.pond-reply-form textarea:focus {
  outline: none;
  border-color: var(--pond-green-mid);
  box-shadow: var(--shadow-focus);
}

.pond-reply-form__actions {
  display: flex;
  justify-content: flex-end;
  gap: var(--space-sm);
  margin-top: var(--space-md);
}

/* ── Drupal admin toolbar offset ─────────────────────── */
body.toolbar-fixed .pond-sidebar {
  height: calc(100vh - 79px);
  top: 79px;
}

body.toolbar-fixed .pond-topbar {
  top: 79px;
}

/* ── Drupal messages integration ─────────────────────── */
.messages--status {
  background: var(--pond-green-pale);
  border: 1px solid var(--pond-green-mid);
  border-radius: var(--radius-md);
  padding: var(--space-md) var(--space-lg);
  margin-bottom: var(--space-lg);
  font-size: 0.8125rem;
}

.messages--error {
  background: rgba(196, 30, 58, 0.08);
  border: 1px solid var(--pond-maple);
  border-radius: var(--radius-md);
  padding: var(--space-md) var(--space-lg);
  margin-bottom: var(--space-lg);
  font-size: 0.8125rem;
}

/* ── Loading States ──────────────────────────────────── */
@keyframes pond-pulse {
  0%, 100% { opacity: 1; }
  50% { opacity: 0.5; }
}

.pond-loading {
  animation: pond-pulse 1.5s infinite;
}

.pond-skeleton {
  background: linear-gradient(90deg, var(--pond-frost) 25%, var(--pond-cloud) 50%, var(--pond-frost) 75%);
  background-size: 200% 100%;
  animation: pond-shimmer 1.5s infinite;
  border-radius: var(--radius-sm);
}

@keyframes pond-shimmer {
  0% { background-position: -200% 0; }
  100% { background-position: 200% 0; }
}
