/* Popup Overlay */
.jcipl-popup-overlay {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: transparent;
    z-index: 999999;
    animation: fadeIn 0.4s ease-in-out;
    backdrop-filter: none;
}

.jcipl-popup-overlay.active {
    display: flex;
    justify-content: center;
    align-items: center;
}

@keyframes fadeIn {
    from {
        opacity: 0;
    }
    to {
        opacity: 1;
    }
}

/* Popup Container */
.jcipl-popup-container {
    position: relative;
    max-width: 900px;
    width: 90%;
    background: #fff;
    border-radius: 12px;
    overflow: hidden;
    animation: slideUp 0.4s ease-out;
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.5);
}

@keyframes slideUp {
    from {
        opacity: 0;
        transform: translateY(50px) scale(0.9);
    }
    to {
        opacity: 1;
        transform: translateY(0) scale(1);
    }
}

/* Close Button */
.jcipl-close-btn {
    position: absolute;
    top: 15px;
    right: 15px;
    background: rgba(0, 0, 0, 0.7);
    color: white;
    border: none;
    width: 40px;
    height: 40px;
    border-radius: 50%;
    font-size: 28px;
    line-height: 1;
    cursor: pointer;
    z-index: 10;
    transition: all 0.3s;
    display: flex;
    align-items: center;
    justify-content: center;
}

.jcipl-close-btn:hover {
    background: rgba(255, 0, 0, 0.8);
    transform: rotate(90deg);
}

/* Popup Content */
.jcipl-popup-content {
    position: relative;
}

.jcipl-popup-image {
    width: 100%;
    aspect-ratio: 16/9;
    overflow: hidden;
    background: #f0f0f0;
}

.jcipl-popup-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
}

/* Button Container */
.jcipl-popup-button-container {
    position: absolute;
    bottom: 30px;
    left: 50%;
    transform: translateX(-50%);
    z-index: 5;
    width: 90%;
    display: flex;
    justify-content: center;
}

.jcipl-popup-button {
    display: inline-block;
    padding: 16px 40px;
    background: #667eea;
    color: white;
    text-decoration: none;
    font-size: 18px;
    font-weight: 600;
    border-radius: 50px;
    transition: all 0.3s;
    box-shadow: 0 10px 30px rgba(102, 126, 234, 0.4);
    text-transform: uppercase;
    letter-spacing: 1px;
}

.jcipl-popup-button:hover {
    transform: translateY(-3px);
    box-shadow: 0 15px 40px rgba(102, 126, 234, 0.6);
    filter: brightness(1.1);
}

.jcipl-popup-button:active {
    transform: translateY(-1px);
}

/* Responsive Design */
@media (max-width: 768px) {
    .jcipl-popup-container {
        width: 95%;
        max-width: 500px;
    }
    
    .jcipl-close-btn {
        width: 35px;
        height: 35px;
        font-size: 24px;
        top: 10px;
        right: 10px;
    }
    
    .jcipl-popup-button {
        padding: 14px 30px;
        font-size: 16px;
    }
    
    .jcipl-popup-button-container {
        bottom: 20px;
    }
}

@media (max-width: 480px) {
    .jcipl-popup-container {
        width: 98%;
    }
    
    .jcipl-popup-button {
        padding: 12px 25px;
        font-size: 14px;
    }
    
    .jcipl-popup-button-container {
        bottom: 15px;
    }
}

/* Animation for button appearance */
@keyframes buttonPulse {
    0%, 100% {
        transform: translateX(-50%) scale(1);
    }
    50% {
        transform: translateX(-50%) scale(1.05);
    }
}

.jcipl-popup-button-container {
    animation: buttonPulse 2s infinite ease-in-out;
}

/* Smooth scrolling lock when popup is open */
body.jcipl-popup-open {
    overflow: hidden;
}