:host {
  --margin: var(--spacing-unit);

  overflow: hidden;
  position: relative;
  display: inline-block;
  box-sizing: border-box;
  vertical-align: top;
  margin: var(--margin);
  border-width: 1px;
  border-radius: var(--corner-radius);

  width: var(--width);
  height: var(--height);
  font-size: var(--font-size);
}

:host:after {
  position: absolute;
  display: block;
  height: 100%;
  width: 100%;
  z-index: 0;
  text-align: center;
  content: attr(data-text);
  color: var(--color-text-secondary);
  background-color: var(--color-background-secondary);
  line-height: var(--line-height);
}

:host(.circle), :host(.circle) img {
  border-radius: 50%;
}

:host(.bordered) {
  border: 1px solid var(--color-border);
}

:host(.leaned) {
  margin: 0;
}

:host(.leaned-vertically) {
  margin-bottom: 0;
  margin-top: 0;
}

:host(.small) {
  --width: 24px;
  --height: 24px;
  --font-size: 10px;
  --line-height: 24px;
}

:host(.small.bordered) {
  --line-height: 22px;
}

:host(.medium) {
  --width: 32px;
  --height: 32px;
  --font-size: 12px;
  --line-height: 32px;
}

:host(.medium.bordered) {
  --line-height: 30px;
}

:host(.large) {
  --width: 40px;
  --height: 40px;
  --font-size: 18px;
  --line-height: 40px;
}

:host(.large.bordered) {
  --line-height: 38px;
}

img {
  object-fit: cover;
  object-position: center;
  box-sizing: border-box;
  border-radius: var(--corner-radius);

  position: absolute;
  display: block;
  z-index: 1;
  width: 100%;
  height: 100%;
}
