// See COPYRIGHT.md for copyright information

input[type="text"],
select,
button {
  padding: 7px 5px;
  border: solid 1px var(--colour-border-grey);
  border-radius: 5px;
  color: var(--colour-text);
  background-color: unset;
  box-sizing: border-box;
}

.square-button-bare {
  width: 3.2rem;
  height: 3.2rem;
  text-align: center;
  color: var(--colour-icon-grey);
  box-sizing: border-box;
  cursor: pointer;
  padding: 0;
  font-size: 2.2rem;
  line-height: 3.2rem;
  user-select: none;
  border: none;
}

.square-button {
  .square-button-bare();

  padding: 0;
  border-radius: 3px;
  border: solid 0.1rem var(--colour-border-grey);
  background-color: var(--colour-button-bg);
  line-height: 3rem;
  margin: 0 0.5rem;

  &:last-of-type {
    margin-right: 0;
  }

  &:first-of-type {
    margin-left: 0;
  }
}

.square-button.primary {
  color: var(--colour-bg);
  border-color: var(--colour-button-primary-border);
  background-color: var(--colour-button-primary-bg);
}

.wk-checkbox,
label.checkbox {
  position: relative;
  padding-left: 2.2rem;
  cursor: pointer;
  user-select: none;
  line-height: 1.6rem;

  &:focus-within {
    outline: solid 0.2rem #000;
    outline-offset: 0.3rem;
  }

  input {
    position: absolute;
    opacity: 0;
    cursor: pointer;
    height: 0;
    width: 0;
  }

  .checkmark {
    position: absolute;
    box-sizing: border-box;
    top: 0;
    left: 0;
    width: 1.6rem;
    height: 1.6rem;
    border-radius: 0.4rem;
    border: solid 0.1rem var(--colour-border-grey);
  }

  input:checked ~ .checkmark::before {
    content: "";
    position: absolute;
    top: 0;
    left: 0.4rem;
    width: 0.4rem;
    height: 1.1rem;
    border: solid var(--colour-primary);
    border-width: 0 0.2rem 0.2rem 0;
    transform: rotate(45deg);
  }
}

input:disabled {
  background-color: #eee;
}

.inline-button {
  display: inline;
  cursor: pointer;
  color: var(--colour-primary);
  padding: 0.3rem;
  border: none;
}

.bare-button {
  display: inline;
  cursor: pointer;
  color: var(--colour-primary);
  padding: 0.3rem;
  border: none;
}
