/* Custom Popup Styles */
.custom-popup-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.7);
    z-index: 9998;
    display: none;
    align-items: center;
    justify-content: center;
}

.custom-popup-overlay.active {
    display: flex;
}

.custom-popup-container {
    position: relative;
    width: 90%;
    max-width: 800px;
    max-height: 90vh;
    background: transparent;
    border-radius: 0;
    overflow: visible;
    box-shadow: none;
    animation: popupFadeIn 0.3s ease-out;
}

@keyframes popupFadeIn {
    from {
        opacity: 0;
        transform: scale(0.95);
    }
    to {
        opacity: 1;
        transform: scale(1);
    }
}

.custom-popup-close {
    position: absolute;
    top: 0;
    right: 0;
    width: 40px;
    height: 40px;
    background: rgba(0, 0, 0, 0.7);
    border: none;
    border-radius: 0;
    cursor: pointer;
    z-index: 10;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: background 0.3s ease;
}

.custom-popup-close:hover {
    background: rgba(0, 0, 0, 0.9);
}

.custom-popup-close::before,
.custom-popup-close::after {
    content: '';
    position: absolute;
    width: 20px;
    height: 2px;
    background: #fff;
}

.custom-popup-close::before {
    transform: rotate(45deg);
}

.custom-popup-close::after {
    transform: rotate(-45deg);
}

.custom-popup-content {
    width: 100%;
    height: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 0;
    overflow-y: auto;
}

.custom-popup-content img {
    max-width: 100%;
    max-height: 90vh;
    height: auto;
    width: auto;
    object-fit: contain;
    display: block;
}

.custom-popup-content p {
    margin: 0 0 15px 0;
}

.custom-popup-content > * {
    max-width: 100%;
}

/* Mobile Responsive */
@media (max-width: 768px) {
    .custom-popup-container {
        width: 95%;
        max-width: 100%;
        margin: 0 10px;
    }

    .custom-popup-close {
        width: 35px;
        height: 35px;
        top: 10px;
        right: 10px;
    }

    .custom-popup-close::before,
    .custom-popup-close::after {
        width: 16px;
    }

    .custom-popup-content {
        padding: 15px;
    }

    .custom-popup-content img {
        max-height: 70vh;
    }
}

@media (max-width: 480px) {
    .custom-popup-container {
        width: 100%;
        max-width: 100%;
        margin: 0;
        border-radius: 0;
        max-height: 100vh;
    }

    .custom-popup-content {
        padding: 10px;
    }

    .custom-popup-content img {
        max-height: 85vh;
    }
}

/* Prevent body scroll when popup is open */
body.popup-open {
    overflow: hidden;
}
