/* Styl izolowany od Elementor / motywu. */
#kfp-popup[hidden].kfp-overlay { display: none !important; }
#kfp-popup.kfp-overlay {
  position: fixed !important;
  inset: 0 !important;
  z-index: 2147483000 !important;
  display: flex !important;
  align-items: center;
  justify-content: center;
  overflow: auto;
  padding: 12px;
  background: rgba(0, 0, 0, .79) !important;
  box-sizing: border-box;
  overscroll-behavior: contain;
}
#kfp-popup, #kfp-popup * { box-sizing: border-box; }
#kfp-popup .kfp-modal {
  position: relative;
  display: block;
  flex: 0 1 auto;
  max-width: min(92vw, 510px);
  max-height: calc(100dvh - 24px);
  background: #000;
  line-height: 0;
  box-shadow: 0 16px 50px rgba(0,0,0,.7);
}
#kfp-popup .kfp-poster-link { display: block; line-height: 0; }
#kfp-popup .kfp-poster-link img {
  display: block;
  width: auto;
  max-width: 100%;
  max-height: calc(100dvh - 24px);
  height: auto;
  object-fit: contain;
  border: 0;
  margin: 0 auto;
  padding: 0;
}
#kfp-popup .kfp-close {
  appearance: none;
  -webkit-appearance: none;
  display: flex;
  align-items: center;
  justify-content: center;
  position: absolute;
  z-index: 5;
  right: 9px;
  top: 9px;
  width: 36px;
  height: 36px;
  padding: 0;
  margin: 0;
  cursor: pointer;
  background: rgba(0,0,0,.94);
  color: #fff;
  border: 2px solid #fff;
  border-radius: 50%;
  font: 30px/1 Arial, sans-serif;
  text-align: center;
  text-decoration: none;
  opacity: 1;
  transform: none;
}
#kfp-popup .kfp-close:hover, #kfp-popup .kfp-close:focus-visible {
  background: #222;
  color: #fff;
  outline: 2px solid #fff;
  outline-offset: 3px;
}
body.kfp-scroll-locked { overflow: hidden !important; }
@media (max-width: 600px) {
  #kfp-popup.kfp-overlay { padding: 8px; }
  #kfp-popup .kfp-modal { max-width: 96vw; max-height: calc(100dvh - 16px); }
  #kfp-popup .kfp-poster-link img { max-height: calc(100dvh - 16px); }
  #kfp-popup .kfp-close { width: 34px; height: 34px; top: 6px; right: 6px; }
}
