/* Make the popup cover the entire screen */
.popup {
    position: fixed; /* Stick it to the screen */
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.8); /* Optional: semi-transparent black background */
    display: none; /* Hidden by default, shown via JS */
    justify-content: center;
    align-items: center;
    z-index: 1000; /* Ensure it sits above other elements */
}

.popup-content {
  background-color: white;
  height: 80vh;
  width: 50vw;
  padding: 1rem;
  border-radius: 8px;
  display: flex;
  align-items: center;
  justify-content: space-between; /* Ensure buttons stay in place */
  box-sizing: border-box;
  overflow: hidden;
  gap: 1rem;
}

/* Wrapper around the image to enforce boundaries */
.image-wrapper {
  height: 100%;
  flex-grow: 1;
  display: flex;
  align-items: center;
  justify-content: center;
  overflow: hidden;
}

/* Image behavior */
#slide {
  max-width: 100%;
  max-height: 100%;
  object-fit: contain; /* OR use 'cover' or 'scale-down' for cropping/scaling */
}


/* Close button styling */
.close-btn {
    position: absolute;
    top: 1rem;
    right: 1rem;
    background: rgb(152, 145, 145);
    color: white;
    border: none;
    font-size: 1.2rem;
    cursor: pointer;
    padding: 0.5rem 1rem;
    z-index: 1001;
}

#leftButton, #rightButton {
    background: #333;
    color: white;
    border: none;
    font-size: 2rem;
    width: 40px;
    height: 40px;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    user-select: none;
}

/* Add animation (fade in the popup) */
@-webkit-keyframes fadeIn {
    from {opacity: 0;}
    to {opacity: 1;}
}

@keyframes fadeIn {
    from {opacity: 0;}
    to {opacity:1 ;}
}