/**
 * A heuristic that applies CSS to tablet
 * viewports.
 *
 * Usage:
 * @include tablet-viewport() {
 *   :host {
 *     background-color: green;
 *   }
 * }
 */
/**
 * A heuristic that applies CSS to mobile
 * viewports (i.e. phones, not tablets).
 *
 * Usage:
 * @include mobile-viewport() {
 *   :host {
 *     background-color: blue;
 *   }
 * }
 */
/**
 * Convert a pixels given value into rem
 * 
 * @param pixels - Value in pixels to be converted (i.e. px)
 * @param context (optional) - Baseline value
 */
/**
 * Convert a font size to a dynamic font size.
 * Fonts that participate in Dynamic Type should use
 * dynamic font sizes.
 * @param size - The initial font size including the unit (i.e. px or pt)
 * @param unit (optional) - The unit to convert to. Use this if you want to
 * convert to a unit other than $baselineUnit.
 */
/**
 * Convert a font size to a dynamic font size but impose
 * a maximum font size.
 * @param size - The initial font size including the unit (i.e. px or pt)
 * @param maxScale - The maximum scale of the font (i.e. 2.5 for a maximum 250% scale).
 * @param unit (optional) - The unit to convert the initial font size to. Use this if you want to
 * convert to a unit other than $baselineUnit.
 */
/**
 * Convert a font size to a dynamic font size but impose
 * a minimum font size.
 * @param size - The initial font size including the unit (i.e. px or pt)
 * @param minScale - The minimum scale of the font (i.e. 0.8 for a minimum 80% scale).
 * @param unit (optional) - The unit to convert the initial font size to. Use this if you want to
 * convert to a unit other than $baselineUnit.
 */
/**
 * Convert a font size to a dynamic font size but impose
 * maximum and minimum font sizes.
 * @param size - The initial font size including the unit (i.e. px or pt)
 * @param minScale - The minimum scale of the font (i.e. 0.8 for a minimum 80% scale).
 * @param maxScale - The maximum scale of the font (i.e. 2.5 for a maximum 250% scale).
 * @param unit (optional) - The unit to convert the initial font size to. Use this if you want to
 * convert to a unit other than $baselineUnit.
 */
/**
 * A heuristic that applies CSS to tablet
 * viewports.
 *
 * Usage:
 * @include tablet-viewport() {
 *   :host {
 *     background-color: green;
 *   }
 * }
 */
/**
 * A heuristic that applies CSS to mobile
 * viewports (i.e. phones, not tablets).
 *
 * Usage:
 * @include mobile-viewport() {
 *   :host {
 *     background-color: blue;
 *   }
 * }
 */
:host {
  /**
   * @prop --border-radius: Border radius of the avatar and inner image
   */
  border-radius: var(--border-radius);
  display: block;
  position: relative;
}

::slotted(ion-img),
::slotted(img) {
  border-radius: var(--border-radius);
  width: 100%;
  height: 100%;
  object-fit: cover;
  overflow: hidden;
}

