@use '../colors';

.root {
  position: relative;
  display: inline-block;
  vertical-align: -0.125em; // не понятно почему, но это значение ставит блок ровно по середине строки
  width: 16px;
  height: 16px;
  svg {
    display: block;
  }
}

.input {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  opacity: 0;
  margin: 0;
  padding: 0;
  cursor: pointer;
  &:not(:checked) + svg .mark {
    display: none;
  }
  &:not(:checked) + svg .square {
    fill: #fff;
    stroke: colors.$basic-gray24;
  }
  &:checked + svg .square {
    fill: colors.$basic-blue;
    stroke: colors.$basic-blue;
  }
  &:disabled:not(:checked) + svg .square {
    fill: colors.$basic-gray4;
    stroke: colors.$basic-gray24;
  }
  &:disabled:checked + svg .square {
    fill: colors.$basic-gray12;
    stroke: colors.$basic-gray12;
  }
  &:disabled {
    cursor: default;
  }
}
