.root {
  display: flex;
  align-items: flex-start;
}

.facade {
  color: var(--color);
  background: var(--background);
  position: relative;
  display: flex;
  align-items: center;
  justify-content: center;
  box-sizing: border-box;
  flex-shrink: 0;
  transition: all 0.2s;
  border: var(--borderWidth) solid var(--borderColor);
  border-radius: var(--borderRadius);
  margin-inline-end: var(--marginRight);
  margin-inline-start: 0;
  padding: var(--padding);

  &::before {
    content: "";
    position: absolute;
    top: -0.3125rem;
    bottom: -0.3125rem;
    left: -0.3125rem; /* stylelint-disable-line property-blacklist */
    right: -0.3125rem; /* stylelint-disable-line property-blacklist */
    box-sizing: border-box;
    border-radius: calc(var(--borderRadius) * 1.5);
    border: var(--focusBorderWidth) var(--focusBorderStyle) var(--focusBorderColor);
    transition: all 0.2s;
    transform: scale(0.75);
    opacity: 0;
    pointer-events: none;
  }
}

.label {
  flex: 1 1 auto;
  min-width: 0.0625rem;
  color: var(--labelColor);
  font-family: var(--labelFontFamily);
  font-weight: var(--labelFontWeight);
  line-height: var(--labelLineHeight);
}

.small {
  .label {
    font-size: var(--labelFontSizeSmall);
  }

  .facade {
    font-size: var(--iconSizeSmall);
    width: var(--facadeSizeSmall);
    height: var(--facadeSizeSmall);
  }
}

.medium {
  .label {
    font-size: var(--labelFontSizeMedium);
  }

  .facade {
    font-size: var(--iconSizeMedium);
    width: var(--facadeSizeMedium);
    height: var(--facadeSizeMedium);
  }
}

.large {
  .label {
    font-size: var(--labelFontSizeLarge);
  }

  .facade {
    font-size: var(--iconSizeLarge);
    width: var(--facadeSizeLarge);
    height: var(--facadeSizeLarge);
  }
}

.checked {
  .facade {
    background: var(--checkedBackground);
    border-color: var(--checkedBorderColor);
  }

  .label {
    color: var(--checkedLabelColor);
  }
}

.focused {
  .facade {
    &::before {
      transform: scale(1);
      opacity: 1;
    }
  }
}

.hovered {
  .facade {
    border-color: var(--hoverBorderColor);
  }
}
