/* Popup Overlay */
.popup-overlay {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.5);
    z-index: 9999;
    justify-content: center;
    align-items: center;
    opacity: 0;
    transition: opacity 0.3s ease;
}

/* Helper class to show */
.popup-overlay.show {
    display: flex !important;
    /* Ensure flex is applied when shown */
    opacity: 1;
}

/* Popup Container */
.popup-container {
    background: transparent;
    padding: 0;
    border-radius: 10px;
    position: relative;
    max-width: 90%;
    max-height: 90vh;
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.3);
    transform: translateY(20px);
    transition: transform 0.3s ease;
}

.popup-overlay.show .popup-container {
    transform: translateY(0);
}

/* Close Button */
.popup-close {
    position: absolute;
    top: -15px;
    right: -15px;
    width: 30px;
    height: 30px;
    background: #333;
    color: #fff;
    border-radius: 50%;
    text-align: center;
    line-height: 30px;
    font-weight: bold;
    cursor: pointer;
    box-shadow: 0 2px 5px rgba(0, 0, 0, 0.2);
    border: 2px solid #fff;
    z-index: 10000;
}

.popup-close:hover {
    background: #555;
}

/* Image */
.popup-image {
    display: block;
    max-width: 100%;
    height: auto;
    border-radius: 10px;
}

/* Mobile Adjustments */
@media (max-width: 768px) {
    .popup-container {
        max-width: 95%;
    }
}