/* Base component */

.Avatar {
  align-items: center;
  background-color: var(--blue500);
  box-shadow: inset 0 0 0 1px rgba(0,0,0,.05);
  border-radius: 50%;
  color: var(--white);
  display: inline-flex;
  justify-content: center;
  font-weight: 600;
  font-size: 14px;
  text-transform: uppercase;
  position: relative;
  width: var(--spacing-400);
  height: var(--spacing-400);
  user-select: none;
}

/* Sizes */

.Avatar.size1 {
  width: var(--spacing-200);
  height: var(--spacing-200);
  font-size: 8px;
}

.Avatar.size2 {
  width: var(--spacing-300);
  height: var(--spacing-300);
  font-size: 12px;
}

.Avatar.size4 {
  width: var(--spacing-600);
  height: var(--spacing-600);
  font-size: 22px;
  font-weight: 400;
}

.Avatar.size5 {
  width: var(--spacing-700);
  height: var(--spacing-700);
  font-size: 32px;
  font-weight: 400;
}

.Avatar.size6 {
  width: var(--spacing-900);
  height: var(--spacing-900);
  font-size: 50px;
  font-weight: 400;
}

/* Colors */

.Avatar.gray::after,
.Avatar.green::after,
.Avatar.blue::after,
.Avatar.yellow::after,
.Avatar.red::after,
.Avatar.gold::after,
.Avatar.bronze::after {
  position: absolute;
  border-radius: 50%;
  top: -2px;
  left: -2px;
  content: "";
  width: calc(100% + 4px);
  height: calc(100% + 4px);
  box-shadow: 0 0 0 2px var(--gray400);
}
.Avatar.green::after  { box-shadow: 0 0 0 2px var(--green500); }
.Avatar.blue::after   { box-shadow: 0 0 0 2px var(--blue500); }
.Avatar.yellow::after { box-shadow: 0 0 0 2px var(--amber500); }
.Avatar.red::after    { box-shadow: 0 0 0 2px var(--red500); }
.Avatar.gold::after   { box-shadow: 0 0 0 2px var(--gold500); }
.Avatar.bronze::after { box-shadow: 0 0 0 2px var(--bronze500); }

/* Props */

.Avatar.inline {
  margin-left: -4px;
  box-shadow: inset 0 0 0 1px rgba(0,0,0,.05), 0 0 0 2px white;
}

.Avatar.nested {
  position: absolute;
  bottom: 0;
  box-shadow: inset 0 0 0 1px rgba(0,0,0,.05), 0 0 0 2px white;
  margin-bottom: calc(-1 * var(--spacing-100));
  z-index: 1;
}

.Avatar.interactive::after {
  border-radius: 50%;
  content: "";
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background-color: rgba(0,0,0,.1);
  transition-property: opacity;
  transition-duration: var(--transitionDuration-200);
  transition-timing-function: linear;
  opacity: 0;
}

.Avatar.interactive:hover::after {
  opacity: 1;
}
