/* Overlay */
#overlay {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: rgba(0, 0, 0, 0.6);
  z-index: 9998;
  display: none;
  opacity: 0;
  transition: opacity 0.4s ease;
}

/* Popup container */
#popup {
  position: fixed;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%) scale(0.9);
  z-index: 9999;
  background: #fff;
  border-radius: 8px;
  padding: 0;
  display: none;
  opacity: 0;
  transition: opacity 0.4s ease, transform 0.4s ease;
  box-shadow: 0 0 20px rgba(0, 0, 0, 0.4);

  /* Responsive dimensions */
  width: 90%;
  max-width: 600px;
  max-height: 90vh;
  overflow: auto;
}

/* Show states */
#popup.show {
  display: block;
  opacity: 1;
  transform: translate(-50%, -50%) scale(1);
}

#overlay.show {
  display: block;
  opacity: 1;
}

/* Responsive image */
#popup img {
  width: 100%;
  height: auto;
  display: block;
  border-top-left-radius: 8px;
  border-top-right-radius: 8px;
}

/* Close button */
.close-btn {
  position: absolute;
  top: 10px;
  right: 10px;
  background: transparent;
  border: none;
  padding: 0;
  color: #ffffff;
  cursor: pointer;
  transition: color 0.3s ease;
  z-index: 10000;
}

/* Icon inside close button */
.close-btn i {
  font-size: 28px;
  color: white;
}

/* Hover effect */
.close-btn:hover i {
  color: #dddddd;
}

/* Footer styling if used */

/* Responsive adjustments for very small devices */
@media (max-width: 480px) {
  #popup {
    width: 95%;
    max-height: 90vh;
  }

  .close-btn i {
    font-size: 24px;
  }
}
