.popup-box {
  display: flex;
  justify-content: center;
  align-items: center;
  position: fixed;
  z-index: 999;
  width: 100%;
  height: 100%;
  top: 0;
  right: 0;
  bottom: 0;
  left: 0;
  opacity: 0;
  transition: opacity 0.3s ease;
}
.popup-box .popup-mask {
  position: absolute;
  z-index: 2;
  width: 100%;
  height: 100%;
  background: rgba(0, 0, 0, 0.7);
}
.popup-box .popup-content {
  position: relative;
  z-index: 10;
  width: fit-content;
  max-height: 82vh;
  max-width: 80%;
  background-color: #fff;
}
@media (max-width: 991px) {
  .popup-box .popup-content {
    max-width: calc(100% - 40px);
  }
}
.popup-box .popup-content .close-popup {
  position: absolute;
  top: -20px;
  right: -20px;
  border-radius: 50%;
  background: #fff;
  width: 40px;
  height: 40px;
  text-align: center;
  line-height: 40px;
  color: #000;
  font-size: 26px;
  font-weight: bold;
  border: none;
  box-shadow: none;
  outline: none;
  cursor: pointer;
}
@media (max-width: 991px) {
  .popup-box .popup-content .close-popup {
    top: -40px;
    right: 0;
    width: 30px;
    height: 30px;
    font-size: 20px;
    line-height: 30px;
  }
}
.popup-box .popup-content .popup-editor {
  width: var(--width, 1280px);
  height: fit-content;
  max-width: 100%;
  min-width: 400px;
  min-height: 300px;
  max-height: 82vh;
  overflow: auto;
}
.popup-box .popup-content .popup-editor::-webkit-scrollbar-track {
  -webkit-box-shadow: inset 0 0 10px rgba(0, 0, 0, 0.3);
  background-color: #dddddd;
}
.popup-box .popup-content .popup-editor::-webkit-scrollbar {
  width: 10px;
  background-color: black;
}
.popup-box .popup-content .popup-editor::-webkit-scrollbar-thumb {
  background-color: #747474;
}
.popup-box .popup-content .popup-editor .popup-image, .popup-box .popup-content .popup-editor img {
  display: block;
  max-width: 100%;
  width: auto;
  height: auto;
  object-fit: contain;
}
@media (max-width: 991px) {
  .popup-box .popup-content .popup-editor {
    min-width: 50vw;
    min-height: 100px;
  }
}

dialog.index-popup {
  background: transparent;
  border: 0;
  outline: 0;
}

dialog.index-popup[open] .popup-box {
  opacity: 1;
}

dialog.index-popup .popup-box.closing {
  opacity: 0;
}
