/* ══════════════════════════════════════════════════════════════════════
   IW States — empty / error / onboarding / offline
   Canon 2026: explain + action + brand. Visual-no-internals (no ids/traces).
   ══════════════════════════════════════════════════════════════════════ */

/* ── Базовый контейнер состояния ────────────────────────────────────── */
.state {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  text-align: center;
  gap: var(--mob-gap-sm, 12px);
  padding: var(--mob-gap-xl, 40px) var(--mob-gap-md, 20px);
  max-width: 420px;
  margin-inline: auto;
  min-height: 50vh;
}

.state__icon {
  font-size: clamp(40px, 12vw, 64px);
  line-height: 1;
  margin-bottom: 4px;
  filter: drop-shadow(0 0 24px rgba(0, 200, 255, 0.12));
  animation: state-float 4s ease-in-out infinite;
}

@keyframes state-float {
  0%, 100% { transform: translateY(0); }
  50%      { transform: translateY(-6px); }
}

.state__title {
  font-size: var(--type-h3, clamp(17px, 1vw + 13px, 26px));
  font-weight: 700;
  color: var(--sw-text-primary, #f5f8fd);
}

.state__text {
  font-size: var(--type-body, 15px);
  color: var(--sw-text-secondary, #a7b7c7);
  line-height: 1.6;
  max-width: 340px;
}

.state__action {
  margin-top: var(--mob-gap-sm, 12px);
  min-height: 48px;
  padding: 0 24px;
  border-radius: 14px;
  border: none;
  cursor: pointer;
  font-family: inherit;
  font-size: var(--type-body, 15px);
  font-weight: 700;
  background: linear-gradient(135deg, var(--eterna-gold, #f0b34a), #d4952a);
  color: #1a1206;
  display: inline-flex;
  align-items: center;
  gap: 8px;
  box-shadow: 0 4px 20px rgba(240, 179, 74, 0.28);
  transition: transform 140ms ease, box-shadow 180ms ease;
  touch-action: manipulation;
}
.state__action:active { transform: scale(0.96); }

.state__action--ghost {
  background: transparent;
  color: var(--eterna-ai, #00c8ff);
  border: 1px solid var(--sw-border, rgba(170,188,204,0.2));
  box-shadow: none;
}

/* ── EMPTY вариант (нейтральный, приглашающий) ──────────────────────── */
.state--empty .state__icon { filter: drop-shadow(0 0 24px rgba(240, 179, 74, 0.15)); }

/* ── ERROR вариант (человеческий, без traceback) ────────────────────── */
.state--error .state__icon {
  filter: drop-shadow(0 0 24px rgba(232, 64, 64, 0.18));
  animation: none;
}
.state--error .state__title { color: var(--eterna-err, #e84040); }

/* ── OFFLINE вариант ────────────────────────────────────────────────── */
.state--offline .state__icon { opacity: 0.7; animation: none; }

/* ── ONBOARDING подсказка (контекстная, поверх пустого экрана) ──────── */
.onboard-hint {
  position: relative;
  display: flex;
  align-items: flex-start;
  gap: 10px;
  padding: 14px 16px;
  border-radius: 14px;
  background: var(--mob-glass-l2, rgba(18, 26, 39, 0.85));
  border: 1px solid rgba(0, 200, 255, 0.22);
  box-shadow: 0 0 0 1px rgba(0, 200, 255, 0.08), 0 8px 28px rgba(0, 0, 0, 0.3);
  margin: var(--mob-gap-sm, 12px) 0;
}

.onboard-hint__pulse {
  flex-shrink: 0;
  width: 8px; height: 8px;
  margin-top: 6px;
  border-radius: 50%;
  background: var(--eterna-ai, #00c8ff);
  box-shadow: 0 0 0 0 rgba(0, 200, 255, 0.6);
  animation: onboard-pulse 2s ease-out infinite;
}

@keyframes onboard-pulse {
  0%   { box-shadow: 0 0 0 0 rgba(0, 200, 255, 0.5); }
  100% { box-shadow: 0 0 0 12px rgba(0, 200, 255, 0); }
}

.onboard-hint__body { flex: 1; }
.onboard-hint__title { font-size: var(--type-small, 13px); font-weight: 700; color: var(--sw-text-primary, #f5f8fd); margin-bottom: 2px; }
.onboard-hint__text { font-size: var(--type-small, 12px); color: var(--sw-text-secondary, #a7b7c7); line-height: 1.5; }
.onboard-hint__close {
  flex-shrink: 0;
  width: 28px; height: 28px;
  border: none; background: none; cursor: pointer;
  color: var(--sw-text-tertiary, #607888);
  font-size: 16px; border-radius: 8px;
  touch-action: manipulation;
}

/* ── Reduced motion ─────────────────────────────────────────────────── */
@media (prefers-reduced-motion: reduce) {
  .state__icon, .onboard-hint__pulse { animation: none; }
}

/* ── Light theme adjust ─────────────────────────────────────────────── */
html[data-theme="light"] .state__action { color: #fff; }
html[data-theme="light"] .onboard-hint {
  background: rgba(255, 255, 255, 0.96);
  box-shadow: 0 0 0 1px rgba(0, 137, 184, 0.1), 0 8px 28px rgba(15, 23, 42, 0.1);
}
