.dpr-bookmark {

  &:focus {
    background-color: red;
  }

  [type="checkbox"]:not(:checked),
  [type="checkbox"]:checked {
    display: none;
  }

  [type="checkbox"]:not(:checked)+label,
  [type="checkbox"]:checked+label {
    position: relative;
    padding-left: 16px;
    cursor: pointer;
  }

  [type="checkbox"]:not(:checked)+label:before,
  [type="checkbox"]:checked+label:before {
    font-family: 'Material Icons';
    content: 'bookmark_border';
    text-rendering: optimizeLegibility;
    font-feature-settings: "liga" 1;
    font-style: normal;
    text-transform: none;
    line-height: 16px;
    font-size: 16px;
    text-align: center;
    position: absolute;
    top: 2px;
    left: 0px;
    display: inline-block;
    color: govuk-colour("blue");
  }

  [type="checkbox"]:not(:checked)+label:after,
  [type="checkbox"]:checked+label:after {
    font-family: 'Material Icons';
    content: 'bookmark';
    text-rendering: optimizeLegibility;
    font-feature-settings: "liga" 1;
    font-style: normal;
    text-transform: none;
    line-height: 16px;
    font-size: 16px;
    text-align: center;
    position: absolute;
    top: 2px;
    left: 0px;
    display: inline-block;
    overflow: hidden;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
    color: govuk-colour("blue");
  }

  [type="checkbox"]:not(:checked)+label:after {
    opacity: 0;
    transform: scale(0);
  }
}

.dpr-bookmark.dpr-bookmark-inline {

  [type="checkbox"]:not(:checked)+label:before,
  [type="checkbox"]:checked+label:before {
    line-height: 43px;
  }

  [type="checkbox"]:not(:checked)+label:after,
  [type="checkbox"]:checked+label:after {
    line-height: 43px;
  }
}

.dpr-bookmark-tooltip {
  position: relative;
  text-align: center
}

.dpr-bookmark-tooltip:hover:after {
  background: govuk-colour("dark-grey");
  content: attr(tooltip);
  display: block;
  color: white;
  padding: govuk-spacing(3);
  position: absolute;
  top: -5px;
  left: 56px;
  white-space: nowrap;
  text-transform: none;
  z-index: 98;
  font-size: 14px;
  font-weight: normal;
  text-align: center;
}

.dpr-bookmark-tooltip.dpr-bookmark-table:hover:after {
    left: 76px;
    top: -10px;
}

.dpr-bookmark-tooltip.dpr-bookmark-table:hover:before {
  left: 56px;
  top: 3px;
}

.dpr-vertical-align {
  vertical-align: middle;
}

.dpr-bookmark-head {
  width: 160px;
  text-align: right;
}

.dpr-bookmark-tooltip:hover:before{
  content: '';
  z-index: 98;
  display: block;
  position: absolute;
  top: 8px;
  left: 36px;
  width: 20;
  height: 20;
  border-left: 10px solid transparent;
  border-right: 10px solid govuk-colour("dark-grey");
  border-bottom: 10px solid transparent;
  border-top: 10px solid transparent;
}

.dpr-bookmark-label {
  display: inline-block;
  margin-top: govuk-spacing(1);
  margin-bottom: 0px;
  margin-left: govuk-spacing(1);
  color: govuk-colour("blue");
  text-decoration: underline !important;
  text-underline-offset: 3px;
}

.dpr-visually-hidden {
  border: 0;
  padding: 0;
  margin: 0;
  position: absolute !important;
  height: 1px;
  width: 1px;
  overflow: hidden;
  clip: rect(1px 1px 1px 1px);
  /* IE6, IE7 - a 0 height clip, off to the bottom right of the visible 1px box */
  clip: rect(1px, 1px, 1px, 1px);
  /*maybe deprecated but we need to support legacy browsers */
  clip-path: inset(50%);
  /*modern browsers, clip-path works inwards from each corner*/
  white-space: nowrap;
  /* added line to stop words getting smushed together (as they go onto seperate lines and some screen readers do not understand line feeds as a space */
}

.dpr-bookmark-component {
  position: relative;
  text-align: right;

  .dpr-bookmark-label {
    margin-left: govuk-spacing(2);
    margin-top: 3px;
  }

  [type="checkbox"]:not(:checked)+label,
  [type="checkbox"]:checked+label {
    margin-left: 10px;
    display: inline-block;
    position: relative;
  }

  [type="checkbox"]:not(:checked)+label:before,
  [type="checkbox"]:checked+label:before {
    font-size: 22px;
    line-height: 22px !important;
  }

  [type="checkbox"]:not(:checked)+label:after,
  [type="checkbox"]:checked+label:after {
    font-size: 22px;
    line-height: 22px !important;
  }
}
