/* stocktwits-widgets.css — StockTwits data widgets for lf0.com
 * Uses the theme's existing CSS custom properties (--accent, --ink, --muted, etc.)
 * so the widgets feel native to the site's design system.
 */

/* ── Shared ───────────────────────────────────────────────────────────────── */

[data-st-widget] {
  min-height: 2rem;
}

[data-st-widget]:empty::after {
  content: '';
  display: block;
  height: 80px;
  background: linear-gradient(90deg, var(--hairline-2) 25%, var(--surface-alt) 50%, var(--hairline-2) 75%);
  background-size: 200% 100%;
  animation: st-shimmer 1.4s infinite;
  border-radius: var(--radius-2, 6px);
}

@keyframes st-shimmer {
  0%   { background-position: 200% 0; }
  100% { background-position: -200% 0; }
}

.st-eyebrow {
  font-family: var(--sans);
  font-size: var(--fs-2xs);
  font-weight: 700;
  letter-spacing: var(--tracking-eyebrow);
  text-transform: uppercase;
  color: var(--muted);
}

.st-via,
.st-via-line {
  font-family: var(--sans);
  font-size: var(--fs-2xs);
  color: var(--muted);
}

.st-via-link {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  font-family: var(--sans);
  font-size: var(--fs-2xs);
  color: var(--muted);
  text-decoration: none;
  transition: color 0.15s;
}
.st-via-link:hover { color: var(--accent); }

/* ── "Why Trending" callout ───────────────────────────────────────────────── */

.st-trending-callout {
  border-left: 3px solid var(--accent);
  background: var(--accent-soft);
  padding: 0.85rem 1.1rem;
  border-radius: 0 var(--radius-2, 8px) var(--radius-2, 8px) 0;
  margin: 1.5rem 0;
}

.st-trending-badge {
  display: inline-block;
  font-family: var(--sans);
  font-size: var(--fs-2xs);
  font-weight: 700;
  letter-spacing: var(--tracking-wide);
  text-transform: uppercase;
  color: var(--accent);
  margin-bottom: 0.4rem;
}

.st-trending-summary {
  font-family: var(--sans);
  font-size: var(--fs-sm);
  color: var(--ink-2);
  margin: 0 0 0.4rem;
  line-height: 1.55;
}

/* ── Community Pulse ──────────────────────────────────────────────────────── */

.st-pulse-widget {
  margin: 2rem 0;
  border: 1px solid var(--hairline);
  border-radius: var(--radius-2, 8px);
  overflow: hidden;
  background: var(--surface);
}

.st-pulse-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0.85rem 1.1rem;
  border-bottom: 1px solid var(--hairline);
  background: var(--surface-alt);
}

.st-pulse-cards {
  display: flex;
  flex-direction: column;
  gap: 0;
}

.st-message-card {
  padding: 0.9rem 1.1rem;
  border-bottom: 1px solid var(--hairline-2);
}
.st-message-card:last-child { border-bottom: none; }

.st-msg-head {
  display: flex;
  align-items: center;
  gap: 0.6rem;
  margin-bottom: 0.45rem;
}

.st-avatar {
  width: 30px;
  height: 30px;
  border-radius: 50%;
  flex-shrink: 0;
  background: var(--hairline);
}
.st-avatar-placeholder { background: var(--surface-alt); }

.st-msg-meta {
  display: flex;
  flex-direction: column;
  gap: 1px;
}

.st-username {
  font-family: var(--sans);
  font-size: var(--fs-xs);
  font-weight: 600;
  color: var(--ink);
}

.st-time {
  font-family: var(--sans);
  font-size: var(--fs-2xs);
  color: var(--muted);
}

.st-msg-body {
  font-family: var(--sans);
  font-size: var(--fs-sm);
  color: var(--ink-2);
  line-height: 1.55;
  margin: 0 0 0.35rem;
}

.st-cashtag {
  font-weight: 600;
  color: var(--accent);
}

.st-msg-foot {
  display: flex;
  gap: 0.75rem;
}

.st-likes {
  font-family: var(--sans);
  font-size: var(--fs-2xs);
  color: var(--muted);
}

.st-pulse-footer {
  padding: 0.75rem 1.1rem;
  border-top: 1px solid var(--hairline);
  background: var(--surface-alt);
  text-align: center;
}

