/* Popup Overlay */
.custompopup-overlay {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.7);
    z-index: 99999;
    animation: fadeIn 0.3s ease;
}

.custompopup-overlay.active {
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 20px;
}

/* Popup Container */
.custompopup-container {
    position: relative;
    max-width: 90%;
    max-height: 90vh;
    animation: slideIn 0.4s ease;
}

/* Popup Content */
.custompopup-content {
    position: relative;
    background: white;
    border-radius: 10px;
    overflow: hidden;
    box-shadow: 0 10px 40px rgba(0, 0, 0, 0.3);
}

/* Close Button */
.custompopup-close {
    position: absolute;
    top: 10px;
    right: 10px;
    background: rgba(0, 0, 0, 0.6);
    color: white;
    border: none;
    width: 35px;
    height: 35px;
    border-radius: 50%;
    font-size: 24px;
    line-height: 1;
    cursor: pointer;
    z-index: 10;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.3s;
}

.custompopup-close:hover {
    background: rgba(0, 0, 0, 0.8);
    transform: rotate(90deg);
}

/* Popup Image */
.custompopup-image {
    width: 100%;
    height: auto;
    display: block;
}

.custompopup-link {
    display: block;
    cursor: pointer;
}

/* Animations */
@keyframes fadeIn {
    from {
        opacity: 0;
    }
    to {
        opacity: 1;
    }
}

@keyframes slideIn {
    from {
        transform: scale(0.8);
        opacity: 0;
    }
    to {
        transform: scale(1);
        opacity: 1;
    }
}

/* Responsive Design */
@media (max-width: 768px) {
    .custompopup-container {
        max-width: 95%;
    }

    .custompopup-close {
        width: 30px;
        height: 30px;
        font-size: 20px;
    }
}

@media (max-width: 480px) {
    .custompopup-container {
        max-width: 98%;
    }

    .custompopup-close {
        width: 28px;
        height: 28px;
        font-size: 18px;
        top: 5px;
        right: 5px;
    }
}