.menu {
  display: flex;
  padding-top: 24px;
  padding-bottom: 24px;
  margin-right: -15px;
  margin-left: -15px;

  &__list {
    padding-left: 0;
    list-style-type: none;
    margin-bottom: 0;
    width: 100%;
  }

  &__header {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 100%;
    padding: 12px 0;
  }

  &__title {
    display: flex;
    align-items: center;
    margin-bottom: 0;
    font-size: 1.125rem;
    font-weight: 500;
    line-height: 1.375rem;
    margin-left: 8px;
  }

  &__total {
    display: flex;
    align-items: center;
    justify-content: center;
    background: $blue-dark;
    color: $white;
    border-radius: 50px;
    width: 18px;
    height: 18px;
    font-size: .75rem;
    font-weight: 500;
    line-height: 1rem;
    margin-left: 10px;
  }

  &__description {
    margin-bottom: 0;
    display: none;
  }

  &__item {
    position: relative;

    & + & {
      &:before {
        content: '';
        border-top: 1px solid $gray;
        position: absolute;
        top: 0;
        left: 50%;
        width: calc(100% - 30px);
        transform: translate(-50%, -50%);
      }
    }
  }

  &__link {
    padding: 0 15px;
    color: $blue-dark;
    display: flex;
    align-items: center;
    text-decoration: none;

    &:hover {
      text-decoration: none;
    }

    &:focus {
      background: $ma-white;
    }

    .icon {
      color: $blue-satin;
      font-size: 1.6rem;

      &-arrow {
        font-size: 1.6rem;
        color: $blue;
      }
    }
  }

  &__icon {
    width: 32px;
    height: 32px;
    display: flex;
    align-items: center;
    justify-content: center;

    &--arrow {
      margin-left: auto;
    }
  }
}

@include media-breakpoint-up(sm) {
  .menu {
    padding-top: 32px;
    padding-bottom: 32px;
    margin: 0;

    &__header {
      padding-right: 8px;
      padding-left: 8px;
    }

    &__item {
      & + & {
        &:before {
          width: 100%;
        }
      }
    }

    &__link {
      padding-right: 0;
      padding-left: 0;
    }
  }
}

@include media-breakpoint-up(md) {
  .menu {
    &__header {
      padding: 0;
    }

    &__list {
      display: grid;
      grid-template-columns: 1fr 1fr;
      grid-auto-rows: 1fr;
      grid-gap: 24px;
    }

    &__item {
      padding: 0;
      display: flex;

      & + & {
        border-top: 0;

        &:before {
          content: none;
        }
      }
    }

    &__link {
      padding: 24px;
      flex-direction: column;
      align-items: flex-start;
      position: relative;
      border: 1px solid $gray;
      border-radius: 4px;
      width: 100%;

      &:focus {
        background: initial;
      }

      &:focus,
      &:hover {
        border-color: $blue;
        color: $blue-dark;
      }
    }

    &__description {
      display: block;
      margin-top: 16px;
      font-size: .875rem;
      font-weight: 400;
      line-height: 1.375rem;
      color: $gray-dark;
    }

    &__icon {
      width: 48px;
      height: 48px;

      .icon {
        font-size: 2rem;
        height: auto;
      }
    }

    &__total {
      min-width: 24px;
      height: 24px;
    }
  }
}

@include media-breakpoint-up(lg) {
  .menu {
    padding-top: 40px;
    padding-bottom: 40px;

    &__list {
      grid-template-columns: repeat(3, 1fr);
    }
  }
}
