/* The image and the fallback share one grid cell, and the image is on top. */
[data-slot='avatar'] {
  position: relative;
  display: inline-grid;
  flex-shrink: 0;
  width: 2rem;
  height: 2rem;
  overflow: hidden;
  border-radius: 9999px;

  & > * {
    grid-area: 1 / 1;
  }
}

[data-slot='avatar-image'] {
  z-index: 1;
  width: 100%;
  height: 100%;
  object-fit: cover;
  /* A broken image shows nothing, leaving the fallback. */
  color: transparent;
  font-size: 0;
}

[data-slot='avatar-fallback'] {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 100%;
  height: 100%;
  border-radius: 9999px;
  background: var(--muted);
  font-size: 0.875rem;
}
