/* Reddgifs — mobile shorts swipe feed.
   Only ever active on touch-sized viewports (the JS gates on max-width:900px and
   adds .rg-sf-active to <body>). Desktop keeps the Phase 2 fitted 9:16 player. */

/* While the pager owns the screen, hide the site chrome and the underlying page
   so nothing shows through and nothing below keeps laying out / decoding. The
   markup stays in the DOM — this is a visual takeover, not a content swap. */
body.rg-sf-active { overflow: hidden !important; padding-bottom: 0 !important; }
body.rg-sf-active .rg-single-page,
body.rg-sf-active .rg-hdr,
body.rg-sf-active header,
body.rg-sf-active footer,
body.rg-sf-active #wpadminbar { display: none !important; }

/* The sticky ad is the one piece of chrome that stays: it sits at the bottom on
   its own fixed layer (z-index 9000) and the pager reserves room for it. */

.rg-sf {
    position: fixed;
    inset: 0;
    /* Leave the bottom band to the 320x50 sticky. */
    bottom: 56px;
    z-index: 8000;
    background: #000;
}

.rg-sf__track {
    height: 100%;
    overflow-y: scroll;
    overflow-x: hidden;
    /* Native snap does the swiping — no custom touch handlers (those are what
       made the home rail stop responding after one gesture). */
    scroll-snap-type: y mandatory;
    -webkit-overflow-scrolling: touch;
    overscroll-behavior-y: contain;
    scrollbar-width: none;
}
.rg-sf__track::-webkit-scrollbar { display: none; }

.rg-sf__slide {
    position: relative;
    height: 100%;
    width: 100%;
    scroll-snap-align: start;
    scroll-snap-stop: always;   /* never fly past a short mid-flick */
    background: #000;
    overflow: hidden;
}

.rg-sf__video {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    /* Source is verified 9:16 and the slide is the full screen, so contain keeps
       the whole frame visible on taller-than-9:16 phones without cropping faces
       out of frame; the letterbox band is pure black against a black slide. */
    object-fit: contain;
    background: #000;
}

/* Full-slide tap target for play/pause, under the meta layer. */
.rg-sf__tap { position: absolute; inset: 0; z-index: 1; }

/* Center play glyph — only visible while paused. */
.rg-sf__play {
    position: absolute;
    top: 50%; left: 50%;
    transform: translate(-50%, -50%);
    z-index: 2;
    width: 68px; height: 68px;
    display: flex; align-items: center; justify-content: center;
    background: rgba(0, 0, 0, .45);
    border-radius: 50%;
    opacity: 0;
    transition: opacity .18s ease;
    pointer-events: none;
}
.rg-sf__slide.is-paused .rg-sf__play { opacity: 1; }

.rg-sf__meta {
    position: absolute;
    left: 0; right: 0; bottom: 0;
    z-index: 2;
    padding: 40px 14px 14px;
    background: linear-gradient(to top, rgba(0,0,0,.82), rgba(0,0,0,0));
    pointer-events: none;
}
.rg-sf__title {
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
    color: #fff;
    font-size: 14px;
    line-height: 1.35;
    font-weight: 600;
    text-decoration: none;
    text-shadow: 0 1px 3px rgba(0,0,0,.6);
    pointer-events: auto;
}
.rg-sf__views {
    margin-top: 4px;
    color: #cfcfd4;
    font-size: 12px;
    text-shadow: 0 1px 3px rgba(0,0,0,.6);
}

/* ---------- in-feed ad slide ---------- */
/* A full-screen slide the visitor swipes to deliberately, holding ExoClick's
   tallest banner (300x500). Labelled, skippable, and never blank: an unfilled
   slide is removed before it is reached, or falls back to a house panel. */
.rg-sf__slide--ad {
    display: flex;
    align-items: center;
    justify-content: center;
    background: #08080a;
}
.rg-sf__adbox {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 10px;
    max-width: 100%;
}
.rg-sf__adlabel {
    font-size: 10px;
    letter-spacing: .09em;
    text-transform: uppercase;
    color: #6c6c74;
}
.rg-sf__adhost {
    display: flex;
    align-items: center;
    justify-content: center;
    min-width: 300px;
    min-height: 250px;
    max-width: 100vw;
}

/* Vertical Video (VAST): unlike the banner, this fills the entire slide. */
.rg-sf__slide--ad.is-vast { padding: 0; }
.rg-sf__slide--ad.is-vast .rg-sf__adbox { position: absolute; inset: 0; gap: 0; }
.rg-sf__slide--ad.is-vast .rg-sf__adhost { position: absolute; inset: 0; min-width: 0; min-height: 0; }
.rg-sf__slide--ad.is-vast .rg-sf__adlabel {
    position: absolute;
    top: 12px; left: 12px;
    z-index: 3;
    padding: 2px 7px;
    background: rgba(0,0,0,.45);
    border-radius: 4px;
}
.rg-sf__vast { position: absolute; inset: 0; }
.rg-sf__vast-content { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: contain; background: #000; }
.rg-sf__vast-ui { position: absolute; inset: 0; }
.rg-sf__vast-ui iframe,
.rg-sf__vast-ui video { width: 100% !important; height: 100% !important; }
/* House fallback shown only if the slot is reached with no fill. */
.rg-sf__house {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 6px;
    padding: 26px 30px;
    border: 1px solid #26262c;
    border-radius: 12px;
    text-decoration: none;
}
.rg-sf__house-title { color: #fff; font-size: 17px; font-weight: 700; }
.rg-sf__house-sub   { color: var(--rg-shorts-accent, #ff2e4d); font-size: 13px; font-weight: 600; }

.rg-sf__back {
    position: absolute;
    top: 10px; left: 10px;
    z-index: 3;
    width: 38px; height: 38px;
    display: flex; align-items: center; justify-content: center;
    color: #fff;
    background: rgba(0,0,0,.4);
    border-radius: 50%;
    text-decoration: none;
}
