/* Prevent horizontal scrolling on the page when banner flies in/out */
html, body {
    overflow-x: hidden;
}

/* Fixed overlay wrapper */
.flying-banner-wrapper-2d386fee {
    position: fixed;
    top: 0;
    left: 0;
    width: 100vw;
    height: 100vh;
    pointer-events: none; /* Let clicks pass through the wrapper */
    display: flex;
    justify-content: center;
    align-items: center; /* Default center, overridden by prefix classes */
    z-index: 9999;
}

/* Backdrop for blur effect */
.flying-banner-backdrop-2d386fee {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    backdrop-filter: blur(4px);
    -webkit-backdrop-filter: blur(4px); /* Safari support */
    background-color: rgba(255, 255, 255, 0.1); /* Slight tint to help the blur */
    opacity: 0;
    transition: opacity 1s ease;
    z-index: -1;
    pointer-events: auto; /* Block clicks to the background when visible */
}

/* Show backdrop when banner is visible */
.flying-banner-wrapper-2d386fee.is-active .flying-banner-backdrop-2d386fee {
    opacity: 1;
}

/* Position overrides from widget settings */
.flying-banner-pos-top .flying-banner-wrapper-2d386fee {
    align-items: flex-start;
    padding-top: 5vh;
}

.flying-banner-pos-bottom .flying-banner-wrapper-2d386fee {
    align-items: flex-end;
    padding-bottom: 5vh;
}

/* Admin bar offset */
body.admin-bar .flying-banner-wrapper-2d386fee {
    top: var(--wp-admin--admin-bar--height, 32px);
    height: calc(100vh - var(--wp-admin--admin-bar--height, 32px));
}

@media screen and (max-width: 782px) {
    body.admin-bar .flying-banner-wrapper-2d386fee {
        top: 46px;
        height: calc(100vh - 46px);
    }
}

.flying-banner-content-2d386fee {
    background-color: transparent;
    padding: 0;
    border-radius: 8px;
    text-align: center;
    box-shadow: 0 4px 15px rgba(0,0,0,0.2);
    transform: translateX(-150vw);
    transition: transform 1s cubic-bezier(0.25, 0.8, 0.25, 1);
    max-width: 90%;
    width: auto;
    display: inline-block;
    pointer-events: auto; /* Re-enable clicks on the banner itself */
    position: relative; /* For close button positioning */
}

.flying-banner-content-2d386fee img {
    max-width: 100%;
    height: auto;
    display: block;
    border-radius: inherit;
}

/* Close button */
.flying-banner-close-2d386fee {
    position: absolute;
    top: -15px;
    right: -15px;
    width: 30px;
    height: 30px;
    background-color: #fff;
    color: #333;
    border-radius: 50%;
    border: none;
    font-size: 20px;
    line-height: 1;
    cursor: pointer;
    box-shadow: 0 2px 5px rgba(0,0,0,0.3);
    display: flex;
    justify-content: center;
    align-items: center;
    z-index: 10;
    transition: background-color 0.2s, color 0.2s;
}

.flying-banner-close-2d386fee:hover {
    background-color: #eee;
}

/* JS States */
.flying-banner-content-2d386fee.is-middle {
    transform: translateX(0);
}

.flying-banner-content-2d386fee.is-out {
    transform: translateX(150vw);
}

/* Editor preview adjustments */
.elementor-editor-active .flying-banner-wrapper-2d386fee {
    position: relative;
    width: 100%;
    height: auto;
    padding: 20px 0;
    top: auto;
    left: auto;
    z-index: 1;
}

.elementor-editor-active .flying-banner-backdrop-2d386fee {
    display: none; /* Hide backdrop in editor to avoid interference */
}
