@use "../../tokens/color" as *;
@use "../../tokens/font" as *;
@use "../../tokens/spacing" as *;
@use "../../base/mixins";
@use "../../tokens/screens" as *;

.iati-footer {
  color: #fff;
  font-weight: 600;
  margin-top: auto;

  a:not([class]) {
    color: currentColor;
    &:hover {
      color: $color-blue-30;
    }
  }

  ul,
  ol {
    @include mixins.unstyled-list();
  }
}

.iati-footer__section {
  margin-block: 2rem;

  &:not(:first-of-type) {
    padding-block-start: 2rem;
    border-block-start: 1px solid $color-blue-30;
  }
}

.iati-footer__section--first .iati-footer__container {
  display: flex;
  gap: 2rem;
  flex-direction: column;
  @media (min-width: $screen-md) {
    justify-content: space-between;
    flex-direction: row;
  }
}

.iati-footer__section--last .iati-footer__container {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 1rem;
  > :first-child {
    margin-inline-end: auto;
  }
}

.iati-footer__container {
  @include mixins.page-width-container();
}

.iati-footer-block__title {
  margin: 0 0 1.5rem;
  font-family: $font-stack-heading;
  font-size: 1.25rem;
  line-height: 1.2;
  font-weight: 700;
  &--centered {
    @media (min-width: $screen-md) {
      text-align: center;
    }
  }
}

.iati-footer-block__content {
  :where(p, li) {
    margin: 0;
  }
}

.iati-footer-block__content--columns {
  display: flex;
  flex-wrap: wrap;
  gap: 2rem;
  align-items: flex-start;

  & > * {
    flex-grow: 1;
  }
}

.iati-footer__legal-nav {
  font-size: 1.0625rem;
  a {
    line-height: 1.1;
    &:visited {
      color: $color-blue-30;
    }
  }
}

.iati-footer__social {
  display: flex;
  gap: 18px;
}

.iati-footer__actions {
  display: flex;
  gap: 1rem;
  justify-content: flex-end;
  align-items: flex-start;
}
