.popup {
  &.desktop_only {
    @include max(laptop) {
      display: none;
    }
  }

  &.mobile_only {
    @include min(laptop) {
      display: none;
    }
  }
  .modalOverlay {
    position: fixed;
    width: 100%;
    height: 100%;
    background-color: var(--overlay-backgorund-color);
    transition: opacity 0.15s linear;
    top: 0;
    bottom: 0;
    z-index: map-get($z-index, modal);
  }
  .modalInner {
    display: flex;
    justify-content: flex-start;
    align-items: center;
    position: fixed;
    top: 0;
    height: 100%;
    width: 100%;
    z-index: map-get($z-index, modal);
    width: 100%;
    .activeModal {
      display: flex;
      justify-content: center;
      align-items: center;
      left: 0;
      right: 0;
    }

    .itemsContent {
      display: block;
      z-index: map-get($z-index, modal);
      width: fit-content;
      height: fit-content;
      top: 0;
      left: 0;
      position: relative;
      width: 100%;
      height: 100%;
      padding-top: 1.6rem;
      @include min(tablet) {
        padding-top: 0;
        width: 100%;
        height: fit-content;
        border-bottom-right-radius: 1.6rem;
      }
      .popupCenter {
        width: 100%;
        height: 100%;
        display: flex;
        flex-direction: column;
        align-items: center;
        justify-content: center;

        @include min(tablet) {
          justify-content: center;
        }
        .modalContent {
          background: var(--popup-backgorund-color);
          padding: 0.8rem 2.4rem;
          width: 100%;
          border-radius: 1rem;
          margin-top: 4.5rem;
          position: relative;
          background-image: url('../../../../static/images/popup-bg.webp');
          background-repeat: no-repeat;
          background-size: cover;
          @include min(tablet) {
            margin-top: 0;
          }
          @include max(mobile) {
            overflow: scroll;
          }
          .closeIcon {
            position: absolute;
            top: 1.5rem;
            right: 1.5rem;
            width: 32px;
            height: 32px;
            background: transparent;
            border-radius: 40px;
            @include flex-direction(column);
            @include flex-align(center, center);

            > svg {
              width: 2.4rem;
              height: 2.4rem;
            }
          }
          .modalTitle {
            > p {
              font-size: 2.4rem;
              margin-bottom: 1rem;
              margin-top: 1rem;
              line-height: 3.3rem;
              font-weight: bold;
              text-align: center;
              padding-right: 1.6rem;

              @include min(tablet) {
                font-size: 3.2rem;
                line-height: 4.4rem;
                margin-top: 1.2rem;
                margin-bottom: 1.3rem;
              }
            }
          }
        }
      }
    }
  }

  &.toggleButton {
    .modalInner {
      left: -100vw;
      transition: all 0.2s;
      -moz-transition: all 0.7s;
      -webkit-transition: all 0.7s;
      -o-transition: all 0.7s;

      @include min(tablet) {
        max-width: 68rem;
        min-width: 68rem;
        margin-top: 0;
        width: auto;
        left: -68rem;
      }
      @include min(laptop) {
        max-width: 78rem;
        min-width: 78rem;
        margin-top: 0;
        width: auto;
      }
      @include min(laptop) {
        left: -78.4rem;
      }

      &.activeModal {
        left: 0;
        transition: all 0.7s;
        -moz-transition: all 0.7s;
        -webkit-transition: all 0.7s;
        -o-transition: all 0.7s;
      }
    }
    .itemsContent {
      .popupCenter {
        .modalContent {
          .modalTitle {
            p {
              font-size: 2rem;
              line-height: 3rem;
              margin-bottom: 1.3rem;
              margin-top: 1.2rem;
            }
          }
          .closeIcon {
            @include min(tablet) {
              display: none;
            }
          }
        }
      }
      .toggleButtonPopup {
        cursor: pointer;
        display: none;
        background: var(--toggle-backgorund-color);
        border-radius: 0px 16px 16px 0px;
        position: absolute;
        right: -8.7rem;
        width: 8.7rem;
        height: 17rem;
        top: 0;
        padding: 2rem 1rem;
        p {
          font-weight: bold;
          font-size: 12px;
          text-align: center;
          text-transform: uppercase;
          color: #000000;
          line-height: 1.6rem;
        }
        @include min(tablet) {
          display: block;
        }
      }
    }
  }
  &.defaultPopup {
    .modalInner {
      display: none;

      @include min(tablet) {
        max-width: 68rem;
        min-width: 68rem;
        margin-top: 0;
        width: auto;
        left: -68rem;
      }
      .itemsContent {
        .popupCenter {
          .modalContent {
            .modalTitle {
              p {
                font-size: 2rem;
                line-height: 3rem;
                margin-bottom: 1.3rem;
                margin-top: 1.2rem;
                text-align: left;
              }
            }
          }
        }
      }
      &.activeModal {
        display: flex;
        left: 0;
        right: 0;
        margin: 0 auto;
      }
    }
  }
}
