/* =====================================================================
 * Shared empty states + skeleton loaders.
 * Used by the Alerts feed, Watchlist widgets (cockpit + grid), Journal
 * recap drop zone, and anywhere else a pane has no data yet.
 * Helper: emptyStateHTML({ glyph, title, copy, action, compact })
 *   in app/js/shared/empty-state.js
 * ===================================================================== */
.empty-state {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  text-align: center;
  padding: 32px 24px;
  gap: 10px;
  color: var(--text-muted);
  min-height: 200px;
}

.empty-state-glyph {
  width: 44px;
  height: 44px;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 50%;
  background: var(--chip-grad);
  color: var(--chip-ink);
  font-size: 20px;
  font-weight: 700;
  font-family: var(--font-mono);
  letter-spacing: -0.04em;
}

.empty-state-title {
  font-size: var(--text-md);
  font-weight: 700;
  color: var(--text-primary);
  letter-spacing: -0.01em;
  margin-top: 2px;
}

.empty-state-copy {
  font-size: var(--text-sm);
  color: var(--text-secondary);
  line-height: 1.55;
  max-width: 320px;
}

.empty-state-action {
  margin-top: 6px;
  background: var(--accent);
  border: 1px solid var(--accent-border);
  color: var(--text-on-accent);
  padding: 8px 14px;
  border-radius: 10px;
  font-family: var(--font-body);
  font-size: var(--text-sm);
  font-weight: 600;
  cursor: pointer;
  transition: background 140ms var(--ease), border-color 140ms var(--ease);
}

.empty-state-action:hover {
  background: var(--accent-hover);
}

/* Compact variant for sidebar widgets / small panes */
.empty-state.is-compact {
  min-height: 72px;
  padding: 14px 12px;
  gap: 6px;
}

.empty-state.is-compact .empty-state-glyph {
  width: 30px;
  height: 30px;
  font-size: 14px;
}

.empty-state.is-compact .empty-state-title {
  font-size: var(--text-sm);
}

.empty-state.is-compact .empty-state-copy {
  font-size: var(--text-xs);
  max-width: 220px;
}

/* === Skeleton loaders ===
 * Use .skeleton on any block to get the pulsing placeholder.
 * Combine with .skeleton-line / .skeleton-card for common shapes. */
.skeleton {
  display: block;
  background: var(--skeleton);
  border-radius:var(--radius-sm);
  position: relative;
  overflow: hidden;
}

.skeleton::after {
  content: '';
  position: absolute;
  inset: 0;
  background: linear-gradient(
    90deg,
    transparent 0%,
    var(--skeleton-sweep) 50%,
    transparent 100%
  );
  transform: translateX(-100%);
  animation: skeleton-shimmer 1.4s ease-in-out infinite;
}

@keyframes skeleton-shimmer {
  to { transform: translateX(100%); }
}

.skeleton-line {
  height: 12px;
  margin-bottom: 8px;
}

.skeleton-line.is-short  { width: 40%; }
.skeleton-line.is-medium { width: 70%; }
.skeleton-line.is-long   { width: 100%; }

.skeleton-card {
  height: 80px;
  margin-bottom: 12px;
}

.skeleton-row {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 12px 0;
}

.skeleton-row .skeleton-circle {
  width: 32px;
  height: 32px;
  border-radius: 50%;
  flex-shrink: 0;
}

.skeleton-row .skeleton-line {
  flex: 1;
  margin-bottom: 0;
}

@media (prefers-reduced-motion: reduce) {
  .skeleton::after { animation: none; }
}

.recap-platform-badge {
  display: none;
  margin-top: 8px;
  padding: 4px 12px;
  background: var(--blue-bg);
  border-radius: 20px;
  font-size: var(--text-sm);
  font-weight: 700;
  color: var(--blue);
}

/* === Theme Toggle Button === */
/* === Ticker Link === */

/* === Symbol Badges === */
.symbol-badge {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}

.symbol-badge__stack {
  display: inline-flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  line-height: 1;
}

.symbol-badge__mark {
  font-family: var(--font-body);
  font-weight: 800;
  letter-spacing: -0.05em;
}

.symbol-badge__sub {
  margin-top: 2px;
  font-family: var(--font-mono);
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  opacity: 0.74;
}

.symbol-badge--xs .symbol-badge__mark {
  font-size: var(--text-micro);
}

.symbol-badge--xs .symbol-badge__sub {
  font-size: 6px;
}

.symbol-badge--sm .symbol-badge__mark {
  font-size: var(--text-xs);
}

.symbol-badge--sm .symbol-badge__sub {
  font-size: 6px;
}

.symbol-badge--md .symbol-badge__mark {
  font-size: var(--text-md);
}

.symbol-badge--md .symbol-badge__sub {
  font-size: 7px;
}

.symbol-badge--company .symbol-badge__mark {
  text-transform: uppercase;
}

.symbol-badge__asset-wrap {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 100%;
  height: 100%;
  border-radius: inherit;
  overflow: hidden;
  border: 1px solid var(--border);
  box-shadow: var(--shadow-sm);
}

