.liv-content-popup-overlay {
  position: fixed;
  inset: 0;
  z-index: 2147483646;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 20px;
  box-sizing: border-box;
  background: rgba(0, 0, 0, .62);
  opacity: 0;
  visibility: hidden;
  transition: opacity .22s ease, visibility .22s ease;
}

.liv-content-popup-overlay.is-visible {
  opacity: 1;
  visibility: visible;
}

.liv-content-popup-box {
  position: relative;
  max-width: calc(100vw - 32px);
  max-height: calc(100vh - 32px);
  transform: translateY(12px) scale(.98);
  transition: transform .22s ease;
}

.liv-content-popup-overlay.is-visible .liv-content-popup-box {
  transform: translateY(0) scale(1);
}

.liv-content-popup-link {
  display: block;
  overflow: hidden;
  color: inherit;
  text-decoration: none;
  background: #fff;
  border-radius: 6px;
  box-shadow: 0 18px 55px rgba(0,0,0,.34);
}

.liv-content-popup-image {
  display: block;
  width: 100%;
  height: auto;
  max-height: calc(100vh - 110px);
  object-fit: contain;
  border: 0;
}

.liv-content-popup-caption {
  padding: 12px 16px 14px;
  font-size: 14px;
  line-height: 1.6;
  text-align: center;
  background: #fff;
}

.liv-content-popup-close {
  position: absolute;
  top: -15px;
  right: -15px;
  z-index: 2;
  width: 38px;
  height: 38px;
  padding: 0;
  border: 0;
  border-radius: 50%;
  background: #fff;
  color: #222;
  font-size: 28px;
  line-height: 36px;
  text-align: center;
  cursor: pointer;
  box-shadow: 0 4px 16px rgba(0,0,0,.30);
}

@media (max-width: 767px) {
  .liv-content-popup-overlay {
    padding: 16px;
  }

  .liv-content-popup-box {
    max-width: calc(100vw - 28px);
  }

  .liv-content-popup-close {
    top: -13px;
    right: -10px;
    width: 36px;
    height: 36px;
    font-size: 26px;
    line-height: 34px;
  }

  .liv-content-popup-caption {
    padding: 10px 12px 12px;
    font-size: 13px;
  }
}
