/* Next-step suggestion chips for a young tree (#427) — see js/next-steps.js.

   Lives in the `.tree-banners` guidance slot (top-centre, under the toolbar),
   the established home for tree-level guidance ("an import is waiting"), so
   it stacks under any live banner instead of fighting the FAB stack and the
   zoom cluster for the bottom edge — on a 375px phone both bottom corners
   are already spoken for. A soft surface card with pill chips: sage for the
   parent/child (life) chips, union rose for the partner chip, matching the
   chronicle kind palette. */

.next-steps {
  /* The banners column stretches children by default — hug content instead. */
  align-self: center;
  max-width: 100%;
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: center;
  gap: var(--space-xs);
  padding: var(--space-xs) var(--space-sm);
  background-color: var(--color-surface-elevated);
  border: 1px solid var(--color-border);
  border-radius: var(--radius-xl);
  box-shadow: var(--shadow-md);
}

/* Entrance only on a fresh appearance (js adds the class), not on every
   re-render — mv-rise-in comes from layout.css's shared motion set. */
@media (prefers-reduced-motion: no-preference) {
  .next-steps--enter {
    animation: mv-rise-in 480ms var(--ease-out-soft) backwards;
  }
}

.next-steps__label {
  font-family: var(--font-serif);
  font-style: italic;
  font-size: var(--font-size-sm);
  color: var(--color-text-muted);
  margin-right: var(--space-xxs);
  white-space: nowrap;
}

.next-steps__chip {
  display: inline-flex;
  align-items: center;
  gap: var(--space-xxs);
  padding: var(--space-xxs) var(--space-sm) var(--space-xxs) var(--space-xs);
  border-radius: var(--radius-pill);
  font-size: var(--font-size-sm);
  font-weight: var(--font-weight-medium);
  cursor: pointer;
  transition:
    background-color var(--transition-fast),
    border-color var(--transition-fast),
    transform var(--transition-fast),
    box-shadow var(--transition-fast);
}

.next-steps__chip:hover {
  transform: translateY(-1px);
  box-shadow: var(--shadow-sm);
}

.next-steps__chip:active {
  transform: translateY(0) scale(0.97);
}

.next-steps__chip:focus-visible {
  outline: 2px solid var(--color-accent);
  outline-offset: 2px;
}

/* Life (parent/child) chips — the brand sage; text on the soft wash uses the
   deep accent stop for contrast (UI/UX RULE 6). */
.next-steps__chip--life {
  background-color: var(--color-accent-soft);
  border: 1px solid var(--color-accent);
  color: var(--color-accent-deep);
}

.next-steps__chip--life:hover {
  background-color: var(--color-surface);
  border-color: var(--color-accent-hover);
}

/* Union (partner) chip — the chronicle's soft rose. */
.next-steps__chip--union {
  background-color: var(--color-union-soft);
  border: 1px solid var(--color-union);
  color: var(--color-union);
}

.next-steps__chip--union:hover {
  background-color: var(--color-surface);
}

.next-steps__chip--union:focus-visible {
  outline-color: var(--color-union);
}

.next-steps__plus {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 16px;
  height: 16px;
  border-radius: 50%;
  background-color: var(--color-surface);
  font-weight: var(--font-weight-bold);
  line-height: 1;
  flex-shrink: 0;
}

.next-steps__chip-text {
  white-space: nowrap;
  max-width: 24ch;
  overflow: hidden;
  text-overflow: ellipsis;
}

.next-steps__dismiss {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 28px;
  height: 28px;
  padding: 0;
  margin-left: var(--space-xxs);
  background: transparent;
  border: none;
  border-radius: 50%;
  color: var(--color-text-faint);
  font-size: var(--font-size-md);
  line-height: 1;
  cursor: pointer;
  transition: background-color var(--transition-fast), color var(--transition-fast);
}

.next-steps__dismiss:hover {
  background-color: var(--color-surface-alt);
  color: var(--color-text);
}

.next-steps__dismiss:focus-visible {
  outline: 2px solid var(--color-accent);
  outline-offset: 2px;
}

/* Touch targets ≥ 44px on coarse pointers (UI/UX RULE 2 / MOBILE PARITY). */
@media (hover: none) and (pointer: coarse) {
  .next-steps__chip {
    min-height: var(--touch-target-min);
    padding: var(--space-xs) var(--space-md) var(--space-xs) var(--space-sm);
  }
  .next-steps__dismiss {
    width: var(--touch-target-min);
    height: var(--touch-target-min);
  }
}

@media (prefers-reduced-motion: reduce) {
  .next-steps__chip,
  .next-steps__dismiss {
    transition: none;
  }
}
