// wrapper
.footer__wrapper {
  @include font-style('body--m');
  padding-bottom: $baseline * 4;
  padding-top: $baseline * 2.5;
}

// grid
.footer__grid {
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;

  &:first-child {
    padding-bottom: $spacing--l;
  }

  li a {
    @include link-states {
      @include color-dark-shade-main;
    }
  }


}

// collapsible
.footer__column {
  width: 100%;

  .collapsible__button {
    &::after,
    &::before {
      background: $color-brand--four;
    }
  }
}

// info
.footer__info {
  margin-bottom: $spacing--m;

  p:last-child {
    margin-bottom: 0;
  }
  // prevent blue color for auto-generated phone number hyperlinks
  a[href^='tel'] {
    color: inherit;
    text-decoration: inherit;
  }
}

// search
.footer__search {
  margin-bottom: $spacing--m;
  position: relative;
  width: 100%;

  &-input[type='text'] {
    @include color-dark-shade-main;
    @include text-ellipsis;
    background: $color--two-80;
    border: 1px solid $color--two-80;
    padding-right: 50px;
    transition: background $transition-duration--fast ease-out, border-color $transition-duration--fast ease-out,
      color $transition-duration--fast ease-out;

    &:active,
    &:focus {
      padding-right: 50px;
    }

    &:focus {
      background: $color-brand--four;
      border: 2px solid $color-brand--four;
      color: $color-brand--two;
    }

    &::-webkit-input-placeholder {
      @include color-dark-shade-main;
    }
  }

  .icon {
    margin-top: -$spacing--xs;
    right: 20px;
    top: $spacing--m;

    svg {
      @include color-dark-shade-main;
      left: 0;
      position: absolute;
      top: 0;
      transition: fill $transition-duration--faster ease-out;
    }
  }

  svg {
    fill: $color--two-50; // deprecated
    margin-right: 5px;
  }
}

// info

.footer__info {
  order: 2;
  width: 100%;

  svg {
    @include color-dark-shade-main;
    margin-right: 5px;
  }
}

// bottom navigation
.footer__bottom-nav {
  margin-bottom: 0;
  order: 3;
  width: 100%;

  li {
    margin-bottom: $spacing--xs;
  }
}

// social media
.footer .social__list {
  order: 1;
  margin-bottom: $spacing--m;
  width: 100%;

  svg {
    @include color-dark-shade-main;
    transition: fill $transition-duration--fast ease-out;

    &:hover {
      fill: $color-brand--four;
    }
  }
}

// footer small
.footer--s {
  .footer__wrapper {
    padding-bottom: $baseline * 4;
    padding-top: $baseline * 4;
  }

  .footer__grid:first-child {
    border-bottom: 0;
    padding-bottom: 0;
  }
}

// viewport s/m
@include viewport--l('inversed') {
  .footer {
    &__grid.divider {
      border-bottom: 0;
    }
  }
}

// viewport l
@include viewport--l {
  // wrapper
  .footer__wrapper {
    padding-bottom: $spacing--l;
    padding-top: $spacing--xl;
  }

  // grid
  .footer__grid {
    & + & {
      margin-top: $spacing--m;
    }
  }

  // collapsible
  .footer__column {
    width: grid-columns(3, 12);

    .collapsible__button {
      display: none;
    }
  }

  // social media
  .footer .social__list {
    flex-wrap: wrap;
  }

  // info
  .footer__info p {
    margin-bottom: $spacing--m;
    width: 100%;
  }

  // bottom navigation
  .footer__bottom-nav {
    ul {
      display: flex;
      flex-wrap: wrap;
      margin-bottom: -($spacing--xs);

      li {
        margin-top: 0;
        margin-right: 30px;
      }
    }
  }

  // footer small
  .footer--s .footer__wrapper {
    padding-bottom: $spacing--l;
    padding-top: $spacing--l;
  }
}

// override width
.footer__column .extensive-link-list__item {
  width: 100%;
}

// background mappings
@include footer-background-mapping;
