@use '~styles/global.scss' as *;

.input {
  width: 48px;
  min-width: 48px;
  height: 28px;

  color: $secondaryGray;

  position: relative;

  background: $primaryGray;
  box-shadow:
    0 0 5px,
    0 0 0 2px;

  outline: none;
  border-radius: 50px;

  cursor: pointer;
  appearance: none;

  &::before {
    width: 28px;
    height: 28px;

    position: absolute;
    top: 0;
    right: 50%;
    left: 0;

    background: currentColor;
    background-image: url('./assets/disableIcon.svg');
    background-repeat: no-repeat;
    background-position: center;
    background-size: 14px;

    box-shadow: 0 2px 5px rgba(0, 0, 0, 0.1);
    border-radius: 50%;

    transition: all 300ms;

    content: '';
    scale: 0.85;
  }

  &.invalid {
    color: $secondaryRed;
  }

  &:active::before {
    transform: scale(0.8);
  }

  &:checked[type='checkbox'] {
    color: $secondaryPurple;

    background: $secondaryPurple;
  }

  &:checked[type='checkbox']::before {
    left: 41%;

    background: $primaryWhite;
    background-image: url('./assets/checkIcon.svg');
    background-repeat: no-repeat;
    background-position: center;
    background-size: 22px;
  }
}

.error {
  color: $secondaryRed;

  background: $primaryWhite;
}
