.zoomable-figure{
    cursor:pointer;
}

#modal-image-container img{
    padding:10px;
}

/* Modal Styling */
#image-modal {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.8); /* Light black background */
    display: flex;
    justify-content: center;
    align-items: center;
    z-index: 1000;
    visibility: hidden;
    opacity: 0;
    transition: opacity 0.3s ease-in-out;
}

#image-modal.visible {
    visibility: visible;
    opacity: 1;
}

#modal-image {
    max-width: 90%; /* Restrict size to fit within the screen */
    max-height: 100%;
    cursor: grab; /* Indicates draggable functionality */
    transition: transform 0.3s ease; /* Smooth zoom and drag transitions */
}

/* Top Bar Styling */
#image-modal .top-bar {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 50px; /* Height of the top bar */
    background: rgba(0, 0, 0, 0.8); /* Semi-transparent black */
    display: flex;
    justify-content: flex-end;
    align-items: center;
    padding: 0 15px;
    z-index: 1200; /* Above everything else */
    box-shadow: 0 2px 5px rgba(0, 0, 0, 0.5);
}


/* Ensure the image starts below the top bar */
#modal-image-container {
    position: relative;
    margin-top: 50px; /* Match the height of the top bar */
    display: flex;
    justify-content: center;
    align-items: center;
    width: 100%;
    height: calc(100% - 50px); /* Subtract top bar height from modal height */
}

#image-modal .top-bar span {
    width: 30px;
    height: 30px;
    margin-left: 15px;
    cursor: pointer;
    background-repeat: no-repeat;
    background-size: contain;
    opacity: 0.8;
    transition: opacity 0.3s ease;
}

/* Hover Effects */
.magnify-icon:hover,
.reset-icon:hover,
.fullscreen-icon:hover,
.small-view-icon:hover {
    opacity: 0.8;
}

#image-modal .top-bar span:hover {
    opacity: 1;
}

/* Icons */
#image-modal .magnify-icon {
    background-image: url('magnify-icon.png'); /* Replace with your magnify icon */
    width: 15px !important;
    height: 15px !important;
}

#image-modal .reset-icon {
    width: 24px;
    height: 24px;
    background: url('zoom-out-icon.png') no-repeat center center; /* Reset icon */
    background-size: contain;
    display: inline-block;
    cursor: pointer;
    width: 15px !important;
    height: 15px !important;
}

#image-modal .fullscreen-icon {
    background-image: url('fullscreen-icon.png'); /* Replace with your fullscreen icon */
    width: 15px !important;
    height: 15px !important;
}

#image-modal .close-icon {
    background-image: url('close-icon.png'); /* Replace with your close icon */
    width: 13px !important;
    height: 13px !important;
}

#image-modal .small-view-icon {
    width: 24px;
    height: 24px;
    background: url('small-view-icon.png') no-repeat center center; /* Small view icon */
    background-size: contain;
    display: inline-block;
    cursor: pointer;
    width: 20px !important;
    height: 20px !important;
}



/* Disable scrolling */
.no-scroll {
    overflow: hidden;
    height: 100vh;
}

.prev-btn, .next-btn {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    background: rgba(0, 0, 0, 0.5);
    color: #fff;
    border: none;
    border-radius: 50%;
    width: 40px;
    height: 40px;
    font-size: 18px;
    cursor: pointer;
    z-index: 1001;
    transition: background 0.3s;
}

.prev-btn {
    left: 10px;
}

.next-btn {
    right: 10px;
}

.prev-btn:hover, .next-btn:hover {
    background: rgba(0, 0, 0, 0.8);
}



/* Responsive Design for Smaller Screens */
@media (max-width: 768px) {
    #modal-image {
        max-width: 100%;
        max-height: 100%;
    }

    #image-modal .top-bar span {
        width: 40px; /* Larger icons for better tap targets */
        height: 40px;
    }

    .prev-btn, .next-btn {
        top: auto; /* Remove vertical centering */
        bottom: 284px; /* Position at the bottom */
        transform: translateY(0); /* Reset vertical transform */
        width: 30px; /* Adjust size for mobile */
        height: 30px;
        font-size: 16px;
    }

    .prev-btn {
        left: 42% !important; /* Position relative to the image width */
    }

    .next-btn {
        right: 42% !important; /* Position relative to the image width */
    }
}
#modal-image-container::after {
  content: "";
  display: table; /* Or 'block' for older browsers */
  clear: both;
}

.lightbox-details {
  width: 100%;
  clear: both;
  color: #fff;
  font-size: 12px;
  display: block;
  position: fixed;
  bottom: 0;
  text-align: center;
  background: rgba(0,0,0,0.2);
  padding: 10px 0px;
}
