:root, .neeto-ui-theme--light, .neeto-ui-theme--dark {
  // Container
  --neeto-ui-avatar-container-border-radius: var(--neeto-ui-rounded);
  --neeto-ui-avatar-container-width: 1.5rem;
  --neeto-ui-avatar-container-height: 1.5rem;

  // Avatar
  --neeto-ui-avatar-width: 1.5rem;
  --neeto-ui-avatar-height: 1.5rem;
  --neeto-ui-avatar-border-radius: var(--neeto-ui-rounded-full);

  // Status
  --neeto-ui-avatar-status-width: 0.75rem;
  --neeto-ui-avatar-status-height: 0.75rem;
  --neeto-ui-avatar-status-bg-color: var(--neeto-ui-white);
  --neeto-ui-avatar-status-border-width: 2px;
  --neeto-ui-avatar-status-border-color: rgb(var(--neeto-ui-white));
  --neeto-ui-avatar-status-border-radius: var(--neeto-ui-rounded-full);
  --neeto-ui-avatar-status-transform: translate(0, 0);
}

.neeto-ui-avatar__container {
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: var(--neeto-ui-avatar-container-border-radius);
  position: relative;
  flex-shrink: 0;
  width: var(--neeto-ui-avatar-container-width);
  height: var(--neeto-ui-avatar-container-height);

  &-round {
    --neeto-ui-avatar-container-border-radius: var(--neeto-ui-rounded-full);
  }

  &--medium {
    --neeto-ui-avatar-container-width: 2rem;
    --neeto-ui-avatar-container-height: 2rem;
  }

  &--large {
    --neeto-ui-avatar-container-width: 2.5rem;
    --neeto-ui-avatar-container-height: 2.5rem;
  }

  &--xlarge {
    --neeto-ui-avatar-container-width: 4rem;
    --neeto-ui-avatar-container-height: 4rem;
  }

  .neeto-ui-avatar__status {
    position: absolute;
    right: 0;
    bottom: 0;
    width: var(--neeto-ui-avatar-status-width);
    height: var(--neeto-ui-avatar-status-width);
    background-color: var(--neeto-ui-avatar-status-bg-color);
    border: var(--neeto-ui-avatar-status-border-width) solid var(--neeto-ui-avatar-status-border-color);
    border-radius: var(--neeto-ui-avatar-status-border-radius);
    transform: var(--neeto-ui-avatar-status-transform);
    z-index: 4;

    &.neeto-ui-avatar__status-medium {
      --neeto-ui-avatar-status-width: 0.75rem;
      --neeto-ui-avatar-status-height: 0.75rem;
    }

    &.neeto-ui-avatar__status-large {
      --neeto-ui-avatar-status-width: 0.875rem;
      --neeto-ui-avatar-status-height: 0.875rem;
    }

    &.neeto-ui-avatar__status-xlarge {
      --neeto-ui-avatar-status-width: 1rem;
      --neeto-ui-avatar-status-height: 1rem;
    }

    &.online {
      --neeto-ui-avatar-status-bg-color: rgb(var(--neeto-ui-success-500));
    }

    &.idle {
      --neeto-ui-avatar-status-bg-color: rgb(var(--neeto-ui-warning-500));
    }

    &.offline {
      --neeto-ui-avatar-status-bg-color: rgb(var(--neeto-ui-gray-300));
    }
  }

  .neeto-ui-avatar {
    display: inline-block;
    border-radius: var(--neeto-ui-avatar-border-radius);
    width: var(--neeto-ui-avatar-width);
    height: var(--neeto-ui-avatar-height);
    object-fit: cover;

    &.hidden {
      display: none;
    }

    &.neeto-ui-avatar--medium {
      --neeto-ui-avatar-width: 2rem;
      --neeto-ui-avatar-height: 2rem;
    }

    &.neeto-ui-avatar--large {
      --neeto-ui-avatar-width: 2.5rem;
      --neeto-ui-avatar-height: 2.5rem;
    }

    &.neeto-ui-avatar--xlarge {
      --neeto-ui-avatar-width: 4rem;
      --neeto-ui-avatar-height: 4rem;
    }
  }
}

.neetix-avatar {
  --neeto-ui-avatar-container-border-radius: var(--neeto-ui-rounded-lg);
  --neeto-ui-avatar-border-radius: var(--neeto-ui-rounded-lg);
}