.st-pulse-more {
  font-family: var(--sans);
  font-size: var(--fs-xs);
  color: var(--accent);
  text-decoration: none;
  font-weight: 600;
}
.st-pulse-more:hover { text-decoration: underline; }

/* ── Trending Tickers (homepage) ──────────────────────────────────────────── */

.st-trending-widget {
  background: var(--surface);
  border: 1px solid var(--hairline);
  border-radius: var(--radius-2, 8px);
  overflow: hidden;
}

.st-trending-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0.85rem 1.1rem;
  border-bottom: 1px solid var(--hairline);
  background: var(--surface-alt);
}

.st-trending-list {
  list-style: none;
  margin: 0;
  padding: 0;
}

.st-trending-item {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  padding: 0.65rem 1.1rem;
  border-bottom: 1px solid var(--hairline-2);
  transition: background 0.12s;
}
.st-trending-item:last-child { border-bottom: none; }
.st-trending-item:hover { background: var(--surface-alt); }
.st-trending-covered { background: var(--accent-soft); }
.st-trending-covered:hover { background: color-mix(in srgb, var(--accent-soft) 80%, var(--hairline)); }

.st-rank {
  font-family: var(--mono);
  font-size: var(--fs-2xs);
  color: var(--muted);
  width: 1.5rem;
  text-align: right;
  flex-shrink: 0;
}

.st-trending-info {
  flex: 1;
  min-width: 0;
  display: flex;
  flex-direction: column;
  gap: 1px;
}

.st-ticker-sym {
  font-family: var(--mono);
  font-size: var(--fs-sm);
  font-weight: 700;
  color: var(--ink);
}

.st-ticker-name {
  font-family: var(--sans);
  font-size: var(--fs-2xs);
  color: var(--muted);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.st-covered-link {
  font-weight: 600;
  color: var(--accent);
  text-decoration: none;
  margin-left: 0.4rem;
}
.st-covered-link:hover { text-decoration: underline; }

.st-pct {
  font-family: var(--mono);
  font-size: var(--fs-xs);
  font-weight: 600;
  padding: 0.15rem 0.4rem;
  border-radius: var(--radius-1, 4px);
  flex-shrink: 0;
}
.st-pct-up   { color: var(--up);   background: var(--up-bg);   }
.st-pct-down { color: var(--down); background: var(--down-bg); }

/* ── Native Comments ──────────────────────────────────────────────────────── */

.quant-comments-section {
  margin: 2.5rem 0 1rem;
  border-top: 1px solid var(--hairline);
  padding-top: 2rem;
}

.quant-comments-section .comment-respond {
  margin-top: 1.5rem;
}

.quant-comments-section .comment-form label {
  font-family: var(--sans);
  font-size: var(--fs-sm);
  color: var(--muted);
  display: block;
  margin-bottom: 0.3rem;
}

.quant-comments-section .comment-form input[type="text"],
.quant-comments-section .comment-form input[type="email"],
.quant-comments-section .comment-form textarea {
  font-family: var(--sans);
  font-size: var(--fs-sm);
  border: 1px solid var(--hairline);
  border-radius: var(--radius-1, 4px);
  padding: 0.55rem 0.75rem;
  width: 100%;
  background: var(--surface);
  color: var(--ink);
}

.quant-comments-section .comment-form textarea { height: 120px; resize: vertical; }

.quant-comments-section .submit input {
  font-family: var(--sans);
  font-size: var(--fs-sm);
  font-weight: 600;
  background: var(--accent);
  color: #fff;
  border: none;
  padding: 0.55rem 1.25rem;
  border-radius: var(--radius-1, 4px);
  cursor: pointer;
}
.quant-comments-section .submit input:hover { opacity: 0.88; }

.quant-comments-section .comment-list {
  list-style: none;
  margin: 0;
  padding: 0;
}

.quant-comments-section .comment {
  border-bottom: 1px solid var(--hairline-2);
  padding: 1rem 0;
}

.quant-comments-section .comment-author { font-weight: 600; font-size: var(--fs-sm); }
.quant-comments-section .comment-metadata { font-size: var(--fs-2xs); color: var(--muted); margin-bottom: 0.5rem; }
.quant-comments-section .comment-content p { font-size: var(--fs-sm); color: var(--ink-2); line-height: 1.65; }

@media (max-width: 640px) {
  .st-sentiment-cols { grid-template-columns: 1fr; }
  .st-sentiment-divider { display: none; }
  .st-sentiment-col:first-child { margin-bottom: 0.75rem; }
}
