/* Popup Animation Styles */

/* Base popup state - hidden by default for non-page-load triggers */
.wp-block-acumenpopup-popup-builder {
    opacity: 1;
    visibility: visible;
}

/* Hidden state for triggers that need to wait */
.wp-block-acumenpopup-popup-builder[data-trigger-type="scroll"],
.wp-block-acumenpopup-popup-builder[data-trigger-type="exit_intent"],
.wp-block-acumenpopup-popup-builder[data-trigger-type="click"],
.wp-block-acumenpopup-popup-builder[data-trigger-type="time_delay"] {
    opacity: 0;
    visibility: hidden;
    pointer-events: none;
}

/* Active popup - shown */
.wp-block-acumenpopup-popup-builder.is-active {
    opacity: 1 !important;
    visibility: visible !important;
    pointer-events: auto !important;
}

/* Fade Animation */
.wp-block-acumenpopup-popup-builder.popup-animation-fade {
    animation: acumenpopupFadeIn 0.3s ease-out forwards;
}

.wp-block-acumenpopup-popup-builder.popup-animation-fade.is-closing {
    animation: acumenpopupFadeOut 0.3s ease-out forwards;
}

@keyframes acumenpopupFadeIn {
    from {
        opacity: 0;
    }
    to {
        opacity: 1;
    }
}

@keyframes acumenpopupFadeOut {
    from {
        opacity: 1;
    }
    to {
        opacity: 0;
    }
}

/* Slide Animation */
.wp-block-acumenpopup-popup-builder.popup-animation-slide .acumenpopup-popup-inner {
    animation: acumenpopupSlideUp 0.4s ease-out forwards;
}

.wp-block-acumenpopup-popup-builder.popup-animation-slide.is-closing .acumenpopup-popup-inner {
    animation: acumenpopupSlideDown 0.4s ease-out forwards;
}

@keyframes acumenpopupSlideUp {
    from {
        transform: translateY(100px);
        opacity: 0;
    }
    to {
        transform: translateY(0);
        opacity: 1;
    }
}

@keyframes acumenpopupSlideDown {
    from {
        transform: translateY(0);
        opacity: 1;
    }
    to {
        transform: translateY(100px);
        opacity: 0;
    }
}

/* Zoom Animation */
.wp-block-acumenpopup-popup-builder.popup-animation-zoom .acumenpopup-popup-inner {
    animation: acumenpopupZoomIn 0.4s cubic-bezier(0.175, 0.885, 0.32, 1.275) forwards;
}

.wp-block-acumenpopup-popup-builder.popup-animation-zoom.is-closing .acumenpopup-popup-inner {
    animation: acumenpopupZoomOut 0.3s ease-out forwards;
}

@keyframes acumenpopupZoomIn {
    from {
        transform: scale(0.5);
        opacity: 0;
    }
    to {
        transform: scale(1);
        opacity: 1;
    }
}

@keyframes acumenpopupZoomOut {
    from {
        transform: scale(1);
        opacity: 1;
    }
    to {
        transform: scale(0.5);
        opacity: 0;
    }
}

/* Bounce Animation */
.wp-block-acumenpopup-popup-builder.popup-animation-bounce .acumenpopup-popup-inner {
    animation: acumenpopupBounceIn 0.6s cubic-bezier(0.68, -0.55, 0.265, 1.55) forwards;
}

.wp-block-acumenpopup-popup-builder.popup-animation-bounce.is-closing .acumenpopup-popup-inner {
    animation: acumenpopupBounceOut 0.4s ease-out forwards;
}

@keyframes acumenpopupBounceIn {
    0% {
        transform: scale(0.3);
        opacity: 0;
    }
    50% {
        transform: scale(1.05);
    }
    70% {
        transform: scale(0.9);
    }
    100% {
        transform: scale(1);
        opacity: 1;
    }
}

@keyframes acumenpopupBounceOut {
    from {
        transform: scale(1);
        opacity: 1;
    }
    to {
        transform: scale(0.3);
        opacity: 0;
    }
}

/* Overlay Animation */
.wp-block-acumenpopup-popup-builder.acumenpopup-popup-overlay {
    animation: acumenpopupOverlayFadeIn 0.3s ease-out forwards;
}

.wp-block-acumenpopup-popup-builder.acumenpopup-popup-overlay.is-closing {
    animation: acumenpopupOverlayFadeOut 0.3s ease-out forwards;
}

@keyframes acumenpopupOverlayFadeIn {
    from {
        background-color: rgba(0, 0, 0, 0);
    }
    to {
        background-color: rgba(0, 0, 0, 0.7);
    }
}

@keyframes acumenpopupOverlayFadeOut {
    from {
        background-color: rgba(0, 0, 0, 0.7);
    }
    to {
        background-color: rgba(0, 0, 0, 0);
    }
}
