/* plugin code --------------------------------------------- */

/* overlay --------------------------------------------  */
#mgznkr-overlay-for-popup {
  position: fixed;
  inset: 0;
  display: flex;
  justify-content: flex-end;
  align-items: flex-start;
  visibility: hidden;
  opacity: 0;
  transition:
    opacity 0.5s ease,
    visibility 0.5s ease;
  z-index: 999;
  pointer-events: none;
}

#mgznkr-overlay-for-popup.open {
  visibility: visible;
  opacity: 1;
}

@media (max-width: 539px) {
  #mgznkr-overlay-for-popup {
    align-items: flex-end;
  }
}

/* popup style and effect ------------------------------ */
.mgznkr-popup-effect > #mgznkr-popup-content {
  transform: scaleX(0);
  transform-origin: right center;
  opacity: 0;

  transition:
    transform 0.8s cubic-bezier(0.34, 1.56, 0.64, 1),
    opacity 0.5s ease;
  margin-left: unset !important;
  margin-right: 2px !important;
  top: 50%;
  width: 500px;
  max-width: 100vw;
  pointer-events: all;
  position: relative;
}

.mgznkr-popup-effect.open > #mgznkr-popup-content {
  transform: scaleX(1);
  opacity: 1;
}

@media (max-width: 539px) {
  .mgznkr-popup-effect > #mgznkr-popup-content {
    margin: 0 3px 20px !important;
    top: unset;
  }
}

/* Gutenberg: Overlay immer sichtbar ---------------------------------------- */
.editor-styles-wrapper .mgznkr-popup-effect > #mgznkr-popup-content {
  transform: scaleX(1);
  opacity: 1;
}

.editor-styles-wrapper #mgznkr-overlay-for-popup {
  visibility: visible;
  opacity: 1;
  position: relative;
}