:host {
  --padding-top: var(--token-space-0, var(--token-scale-0, 0px));
  --padding-bottom: var(--token-space-0, var(--token-scale-0, 0px));
  font-size: var(--token-font-size-450, 18px);
  font-weight: var(--token-font-weight-medium, 500);
  letter-spacing: var(--token-font-letter-spacing-0, 0%);
  line-height: var(--token-font-line-height-700, var(--token-scale-700, 28px));
  text-decoration: none;
  text-transform: none;
  display: flex;
  align-items: center;
  justify-content: center;
  background: var(--token-bg-neutral-subtle-default, var(--token-primitives-neutral-200, #eae9e9));
  color: var(--token-text-subtlest, var(--token-primitives-neutral-800, #626262));
}

:host(:not(.avatar-image)) {
  -webkit-padding-start: var(--padding-start);
  padding-inline-start: var(--padding-start);
  -webkit-padding-end: var(--padding-end);
  padding-inline-end: var(--padding-end);
  padding-top: var(--padding-top);
  padding-bottom: var(--padding-bottom);
}

/* 2-Extra Small */
:host(.avatar-xxsmall) {
  --padding-end: var(--token-space-050, var(--token-scale-050, 2px));
  --padding-start: var(--token-space-050, var(--token-scale-050, 2px));
  font-size: var(--token-font-size-300, 12px);
  font-weight: var(--token-font-weight-medium, 500);
  letter-spacing: var(--token-font-letter-spacing-0, 0%);
  line-height: var(--token-font-line-height-500, var(--token-scale-500, 20px));
  text-decoration: none;
  text-transform: none;
  width: var(--token-scale-400, 16px);
  height: var(--token-scale-400, 16px);
}

/* Extra Small */
:host(.avatar-xsmall) {
  --padding-end: var(--token-space-050, var(--token-scale-050, 2px));
  --padding-start: var(--token-space-050, var(--token-scale-050, 2px));
  font-size: var(--token-font-size-300, 12px);
  font-weight: var(--token-font-weight-medium, 500);
  letter-spacing: var(--token-font-letter-spacing-0, 0%);
  line-height: var(--token-font-line-height-500, var(--token-scale-500, 20px));
  text-decoration: none;
  text-transform: none;
  width: var(--token-scale-600, 24px);
  height: var(--token-scale-600, 24px);
}

/* Small */
:host(.avatar-small) {
  --padding-end: var(--token-space-150, var(--token-scale-150, 6px));
  --padding-start: var(--token-space-150, var(--token-scale-150, 6px));
  font-size: var(--token-font-size-400, 16px);
  font-weight: var(--token-font-weight-medium, 500);
  letter-spacing: var(--token-font-letter-spacing-0, 0%);
  line-height: var(--token-font-line-height-600, var(--token-scale-600, 24px));
  text-decoration: none;
  text-transform: none;
  width: var(--token-scale-800, 32px);
  height: var(--token-scale-800, 32px);
}

/* Medium */
:host(.avatar-medium) {
  --padding-end: var(--token-space-200, var(--token-scale-200, 8px));
  --padding-start: var(--token-space-200, var(--token-scale-200, 8px));
  width: var(--token-scale-1000, 40px);
  height: var(--token-scale-1000, 40px);
}

/* Large */
:host(.avatar-large) {
  --padding-end: var(--token-space-250, var(--token-scale-250, 10px));
  --padding-start: var(--token-space-250, var(--token-scale-250, 10px));
  font-size: var(--token-font-size-500, 20px);
  font-weight: var(--token-font-weight-medium, 500);
  letter-spacing: var(--token-font-letter-spacing-0, 0%);
  line-height: var(--token-font-line-height-700, var(--token-scale-700, 28px));
  text-decoration: none;
  text-transform: none;
  width: var(--token-scale-1200, 48px);
  height: var(--token-scale-1200, 48px);
}

/* Extra Large */
:host(.avatar-xlarge) {
  --padding-end: var(--token-space-300, var(--token-scale-300, 12px));
  --padding-start: var(--token-space-300, var(--token-scale-300, 12px));
  font-size: var(--token-font-size-550, 22px);
  font-weight: var(--token-font-weight-medium, 500);
  letter-spacing: var(--token-font-letter-spacing-0, 0%);
  line-height: var(--token-font-line-height-700, var(--token-scale-700, 28px));
  text-decoration: none;
  text-transform: none;
  width: var(--token-scale-1400, 56px);
  height: var(--token-scale-1400, 56px);
}

:host(.avatar-xxsmall.avatar-soft),
:host(.avatar-xsmall.avatar-soft),
:host(.avatar-small.avatar-soft) {
  --border-radius: var(--token-soft-2xs, var(--token-border-radius-100, var(--token-scale-100, 4px)));
}

:host(.avatar-medium.avatar-soft) {
  --border-radius: var(--token-soft-xs, var(--token-border-radius-200, var(--token-scale-200, 8px)));
}

:host(.avatar-large.avatar-soft),
:host(.avatar-xlarge.avatar-soft) {
  --border-radius: var(--token-soft-md, var(--token-border-radius-400, var(--token-scale-400, 16px)));
}

:host(.avatar-xxsmall.avatar-round),
:host(.avatar-xsmall.avatar-round),
:host(.avatar-small.avatar-round) {
  --border-radius: var(--token-round-2xs, var(--token-border-radius-full, 999px));
}

:host(.avatar-medium.avatar-round) {
  --border-radius: var(--token-round-xs, var(--token-border-radius-full, 999px));
}

:host(.avatar-large.avatar-round),
:host(.avatar-xlarge.avatar-round) {
  --border-radius: var(--token-round-md, var(--token-border-radius-full, 999px));
}

:host(.avatar-xxsmall.avatar-rectangular),
:host(.avatar-xsmall.avatar-rectangular),
:host(.avatar-small.avatar-rectangular) {
  --border-radius: var(--token-rectangular-2xs, var(--token-border-radius-0, var(--token-scale-0, 0px)));
}

:host(.avatar-medium.avatar-rectangular) {
  --border-radius: var(--token-rectangular-xs, var(--token-border-radius-0, var(--token-scale-0, 0px)));
}

:host(.avatar-large.avatar-rectangular),
:host(.avatar-xlarge.avatar-rectangular) {
  --border-radius: var(--token-rectangular-md, var(--token-border-radius-0, var(--token-scale-0, 0px)));
}

:host(.avatar-icon) {
  padding-left: 0;
  padding-right: 0;
  padding-top: 0;
  padding-bottom: 0;
}

:host(.avatar-xxsmall) ::slotted(ion-icon) {
  width: var(--token-scale-300, 12px);
  height: var(--token-scale-300, 12px);
}

:host(.avatar-xsmall) ::slotted(ion-icon) {
  width: var(--token-scale-400, 16px);
  height: var(--token-scale-400, 16px);
}

:host(.avatar-small) ::slotted(ion-icon) {
  width: var(--token-scale-500, 20px);
  height: var(--token-scale-500, 20px);
}

:host(.avatar-medium) ::slotted(ion-icon) {
  width: var(--token-scale-600, 24px);
  height: var(--token-scale-600, 24px);
}

:host(.avatar-large) ::slotted(ion-icon) {
  width: var(--token-scale-700, 28px);
  height: var(--token-scale-700, 28px);
}

:host(.avatar-xlarge) ::slotted(ion-icon) {
  width: var(--token-scale-800, 32px);
  height: var(--token-scale-800, 32px);
}

:host ::slotted(ion-badge.badge-vertical-top:empty) {
  transform: translate(var(--token-scale-050, 2px), calc(var(--token-scale-050, 2px) * -1));
}

:host(.avatar-xxsmall) ::slotted(ion-badge.badge-vertical-top:empty) {
  transform: translate(var(--token-scale-100, 4px), calc(var(--token-scale-100, 4px) * -1));
}

:host ::slotted(ion-badge.badge-vertical-bottom:empty) {
  transform: translate(0, var(--token-scale-100, 4px));
}

:host(.avatar-xxsmall) ::slotted(ion-badge.badge-vertical-bottom:empty) {
  transform: translate(var(--token-scale-100, 4px), var(--token-scale-100, 4px));
}

:host ::slotted(ion-badge.badge-vertical-bottom:not(:empty)) {
  transform: translate(50%, 50%);
}

:host(.avatar-xxsmall) ::slotted(ion-badge.badge-vertical-bottom:not(:empty)) {
  bottom: var(--token-scale-100, 4px);
  transform: translate(100%, 100%);
}
:host(.avatar-xxsmall) ::slotted(ion-badge.badge-vertical-bottom:not(:empty)) {
  inset-inline-end: var(--token-scale-100, 4px);
}

:host(.avatar-xsmall) ::slotted(ion-badge.badge-vertical-bottom:not(:empty)) {
  bottom: calc(var(--token-scale-050, 2px) * -1);
}
:host(.avatar-xsmall) ::slotted(ion-badge.badge-vertical-bottom:not(:empty)) {
  inset-inline-end: calc(var(--token-scale-050, 2px) * -1);
}

:host(.avatar-small) ::slotted(ion-badge.badge-vertical-bottom:not(:empty)),
:host(.avatar-medium) ::slotted(ion-badge.badge-vertical-bottom:not(:empty)),
:host(.avatar-large) ::slotted(ion-badge.badge-vertical-bottom:not(:empty)) {
  bottom: var(--token-scale-050, 2px);
}
:host(.avatar-small) ::slotted(ion-badge.badge-vertical-bottom:not(:empty)),
:host(.avatar-medium) ::slotted(ion-badge.badge-vertical-bottom:not(:empty)),
:host(.avatar-large) ::slotted(ion-badge.badge-vertical-bottom:not(:empty)) {
  inset-inline-end: var(--token-scale-050, 2px);
}

:host(.avatar-xlarge) ::slotted(ion-badge.badge-vertical-bottom:not(:empty)) {
  bottom: var(--token-scale-150, 6px);
}
:host(.avatar-xlarge) ::slotted(ion-badge.badge-vertical-bottom:not(:empty)) {
  inset-inline-end: var(--token-scale-150, 6px);
}

:host ::slotted(ion-badge.badge-vertical-top:not(:empty)) {
  transform: translate(50%, -50%);
}

:host(.avatar-xxsmall) ::slotted(ion-badge.badge-vertical-top:not(:empty)) {
  top: var(--token-scale-050, 2px);
}
:host(.avatar-xxsmall) ::slotted(ion-badge.badge-vertical-top:not(:empty)) {
  inset-inline-end: 0;
}

:host(.avatar-xsmall) ::slotted(ion-badge.badge-vertical-top:not(:empty)) {
  top: var(--token-scale-100, 4px);
}
:host(.avatar-xsmall) ::slotted(ion-badge.badge-vertical-top:not(:empty)) {
  inset-inline-end: calc(var(--token-scale-050, 2px) * -1);
}

:host(.avatar-small) ::slotted(ion-badge.badge-vertical-top:not(:empty)),
:host(.avatar-medium) ::slotted(ion-badge.badge-vertical-top:not(:empty)) {
  top: var(--token-scale-150, 6px);
}
:host(.avatar-small) ::slotted(ion-badge.badge-vertical-top:not(:empty)),
:host(.avatar-medium) ::slotted(ion-badge.badge-vertical-top:not(:empty)) {
  inset-inline-end: 0;
}

:host(.avatar-large) ::slotted(ion-badge.badge-vertical-top:not(:empty)) {
  top: var(--token-scale-150, 6px);
}
:host(.avatar-large) ::slotted(ion-badge.badge-vertical-top:not(:empty)) {
  inset-inline-end: var(--token-scale-050, 2px);
}

:host(.avatar-xlarge) ::slotted(ion-badge.badge-vertical-top:not(:empty)) {
  top: var(--token-scale-150, 6px);
}
:host(.avatar-xlarge) ::slotted(ion-badge.badge-vertical-top:not(:empty)) {
  inset-inline-end: var(--token-scale-150, 6px);
}

:host(.avatar-disabled)::after {
  border-radius: var(--border-radius);
  right: 0;
  left: 0;
  top: 0;
  bottom: 0;
  position: absolute;
  background-color: var(--token-state-disabled, rgba(255, 255, 255, 0.6));
  content: "";
  pointer-events: none;
}