/*
 * Avatar (DSC-016) — geconsumeerd door DesignSystemHelper#avatar_tag.
 * Rond, gecentreerde initialen (font-weight 700), duotone-fallback:
 * .avatar--brand = Young Orange met Almost Black-initialen,
 * .avatar--ink   = Almost Black met Kinda White-initialen.
 * Maten uit de spec (11.8): xs 24 / sm 32 / md 40 / xl 96.
 */

.avatar {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border-radius: 9999px;
  overflow: hidden;
  flex-shrink: 0;
  font-weight: 700;
  line-height: 1;
  letter-spacing: 0.01em;
  user-select: none;
  /* foto-variant is een <img>; vult de cirkel zonder vervorming */
  object-fit: cover;
}

/* Foto in de kleur-eerst-wrapper (avatar_tag + avatar_controller.js): vult de
   cirkel en fadet in zodra geladen; tot die tijd toont de wrapper de
   gemiddelde fotokleur (of duotone-fallback). */
.avatar-foto {
  width: 100%;
  height: 100%;
  object-fit: cover;
  opacity: 0;
  transition: opacity 200ms ease-out;
}

.avatar-foto.is-geladen {
  opacity: 1;
}

@media (prefers-reduced-motion: reduce) {
  .avatar-foto {
    transition: none;
  }
}

.avatar--brand {
  background: var(--color-brand);
  color: var(--color-black);
}

.avatar--ink {
  background: var(--color-black);
  color: var(--color-offwhite);
}

.avatar--xs {
  width: 24px;
  height: 24px;
  font-size: 10px;
}

.avatar--sm {
  width: 32px;
  height: 32px;
  font-size: 12px;
}

.avatar--md {
  width: 40px;
  height: 40px;
  font-size: 14px;
}

.avatar--xl {
  width: 96px;
  height: 96px;
  font-size: 32px;
}
