/*
 * A list with no items: say what is missing and, when there is one, the next step.
 * The action slot takes any button or link; the button component styles it.
 */
@layer components {
  .empty-state {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: var(--space-3);
    padding: var(--space-8) var(--space-4);
    border: var(--border-width) dashed var(--color-border);
    border-radius: var(--radius-lg);
    background: var(--color-surface);
    text-align: center;

    @media (min-width: 37.5em) {
      padding: var(--space-12) var(--space-8);
    }
  }

  /* Decorative: the light brand teal is allowed on icons (docs/DESIGN.md, Tokens). */
  .empty-state__icon {
    inline-size: var(--space-12);
    block-size: var(--space-12);
    color: var(--color-brand);
  }

  .empty-state__title {
    font-size: var(--text-lg);
  }

  .empty-state__text {
    max-inline-size: 48ch;
    color: var(--color-text-muted);
  }

  .empty-state__actions {
    margin-block-start: var(--space-2);
  }

  /* Error: the list did not load. Solid danger edge, icon in the danger color, title names the problem. */
  .empty-state--error {
    border-style: solid;
    border-color: var(--color-danger);
    background: var(--color-danger-tint);

    & .empty-state__icon {
      color: var(--color-danger);
    }

    & .empty-state__title,
    & .empty-state__text {
      color: var(--color-danger-strong);
    }
  }

  /* Compact: inside a card or a table cell. */
  .empty-state--compact {
    gap: var(--space-2);
    padding: var(--space-6) var(--space-4);

    & .empty-state__icon {
      inline-size: var(--space-8);
      block-size: var(--space-8);
    }

    & .empty-state__title {
      font-size: var(--text-base);
    }
  }
}
