.q-radio {
  --radio-color-base: var(--color-primary-black);
  --radio-color-disabled: rgba(var(--color-rgb-gray), 0.64);

  --radio-background-color-base: var(--color-tertiary-gray-ultra-light);
  --radio-background-color-hover: var(--color-tertiary-gray);
  --radio-background-color-focus: var(--color-tertiary-gray-ultra-light);
  --radio-background-color-checked: var(--color-tertiary-gray-ultra-light);
  --radio-background-color-disabled: var(--color-tertiary-gray);

  --radio-dot-color-base: var(--color-primary-blue);
  --radio-dot-color-disabled: rgba(var(--color-rgb-gray), 0.64);

  --radio-box-shadow-base: -1px -1px 3px rgba(var(--color-rgb-white), 0.25),
    1px 1px 3px rgba(var(--color-rgb-blue), 0.4),
    inset -1px -1px 1px rgba(var(--color-rgb-white), 0.7),
    inset 1px 1px 2px rgba(var(--color-rgb-blue), 0.2);
  --radio-box-shadow-focus: -1px -1px 3px rgba(var(--color-rgb-white), 0.25),
    1px 1px 3px rgba(var(--color-rgb-blue), 0.4),
    4px 4px 10px rgba(var(--color-rgb-blue), 0.4),
    -4px -4px 10px rgba(var(--color-rgb-white), 0.25),
    inset -1px -1px 1px rgba(var(--color-rgb-white), 0.7),
    inset 1px 1px 2px rgba(var(--color-rgb-blue), 0.2);

  position: relative;
  display: inline-flex;
  font-weight: var(--font-weight-base);
  font-size: var(--font-size-base);
  line-height: 1;
  color: var(--radio-color-base);
  white-space: nowrap;
  outline: none;
  cursor: pointer;
  user-select: none;

  &_disabled {
    cursor: not-allowed;
  }

  &__label {
    margin-top: 3px;
    padding-left: 16px;
    font-size: var(--font-size-base);
    line-height: 18px;
    white-space: normal;
    word-break: break-word;

    .q-radio_disabled & {
      color: var(--radio-color-disabled);
    }
  }

  &__input {
    position: relative;
    line-height: 0;
    white-space: nowrap;
    border: none;
    outline: none;
  }

  &__inner {
    position: relative;
    display: inline-block;
    box-sizing: border-box;
    width: 24px;
    height: 24px;
    background-color: var(--radio-background-color-base);
    border-radius: 100%;
    outline: none;
    box-shadow: var(--radio-box-shadow-base);

    &::after {
      content: '';
      position: absolute;
      top: 50%;
      left: 50%;
      width: 12px;
      height: 12px;
      background-color: var(--radio-dot-color-base);
      border-radius: 100%;
      transform: translate(-50%, -50%) scale(0);
      transition: transform 0.15s ease-in;
    }

    .q-radio_checked & {
      background-color: var(--radio-background-color-checked);

      &::after {
        transform: translate(-50%, -50%) scale(1);
      }
    }

    .q-radio:not(.q-radio_disabled):focus & {
      background-color: var(--radio-background-color-focus);
      box-shadow: var(--radio-box-shadow-focus);
    }

    &,
    .q-radio:not(.q-radio_disabled):focus &,
    .q-radio_checked & {
      &:hover {
        background-color: var(--radio-background-color-hover);
      }
    }

    .q-radio_disabled & {
      background-color: var(--radio-background-color-disabled);

      &::after {
        background-color: var(--radio-dot-color-disabled);
      }
    }
  }

  &__original {
    position: absolute;
    top: 0;
    right: 0;
    bottom: 0;
    left: 0;
    z-index: -1;
    margin: 0;
    outline: none;
    opacity: 0;
  }
}
