.yith-plugin-fw__modal__wrap {
  display: flex;
  align-items: center;
  justify-content: center;
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  z-index: var(--yith-modal-z-index);
  background: rgba(34, 59, 80, 0.7);
  animation: yith-plugin-fw-fade-in .3s forwards;
  box-sizing: border-box;

  .yith-plugin-fw__modal__main {
    position: relative;
    background: #fff;
    border-radius: 10px;
    box-shadow: 1px 3px 16px rgba(0, 22, 59, .4);
    animation: yith-plugin-fw-appear-from-top .3s forwards;
    overflow: hidden;
    max-width: calc(100% - 20px);
    max-height: calc(100% - 20px);
    display: flex;
    flex-direction: column;
  }

  .yith-plugin-fw__modal__close {
    position: absolute;
    top: 0;
    right: 0;
    padding: 8px;
    font-size: 14px;
    font-weight: 600;
    color: #aaa;
    cursor: pointer;

    &:hover {
      color: #444;
    }
  }

  .yith-plugin-fw__modal__title {
    padding: 20px 25px;
    font-size: 1.5em;
    font-weight: 600;
    line-height: 1.5em;
    color: var(--yith-primary);
  }

  .yith-plugin-fw__modal__content {
    padding: 0 25px 25px;
  }

  .yith-plugin-fw__modal__footer {
    padding: 25px;
    background: #f7f7f7;
  }

  &.yith-plugin-fw__modal__wrap--scroll-content {
    .yith-plugin-fw__modal__content {
      overflow-y: auto;
    }
  }
}

.yith-plugin-fw__modal--opened {
  overflow: hidden;
}

.yith-plugin-fw__modal--no-title{
  .yith-plugin-fw__modal__content{
    padding-top: 25px;
  }
}

// Allow seeing WP Menu.

.yith-plugin-fw__modal--allow-wp-menu {
  .yith-plugin-fw__modal__wrap {
    z-index: var(--yith-modal-allow-wp-z-index);
    padding-left: $wp_menu_size;
    padding-top: $wp_top_bar_size;
  }

  #adminmenuback {
    z-index: calc(var(--yith-modal-allow-wp-z-index) + 1);
  }
}

@media only screen and (max-width: 960px) {
  .folded {
    .yith-plugin-fw__modal__wrap {
      padding-left: $wp_menu_folded_size;
    }
  }

  .auto-fold {
    .yith-plugin-fw__modal--allow-wp-menu {
      .yith-plugin-fw__modal__wrap {
        padding-left: $wp_menu_folded_size;
      }
    }
  }
}

@media screen and (max-width: 782px) {
  .auto-fold {
    .yith-plugin-fw__modal--allow-wp-menu {
      .yith-plugin-fw__modal__wrap {
        z-index: var(--yith-modal-z-index);
        width: 100%;
        height: 100%;
        padding-left: 0;
        padding-top: 0;
      }
    }

    .yith-plugin-fw__modal--allow-wp-menu-in-mobile {
      .yith-plugin-fw__modal__wrap {
        z-index: var(--yith-modal-allow-wp-z-index);
        padding-top: $wp_top_bar_mobile_size;
      }

      &.wp-responsive-open {
        .yith-plugin-fw__modal__wrap {
          padding-left: $wp_menu_mobile_size;
        }
      }
    }


  }
}