/* components.css — slice of the former style.css (see also: sibling css/ files) */
.comment-form { margin-bottom: 16px; }
.comment-form textarea { margin-bottom: 8px; }

.comment-list, .comment-children {
  list-style: none;
  padding: 0;
  margin: 0;
}
.comment-children { margin-top: 6px; border-left: 2px solid var(--border); padding-left: 8px; }

.comment {
  padding: 10px 0;
  border-bottom: 1px solid var(--border);
}
.comment:last-child { border-bottom: none; }
.comment-deleted .comment-text { color: var(--muted); font-style: italic; }

.comment-row { display: flex; gap: 12px; align-items: flex-start; }

.vote-col {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 2px;
  flex: 0 0 28px;
}
.vote-btn {
  background: none;
  border: none;
  color: var(--muted);
  padding: 0 4px;
  cursor: pointer;
  font-size: 0.85rem;
  line-height: 1;
}
.vote-btn:hover:not(:disabled) { color: var(--accent); }
.vote-btn:disabled { opacity: 0.3; cursor: default; }
.vote-btn.vote-active.up { color: var(--pos); }
.vote-btn.vote-active.down { color: var(--neg); }
.vote-form { line-height: 0; }
.vote-score { font-size: 0.85rem; font-weight: 700; }

.comment-body { flex: 1; min-width: 0; }
.comment-meta { font-size: 0.82rem; }
.comment-text {
  margin-top: 4px;
  font-size: 0.92rem;
  line-height: 1.45;
  white-space: pre-wrap;
  word-wrap: break-word;
}
.comment-actions { margin-top: 6px; display: flex; gap: 10px; align-items: center; }

.reply-form { margin-top: 8px; }
.reply-form textarea { margin-bottom: 6px; }

.icon {
  display: inline-block;
  vertical-align: -3px;
  flex-shrink: 0;
}
.icon-comment { color: var(--accent); }

.comment-count {
  font-size: 0.85rem;
  color: var(--muted);
  margin-left: 6px;
  display: inline-flex;
  align-items: center;
  gap: 4px;
  text-decoration: none;
  vertical-align: middle;
  line-height: 1;
}
.comment-count .icon-comment { color: var(--accent); transition: color 0.12s; }
.comment-count:hover { color: var(--accent); text-decoration: none; }
.comment-count:hover .icon-comment { color: var(--accent-2); }

.card-summary {
  background: var(--panel-2);
  border: 1px solid var(--border);
  border-radius: 8px;
  padding: 12px 14px;
  margin-bottom: 12px;
}

.close-positions-panel {
  background: var(--panel-2);
  border: 1px solid var(--border);
  border-radius: 8px;
  padding: 10px 14px 6px;
  margin-bottom: 14px;
}
.close-positions-head {
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  margin-bottom: 6px;
}
.close-positions-list {
  list-style: none;
  padding: 0;
  margin: 0;
}
.close-positions-list li {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 10px;
  padding: 8px 0;
  border-top: 1px solid var(--border);
}
.close-positions-list li:first-child { border-top: none; }
.close-positions-meta { display: flex; flex-wrap: wrap; gap: 6px 10px; align-items: center; }
.close-btn { padding: 5px 12px; font-size: 0.85rem; }

.form-divider {
  display: flex;
  align-items: center;
  text-align: center;
  color: var(--muted);
  font-size: 0.85rem;
  margin: 4px 0 14px;
}
.form-divider::before, .form-divider::after {
  content: "";
  flex: 1;
  border-top: 1px solid var(--border);
}
.form-divider span { padding: 0 12px; }
.checkbox-label {
  display: flex;
  align-items: center;
  gap: 8px;
  margin: 10px 0;
}
.checkbox-label input { width: auto; margin-top: 0; }
.kind-pill { text-transform: uppercase; letter-spacing: 0.05em; }
.kind-pill.kind-option { background: rgba(210,168,255,0.18); color: var(--accent-2); }
.kind-pill.kind-future { background: rgba(63,185,80,0.18); color: var(--pos); }

.pnl-pill {
  display: inline-block;
  padding: 2px 9px;
  border-radius: 999px;
  font-size: 0.78rem;
  font-weight: 700;
  letter-spacing: 0.01em;
  font-variant-numeric: tabular-nums;
}
.pnl-pos { background: rgba(63,185,80,0.18); color: var(--pos); }
.pnl-neg { background: rgba(248,81,73,0.18); color: var(--neg); }
.pnl-flat { background: rgba(139,148,158,0.18); color: var(--muted); text-transform: uppercase; font-size: 0.7rem; letter-spacing: 0.06em; }

.filter-pills { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 8px; }

.challenge-card { display: block; margin: 0; text-decoration: none; color: inherit; transition: transform 0.12s, border-color 0.12s; }
.challenge-card:hover { transform: translateY(-2px); border-color: var(--accent); text-decoration: none; }
.challenge-card-dates { font-size: 0.82rem; margin-top: 4px; }
.challenge-card-pill { font-size: 0.72rem; }
.section-empty { margin: 0; }
.card.no-padding .section-empty { padding: 16px 20px; }

.filter-fieldset {
  border: 1px solid var(--border);
  border-radius: 8px;
  padding: 8px 14px 12px;
  margin: 12px 0;
}
.filter-fieldset legend { padding: 0 6px; font-size: 0.82rem; color: var(--muted); text-transform: uppercase; letter-spacing: 0.06em; }

.progress-bar {
  background: var(--panel-2);
  border: 1px solid var(--border);
  border-radius: 999px;
  height: 10px;
  overflow: hidden;
  margin-top: 4px;
}
.progress-bar.small { height: 6px; }
.progress-fill {
  height: 100%;
  background: linear-gradient(90deg, var(--accent), var(--accent-2));
  transition: width 0.3s;
}
.progress-fill.progress-done {
  background: linear-gradient(90deg, var(--pos), #79c97a);
}

.pot-card {
  background: linear-gradient(135deg, rgba(121,192,255,0.06), rgba(210,168,255,0.06));
  border-color: rgba(121,192,255,0.3);
}

.club-list { list-style: none; padding: 0; margin: 0; }
.club-list li { padding: 8px 0; border-bottom: 1px solid var(--border); }
.club-list li:last-child { border-bottom: none; }

.ranked { list-style: none; padding: 0; margin: 0; counter-reset: rank; }
.ranked li {
  display: flex;
  justify-content: space-between;
  padding: 8px 0;
  border-bottom: 1px solid var(--border);
  counter-increment: rank;
}
.ranked li::before {
  content: counter(rank);
  display: inline-block;
  width: 24px;
  color: var(--muted);
  font-weight: 600;
}
.ranked li:last-child { border-bottom: none; }
.ranked li > a { flex: 1; }

.card.no-padding { padding: 0; }
.card-header.padded { padding: 16px 22px; }
.padded { padding: 16px 22px; }
