.modal-barcode {
  .modal-box__container {
    padding: 0;

    .barcode {
      width: 100%;

      &-wrap {
        height: 100%;
        display: flex;
        justify-content: center;
        align-items: center;
        padding: 40px;
        background: $white;
      }

      &__discount {
        right: 2.5rem;
      }

      &__container {
        padding: 0;

        svg {
          height: 100%;
          padding: 15px 0;
        }
      }

      &__footer {
        bottom: 5px;

        &_text {
          margin-top: 5px;
        }
      }
    }
  }

  &-targeted {
    .barcode {
      &__header {
        &-title,
        &-info {
          text-align: center;
        }

        &-title {
          font-weight: 500;
          margin-bottom: 5px;
        }
      }
    }
  }
}

.rotation-wrap {
  position: absolute;
  bottom: 15px;

  .phone {
    height: 50px;
    width: 100px;
    margin: 40px auto 0;
    border: 3px solid $blue;
    border-radius: 10px;
    animation: rotate 1.5s ease-in-out infinite alternate;
  }

  .message {
    text-align: center;
    color: $red;
    font-size: 1em;
    margin-top: 40px;
  }
}

.barcode {
  &-wrap {
    margin: 0 auto;
    padding: 15px;
    border: 1px solid $gray;
    position: relative;

    .icon {
      svg {
        color: $warm-grey;
        width: 1rem;
        height: 1rem;
      }
    }
  }

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

  &__container {
    padding: 15px 0;

    svg {
      width: 100%;
    }
  }

  &__footer {
    text-align: center;
    position: relative;

    &_expand {
      display: none;
      text-align: center;
      font-weight: 400;
      margin-top: 10px;

      .icon {
        svg {
          color: $blue;
        }
      }
    }
  }

  &__discount {
    position: absolute;
    top: 0;
    right: 0;
  }
}

@keyframes rotate {
  0% {
    transform: rotate(0deg);
  }

  50% {
    transform: rotate(-90deg);
  }

  100% {
    transform: rotate(-90deg);
  }
}

@include media-breakpoint-up(md) {
  .rotation-wrap {
    display: none;
  }

  .page_tradePro-rewards,
  .page_tradePro-discount {

    .modal-box {
      &_full {
        background: $white;

        .modal-box__container,
        .modal-box__row,
        .modal-box__columns,
        .modal-box__content {
          height: 100%;
        }

        .modal-box__container {
          margin-top: 0;
          margin-bottom: 0;
          max-width: none;
        }

        .modal-box__content {
          width: auto;
          box-shadow: none;
        }

        .modal-box__inner-row {
          @include make-row;
        }
      }
    }

    .modal-box__columns {
      @include make-col(12);
    }
  }
}

@include media-breakpoint-down(sm) {
  .barcode {
    &-wrap {
      font-size: 1rem;
    }

    &__footer {
      &_expand {
        display: block;
      }
    }
  }

  .modal-barcode {
    .barcode {
      &__footer {
        &_expand {
          display: none;
        }
      }
    }
  }
}

@media only screen and (orientation: landscape) {
  .rotation-wrap {
    display: none;
  }

  .modal-barcode {
    .modal-box__container {
      .barcode {
        &__container {
          svg {
            height: 60vh;
            padding: 0;
          }
        }
      }
    }
  }
}

@media only screen and (orientation: portrait) {
  .modal-barcode {
    .modal-box__container {
      .barcode {
        &-wrap {
          align-items: inherit;
        }
      }
    }
  }
}
