/* Manual Ad — small corner banner, one ad shown at a time, button
   overlaid on top of the media. Responsive: same layout idea on
   mobile and desktop, just sized differently. */

#velaphix-manual-ad {
    position: fixed;
    right: 1rem;
    bottom: 1rem;
    z-index: 9999;
    width: 240px;
    max-width: calc(100vw - 2rem);
    /* Room at the top for the close button to sit outside/above the ad */
    padding-top: 30px;
    transition: bottom 0.2s ease;
}

#velaphix-manual-ad .vlx-ad-card {
    position: relative;
    border-radius: 0.7rem;
    overflow: hidden;
    box-shadow: 0 6px 24px rgba(0, 0, 0, 0.18);
    background: rgb(20, 20, 20);
}

/* Small, standard "Ad" label — plain and quiet, like Google/Facebook/
   Instagram use, not a loud banner across the creative. */
#velaphix-manual-ad .vlx-ad-sponsored {
    position: absolute;
    top: 0.5rem;
    left: 0.5rem;
    z-index: 3;
    background: rgba(255, 255, 255, 0.92);
    color: rgb(40, 40, 40);
    font-size: 0.65rem;
    font-weight: 700;
    letter-spacing: 0.02em;
    padding: 0.15rem 0.45rem;
    border-radius: 0.25rem;
    pointer-events: none;
}

/* Close button sits outside/above the ad card — a standard floating
   circle, not overlapping the creative itself. */
#velaphix-manual-ad .vlx-ad-close {
    position: absolute;
    top: 0;
    right: 4px;
    z-index: 3;
    width: 26px;
    height: 26px;
    border-radius: 999px;
    background: rgb(255, 255, 255);
    color: rgb(60, 60, 60);
    border: 1px solid rgba(0, 0, 0, 0.1);
    box-shadow: 0 2px 6px rgba(0, 0, 0, 0.2);
    font-size: 1rem;
    line-height: 1;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 0;
}
#velaphix-manual-ad .vlx-ad-close:hover {
    background: rgb(245, 245, 245);
}

/* Each slide fills the same box; only the active one is shown —
   swapped instantly by JS, no transition/animation. */
#velaphix-manual-ad .vlx-ad-slide {
    position: relative;
    display: none;
    width: 100%;
}
#velaphix-manual-ad .vlx-ad-slide.is-active {
    display: block;
}

#velaphix-manual-ad .vlx-ad-media-wrap {
    position: relative;
    width: 100%;
    aspect-ratio: 4 / 5;
    background: rgb(0, 0, 0);
}

#velaphix-manual-ad .vlx-ad-media-wrap img,
#velaphix-manual-ad .vlx-ad-media-wrap video {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: none;
}
#velaphix-manual-ad .vlx-ad-media-wrap img.is-showing,
#velaphix-manual-ad .vlx-ad-media-wrap video.is-showing {
    display: block;
}

/* Button sits ON the ad — overlaid near the bottom, like a banner CTA */
#velaphix-manual-ad .vlx-ad-button {
    position: absolute;
    left: 50%;
    bottom: 0.8rem;
    transform: translateX(-50%);
    z-index: 2;
    display: inline-block;
    background: var(--primary-color, #6c2bd9);
    color: rgb(255, 255, 255);
    font-size: 0.85rem;
    font-weight: 600;
    padding: 0.5rem 1.2rem;
    border-radius: 999px;
    text-decoration: none;
    white-space: nowrap;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.3);
}
#velaphix-manual-ad .vlx-ad-button:hover {
    filter: brightness(1.08);
}

/* Smaller card on narrow phones so it never crowds the screen */
@media only screen and (max-width: 380px) {
    #velaphix-manual-ad {
        width: 180px;
        right: 0.6rem;
        bottom: 0.6rem;
    }
    #velaphix-manual-ad .vlx-ad-button {
        font-size: 0.75rem;
        padding: 0.4rem 0.9rem;
    }
}

/* A little more room to breathe on larger screens */
@media only screen and (min-width: 900px) {
    #velaphix-manual-ad {
        width: 260px;
    }
}
