/**
 * SmartSwing AI — Canonical empty-state utility.
 *
 * Replaces "Loading..." placeholders + raw blank panels with friendly,
 * actionable empty states across the app. Every list / table / dashboard
 * tile that can be empty should render an .ss-empty container instead of
 * a spinner-forever or a blank box.
 *
 * Usage:
 *   <div class="ss-empty">
 *     <div class="ss-empty__icon">📊</div>
 *     <h3 class="ss-empty__title">No reports yet</h3>
 *     <p class="ss-empty__body">
 *       Run your first analysis to start seeing trends here.
 *     </p>
 *     <a href="./analyze.html" class="ss-empty__cta">Try a free analysis →</a>
 *   </div>
 *
 * Or for a compact inline empty:
 *   <div class="ss-empty ss-empty--inline">
 *     <p class="ss-empty__body">No matches logged yet.</p>
 *   </div>
 *
 * Tokens: consumes brand-tokens.css `--ss-*` vars when present.
 */

.ss-empty {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  text-align: center;
  gap: 12px;
  padding: 40px 24px;
  border-radius: 16px;
  background: rgba(255, 255, 255, 0.02);
  border: 1px dashed rgba(255, 255, 255, 0.08);
  color: var(--ss-text-muted, rgba(255,255,255,0.55));
  font-family: "DM Sans", -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  min-height: 200px;
}

.ss-empty--inline {
  min-height: 0;
  padding: 20px 16px;
}

.ss-empty__icon {
  font-size: 36px;
  line-height: 1;
  opacity: 0.7;
  margin-bottom: 4px;
}
.ss-empty--inline .ss-empty__icon { font-size: 24px; }

.ss-empty__title {
  font-family: "Sora", "DM Sans", sans-serif;
  font-size: 17px;
  font-weight: 700;
  color: var(--ss-text, #f5f5f7);
  margin: 0;
}

.ss-empty__body {
  font-size: 14px;
  line-height: 1.5;
  color: var(--ss-text-muted, rgba(255,255,255,0.55));
  max-width: 360px;
  margin: 0;
}

.ss-empty__cta {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  margin-top: 8px;
  padding: 10px 18px;
  border-radius: 999px;
  background: var(--ss-volt, #39ff14);
  color: #0a0a0a;
  font-weight: 800;
  font-size: 13px;
  text-decoration: none;
  border: 1px solid rgba(57, 255, 20, 0.35);
  transition: background 160ms ease, transform 160ms ease;
}
.ss-empty__cta:hover,
.ss-empty__cta:focus-visible {
  background: #50ff30;
  transform: translateY(-1px);
}

/* Subtle "loading → empty" handoff: when a parent has data-ss-loading="false"
   and contains an .ss-empty, fade it in. Pages can toggle the attribute when
   their fetch resolves with zero results. */
[data-ss-loading="false"] .ss-empty {
  animation: ss-empty-in 240ms cubic-bezier(0.22, 0.61, 0.36, 1);
}
@keyframes ss-empty-in {
  from { opacity: 0; transform: translateY(4px); }
  to   { opacity: 1; transform: translateY(0); }
}

@media (prefers-reduced-motion: reduce) {
  [data-ss-loading="false"] .ss-empty {
    animation: none;
  }
  .ss-empty__cta { transition: none; }
}
