/**
 * WP Simple Popups - Frontend Styles
 */

/* Overlay */
.wpsp-popup-overlay {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.7);
    z-index: 999999;
    overflow-y: auto;
    padding: 20px;
    box-sizing: border-box;
}

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

/* Container */
.wpsp-popup-container {
    position: relative;
    background: #ffffff;
    border-radius: 8px;
    box-shadow: 0 10px 40px rgba(0, 0, 0, 0.3);
    width: 100%;
    max-height: 90vh;
    overflow-y: auto;
    margin: auto;
}

/* Close Button */
.wpsp-popup-close {
    position: absolute;
    top: 15px;
    right: 15px;
    background: rgba(0, 0, 0, 0.5);
    color: #ffffff;
    border: none;
    width: 36px;
    height: 36px;
    border-radius: 50%;
    font-size: 24px;
    line-height: 1;
    cursor: pointer;
    z-index: 10;
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 0;
}

.wpsp-popup-close:hover {
    background: rgba(0, 0, 0, 0.8);
    transform: rotate(90deg);
}

.wpsp-popup-close span {
    display: block;
    line-height: 1;
}

/* Content */
.wpsp-popup-content {
    padding: 40px 30px 30px;
}

/* Animations */
.wpsp-popup-overlay[data-animation="fade"].active {
    animation: wpspPopupFadeIn 0.3s ease;
}

.wpsp-popup-overlay[data-animation="fade"].closing {
    animation: wpspPopupFadeOut 0.3s ease;
}

.wpsp-popup-overlay[data-animation="slide-down"].active .wpsp-popup-container {
    animation: wpspPopupSlideDown 0.4s ease;
}

.wpsp-popup-overlay[data-animation="slide-down"].closing .wpsp-popup-container {
    animation: wpspPopupSlideUp 0.3s ease;
}

.wpsp-popup-overlay[data-animation="zoom"].active .wpsp-popup-container {
    animation: wpspPopupZoomIn 0.3s ease;
}

.wpsp-popup-overlay[data-animation="zoom"].closing .wpsp-popup-container {
    animation: wpspPopupZoomOut 0.3s ease;
}

/* Keyframes */
@keyframes wpspPopupFadeIn {
    from {
        opacity: 0;
    }
    to {
        opacity: 1;
    }
}

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

@keyframes wpspPopupSlideDown {
    from {
        transform: translateY(-50px);
        opacity: 0;
    }
    to {
        transform: translateY(0);
        opacity: 1;
    }
}

@keyframes wpspPopupSlideUp {
    from {
        transform: translateY(0);
        opacity: 1;
    }
    to {
        transform: translateY(-50px);
        opacity: 0;
    }
}

@keyframes wpspPopupZoomIn {
    from {
        transform: scale(0.7);
        opacity: 0;
    }
    to {
        transform: scale(1);
        opacity: 1;
    }
}

@keyframes wpspPopupZoomOut {
    from {
        transform: scale(1);
        opacity: 1;
    }
    to {
        transform: scale(0.7);
        opacity: 0;
    }
}

/* Responsive */
@media (max-width: 768px) {
    .wpsp-popup-overlay {
        padding: 10px;
    }
    
    .wpsp-popup-container {
        max-height: 95vh;
    }
    
    .wpsp-popup-content {
        padding: 35px 20px 20px;
    }
    
    .wpsp-popup-close {
        top: 10px;
        right: 10px;
        width: 32px;
        height: 32px;
        font-size: 20px;
    }
}

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