/**
 * Avatar classes
 */
.o-avatar-container {
  position: relative;
}

.o-avatar-container::after {
  content: "";
  display: block;
  padding-bottom: 100%;
}

.o-avatar-profile {
  position: absolute;
  width: 100%;
  height: 100%;
  object-fit: cover;
  @apply u-rounded-8;
}

.o-avatar {
  display: grid;
  grid-template-rows: 32px 1fr;
  position: relative;
  flex-shrink: 0;
}

.o-avatar__img-wrapper {
  display: inline-block;
  width: 32px;
  height: 32px;
  overflow: hidden;
  border-radius: 100%;
  border: 1px solid theme('colors.gray-40');
  justify-self: center;
}

.o-avatar__img-wrapper-s {
}


.o-avatar__img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.o-avatar__name {
  text-align: center;
  margin-top: 1px;
  font-family: Signika;
  font-size: 10px;
}

@screen sm {
  .o-avatar {
    display: grid;
    grid-template-rows: 48px 1fr;
    position: relative;
    flex-shrink: 0;
  }

  .o-avatar__img-wrapper {
    display: inline-block;
    width: 48px;
    height: 48px;
    overflow: hidden;
    border-radius: 100%;
    border: 2px solid theme('colors.gray-40');
    justify-self: center;
  }

  .o-avatar__img-wrapper-s {
    width: 32px;
    height: 32px;
  }

  .o-avatar__img {
    width: 100%;
    height: 100%;
    object-fit: cover;
  }

  .o-avatar__name {
    text-align: center;
    margin-top: 1px;
    font-family: Signika;
    font-size: 12px;

  }
}

@screen md {
  .o-avatar {
    display: grid;
    grid-template-rows: 72px 1fr;
    position: relative;
    flex-shrink: 0;
  }

  .o-avatar__img-wrapper {
    display: inline-block;
    width: 72px;
    height: 72px;
    overflow: hidden;
    border-radius: 100%;
    border: 2px solid theme('colors.gray-40');
    justify-self: center;
  }

  .o-avatar__img-wrapper-s {
    width: 48px;
    height: 48px;
  }

  .o-avatar__img {
    width: 100%;
    height: 100%;
    object-fit: cover;
  }

  .o-avatar__name {
    text-align: center;
    margin-top: 3px;
    font-family: Signika;
    font-size: 13px;
  }
}

@screen lg {
  .o-avatar {
    display: grid;
    grid-template-rows: 96px 1fr;
    position: relative;
    flex-shrink: 0;
  }

  .o-avatar__img-wrapper {
    display: inline-block;
    width: 96px;
    height: 96px;
    overflow: hidden;
    border-radius: 100%;
    border: 2px solid theme('colors.gray-40');
    justify-self: center;
  }

  .o-avatar__img-wrapper-s {
    width: 78px;
    height: 78px;
  }

  .o-avatar__img {
    width: 100%;
    height: 100%;
    object-fit: cover;
  }

  .o-avatar__name {
    text-align: center;
    margin-top: 4px;
    font-family: Signika;
    font-size: 14px;
  }
}

.o-avatar__languages {
  font-family: Signika;
  font-size: 12px;
  line-height: 20px;
  font-weight: 300;
  font-style: italic;
  text-align: center;
  margin-top: 4px;
}


.o-avatar__host-status {
  position: absolute;
  bottom: 0;
  right: 0;
  border-radius: 100%;
  overflow: hidden;
  width: 32px;
  height: 32px;
  display: flex;
  align-items: center;
  justify-content: center;
}


.o-avatar__host-img {
  width: 20px;
  height: 20px;
  fill: theme('colors.white');
}


/* Hovers
   ========================================================================== */
.o-avatar:hover {
  opacity: 0.7;
}


/* Size variations
   ========================================================================== */
/**
 * Large
 */
.o-avatar--l {
  width: 120px;
  grid-template-rows: 120px 1fr;
}

.o-avatar--l .o-avatar__img-wrapper {
  width: 120px;
  height: 120px;
}


/**
 * Medium
 */
.o-avatar--m {
  width: 72px;
  grid-template-rows: 72px 1fr;
}

.o-avatar--m .o-avatar__img-wrapper {
  width: 72px;
  height: 72px;
}

.o-avatar--m .o-avatar__name,
.o-avatar--m .o-avatar__languages {
  margin: initial;
}


/**
 * Small
 */
.o-avatar--s {
  grid-template-rows: 48px 1fr;
}

.o-avatar--s .o-avatar__img-wrapper {
  width: 48px;
  height: 48px;
}

.o-avatar--s .o-avatar__name,
.o-avatar--s .o-avatar__languages {
  margin: initial;
}

.o-avatar--xs {
  width: 32px;
  grid-template-rows: 48px 1fr;
}

.o-avatar--xs .o-avatar__img-wrapper {
  width: 32px;
  height: 32px;
}

.o-avatar--xs .o-avatar__name,
.o-avatar--xs .o-avatar__languages {
  margin: initial;
}


/* Color variations
   ========================================================================== */
/**
 * White
 */
.o-avatar--white .o-avatar__name,
.o-avatar--white .o-avatar__languages {
  color: theme('colors.white');
}


/* Variations
   ========================================================================== */
/**
 * No name
 */
.o-avatar--noname {
  display: flex;
  flex-direction: column;
}


.o-avatar--noname .o-avatar__name,
.o-avatar--noname .o-avatar__languages {
  display: none;
}


.o-avatar--noname .o-avatar__img-wrapper {
  border: 2px solid theme('colors.gray-40');
}

.o-avatar--noname_s .o-avatar__img-wrapper {
  border: 2px solid theme('colors.gray-40');
}

.o-avatar--shadow {
  box-shadow: 0 0 16px 0 #d7d7d7;
  border-radius: 100%;
}


.o-avatar--shadow-s {
  box-shadow: 0 0 8px 0 #e6e6e6;
  border-radius: 100%;
}

.o-avatar--shadow-green {
  border-color: green;
}


/* States
   ========================================================================== */
/**
 * Disabled
 */
.o-avatar--disabled {
  opacity: 0.4;
  cursor: pointer;
  pointer-events: none;
}
