/**
 * @license
 * Copyright (c) 2017 - 2026 Vaadin Ltd.
 * This program is available under Apache License Version 2.0, available at https://vaadin.com/license/
 */
@media lumo_components_avatar {
  :host {
    --vaadin-avatar-outline-width: var(--vaadin-focus-ring-width, 2px);
    border: var(--vaadin-avatar-outline-width) solid transparent;
    margin: calc(var(--vaadin-avatar-outline-width) * -1);
    color: var(--vaadin-avatar-text-color, var(--lumo-secondary-text-color));
    background-color: var(--vaadin-avatar-background, var(--lumo-contrast-10pct));
    outline: none;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
    vertical-align: baseline;
  }

  [part='icon'] {
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: var(--vaadin-avatar-size, 64px);
    line-height: 1;
    mask: none;
    background: none;
  }

  [part='icon']::before {
    content: var(--lumo-icons-user);
    font-family: lumo-icons;
    font-size: 0.9em;
  }

  [part='abbr'] {
    font-family: var(--lumo-font-family);
    font-size: 2.4375em;
    font-weight: 500;
  }

  :host([has-color-index]) {
    color: var(--lumo-base-color);
  }

  :host([has-color-index])::before {
    outline: none;
    box-shadow: inset 0 0 0 2px var(--vaadin-avatar-user-color);
  }

  :host([focus-ring]) {
    outline: none;
    border-color: var(--vaadin-focus-ring-color, var(--lumo-primary-color-50pct));
  }

  :host([theme~='xlarge']) [part='abbr'] {
    font-size: 2.5em;
  }

  :host([theme~='large']) [part='abbr'] {
    font-size: 2.375em;
  }

  :host([theme~='small']) [part='abbr'] {
    font-size: 2.75em;
  }

  :host([theme~='xsmall']) [part='abbr'] {
    font-size: 3em;
  }

  :host([theme~='xlarge']) {
    --vaadin-avatar-size: var(--lumo-size-xl);
  }

  :host([theme~='large']) {
    --vaadin-avatar-size: var(--lumo-size-l);
  }

  :host([theme~='small']) {
    --vaadin-avatar-size: var(--lumo-size-s);
  }

  :host([theme~='xsmall']) {
    --vaadin-avatar-size: var(--lumo-size-xs);
  }
}
