@import 'forms.css';
@import 'icons.css';

body {
  font-size: 1.8rem;
  line-height: 2.6rem;
  font-family: var(--font-body), sans-serif;
  background-color: #ffffff;
  color: #050505;
}

:focus {
  outline-color: #003a56;
}

h1,
.h1,
h2,
.h2,
h3,
.h3,
h4,
.h4,
h5,
.h5,
h6,
.h6 {
  color: #003a56;
  margin: 0;
  padding: 0;
}

h1,
.h1 {
  font-weight: 900;
  font-size: 4.8rem;
  line-height: 5.6rem;
  letter-spacing: -0.025rem;
}
h2,
.h2 {
  font-weight: 900;
  font-size: 3.2rem;
  line-height: 4rem;
  letter-spacing: -0.025rem;
}
h3,
.h3 {
  font-weight: 700;
  font-size: 2.4rem;
  line-height: 3rem;
  letter-spacing: 0.025rem;
}
h4,
.h4 {
  font-weight: 700;
  font-size: 2.2rem;
  line-height: 2.6rem;
  letter-spacing: 0.025rem;
}
h5,
.h5 {
  font-weight: 700;
  font-size: 2rem;
  line-height: 2.6rem;
  letter-spacing: 0.025rem;
}
h6,
.h6 {
  font-weight: 700;
  font-size: 1.6rem;
  line-height: 1.6rem;
  letter-spacing: 0.025rem;
}

p {
  font-size: 1.8rem;
  line-height: 2.6rem;
  font-weight: 400;
  margin: 0;
  padding: 0;
}

.copy-lead {
  font-size: 2rem;
  line-height: 2.8rem;
  font-weight: 400;
  color: #050505;
  letter-spacing: -0.01rem;
}
.copy-small {
  font-size: 1.4rem;
  line-height: 1.8rem;
  font-weight: 400;
  color: #575756;
}

/* buttons */
button,
a {
  cursor: pointer;
}

.btn {
  padding: 14px 24px;
  letter-spacing: -0.4px;
  display: inline-block;
  border: none;
  border-radius: 4px;
  background: #003a56;
  color: #ffffff;
  font-size: 2rem;
  line-height: 2rem;
  text-decoration: none;
  font-weight: 700;
  position: relative;
  transition: background 0.3s;
  overflow: visible;
}
.btn--small {
  font-size: 1.6rem;
  line-height: 1.6rem;
  padding: 13px 24px;
}
.btn:focus {
  outline: none;
  background: #003a56;
  color: #ffffff;
}
.btn--secondary {
  padding: 13px 23px;
  background: #ffffff;
  color: #003a56;
  border: 1px solid #003a56;
}
.btn--secondary:focus {
  background: #ffffff;
  color: #003a56;
  border: 1px solid #003a56;
}
.btn:hover {
  background: #c8dde8;
  color: #003a56;
  border: none;
}
.btn--secondary:hover {
  background: #c8dde8;
  color: #003a56;
  border: 1px solid #c8dde8;
}
.btn--tertiary,
.btn--tertiary:focus {
  background: #f3f9fc;
  color: #003a56;
}
.btn:active,
.btn:active.btn--secondary,
.btn:active.btn--tertiary {
  background: #ebf8ff;
  color: #003a56;
  border: none;
}
.btn:hover,
.btn:active {
  text-decoration: underline;
}
.btn:focus::after,
.btn:active::after {
  content: '';
  display: block;
  width: calc(100% + 4px);
  height: calc(100% + 4px);
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  border-radius: 7px;
  border: 2px solid #003a56;
}
.btn--secondary:focus::after {
  width: calc(100% + 6px);
  height: calc(100% + 6px);
  left: 50%;
}
.btn[disabled] {
  padding: 12px 22px;
  background: #f5f5f5;
  color: #575756;
  border: 2px solid #cccccc;
  cursor: default;
  box-shadow: none;
}
.btn--secondary[disabled],
.btn--tertiary[disabled] {
  border-width: 1px;
}

