.shopping-list {
  .empty-shopping-list {
    .save-to-shopping-list {
      .btn {
        margin-right: 10px;
        padding: 5px 10px;
        cursor: default;
      }

      .btn-outline-primary:hover {
        color: $blue;
        background-color: $white;
        border-color: $blue;
      }
    }
  }

  .my-shopping-list {
    .shop-list-info {
      padding-bottom: 1rem;
      flex-wrap: wrap;

      &::after {
        content: '';
        position: absolute;
        bottom: 0;
        left: 0;
        width: calc(100% - 30px);
        height: 1px;
        margin-left: 15px;
        border-bottom: 1px solid $gray;
      }

      &__ref {
        padding-top: 10px;
        font-size: 1rem;

        &_value {
          overflow-wrap: anywhere;
          word-break: break-all;
        }
      }

      &_item {
        width: 50%;
        font-weight: 400;
      }

      &_call-action {
        flex-direction: row;
        width: 50%;

        a {
          white-space: nowrap;
          margin: 0 6px;
          height: 25px;
          outline: none;
        }

        .icon {
          height: 20px;
          width: 20px;
          margin: 0 17px 0 0;
        }

        .share-call {
          &__mobile {
            display: block;
          }

          &__desktop {
            display: none;
          }
        }

        .share-email-via {
          display: flex;
          justify-content: space-between;
        }

        .share-call_not-register {
          font-weight: 500;
          color: $warm-grey;

          @include media-breakpoint-up(lg) {
            margin-right: 15px;
          }
        }
      }

      @include media-breakpoint-down(sm) {
        flex-direction: column-reverse;

        div {
          width: 100%;
        }

        &_call-action {
          display: flex;
          justify-content: space-between;
        }

        &_item {
          margin-top: 30px;
          text-align: center;
        }
      }

      @include media-breakpoint-only(md) {
        div {
          width: auto;
        }

        &_item {
          margin-right: 50px;
        }
      }
    }
  }

  .ref {
    display: grid;
    grid-template-columns: 1fr 2fr 100px;
    align-items: center;
    padding-top: 15px;
    margin-bottom: -5px;

    &__add {
      grid-column: 1 / span 1;
      display: flex;

      &-label {
        margin-left: 10px;

        &_hide {
          display: none;
        }
      }


      & .icon-info-component {
        vertical-align: middle;
        margin-right: 5px;
      }


      &-text {
        text-transform: capitalize;
        font-size: 1rem;
        font-weight: 400;
      }
    }

    &__field {
      grid-column: 2 / span 1;
      width: 100%;
      padding: 0 20px;

      &_error {
        .ref__error {
          visibility: visible;
        }

        .ref__label input {
          border-color: $red;
        }
      }

    }

    &__count {
      text-align: right;

      &_max {
        color: $red;
      }

      &_hide {
        visibility: hidden;
      }
    }

    &__label {
      width: 100%;
    }

    &__action {
      grid-column: 3 / span 1;
      padding-left: 2px;
      padding-bottom: 5px;
    }

    &__link {
      font-weight: 500;
      text-transform: capitalize;
    }

    &__remove {
      padding-left: 20px;
      font-size: 1.25rem;

      &_hide {
        visibility: hidden;
      }
    }

    &__info {
      &_hide {
        visibility: hidden;
        display: none;
      }
    }

    &__error {
      font-size: .75rem;
      line-height: 1rem;
      margin: 0;
      color: $red;
      visibility: hidden;
    }
  }
}

@include media-breakpoint-up(md) {
  .shopping-list {
    .my-shopping-list {
      .shop-list-info {
        &_call-action {
          .share-call {
            margin-right: 65px;

            &__mobile {
              display: none;
            }

            &__desktop {
              display: inline-block;
            }
          }
        }
      }

      .shop-list {
        &__ref {
          height: 73px;
        }
      }

      .ref {
        &__count {
          position: absolute;
          top: 5px;
          right: 136px;
        }

        &__label {
          position: relative;
          top: 10px;
        }

        &__error {
          position: relative;
          top: 5px;
        }
      }
    }
  }
}

@include media-breakpoint-up(lg) {
  .shopping-list {
    .my-shopping-list {
      .shop-list-info {
        &_item {
          width: 40%;
        }

        &_call-action {
          width: 60%;

          .share-call_not-register {
            margin-right: 15px;
          }
        }
      }
    }
  }
}


@include media-breakpoint-down(lg) {
  .shopping-list {
    .ref {
      grid-template-columns: 2fr 3fr 100px;
    }
  }
}

@include media-breakpoint-down(sm) {
  .shopping-list {
    .ref {
      grid-template-columns: 4fr 1fr;
      padding-top: 15px;
      margin-bottom: -10px;

      &_wide {
        grid-template-columns: 2fr 1fr;
      }

      &__add {
        grid-column: 1 / span 1;
        order: 1;
      }

      &__field {
        order: 3;
        grid-column: 1 / span 2;
        padding: 10px 0 0;
      }

      &__action {
        grid-column: 2 / span 1;
        order: 2;
        text-align: right;
        padding-bottom: 2px;
        padding-left: 0;
      }

      &__remove {
        padding-left: 10px;

        &_hide {
          display: none;
        }
      }

      &__info {
        &_hide {
          visibility: hidden;
          display: none;
        }
      }
    }

    .my-shopping-list {
      .shop-list-info {
        &_item {
          width: 40%;
        }

        &_call-action {
          width: 60%;

          .share-call_not-register {
            margin-right: 15px;
          }
        }
      }
    }

  }
}

@include media-breakpoint-down(sm) {
  .shopping-list {
    .header-line-break {
      display: none;
    }

    .empty-shopping-list {
      a {
        text-decoration: none;
      }
    }

    .my-shopping-list {
      .download-pdf {
        display: none;
      }

      .shop-list-info {
        flex-direction: column-reverse;

        div {
          width: 100%;
        }

        &_call-action {
          display: flex;
          justify-content: space-between;

          &.user-reg {
            flex-direction: column;
          }

          & .share-via {
            text-align: center;
            width: 200px;
            align-self: flex-end;

            & .socials {
              padding: 5px 0;
            }

            & .socials__item {
              margin-left: 0;
            }
          }
        }

        &_item {
          margin-top: 30px;
          text-align: center;
        }
      }
    }
  }
}

@include media-breakpoint-down(xs) {
  .tooltip-inner {
    // sass-lint:disable no-important
    max-width: 260px !important;
  }
}
