/* POPUP OVERLAY */
#popupOverlay {
  position: fixed;
  inset: 0;
  width: 100vw;
  height: 100vh;
  background: rgba(0,0,0,0.65);
  display: none;
  justify-content: center;
  align-items: center;
  z-index: 99999;
}

#popupOverlay.show {
  display: flex;
}

/* POPUP FRAME */
.popup {
  background: white;
  width: 90%;
  max-width: 800px;

  /* FIX: iPad gebruikt dvh i.p.v. vh */
  max-height: 85dvh;

  border-radius: 12px;
  overflow: hidden; /* nodig voor nette hoeken */
  position: relative;

  border: 4px solid lightblue; /* rand rondom popup */
  box-shadow: 4px 4px 16px 0 rgba(255, 255, 255, 0.95);
}

/* SLUITKNOP */
.close {
  width: 36px;
  height: 36px;
  background: white;
  border: 2px solid red;
  border-radius: 50%;
  position: absolute;
  top: 12px;
  right: 12px;
  display: flex;
  justify-content: center;
  align-items: center;
  font-size: 24px;
  font-weight: bold;
  color: red;
  cursor: pointer;
  z-index: 1000;
  box-shadow: 0 3px 6px rgba(0,0,0,0.3);
}

.close:hover {
  background: #ffe5e5;
}

/* INHOUD — scrollt correct binnen 85dvh */
.popup-inner {
  padding: 20px;
  overflow-y: auto;
  max-height: calc(85dvh - 60px); /* 60px = ruimte voor top + sluitknop */
}

/* POPUP LINK */
.popup-link {
  display: inline-block;
  background: #a3d2f2;
  color: #333;
  border-radius: 5px;
  padding: 0 2px;
  border: 1px solid #ccc;
  box-shadow: 1px 1px 4px 0 rgba(0, 0, 0.8);
  cursor: pointer;
  transition: 0.2s;
}

.popup-link:hover {
  background: #79b3e0;
  transform: scale(1.05);
}

/* VIDEO */
.video-container {
  position: relative;
  width: 100%;
  padding-bottom: 56.25%;
  background: white;
  border-radius: 6px;
  overflow: hidden;
}

.video-container.ratio-4-3 {
  padding-bottom: 75%;
}

.video-container iframe {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  border: none;
}
