/* Status badge (label/s). Only for the status of an event. */
@layer components {
  .badge {
    display: inline-flex;
    align-items: center;
    padding: var(--space-4) var(--space-8);
    border: var(--border-width-thin) solid transparent;
    border-radius: var(--radius-xs);
    background-color: var(--color-status-booked);
    color: var(--color-text-inverse);
    font-family: var(--font-family-base), system-ui, sans-serif;
    font-weight: var(--font-weight-bold);
    font-size: var(--type-label-s-size);
    line-height: var(--type-label-s-line-height);
    white-space: nowrap;
  }

  .badge--booked {
    background-color: var(--color-status-booked);
  }

  .badge--cancelled {
    background-color: var(--color-status-cancelled);
  }

  /* Neutral: registration closed, closed event. Not a warning, so no status colour. */
  .badge--closed,
  .badge--open,
  .badge--private,
  .badge--past {
    background-color: var(--color-background-muted);
    border-color: var(--color-border-strong);
    color: var(--color-text-default);
  }

  /* "Hat stattgefunden · Sa, 21.11.2026" is longer than a status word: it may wrap on narrow screens. */
  .badge--past {
    white-space: normal;
    text-wrap: balance;
  }
}
