/* Animation master - Avatar hover */

/*
  Usage:
    <div class="t-avatar-hover">
      <span class="t-avatar-hover-item">A</span>
      <span class="t-avatar-hover-item">B</span>
    </div>

  Set `--avatar-hover-shift` and `--avatar-hover-active-scale`
  on each item to create the grouped hover lift.
*/

:root {
  --avatar-hover-lift: -4px;
  --avatar-hover-dur: 320ms;
  --avatar-hover-ease-in: cubic-bezier(0.22, 1, 0.36, 1);
  --avatar-hover-ease-out: cubic-bezier(0.34, 3.85, 0.64, 1);
  --avatar-hover-scale: 1.05;
  --avatar-hover-falloff: 0.45;
}

.t-avatar-hover {
  display: flex;
  align-items: center;
}

.t-avatar-hover-item {
  width: 32px;
  height: 32px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  margin-right: -8px;
  border: 1.5px solid #f9f9f9;
  border-radius: 50%;
  background: var(--avatar-color, #d9d9d9);
  color: rgba(0, 0, 0, 0.68);
  cursor: pointer;
  font-size: 12px;
  font-weight: 650;
  overflow: hidden;
  position: relative;
  transform:
    translateY(var(--avatar-hover-shift, 0px))
    scale(var(--avatar-hover-active-scale, 1));
  transform-origin: center;
  transition: transform var(--avatar-hover-dur) var(--avatar-hover-ease-in);
  will-change: transform;
}

.t-avatar-hover-item:last-child {
  margin-right: 0;
}

.t-avatar-hover-more {
  background: color-mix(in srgb, #f9f9f9 80%, #000 20%);
  color: #0d0d0d;
  cursor: default;
}

@media (prefers-reduced-motion: reduce) {
  .t-avatar-hover-item {
    transition: none !important;
  }
}
