/* === Popup Background Overlay === */
.popup-overlay {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: rgba(0, 0, 0, 0.6);
  display: flex;
  align-items: center;
  justify-content: center;
  opacity: 0;
  visibility: hidden;
  transition: opacity 0.4s ease, visibility 0.4s ease;
  z-index: 1000;
}

/* Active (visible) state */
.popup-overlay.active {
  opacity: 1;
  visibility: visible;
}

/* === Popup Content Box === */
.popup-content {
  background: #fff;
  color: #222;
  padding: 1.5rem;
  border-radius: 10px;
  max-width: 600px;
  width: 90%;
  max-height: 80vh;
  overflow-y: auto; /* ✅ allows scrolling */
  box-shadow: 0 8px 30px rgba(0, 0, 0, 0.25);
  transform: scale(0.95);
  opacity: 0;
  transition: opacity 0.4s ease, transform 0.4s ease;
}

/* Animate content when overlay is active */
.popup-overlay.active .popup-content {
  transform: scale(1);
  opacity: 1;
}

/* Close button */
.popup-close {
  position: absolute;
  top: 12px;
  right: 18px;
  font-size: 1.5rem;
  color: #555;
  cursor: pointer;
  transition: color 0.2s ease;
}
.popup-close:hover {
  color: #000;
}

/* Optional: custom scrollbar inside popup */
.popup-content::-webkit-scrollbar {
  width: 8px;
}
.popup-content::-webkit-scrollbar-thumb {
  background-color: #888;
  border-radius: 5px;
}
.popup-content::-webkit-scrollbar-thumb:hover {
  background-color: #555;
}



/*additional code*/
/* news popup: overlay + content with fade and scroll */
.popup-overlay {
  position: fixed;
  inset: 0;                 /* top:0; right:0; bottom:0; left:0; */
  display: flex;
  align-items: center;
  justify-content: center;
  background: rgba(0,0,0,0.0); /* start transparent for fade */
  opacity: 0;
  visibility: hidden;
  transition: background 0.35s ease, opacity 0.35s ease, visibility 0.35s;
  z-index: 1500;
  pointer-events: none;
}

/* visible state */
.popup-overlay.active {
  background: rgba(0,0,0,0.6);
  opacity: 1;
  visibility: visible;
  pointer-events: auto;
}

/* popup box */
.popup-content {
  background: #fff;
  color: #222;
  padding: 1.25rem;
  border-radius: 10px;
  width: 94%;
  max-width: 740px;
  max-height: 80vh;         /* important: constrain height */
  overflow-y: auto;         /* enable scrolling inside box */
  box-shadow: 0 14px 40px rgba(0,0,0,0.25);
  transform: translateY(8px) scale(0.98);
  opacity: 0;
  transition: transform 0.35s cubic-bezier(.2,.9,.2,1), opacity 0.35s ease;
  position: relative;
}

/* animate content in when overlay active */
.popup-overlay.active .popup-content {
  transform: translateY(0) scale(1);
  opacity: 1;
}

/* close button */
.popup-close {
  position: absolute;
  top: 10px;
  right: 12px;
  border: none;
  background: transparent;
  font-size: 1.6rem;
  line-height: 1;
  cursor: pointer;
  color: #444;
  padding: 6px;
}
.popup-close:hover { color: #000; }

/* inner body spacing */
.popup-body {
  line-height: 1.5;
  color: #222;
}

/* Optional: nicer scrollbar inside popup */
.popup-content::-webkit-scrollbar { width: 10px; }
.popup-content::-webkit-scrollbar-thumb { background: rgba(0,0,0,0.2); border-radius: 6px; }
.popup-content::-webkit-scrollbar-thumb:hover { background: rgba(0,0,0,0.35); }

/* Prevent background content shift when disabling body scroll */
.no-scroll {
  position: fixed;
  width: 100%;
  overflow: hidden;
  top: 0;
  left: 0;
}

/* small screens tweaks */
@media (max-width: 520px) {
  .popup-content { padding: 1rem; max-width: 96%; }
  .popup-close { top: 8px; right: 8px; font-size: 1.4rem; }
}