/* forms */
.form__submit--loading {
  color: #003a56;
  background: #ebf8ff;
  padding: 14px 10px;
}
.form__submit--loading:focus {
  color: #003a56;
  background: #ebf8ff;
}
.form__spinner {
  background-image: url('../gifs/spinner-blue.gif');
}
.form__loading-label {
  margin-left: 4px;
}
.form__field .form__dropdown .form__dropdown__control {
  border-radius: 3px;
}
.form__field--dropdown .form__dropdown__control--is-focused,
.form__field--dropdown .form__dropdown__control:focus,
.form__field--dropdown.form__field--error .form__dropdown__control--is-focused {
  margin-top: -2px;
}
.tooltip__container .tooltip__header {
  font-weight: 500;
}

/* icon buttons */
.icon-btn {
  padding: 8px;
  background: none;
  border: none;
  cursor: pointer;
  overflow: visible;
}
.icon-btn__inner {
  width: 32px;
  height: 32px;
  display: flex;
  justify-content: center;
  align-items: center;
  background: #003a56;
  border-radius: 50%;
  position: relative;
}
.icon-btn .icon-btn__svg {
  width: 16px;
  height: 16px;
  fill: #ffffff;
}
.icon-btn:hover .icon-btn__inner {
  background: #c8dde8;
}
.icon-btn:hover .icon-btn__svg {
  fill: #003a56;
}
.icon-btn:focus {
  outline: none;
}
.icon-btn:active .icon-btn__inner::after,
.icon-btn:focus .icon-btn__inner::after {
  content: '';
  display: block;
  width: calc(100% + 4px);
  height: calc(100% + 4px);
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  border-radius: 50%;
  border: 4px solid #003a56;
}
.icon-btn:active .icon-btn__inner {
  background: #ebf8ff;
}
.icon-btn:active .icon-btn__svg {
  fill: #003a56;
}
.icon-btn[disabled] .icon-btn__inner {
  background: #f5f5f5;
  border: 1px solid #cccccc;
}
.icon-btn[disabled] .icon-btn__svg {
  fill: #575756;
}
.icon-btn--large {
  padding: 0;
}
.icon-btn--large .icon-btn__inner {
  width: 48px;
  height: 48px;
}
.icon-btn--large .icon-btn__svg {
  width: 32px;
  height: 32px;
}
.icon-btn--medium .icon-btn__inner {
  width: 42px;
  height: 42px;
}
.icon-btn--medium .icon-btn__svg {
  width: 17px;
  height: 17px;
}
.icon-btn--rev .icon-btn__inner {
  transform: rotate(180deg);
}
.icon-btn--secondary .icon-btn__inner {
  background: #ffffff;
  border: 1px solid #003a56;
}
.icon-btn--secondary .icon-btn__svg {
  fill: #003a56;
  stroke: #003a56;
}
.icon-btn--small {
  padding: 10px;
}
.icon-btn--small .icon-btn__inner {
  width: 24px;
  height: 24px;
}
.icon-btn--small .icon-btn__svg {
  width: 12px;
  height: 12px;
}

