/* FapSwipe Ads 0.3.0 — neutral monetization chrome kept separate from Core skins. */
.fapswipe-feed.fapswipe-ad-dock-enabled {
    --fapswipe-ad-dock-height: var(--fapswipe-ad-dock-desktop-height, 90px);
}

/*
 * Reserve dock space only inside organic slides. The Swiper itself remains full
 * viewport height, so interstitial ad slides can stay true full-stage when the
 * dock is hidden.
 */
.fapswipe-feed.fapswipe-ad-dock-enabled .fapswipe-slide:not(.fapswipe-ad-slide) {
    box-sizing: border-box;
    padding-bottom: var(--fapswipe-ad-dock-height);
}

.fapswipe-feed.fapswipe-ad-dock-enabled .fapswipe-slide:not(.fapswipe-ad-slide) .fapswipe-player-wrap,
.fapswipe-feed.fapswipe-ad-dock-enabled .fapswipe-slide:not(.fapswipe-ad-slide) video,
.fapswipe-feed.fapswipe-ad-dock-enabled .fapswipe-slide:not(.fapswipe-ad-slide) .fapswipe-native-video {
    max-height: calc(100dvh - var(--fapswipe-ad-dock-height));
}

.fapswipe-feed.fapswipe-ad-dock-enabled .fapswipe-overlay {
    bottom: calc(76px + var(--fapswipe-ad-dock-height));
}

.fapswipe-feed.fapswipe-ad-dock-enabled .fapswipe-feedback {
    bottom: calc(22px + var(--fapswipe-ad-dock-height));
}

@media (min-width: 768px) {
    .fapswipe-feed.fapswipe-ad-dock-enabled .fapswipe-actions {
        bottom: calc(84px + var(--fapswipe-ad-dock-height));
    }
}

/*
 * Immersive ad state
 * ------------------
 * SAFE TO RESTYLE: this is intentionally neutral so future skins can replace the
 * chrome without touching VAST/direct-delivery logic.
 *
 * DO NOT remove the class-driven separation between organic controls and ad
 * controls unless an equivalent collision-free layout is provided.
 */
.fapswipe-feed .fapswipe-feed-controls,
.fapswipe-feed .fapswipe-info-toggle {
    transition: opacity 140ms ease, visibility 140ms ease;
}

.fapswipe-feed.fapswipe-ad-active .fapswipe-feed-controls,
.fapswipe-feed.fapswipe-ad-active .fapswipe-info-toggle {
    opacity: 0;
    visibility: hidden;
    pointer-events: none;
}

.fapswipe-ad-slide {
    background: #000;
    color: #fff;
}

.fapswipe-ad-stage {
    position: relative;
    display: grid;
    place-items: center;
    width: min(100%, 720px);
    height: 100%;
    margin-inline: auto;
    overflow: hidden;
    isolation: isolate;
    background: #000;
}

.fapswipe-ad-stage.is-clickable {
    cursor: pointer;
}

.fapswipe-ad-stage.is-clickable:focus-visible {
    outline: 2px solid rgb(255 255 255 / 0.92);
    outline-offset: -4px;
}

/* Subtle lower fade gives labels/CTA a predictable contrast surface. */
.fapswipe-ad-stage::after {
    content: "";
    position: absolute;
    inset: auto 0 0;
    z-index: 2;
    height: min(34%, 300px);
    pointer-events: none;
    background: linear-gradient(180deg, transparent 0%, rgb(0 0 0 / 0.18) 28%, rgb(0 0 0 / 0.78) 100%);
}

.fapswipe-ad-media,
.fapswipe-ad-media-link {
    display: block;
    width: 100%;
    height: 100%;
}

.fapswipe-ad-media {
    object-fit: cover;
    background: #000;
}

/* Ad-local mute stays clear of the Core up/down navigation rail. */
.fapswipe-ad-mute {
    position: absolute;
    top: 50%;
    right: 14px;
    z-index: 5;
    display: grid;
    place-items: center;
    width: 42px;
    height: 42px;
    padding: 0;
    transform: translateY(-50%);
    border: 1px solid rgb(255 255 255 / 0.42);
    border-radius: 999px;
    background: rgb(8 8 8 / 0.66);
    box-shadow: 0 6px 18px rgb(0 0 0 / 0.48);
    color: #fff;
    font-size: 18px;
    line-height: 1;
    cursor: pointer;
    -webkit-tap-highlight-color: transparent;
}

.fapswipe-ad-mute:hover,
.fapswipe-ad-mute:focus-visible {
    background: rgb(8 8 8 / 0.88);
    border-color: rgb(255 255 255 / 0.68);
}

.fapswipe-ad-mute:focus-visible {
    outline: 2px solid #fff;
    outline-offset: 2px;
}

