// Estilos estruturais do avatar
.matcha-avatar {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  position: relative;
  overflow: hidden;

  font-weight: 500;
  user-select: none;
  flex-shrink: 0;

  // Tamanhos
  &.matcha-avatar-tiny {
    width: 24px;
    height: 24px;
    font-size: 10px;
    line-height: 1;
  }

  &.matcha-avatar-small {
    width: 40px;
    height: 40px;
    font-size: 14px;
    line-height: 1;
  }

  &.matcha-avatar-medium {
    width: 56px;
    height: 56px;
    font-size: 20px;
    line-height: 1;
  }

  &.matcha-avatar-large {
    width: 80px;
    height: 80px;
    font-size: 28px;
    line-height: 1;
  }

  &.matcha-avatar-huge {
    width: 96px;
    height: 96px;
    font-size: 32px;
    line-height: 1;
  }

  // Imagem
  .matcha-avatar-image {
    width: 100%;
    height: 100%;
    object-fit: cover;
    border-radius: inherit;
  }

  // Iniciais
  .matcha-avatar-initials {
    font-weight: 500;
    text-transform: uppercase;
    letter-spacing: 0.5px;
  }

  // Ícone padrão
  .matcha-avatar-icon {
    width: 100%;
    height: 100%;
  }

  // Estado desabilitado
  &.color-disabled {
    opacity: 0.6;
    pointer-events: none;
  }
}

// Mixin de tema
@mixin matcha-avatar-theme($theme) {
  $foreground: map-get($theme, foreground);

  .matcha-avatar {

    // Ícone padrão
    .matcha-avatar-icon {
      color: map-get($foreground, disabled-text);
    }

    // Estado desabilitado
    &.color-disabled {
      background-color: map-get($foreground, disabled);
      color: map-get($foreground, disabled-text) !important;

      .matcha-avatar-icon {
        color: map-get($foreground, disabled-text);
      }
    }
  }
}