/* ==========================================================================
   Apple Design System - StatusChips Component
   Interactive segmented chip radio group for immediate single-click status transitions.
   Uses system design tokens (--sa-surface, --sa-border, --sa-*-bg, etc.) for seamless
   Light and Dark theme integration.
   ========================================================================== */

.ui-status-chips,
.sa-status-chips {
  display: inline-flex;
  align-items: center;
  gap: 0.3rem;
  background: var(--sa-surface, #f8fafc);
  padding: 3px;
  border-radius: 9999px;
  border: 1px solid var(--sa-border, #cbd5e1);
  box-shadow: inset 0 1px 2px rgba(0, 0, 0, 0.04);
}

.ui-status-chip,
.sa-status-chip {
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
  padding: 0.3rem 0.65rem;
  border-radius: 9999px;
  font-size: 0.75rem;
  font-weight: 500;
  color: var(--sa-text-secondary, #64748b);
  background: transparent;
  border: 1px solid transparent;
  cursor: pointer;
  transition: all 0.18s cubic-bezier(0.16, 1, 0.3, 1);
  user-select: none;
  white-space: nowrap;
  line-height: 1.2;
}

.ui-status-chip:hover:not(.active),
.sa-status-chip:hover:not(.active) {
  background: var(--sa-hover-bg, #f1f5f9);
  color: var(--sa-text, #1d1d1f);
}

.ui-status-chip:active,
.sa-status-chip:active {
  transform: scale(0.96);
}

.ui-status-chip__dot,
.sa-status-chip__dot {
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background-color: currentColor;
  opacity: 0.45;
  flex-shrink: 0;
  transition: opacity 0.18s ease, transform 0.18s ease;
}

/* Active State Base */
.ui-status-chip.active,
.sa-status-chip.active {
  font-weight: 600;
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.08);
}

.ui-status-chip.active .ui-status-chip__dot,
.ui-status-chip.active .sa-status-chip__dot,
.sa-status-chip.active .ui-status-chip__dot,
.sa-status-chip.active .sa-status-chip__dot {
  opacity: 1;
  transform: scale(1.15);
}

/* Pending / Novo / Warning (Amber) */
.ui-status-chip--pending.active,
.sa-status-chip--pending.active,
.ui-status-chip--warning.active,
.sa-status-chip--warning.active {
  background: var(--sa-warning-bg, #fffbeb);
  color: var(--sa-warning-text, #92400e);
  border-color: var(--sa-warning-border, #fde68a);
}

/* In Progress / Info / Blue */
.ui-status-chip--in_progress.active,
.sa-status-chip--in_progress.active,
.ui-status-chip--info.active,
.sa-status-chip--info.active,
.ui-status-chip--primary.active,
.sa-status-chip--primary.active {
  background: var(--sa-info-bg, #f0f7ff);
  color: var(--sa-info-text, #0050b3);
  border-color: var(--sa-info-border, #bae0ff);
}

/* Resolved / Success / Emerald */
.ui-status-chip--resolved.active,
.sa-status-chip--resolved.active,
.ui-status-chip--success.active,
.sa-status-chip--success.active {
  background: var(--sa-success-bg, #f0fdf4);
  color: var(--sa-success-text, #15803d);
  border-color: var(--sa-success-border, #bbf7d0);
}

/* Danger / Canceled (Red) */
.ui-status-chip--danger.active,
.sa-status-chip--danger.active,
.ui-status-chip--canceled.active,
.sa-status-chip--canceled.active {
  background: var(--sa-danger-bg, #fef2f2);
  color: var(--sa-danger-text, #b91c1c);
  border-color: var(--sa-danger-border, #fecaca);
}
