.profile-avatar {
  position: absolute;
  top: 0;
  left: 50%;
  transform: translateX(-50%);
  z-index: 1;
}

.profile-avatar__form {
  margin: 0;
}

.profile-avatar__input {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  border: 0;
}

.profile-avatar__slot {
  position: relative;
  display: flex;
  align-items: center;
  justify-content: center;
  width: 5rem;
  height: 5rem;
  padding: 0;
  border: 0;
  border-radius: var(--radius-full);
  background: transparent;
  cursor: pointer;
  overflow: hidden;
  font: inherit;
  color: inherit;
  box-shadow: 0 0 0 4px var(--color-white), var(--shadow-md);
  transition: transform var(--transition-fast);
}

.profile-avatar__slot:focus-visible {
  outline: 2px solid var(--color-primary-900);
  outline-offset: 4px;
}

.profile-avatar__slot--empty {
  background: var(--color-spring-wood-400);
}

.profile-avatar__slot--empty:hover {
  background: var(--color-spring-wood-500);
}

.profile-avatar__initial {
  color: var(--color-primary-800);
  font-weight: 600;
  font-size: 2rem;
  line-height: 1;
}

.profile-avatar__image {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

.profile-avatar__overlay {
  position: absolute;
  inset: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  background: rgb(0 0 0 / 0.55);
  color: var(--color-white);
  font-size: 1.25rem;
  line-height: 1;
  opacity: 0;
  transition: opacity var(--transition-fast);
  pointer-events: none;
}

@media (hover: hover) {
  .profile-avatar__slot:hover .profile-avatar__overlay,
  .profile-avatar__slot:focus-visible .profile-avatar__overlay {
    opacity: 1;
  }
}

.profile-avatar__menu {
  left: 50%;
  right: auto;
  transform-origin: top center;
  transform: translateX(-50%) scale(0.95);
}

.profile-avatar__menu.dropdown__menu--open {
  transform: translateX(-50%) scale(1);
}

.profile-avatar__menu-form {
  margin: 0;
}

.profile-avatar__menu-item {
  display: flex;
  align-items: center;
  cursor: pointer;
}
