.alert {
  display: grid;
  position: relative;
  align-items: flex-start;
  justify-content: start;
  width: 100%;
  padding: calc(var(--spacing) * 3) calc(var(--spacing) * 4);
  border: 1px solid var(--color-border);
  border-radius: var(--radius-lg);
  background-color: var(--color-card);
  font-size: var(--text-sm);
  line-height: var(--text-sm--line-height);
  row-gap: calc(var(--spacing) * 0.5);

  .alert-title {
    grid-column-start: 2;
    min-height: calc(var(--spacing) * 4);
    overflow: hidden;
    font-weight: var(--font-weight-medium);
    letter-spacing: var(--tracking-tight);
    text-overflow: ellipsis;
    white-space: nowrap;
  }

  .alert-description {
    display: grid;
    grid-column-start: 2;
    color: var(--color-muted-foreground);
    justify-items: start;
    gap: calc(var(--spacing) * 4);
  }

  /* Variant */
  &[data-variant="default"] {
    color: var(--color-card-foreground);
  }

  &[data-variant="destructive"] {
    color: var(--color-destructive);

    .alert-description {
      color: color-mix(in oklab, currentcolor 90%, transparent);
    }
  }

  /* Icon */
  & > svg {
    width: calc(var(--spacing) * 4);
    height: calc(var(--spacing) * 4);
    transform: translateY(calc(var(--spacing) * 0.5));
  }

  &:has(> svg) {
    grid-template-columns: calc(var(--spacing) * 4) 1fr;
    column-gap: calc(var(--spacing) * 3);
  }
}