/* rich text */
.rich-text a:not(.btn) {
  background-color: transparent;
  background-image: linear-gradient(#003a56, #003a56), linear-gradient(#003a56, #003a56);
  background-size: 100% 1px, 100% 1px;
  background-position: 50% calc(100% - 2px), 50% calc(100% - 2px);
  background-repeat: no-repeat, no-repeat;
  border: 1px solid transparent;
  color: #003a56;
  font-size: 1.8rem;
  font-weight: 400;
  line-height: 2.6rem;
  position: relative;
  text-decoration: none;
}
.rich-text h2 a:not(.btn),
.rich-text h3 a:not(.btn),
.rich-text h4 a:not(.btn),
.rich-text h5 a:not(.btn),
.rich-text h6 a:not(.btn),
.rich-text sup a:not(.btn) {
  font-size: inherit;
  letter-spacing: inherit;
  line-height: inherit;
}
.rich-text a:not(.btn):visited {
  background-size: 100% 1px, 33% 1px;
  background-position: 50% calc(100% - 2px), 50% calc(100%);
}
.rich-text a:not(.btn):focus {
  border-color: #003a56;
  border-radius: 5px;
  outline: none;
}
.rich-text a:not(.btn):hover {
  background-image: linear-gradient(#003a56, #003a56), linear-gradient(#003a56, #003a56);
  background-size: 100% 1px, 100% 1px;
  background-position: 50% calc(100% - 2px), 50% calc(100%);
}
.rich-text a:not(.btn):focus:hover {
  background-image: none;
}
.rich-text .copy-lead a,
.rich-text.copy-lead a {
  font-size: 2rem;
  font-weight: 400;
  line-height: 2.8rem;
}
.rich-text.copy-small p,
.rich-text.copy-small a {
  font-size: 1.4rem;
  line-height: 1.8rem;
  font-weight: 400;
}
.rich-text.copy-small a:not(.btn) {
  background: none;
  border-radius: 0;
  border-bottom: 1px solid #003a56;
  font-weight: 400;
}
.rich-text.copy-small a:not(.btn):hover {
  background: none;
  border-bottom-style: double;
  border-bottom-width: 3px;
}
.rich-text.copy-small a:not(.btn):focus {
  border-radius: 5px;
}

/* rich text snippets */
.rich-text h2 {
  margin: 0;
  padding: 14px 0 13px;
}
.rich-text h3 {
  margin: 0;
  padding: 15px 0 14px;
}
.rich-text h4 {
  margin: 0;
  padding: 13px 0;
}
.rich-text h5 {
  margin: 0;
  padding: 12px 0 4px;
}
.rich-text h6 {
  margin: 0;
  padding: 15px 0 8px;
}
.rich-text h2 + p,
.rich-text h3 + p,
.rich-text h4 + p,
.rich-text h5 + p,
.rich-text h6 + p {
  margin-top: 0;
}

.rich-text strong,
.rich-text b {
  font-weight: 700;
}
.rich-text p {
  margin: 15px 0;
}
.rich-text p:last-child {
  margin-bottom: 0;
}
.rich-text p:first-child {
  margin-top: 0;
}
.rich-text .btn {
  margin: 5px 0 8px;
  font-size: 2rem;
  line-height: 2rem;
  color: #ffffff;
  background-image: none;
  border: none;
}
.rich-text .btn--secondary {
  font-size: 2rem;
  line-height: 2rem;
  color: #003a56;
  border: 1px solid #003a56;
}
.rich-text .btn:hover {
  border: none;
  color: #003a56;
  background-image: none;
  text-decoration: underline;
}
.rich-text .btn:focus {
  border: none;
  background: #003a56;
}
.rich-text .btn:active {
  color: #003a56;
  background: #ebf8ff;
  text-decoration: underline;
}
.rich-text .btn:hover::after,
.rich-text .btn:focus::after {
  background: none;
}
.rich-text .btn:focus::after,
.rich-text .btn:active::after {
  content: '';
  display: block;
  width: calc(100% + 4px);
  height: calc(100% + 4px);
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  border-radius: 7px;
  border: 2px solid #003a56;
  background: none;
}
.rich-text .btn--secondary:focus {
  background: none;
  border: 1px solid #003a56;
}
.rich-text .btn--secondary:hover {
  border: 1px solid #c8dde8;
}
.rich-text .btn--secondary:active {
  text-decoration: underline;
}
.rich-text .btn:focus:hover {
  background-color: transparent;
  text-decoration: underline;
}
.rich-text .btn--secondary:focus:hover {
  color: #003a56;
  border: 1px solid #f3f9fc;
  background: #f3f9fc;
}
.rich-text.copy-small .btn {
  padding: 13px 24px 11px;
  font-weight: 500;
  border-bottom: none;
}
.rich-text.copy-small .btn--secondary {
  padding: 12px 24px 10px;
  border-bottom: 1px solid #003a56;
}
.rich-text.copy-small .btn:hover {
  border-bottom: none;
  text-decoration: underline;
}

.rich-text-table {
  margin: 10px 0;
  overflow-x: auto;
  text-align: left;
  font-size: 1.4rem;
  line-height: 1.8rem;
  font-weight: 400;
}
.rich-text-table table {
  width: 100%;
  border-bottom: 1px solid rgba(0, 58, 86, 0.5);
}
.rich-text-table tr {
  border-top: 1px solid rgba(0, 58, 86, 0.5);
}
.rich-text-table th {
  color: #003a56;
  background: #ebf8ff;
  font-weight: 400;
}
.rich-text-table th,
.rich-text-table td {
  padding: 19px 20px;
}
.rich-text-table caption {
  margin: 5px 0;
  text-align: left;
}
.rich-text-table th + td,
.rich-text-table td + td,
.rich-text-table th + th {
  padding-left: 20px;
}

/* rich text snippets - list types */
.list {
  margin: 10px 0;
  list-style-type: disc;
  font-size: 1.8rem;
  line-height: 2.6rem;
}
.list--tick,
.list--ordered {
  list-style-type: none;
}
.list li {
  position: relative;
  margin-bottom: 17px;
  margin-left: 18px;
  padding-left: 8px;
}
.list li::before {
  position: absolute;
  content: '';
  display: block;
  top: 2px;
  left: -30px;
  font-size: 1.8rem;
  line-height: 2.5rem;
}
.list--lead {
  font-size: 2rem;
  line-height: 2.8rem;
  letter-spacing: -0.01rem;
}
.list--lead li {
  padding-left: 11px;
  margin-left: 20px;
}
.list--tick {
  font-weight: 400;
}
.list--tick li {
  padding-left: 0;
  margin-left: 28px;
}
.list--tick li::before {
  width: 20px;
  height: 20px;
  background: var(--icon-tick);
  background-position: center;
  background-size: cover;
}
.list--tick.list--lead li::before {
  top: 3px;
}
.list--ordered {
  font-weight: 400;
}
.list--ordered li {
  counter-increment: count;
  padding-left: 0;
  margin-left: 28px;
}
.list--ordered li::before {
  content: counter(count);
  left: -28px;
  top: 0;
  color: #003a56;
}

/* background colours */
.bg--aqua {
  background: #99e5ef;
}
.bg--lime {
  background: #e9ed9c;
}
.bg--coral {
  background: #ffc1cb;
}

@media screen and (max-width: 1024px) {
  .form__dropdown--mobile,
  .form__dropdown--mobile option {
    padding: 13px 35px 13px 15px;
  }
  .form__dropdown--mobile {
    width: 100%;
    display: block;
    height: 53px;
    margin-bottom: 8px;
    border: 1px solid rgba(0, 49, 92, 0.5);
    background: var(--icon-chevron-navy) no-repeat top 50% right 10px, #f2f5f7;
    border-radius: 4px;
    color: #003a56;
    -webkit-appearance: none;
    -moz-appearance: none;
    appearance: none;
    font-weight: 400;
  }
  .form__field--dropdown .form__dropdown.form__dropdown--mobile:focus {
    border: 2px solid rgba(0, 49, 92);
  }
}

@media screen and (max-width: 768px) {
  h1,
  .h1 {
    font-size: 3.2rem;
    line-height: 4rem;
  }
  h2,
  .h2 {
    font-size: 2.6rem;
    line-height: 3.2rem;
  }
  h3,
  .h3 {
    font-size: 2.2rem;
    line-height: 2.8rem;
  }
  h4,
  .h4 {
    font-size: 2rem;
    line-height: 2.6rem;
  }
  h5,
  .h5 {
    font-size: 1.6rem;
    line-height: 2rem;
  }
  h6,
  .h6 {
    font-size: 1.4rem;
    line-height: 1.6rem;
  }

  p,
  .list,
  .list li::before,
  .rich-text a:not(.btn) {
    font-size: 1.6rem;
    line-height: 2.4rem;
  }

  .rich-text-table th,
  .rich-text-table td {
    padding: 19px 10px;
  }

  .rich-text-table th + td,
  .rich-text-table td + td,
  .rich-text-table th + th {
    padding-left: 10px;
  }

  .list--lead {
    font-size: 2rem;
    line-height: 2.8rem;
    letter-spacing: -0.01rem;
  }

  .copy-small,
  .rich-text.copy-small a,
  .general-link--small {
    font-size: 1.3rem;
    line-height: 1.6rem;
  }

  .rich-text h2 {
    padding: 16px 0 10px;
  }
  .rich-text h3 {
    padding: 17px 0 11px;
  }
  .rich-text h4 {
    padding: 12px 0 7px;
  }
  .rich-text h5 {
    padding: 14px 0 5px;
  }
  .rich-text h6 {
    padding: 16px 0 6px;
  }
  .rich-text p {
    margin: 11px 0;
  }
  .rich-text .copy-lead a {
    font-size: 2rem;
    line-height: 2.8rem;
  }

  .form__field--dropdown .form__dropdown--mobile {
    height: 53px;
  }
}