/*
 * Bottom ad chrome
 * ----------------
 * Compact neutral presentation inspired by reels-style placements: identity and
 * optional copy above a broad CTA. No skin-specific colors are hard-coded here.
 */
.fapswipe-ad-copy {
    position: absolute;
    left: 16px;
    right: 16px;
    bottom: max(16px, env(safe-area-inset-bottom, 0px));
    z-index: 4;
    display: grid;
    gap: 8px;
    max-width: 620px;
    margin-inline: auto;
    pointer-events: none;
    text-shadow: 0 1px 3px rgb(0 0 0 / 0.92);
}

.fapswipe-ad-meta {
    display: flex;
    align-items: center;
    flex-wrap: wrap;
    gap: 7px;
    min-width: 0;
}

.fapswipe-ad-badge {
    display: inline-flex;
    align-items: center;
    min-height: 25px;
    padding: 5px 8px;
    border: 1px solid rgb(255 255 255 / 0.34);
    border-radius: 999px;
    background: rgb(8 8 8 / 0.68);
    box-shadow: 0 4px 14px rgb(0 0 0 / 0.36);
    color: rgb(255 255 255 / 0.96);
    font: 750 10px/1.1 system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
    letter-spacing: .045em;
    text-transform: uppercase;
}

.fapswipe-ad-title {
    min-width: 0;
    margin: 0;
    overflow: hidden;
    color: #fff;
    font: 750 15px/1.2 system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.fapswipe-ad-description {
    display: -webkit-box;
    overflow: hidden;
    margin: 0;
    color: rgb(255 255 255 / 0.9);
    font: 520 12px/1.35 system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
    -webkit-box-orient: vertical;
    -webkit-line-clamp: 2;
}

.fapswipe-ad-cta {
    box-sizing: border-box;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 100%;
    min-height: 48px;
    padding: 11px 16px;
    pointer-events: auto;
    border: 1px solid rgb(255 255 255 / 0.7);
    border-radius: 14px;
    background: rgb(255 255 255 / 0.96);
    box-shadow: 0 5px 18px rgb(0 0 0 / 0.3);
    color: #111;
    font: 800 13px/1.15 system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
    text-align: center;
    text-decoration: none;
    text-shadow: none;
    -webkit-tap-highlight-color: transparent;
}

.fapswipe-ad-cta:hover,
.fapswipe-ad-cta:focus-visible {
    background: #fff;
}

.fapswipe-ad-cta:focus-visible {
    outline: 2px solid #fff;
    outline-offset: 3px;
}

.fapswipe-ad-loading {
    color: rgb(255 255 255 / 0.78);
    font: 650 12px/1.2 system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
}

/* Bottom dock remains independent from full-swipe interstitial styling. */
.fapswipe-ad-dock {
    position: absolute;
    left: 0;
    right: 0;
    bottom: 0;
    z-index: 35;
    display: grid;
    place-items: center;
    height: var(--fapswipe-ad-dock-height);
    padding: 7px 12px max(7px, env(safe-area-inset-bottom, 0px));
    box-sizing: border-box;
    overflow: hidden;
    border-top: 1px solid rgb(255 255 255 / 0.12);
    background: #090909;
    transition: opacity 120ms ease, visibility 120ms ease;
}

.fapswipe-ad-dock.is-hidden {
    opacity: 0;
    visibility: hidden;
    pointer-events: none;
}

.fapswipe-ad-dock > * {
    max-width: 100%;
    max-height: 100%;
}

.fapswipe-ad-dock-link {
    display: grid;
    place-items: center;
    width: 100%;
    height: 100%;
}

.fapswipe-ad-dock img {
    display: block;
    max-width: 100%;
    max-height: 100%;
    object-fit: contain;
}

.fapswipe-ad-dock-frame {
    width: 100%;
    height: 100%;
    border: 0;
    background: transparent;
}

@media (max-width: 767px) {
    .fapswipe-feed.fapswipe-ad-dock-enabled {
        --fapswipe-ad-dock-height: var(--fapswipe-ad-dock-mobile-height, 96px);
    }

    .fapswipe-ad-copy {
        left: 14px;
        right: 14px;
        bottom: max(14px, env(safe-area-inset-bottom, 0px));
        gap: 7px;
    }

    .fapswipe-ad-title {
        font-size: 14px;
    }

    .fapswipe-ad-description {
        font-size: 11px;
    }

    .fapswipe-ad-cta {
        min-height: 46px;
        border-radius: 13px;
        font-size: 13px;
    }

    .fapswipe-ad-mute {
        right: 12px;
        width: 40px;
        height: 40px;
    }
}

@media (prefers-reduced-motion: reduce) {
    .fapswipe-feed .fapswipe-feed-controls,
    .fapswipe-feed .fapswipe-info-toggle,
    .fapswipe-ad-dock {
        transition: none;
    }
}
