/* ==========================================================================
   Todo list
   Figma source: Table / Todos → Row / Todo Action Required (3462:17831).
   White bordered card; each row 76px: status icon (80px frame) +
   heading 16 / subtext 13 (Footnote metrics: 18px leading, -0.08px
   tracking, rendered in Inter in the product) + trailing state icon.
   Loader spin is PROVISIONAL (no motion spec in Figma); reduced motion
   is handled globally in base.css.
   ========================================================================== */

.todos {
  list-style: none;
  margin: 0;
  padding: 0;
  background: var(--color-surface);
  border: var(--border-width) solid var(--color-border);
  border-radius: var(--radius-md);
}

.todo {
  display: flex;
  align-items: center;
  min-height: 76px;
}

/* Leading status icon and trailing state icon share the same 80px frame */
.todo__icon,
.todo__state {
  flex: none;
  display: flex;
  align-items: center;
  justify-content: center;
  width: 80px;
}

.todo__icon > svg,
.todo__state > svg {
  width: 24px;
  height: 24px;
}

.todo__icon--success { color: var(--color-success); }
.todo__icon--active  { color: var(--color-active); }
.todo__icon--danger  { color: var(--color-danger); }

.todo__state--done    { color: var(--color-text); }
.todo__state--running { color: var(--color-border-strong); }

.todo__body {
  flex: 1;
  min-width: 0;
  padding: var(--space-4) 0;
}

.todo__heading {
  font-size: var(--text-base);
  font-weight: var(--weight-regular);
  line-height: var(--leading-body);
  color: var(--color-text);
  margin-bottom: var(--space-1);
}

.todo__subtext {
  font-size: var(--text-xs);
  line-height: var(--leading-footnote);
  letter-spacing: -0.08px; /* Figma Footnote tracking */
  color: var(--color-text-muted);
}

/* Standalone link-row variant (settings rows on Tax / Settings, 3462:21731):
   the row is its own bordered card, no status icon (20px filler instead),
   trailing arrow. Use as <a class="todo todo--card"> */
.todo--card {
  border: var(--border-width) solid var(--color-border);
  border-radius: var(--radius-md);
  background: var(--color-surface);
  color: inherit;
  text-decoration: none;
  /* These cards are clickable whether they're built as <a> or <button>; a <button> doesn't get the
     pointer for free, so the button-based ones (return actions, etc.) read as dead (Peter, 23 Jul). */
  cursor: pointer;
}

.todo__filler {
  flex: none;
  width: 20px;
}

/* provisional */
.todo--card:hover {
  background: var(--color-bg-subtle-light);
}

/* Upcoming/not-yet-available step (VAT getting started, 3462:19851):
   muted text, lighter circle, no arrow */
.todo--upcoming .todo__heading,
.todo--upcoming .todo__subtext {
  color: var(--color-text-muted);
}

.todo--upcoming .todo__icon {
  color: var(--color-border-strong);
}

/* provisional - spinner for the running state */
.todo__state--running > svg {
  animation: todo-spin 1.6s linear infinite;
}

@keyframes todo-spin {
  to { transform: rotate(360deg); }
}
