/* Custom popup overlay styling - replaces Elementor Pro's dialog manager */
.custom-popup-overlay {
  display: none;
  position: fixed;
  inset: 0;
  z-index: 100000;
  background: rgba(20, 20, 20, 0.72);
  align-items: center;
  justify-content: center;
  padding: 24px;
  overflow-y: auto;
}
.custom-popup-overlay.is-open {
  display: flex;
}
.custom-popup-box {
  position: relative;
  background: #fff;
  max-width: 800px;
  width: 100%;
  max-height: 90vh;
  overflow: auto;
  border-radius: 4px;
  margin: auto;
}
.custom-popup-box [data-elementor-type="popup"] {
  display: block !important;
}
.custom-popup-close {
  position: absolute;
  top: 12px;
  right: 16px;
  z-index: 10;
  background: rgba(255, 255, 255, 0.9);
  border: none;
  border-radius: 50%;
  width: 36px;
  height: 36px;
  font-size: 24px;
  line-height: 1;
  cursor: pointer;
  color: #1f2124;
  box-shadow: 0 1px 4px rgba(0, 0, 0, 0.2);
}
.custom-popup-close:hover {
  background: #fff;
}
body.custom-popup-locked {
  overflow: hidden;
}

/* Self-contained video embed (bypasses Elementor's aspect-ratio CSS var, which
   is normally set inline by Elementor's JS/PHP and is no longer available) */
.custom-video-embed {
  display: block;
  width: 100%;
}
.custom-video-embed-inner {
  position: relative;
  width: 100%;
  aspect-ratio: 16 / 9;
  overflow: hidden;
}
.custom-video-embed-inner iframe {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  border: 0;
}
/* Elementor's own widget-video.min.css sets overflow:hidden + a transform on
   this container; force it visible so our aspect-ratio box is never clipped. */
.elementor-widget-video .elementor-widget-container {
  overflow: visible !important;
  transform: none !important;
}