.symbol-badge--xs .symbol-badge__asset-wrap {
  width: 24px;
  height: 24px;
  border-radius: 9px;
}

.symbol-badge--sm .symbol-badge__asset-wrap {
  width: 30px;
  height: 30px;
  border-radius: 10px;
}

.symbol-badge--md .symbol-badge__asset-wrap {
  width: 38px;
  height: 38px;
  border-radius:var(--radius-md);
}

.symbol-badge__asset-image {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: contain;
}

/* ── Mono ticker chip (the fallback) ──
   Replaces the auto-generated colored gradient + letter mark for any
   ticker without a curated SVG. Hairline border, mono ticker, no
   gradients — reads as "data" not "branding". */
.symbol-badge--mono {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border: 1px solid var(--border2);
  background: var(--wash);
  border-radius:var(--radius-sm);
  padding: 0 6px;
  min-width: 38px;
  font-family: var(--font-mono);
  font-variant-numeric: tabular-nums;
  letter-spacing: 0.02em;
  color: var(--text-primary);
  white-space: nowrap;
  line-height: 1;
}
.symbol-badge--mono.symbol-badge--sm { height: 26px; font-size: 11px; }
.symbol-badge--mono.symbol-badge--md { height: 32px; font-size: 12.5px; padding: 0 8px; }
.symbol-badge--mono.symbol-badge--lg { height: 40px; font-size: 14px; padding: 0 10px; }
.symbol-badge--mono .symbol-badge__mono-text { font-weight: 700; }

.symbol-badge--fund .symbol-badge__mark,
.symbol-badge--index .symbol-badge__mark {
  font-family: var(--font-mono);
  text-transform: uppercase;
}

/* === Figures: tabular with tight tracking === */
.rv-stat-value,
.last-updated,
.alert-banner-time,
.alert-modal-time {
  font-variant-numeric: tabular-nums;
  letter-spacing: -0.02em;
}

/* === Positive/Negative Badge Utilities === */
.badge-up { background: var(--green-bg); color: var(--green); padding: 3px 8px; border-radius:var(--radius-pill); font-size: var(--text-sm); font-weight: 700; font-family: var(--font-mono); font-variant-numeric: tabular-nums; letter-spacing: -0.01em; }
.badge-down { background: var(--red-bg); color: var(--red); padding: 3px 8px; border-radius:var(--radius-pill); font-size: var(--text-sm); font-weight: 700; font-family: var(--font-mono); font-variant-numeric: tabular-nums; letter-spacing: -0.01em; }

/* === Button Polish — Primary Gradient === */
.refresh-btn.btn-primary-action,
button.btn-primary-action {
  background: var(--accent);
  color: var(--text-on-accent);
  border: 1px solid var(--accent-border);
  box-shadow: var(--shadow-btn-primary);
  transition: box-shadow 0.2s, transform 0.15s;
}
.refresh-btn.btn-primary-action:hover,
button.btn-primary-action:hover {
  background: var(--accent-hover);
  box-shadow: var(--shadow-btn-primary);
  transform: translateY(-1px);
}

/* === Large Number Display Component === */
.fey-metric {
  display: flex;
  flex-direction: column;
  gap: 2px;
}
.fey-metric-change.up { color: var(--green); }
.fey-metric-change.down { color: var(--red); }
.fey-metric-change.flat { color: var(--text-muted); }

/* === Status Dot Component ===
 * The one status indicator.
 *   <span class="fey-dot up"></span>
 * State modifiers: up / down / neutral / live / stale / cold.
 * Size modifier: .is-sm (6px) for inline use; default is 8px. */
.fey-dot {
  display: inline-block;
  width: 8px;
  height: 8px;
  border-radius: 50%;
  flex-shrink: 0;
}
.fey-dot.is-sm { width: 6px; height: 6px; }
.fey-dot.up      { background: var(--green); box-shadow: 0 0 0 1px var(--green-bg); }
.fey-dot.down    { background: var(--red);   box-shadow: 0 0 0 1px var(--red-bg); }
.fey-dot.neutral { background: var(--amber); box-shadow: 0 0 0 1px var(--amber-bg); }
.fey-dot.live    { background: var(--green); animation: fey-pulse 2s infinite; }

/* New: data freshness indicators — wire these where applicable. */
.fey-dot.stale   { background: var(--amber); }
.fey-dot.cold    { background: var(--text-faint); }

/* ==================== Skeleton loading ====================
   Shimmering placeholders shaped like the incoming content — loading is
   choreographed, never announced. Usage: <div class="mac-skel" style="
   height/width sized like the content"></div>. */
.mac-skel {
  position: relative;
  overflow: hidden;
  background: var(--skeleton);
  border-radius:var(--radius-sm);
}
.mac-skel::after {
  content: "";
  position: absolute;
  inset: 0;
  transform: translateX(-100%);
  background: linear-gradient(90deg, transparent, var(--skeleton-sweep), transparent);
  animation: mac-skel-sweep 1.4s ease-in-out infinite;
}
@keyframes mac-skel-sweep { to { transform: translateX(100%); } }
@media (prefers-reduced-motion: reduce) { .mac-skel::after { animation: none; } }
