/* layout */
.ds-footer {
  background-color: var(--ds-color-london-20);
  color: var(--ds-color-london-100);
  padding: 2rem var(--ds-grid-gap) 0.3125rem;
  padding-bottom: 2.5rem;
  -webkit-text-size-adjust: 100%; /* Prevent font scaling in landscape in ios */
}

.ds-footer-cols-alpha {
  border-bottom: var(--ds-border-rule--inverse);
  margin: 0 auto 1.5rem auto;
  padding: 0 0 0.625rem 0;
}

.ds-footer-cols-alpha__lead {
  border-bottom: var(--ds-border-rule--inverse);
  margin: 0 0 1.5rem 0;
  padding: 0 0 0.625rem 0;
  .ds-navigation-link {
    display: inline-block;
    margin: 0 0 1.375rem 0;
  }
}

.ds-footer-cols-lambda {
  align-items: start;
  border-bottom: var(--ds-border-rule--inverse);
  margin: 0 auto 1rem auto;
}

.ds-footer-cols-lambda__group {
  .ds-navigation-link {
    display: inline-block;
    margin: 0 0 0.6875rem 0;
  }
}

.ds-footer-cols-omega {
  display: flex;
  flex-direction: column;
  margin: 0 auto;
  max-width: 89.5rem;
  ul {
    display: flex;
    flex-wrap: wrap;
  }
  .ds-navigation-link {
    margin: 0 var(--ds-grid-gap) 0.6875rem 0;
  }
}

/* lists */

.ds-footer__link-list {
  .ds-footer-cols-lambda & {
    padding: 0 0 1.375rem 0;
  }
  .ds-footer-cols-share & {
    display: flex;
    flex-wrap: wrap;
    margin: 0 0 0.75rem 0;
  }
  li {
    .ds-footer-cols-share & {
      margin: 0 0.75rem 0.75rem 0;
    }
  }
}

/* headers */

.ds-footer__header {
  color: var(--ds-color-london-100);
  font-family: var(--ds-type-system-sans-lining);
  font-size: var(--ds-type-scale-0);
  font-weight: 700;
  line-height: var(--ds-type-leading-lower);
  margin: 0 0 1.25rem 0;
}

/* copyright */

.ds-footer__copyright {
  color: var(--ds-color-london-70);
  display: block;
  font-family: var(--ds-type-system-sans-lining);
  font-size: var(--ds-type-scale--1);
  font-weight: 400;
  line-height: var(--ds-type-leading-lower);
  margin: 0 0 0.6875rem 0;
}

/* mission statement */

.ds-footer__mission-statement {
  display: block;
  font-family: var(--ds-type-system-serif);
  font-size: var(--ds-type-scale-1);
  font-weight: 400;
  line-height: var(--ds-type-leading-lower);
  margin: 0 0 1rem 0;
  max-width: 37.5rem;
  em {
    font-style: italic;
  }
}

/* cookie notice */

.ds-footer__cookie-notice {
  border-bottom: var(--ds-border-rule--inverse);
  font-family: var(--ds-type-system-sans);
  margin: 1.5rem auto;
  max-width: 89.5rem;
}

.ds-footer__cookie-notice p {
  color: var(--ds-color-london-85);
  font-size: var(--ds-type-scale-0);
  margin: 0 0 1.375rem;
}

.ds-footer__manage-cookies-btn {
  border-width: 0.0625rem;
  font-family: var(--ds-type-system-sans);
  font-size: var(--ds-type-scale--1);
  height: unset;
  line-height: unset;
  margin-bottom: 1.5rem;
  padding: 0.375rem;
}

@media (--ds-viewport-min-small) {
  .ds-footer__link-list {
    .ds-footer-cols-alpha__lead & {
      column-count: 2;
      column-gap: var(--ds-grid-gutter);
    }
  }
}

@media (min-width: 28.75rem) and (max-width: 37.4375rem) {
  .ds-layout-grid.ds-footer-cols-lambda {
    grid-template-columns: 1fr 1fr;
  }
}

@media (--ds-viewport-min-medium) {
  .ds-footer {
    padding-left: var(--ds-grid-gutter);
    padding-right: var(--ds-grid-gutter);
  }
  .ds-footer-cols-lambda__group {
    grid-column: span 2;
    &:last-child {
      display: grid;
      grid-column: span 4;
      ul {
        column-count: 2;
        column-gap: var(--ds-grid-gutter);
      }
    }
  }
  .ds-footer__link-list {
    .ds-footer-cols-alpha__lead & {
      column-count: 3;
      grid-column: span 4;
    }
  }
  .ds-footer-cols-alpha__lead {
    grid-column: 1 / -1;
  }
  .ds-footer-cols-share {
    grid-column: 1 / -1;
  }
  .ds-footer__mission-statement {
    grid-column: 1 / -1;
  }
}

@media (--ds-viewport-min-large) {
  .ds-footer-cols-alpha {
    padding-bottom: 0.625rem;
  }
  .ds-footer-cols-alpha__lead {
    border: 0;
    grid-column: span 3;
    margin-bottom: 0;
    padding-bottom: 0;
  }
  .ds-footer-cols-omega {
    flex-direction: row;
  }
  .ds-footer-cols-lambda__group {
    grid-column: span 3;
    &:last-child {
      grid-column: span 9;
      ul {
        column-count: 3;
      }
    }
  }
  .ds-footer-cols-share {
    grid-column: span 3;
  }
  .ds-footer__link-list {
    .ds-footer-cols-alpha__lead & {
      column-count: 1;
    }
    .ds-footer-cols-share & {
      width: 9rem;
    }
  }
  .ds-footer__copyright {
    margin-left: auto;
  }
  .ds-footer__mission-statement {
    font-size: var(--ds-type-scale-3);
    grid-column: span 6;
    max-width: 40rem;
  }
  .ds-footer__cookie-notice p {
    display: inline-block;
    margin: 0 0.5rem 1.5rem 0;
  }
  .ds-footer__manage-cookies-btn {
    margin: unset;
  }
}

@media (--ds-viewport-min-xlarge) {
  .ds-footer-cols-alpha__lead,
  .ds-footer-cols-lambda__group,
  .ds-footer-cols-share {
    grid-column: span 2;
  }
  .ds-footer-cols-lambda__group {
    &:last-child {
      grid-column: span 6;
    }
  }
  .ds-footer__mission-statement {
    grid-column: span 6;
  }
}
