@import '../../../utilities/tooltip.less';

html,
body {
  font-family: 'Segoe UI', 'Segoe UI Web (West European)', 'Segoe UI',
    -apple-system, BlinkMacSystemFont, 'Roboto', 'Helvetica Neue', sans-serif;
  color: var(--font-colour);
}

ul,
ol,
span,
p,
td,
th,
code {
  line-height: 1.6;
}

h1 {
  font-size: 3.2rem;
}

h2 {
  font-size: 2.4rem;
}

h3 {
  font-size: 1.8rem;
}

label {
  font-size: 1.4rem;
  font-weight: 600;
  position: relative;

  &.disabled,
  &[disabled]:not([disabled='false']) {
    color: var(--colour-on-disabled);
  }

  &.required,
  &[required] {
    &[tabindex='0'] {
      .tooltip();
      &:hover,
      &:focus {
        &::before {
          content: 'Required field';
        }
        /** substitute the space that the '*' takes with a padding. so that it will not move around */
        padding-right: 1.12rem;
      }
    }
    &::after {
      position: relative;
      content: '*';
      color: var(--danger);
      margin-left: 0.5rem;
    }

    /** making the tooltip overridable */
    &[data-tooltip] {
      &:hover,
      &:focus {
        &::before {
          content: attr(data-tooltip);
        }
      }
    }
  }
}

kbd,
code:not([class*='language']) {
  margin: 0 0.2rem;
  padding: 0.2rem 0.4rem;
  position: relative;
  background-color: var(--code-background);
  border-radius: 0.2rem;
  .border();
  bottom: 0.1rem;
}

mark {
  background-color: var(--accent);
}

blockquote {
  font-weight: bold;
  display: block;
  line-height: 1.4;
  border-left: 0.75rem solid var(--accent);
  padding-top: @default-distance;
  padding-left: @default-distance;

  & > cite {
    font-weight: initial;
    padding: 3rem @default-distance @default-distance @default-distance;
    display: block;
    float: right;
    &::before {
      position: relative;
      content: '~';
      margin-right: 0.5rem;
    }
  }
}
