.pop-overlay-active #custom-popup {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: center;
}
#custom-popup {
  position: fixed;
  height: 100%;
  width: 100%;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  z-index: 2500;
  overflow: initial;
  transition: all .15s ease-in-out;
  background-color: rgba( 0, 0, 0, 0.50);
  display: none;
}
.custom-popup-img-wrap {
  position: relative;
}
.custom-popup-close {
  display: inline-block;
  position: absolute;
  width: 22px;
  height: 22px;
  background: url(/themes/custom/usadf/img/popup/close_icon.png) center no-repeat;
  top: -30px;
  right: -30px;
  text-decoration: none;
  font-size: 0;
  cursor: pointer;
}
.custom-popup-img-wrap img {
  object-fit: cover;
  /*width: 550px;*/
  width: 500px;
  height: 100%;
  object-position: center;
  font-family: 'object-fit: cover; object-position: center;';
  box-shadow: 1px 1px 3px 0px rgba( 2, 2, 2, 0.23);
}
@media screen and (max-width: 767px) {
  .custom-popup-img-wrap img {
    width: 300px;
  }
  .custom-popup-close {
    top: -25px;
    right: -25px;
    background-size: 15px 15px;
  }
}
/* iPhone5+ */

@media only screen and (min-device-width: 320px) and (max-device-width: 568px) and (-webkit-device-pixel-ratio: 2) and (device-aspect-ratio: 40/71) {
  .custom-popup-img-wrap img {
    width: 260px;
  }
}
/* Iphone 4 and 4s */

@media only screen and (min-device-width: 320px) and (max-device-width: 480px) and (-webkit-device-pixel-ratio: 2) and (device-aspect-ratio: 2/3) {
  .custom-popup-img-wrap img {
    width: 260px;
  }
}
