.e2-user-picture-container {
  display: inline-block;
  position: relative;
  border-radius: 50%;
  width: 40px;
  height: 40px;

  &_large {
    width: 120px;
    height: 120px;
  }
  &_uploading,
  &_deleting {
    pointer-events: none;
  }
}

.e2-user-picture-inner {
  position: absolute;
  top: 0;
  bottom: 0;
  left: 0;
  right: 0;
}
.e2-external-drop-target-dragover .e2-user-picture-inner {
  opacity: .4;
}

.e2-user-picture-image,
.e2-user-picture-placeholder {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  border-radius: 50%;
  transition: opacity .25s ease-out, transform .25s ease-out;
}

.e2-user-picture-image {
  opacity: 1;
  transform: scale(1) rotate(0);
}
.e2-user-picture-container_deleting .e2-user-picture-image {
  opacity: 0.4;
}
.e2-user-picture-container_empty .e2-user-picture-image,
.e2-user-picture-container_uploading .e2-user-picture-image,
.e2-user-picture-container_deleted .e2-user-picture-image {
  opacity: 0.4;
  transform: scale(0.001) rotate(90deg);
}

.e2-user-picture-placeholder {
  opacity: 0;
  transform: scale(0.001) rotate(90deg);
}
.e2-user-picture-container_empty .e2-user-picture-placeholder {
  opacity: 1;
  transform: scale(1) rotate(0);
}
.e2-user-picture-container_uploading .e2-user-picture-placeholder,
.e2-user-picture-container_deleting .e2-user-picture-placeholder,
.e2-user-picture-container_deleted .e2-user-picture-placeholder {
  opacity: 0;
  transform: scale(0.001) rotate(90deg);
}

.e2-user-picture-placeholder svg {
  width: 100%;
  height: 100%;
  fill: var(--foregroundColor);
  stroke: var(--foregroundColor);
  transition: fill var(--time) ease-out, stroke var(--time) ease-out;
}

.e2-user-picture-container_large.e2-user-picture-container_empty:hover .e2-user-picture-placeholder svg,
.e2-user-picture-container-link.hover .e2-user-picture-placeholder svg {
  fill: var(--hoverColor);
  stroke: var(--hoverColor);
  transition: none;
}

.e2-user-picture-spinner {
  visibility: hidden;
  position: absolute;
  font-size: 0; // fixes strange position bug
  line-height: 0; // fixes strange position bug
  left: 50%;
  top: 50%;
  width: 16px;
  height: 16px;
  margin: -8px 0 0 -8px;
}
.e2-user-picture-container_showspinner .e2-user-picture-spinner {
  visibility: visible;
}

.e2-user-picture-inputlabel {
  position: absolute;
  top: 0;
  bottom: 0;
  left: 0;
  right: 0;
  overflow: hidden;
  cursor: pointer;
}
.e2-user-picture-container_uploading .e2-user-picture-inputlabel,
.e2-user-picture-container_deleting .e2-user-picture-inputlabel,
.e2-user-picture-container_deleted .e2-user-picture-inputlabel {
  visibility: hidden;
}
.e2-user-picture-input {
  position: absolute;
  top: 0;
  right: 100%;
  opacity: 0;
  cursor: pointer;
}

.e2-user-picture-remove {
  position: absolute;
  top: 50%;
  left: 100%;
  width: 30px;
  height: 30px;
  margin: -15px 0 0 0;
  font-size: 14px;
  line-height: 30px;
  text-indent: -100em;
  overflow: hidden;
  color: var(--foregroundColor);
  transition: color var(--time) ease-out;
}
.e2-user-picture-remove:hover {
  color: var(--hoverColor);
  transition: none;
}
.e2-user-picture-container_empty .e2-user-picture-remove,
.e2-user-picture-container_uploading .e2-user-picture-remove,
.e2-user-picture-container_deleting .e2-user-picture-remove,
.e2-user-picture-container_deleted .e2-user-picture-remove {
  visibility: hidden;
}