/* Status Indicator Compact — Header API status pill (UI v2 density refactor)
 * Replaces the previous "API: подключено" inline text that wrapped to two lines.
 * Requires: tokens.css
 *
 * Usage:
 *   <div class="status-indicator status-indicator--compact" id="api-status" data-tooltip="...">
 *     <span class="dot" aria-hidden="true"></span>
 *     <span class="status-indicator__label">API</span>
 *     <span id="api-status-text" class="sr-only">проверка...</span>
 *   </div>
 *
 * JS continues to set #api-status-text textContent (screen-reader announcement)
 * and toggle dot color via .ok / .error / .warning class on .status-indicator.
 */

.status-indicator--compact {
  display: inline-flex;
  align-items: center;
  gap: var(--space-2);
  padding: 4px 10px;
  border-radius: 999px;
  background: var(--surface-card);
  border: 1px solid var(--border-subtle);
  font-size: var(--font-2xs);
  font-weight: var(--weight-medium);
  color: var(--text-secondary);
  white-space: nowrap;
  line-height: 1;
}

.status-indicator--compact .dot {
  width: 8px;
  height: 8px;
  border-radius: 999px;
  flex-shrink: 0;
  background: var(--text-muted); /* default: проверка */
  transition: background-color 0.15s ease;
}

.status-indicator--compact.ok        .dot,
.status-indicator--compact.connected .dot { background: var(--color-success-500); }
.status-indicator--compact.error     .dot { background: var(--color-error-500);   }
.status-indicator--compact.warning   .dot { background: var(--color-warning-500); }

.status-indicator__label {
  letter-spacing: var(--tracking-eyebrow);
  text-transform: uppercase;
}

/* ── Freshness chip ─────────────────────────────────────────────────────
 * Per-hunter data-recency indicator: "последние данные N назад".
 * Surfaces a silently-dead hunter (process alive, no new messages) at a glance.
 * Tiers align with the backend inflow watchdog (warn ≈120m / crit ≈360m):
 *   .fresh < 120m (green) · .stale 120–360m (amber) · .very-stale ≥360m (red)
 *   .no-data = null last_activity (neutral, "нет данных").
 * Reuses the .status-indicator--compact pill + .dot geometry; label is shown
 * as mixed-case relative time (not the uppercase eyebrow used by other chips).
 * Driven by js/utils/freshness.js (window.HunterFreshness.apply).
 */
.status-indicator--freshness .status-indicator__label,
.status-indicator--freshness {
  text-transform: none;
  letter-spacing: normal;
}
.status-indicator--freshness.fresh      .dot { background: var(--color-success-500); }
.status-indicator--freshness.stale      .dot { background: var(--color-warning-500); }
.status-indicator--freshness.very-stale .dot { background: var(--color-error-500);   }
.status-indicator--freshness.no-data    .dot { background: var(--text-muted);         }
