/* Popup Overlay */
.hpp-popup-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.8);
    z-index: 999999;
    display: flex;
    justify-content: center;
    align-items: center;
    opacity: 0;
    visibility: hidden;
    transition: all 0.3s ease;
}

.hpp-popup-overlay.hpp-active {
    opacity: 1;
    visibility: visible;
}

/* Popup Container */
.hpp-popup-container {
    position: relative;
    max-width: 90vw;
    max-height: 90vh;
    background: white;
    border-radius: 12px;
    overflow: hidden;
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.3);
    transform: scale(0.7);
    transition: transform 0.3s ease;
}

.hpp-popup-overlay.hpp-active .hpp-popup-container {
    transform: scale(1);
}

/* Popup Image */
.hpp-popup-image {
    width: 100%;
    height: auto;
    display: block;
    max-height: 85vh;
    object-fit: contain;
}

/* Close Button */
.hpp-popup-close {
    position: absolute;
    top: 15px;
    right: 15px;
    width: 40px;
    height: 40px;
    background: rgba(255, 255, 255, 0.9);
    border: none;
    border-radius: 50%;
    cursor: pointer;
    display: flex;
    justify-content: center;
    align-items: center;
    font-size: 18px;
    color: #333;
    transition: all 0.3s ease;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.2);
    z-index: 1000000;
}

.hpp-popup-close:hover {
    background: white;
    transform: scale(1.1);
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.3);
}

.hpp-popup-close::before {
    content: "×";
    font-weight: bold;
    line-height: 1;
}

/* Mobile Optimizations */
@media (max-width: 768px) {
    .hpp-popup-container {
        max-width: 95vw;
        max-height: 85vh;
        margin: 20px;
        border-radius: 8px;
    }

    .hpp-popup-image {
        max-height: 75vh;
    }

    .hpp-popup-close {
        top: 10px;
        right: 10px;
        width: 35px;
        height: 35px;
        font-size: 16px;
    }
}

@media (max-width: 480px) {
    .hpp-popup-container {
        max-width: 98vw;
        margin: 10px;
        border-radius: 6px;
    }

    .hpp-popup-image {
        max-height: 70vh;
    }

    .hpp-popup-close {
        top: 8px;
        right: 8px;
        width: 32px;
        height: 32px;
        font-size: 14px;
    }
}

/* Prevent body scroll when popup is open */
body.hpp-popup-open {
    overflow: hidden;
}