/* Page-load popup: viewport based and responsive */
#mask {
  position: fixed;
  inset: 0;
  width: 100%;
  height: 100%;
  z-index: 9000;
  background-color: #26262c;
  display: none;
  opacity: 0.9;
}

#boxes .window {
  position: fixed;
  left: 50%;
  top: 50%;
  transform: translate(-50%, -50%);
  width: min(750px, calc(100vw - 30px));
  max-height: calc(100vh - 30px);
  display: none;
  z-index: 9999;
  padding: 10px;
  border-radius: 5px;
  text-align: center;
  overflow: auto;
  box-sizing: border-box;
}

#boxes #dialog {
  width: min(750px, calc(100vw - 30px));
  max-width: 100%;
  height: auto;
  max-height: calc(100vh - 30px);
  padding: 10px;
  background-color: #ffffff;
  font-size: 15pt;
  box-sizing: border-box;
  overflow: auto;
}

#boxes #dialog #san {
  position: relative;
}

#boxes #dialog #san > img:not([src*="close-icon"]) {
  width: 100%;
  height: auto;
  max-height: calc(100vh - 70px);
  object-fit: contain;
}

#boxes #dialog .close {
  position: absolute;
  top: 0;
  right: 0;
  z-index: 2;
  display: block;
}

#boxes #dialog .close img {
  width: 40px;
  height: 40px;
  max-width: none;
  float: none !important;
  margin: 0 !important;
}

.agree:hover {
  background-color: #D1D1D1;
}

.popupoption:hover {
  background-color: #D1D1D1;
  color: green;
}

.popupoption2:hover {
  color: red;
}

@media screen and (max-width: 768px) {
  #boxes .window,
  #boxes #dialog {
    width: calc(100vw - 20px);
    max-width: calc(100vw - 20px);
    max-height: calc(100vh - 20px);
    padding: 6px;
  }

  #boxes #dialog {
    font-size: 15px;
  }

  #boxes #dialog #san > img:not([src*="close-icon"]) {
    max-height: calc(100vh - 55px);
  }

  #boxes #dialog .close img {
    width: 34px;
    height: 34px;
  }
}
