/*---------  Flyout  -------------*/

.rm-flyout {
  display: flex;
  padding: 0;
  position: fixed;
  bottom: 20%;
  z-index: 110;
  right: 0;
  transition: transform .7s cubic-bezier(.68, -0.55, .27, 1.55);
  transform: translateX(100%);
  width: fit-content;
  height: auto;

  .flyout-label {
    background-color: var(--primary-color);
    color: var(--light-color);
    cursor: pointer;
    display: flex;
    font-family: var(--secondary-font);
    font-size: 14px;
    line-height: 1em;
    font-weight: var(--fw-semi-bold);
    flex-direction: column;
    align-items: center;
    justify-content: center;
    letter-spacing: 10px;
    /* line-height: 1em; */
    padding: 10px 7.5px 2.5px 7.5px;
    position: relative;
    text-transform: uppercase;
    /* text-orientation: upright; */
    writing-mode: vertical-rl;
    transform: rotate(180deg);
    transform-origin: center center;
    /* Change to the text-orientation to the following if letters need to appear sideways: */
    /* text-orientation: mixed; */
    /* For sideways letters, add the following if letters need to start at the bottom of the flyout: */
    /* transform: rotate(180deg); */
    width: fit-content;

    /* Desktop Styles */
    @media (width >= 1024px) {
      font-size: 17px;
    }
  }

  .close-flyout {
    background: var(--primary-accent);
    border: none;
    color: var(--light-color);
    font-weight: var(--fw-thin);

    &.fixed-close {
      position: absolute;
      top: 0;
      font-size: 16px;
      line-height: 1em;
      transform: translateY(-50%);
      right: 5px;
      border-radius: 50%;
      width: 30px;
      height: 30px;
      display: flex;
      justify-content: center;
      align-items: center;
      z-index: 10;
    }

    .close-container {
      position: relative;
      width: 60%;
      height: 60%;

      &:before,
      &:after {
        background-color: var(--light-color);
        content: '';
        position: absolute;
        top: 0;
        left: 50%;
        bottom: 0;
        right: 0;
        width: 1px;
      }

      &:before {
        transform: translateX(-50%) rotate(45deg);
      }

      &:after {
        transform: translateX(-50%) rotate(-45deg);
      }
    }
  }

  .flyout-content {
    background-color: var(--primary-color);
    color: var(--light-color);
    display: flex;
    height: auto;
    position: relative;
    text-decoration: none;

    .flyout-image {
      display: flex;
      max-width: 300px;

      img {
        object-fit: cover;
        height: auto;
        width: 100%;
      }
    }

    .flyout-icon {
      svg {
        width: auto;
        height: 20px;
        margin: 0;
      }
    }

    .flyout-text {
      /*  Add bg image if needed */
      /* background-image: url('');
      background-position: center;
      background-repeat: no-repeat;
      background-size: cover; */
      display: flex;
      row-gap: 1em;
      font-family: var(--primary-font);
      font-size: 14px;
      line-height: 1.25em;
      font-weight: var(--fw-regular);
      flex-direction: column;
      align-items: center;
      justify-content: center;
      max-width: 300px;
      padding: 15px;
      text-align: center;

      p {
        margin-bottom: 0;
      }

      ul {
        margin: 0;

        li {
          list-style: none;
        }
      }

      a.button {
        cursor: pointer;
        display: block;
      }
    }
  }
}

/*---------- End Flyout  ---------*/

/*----------  Popup  -------------*/

.rm-active-popup {
  background-color: rgb(from var(--dark-color) r g b / 0.8);
  padding: 20px;
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  display: none;
  justify-content: center;
  overflow-y: scroll;
  overflow-x: hidden;
  z-index: 99999;

  /* Tablet Styles */
  @media (width >= 768px) {
    align-items: center;
  }

  &.show-popup {
    display: flex !important;
  }

  &.popup-image-only {
    align-items: center;

    .popup-content {
      .popup-image {
        width: 100%;
      }
    }
  }

  button.close-top-right-btn {
    background: var(--dark-alt);
    border: none;
    border-radius: 20px;
    color: var(--light-color);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 20px;
    line-height: 1em;
    top: 0;
    right: 0;
    margin: 10px;
    padding: 0;
    position: fixed;
    height: 30px;
    width: 30px;
    z-index: 1;

    /* Tablet Styles */
    @media (width >= 768px) {
      position: absolute;
    }

    .close-container {
      position: relative;
      width: 60%;
      height: 60%;

      &:before,
      &:after {
        background-color: var(--light-color);
        content: '';
        position: absolute;
        top: 0;
        left: 50%;
        bottom: 0;
        right: 0;
        width: 1px;
      }

      &:before {
        transform: translateX(-50%) rotate(45deg);
      }

      &:after {
        transform: translateX(-50%) rotate(-45deg);
      }
    }
  }

  .popup-content {
    background-color: var(--light-color);
    display: flex;
    width: 1000px;
    height: auto;
    max-width: 100%;
    overflow-y: scroll;
    overflow-x: hidden;
    scrollbar-width: none;
    position: relative;
    z-index: 0;

    &::-webkit-scrollbar {
      display: none;
    }

    .popup-bg {
      position: absolute;
      top: 0;
      left: 0;
      right: 0;
      bottom: 0;
      width: 100%;
      height: 100%;
      object-fit: cover;
    }

    .popup-image {
      width: 300px;
      height: auto;
      max-width: 100%;

      img {
        width: 100%;
        height: auto;
      }
    }

    .popup-container {
      color: var(--primary-color);
      display: flex;
      flex-direction: column;
      justify-content: center;
      align-items: center;
      row-gap: 1em;
      margin: auto;
      padding: 40px;
      max-width: 100%;
      min-height: 500px;
      height: auto;
      width: auto;
      position: relative;
      text-align: left;

      /* Tablet Styles */
      @media (width >= 768px) {
        padding: 40px 175px;
      }

      /* Desktop Styles */
      @media (width >= 1024px) {
        justify-content: flex-end;
      }

      h2 {
        color: var(--secondary-color);
        margin-top: 0;
        text-align: center;
        text-transform: uppercase;
      }

      .content {
        text-align: center;
      }

      a.button {
        text-align: center;

        &.close-popup {
          margin-left: auto;
          margin-right: auto;
        }
      }
    }
  }
}

/*----------  End Popup  -------------*/