/* Horizontal reel feed. Loaded after the original stylesheet so payment UI stays intact. */
html, body {
    overflow: hidden;
    background: #080b09;
}

.legacy-scene { display: none !important; }

.reels-feed {
    width: 100%;
    height: 100vh;
    height: 100svh;
    margin: 0 auto;
    display: flex;
    flex-direction: row;
    direction: ltr;
    overflow-y: hidden;
    overflow-x: auto;
    padding-bottom: 132px;
    scroll-snap-type: x mandatory;
    scroll-behavior: smooth;
    overscroll-behavior-x: contain;
    touch-action: pan-x pinch-zoom;
    -webkit-overflow-scrolling: touch;
    scrollbar-width: none;
    background: #080b09;
}
.reels-feed::-webkit-scrollbar { display: none; }

.reel-card {
    flex: 0 0 100%;
    min-width: 0;
    width: 100%;
    height: calc(100vh - 132px);
    height: calc(100svh - 132px);
    scroll-snap-align: start;
    scroll-snap-stop: always;
    background: #080b09;
}

.reel-titlebar {
    height: 72px;
    display: grid;
    grid-template-columns: 42px minmax(0, 1fr) auto;
    align-items: center;
    gap: 12px;
    padding: 10px 16px;
    color: #fff;
    background: linear-gradient(90deg, #101812, #0c110d);
    border-bottom: 1px solid rgba(255,255,255,.12);
}
.reel-title-icon {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    display: grid;
    place-items: center;
    color: #fff;
    background: linear-gradient(145deg, var(--c-primary), var(--c-accent));
    box-shadow: 0 5px 18px rgba(0,0,0,.28);
}
.reel-title-icon svg { width: 20px; height: 20px; margin-left: 2px; }
.reel-title-copy { min-width: 0; display: block; }
.reel-titlebar h2 {
    min-width: 0;
    overflow: hidden;
    white-space: nowrap;
    text-overflow: ellipsis;
    font-size: 17px;
    line-height: 1.2;
    font-weight: 750;
}
.reel-title-copy small {
    display: block;
    margin-top: 4px;
    color: rgba(255,255,255,.52);
    font-size: 11px;
    font-weight: 600;
    letter-spacing: .35px;
    text-transform: uppercase;
}
.reel-top-badge {
    padding: 5px 8px;
    border: 1px solid rgba(255,255,255,.22);
    border-radius: 999px;
    color: #dfffe8;
    background: rgba(29,143,67,.22);
    font-size: 10px;
    font-weight: 850;
    letter-spacing: .8px;
}

.reel-media {
    position: relative;
    width: 100%;
    height: calc(100% - 72px);
    overflow: hidden;
    background: #000;
}
.reel-poster {
    position: absolute;
    inset: 0;
    background-color: #000;
    background-position: center;
    background-repeat: no-repeat;
    background-size: contain;
    filter: none;
    transform: none;
}
.reel-locked-cover {
    position: absolute;
    z-index: 2;
    inset: 0;
    display: none;
    background-color: #030504;
    background-position: center;
    background-repeat: no-repeat;
    background-size: contain;
}
.reel-card.is-locked .reel-locked-cover { display: block; }
.reel-card.is-locked .reel-video { opacity: 0; }
.reel-card.is-locked .reel-sound,
.reel-card.is-locked .reel-progress { display: none; }
.reel-video {
    position: relative;
    z-index: 1;
    display: block;
    width: 100%;
    height: 100%;
    object-fit: contain;
    background: transparent;
    opacity: 0;
    transition: opacity .15s ease;
}
.reel-video.is-ready { opacity: 1; }
.reel-card.is-locked .reel-video.is-ready { opacity: 0; }

.reel-sound,
.reel-play {
    position: absolute;
    z-index: 4;
    border: 0;
    color: #fff;
    background: rgba(0,0,0,.56);
    backdrop-filter: blur(7px);
    -webkit-backdrop-filter: blur(7px);
    cursor: pointer;
    -webkit-tap-highlight-color: transparent;
}
.reel-sound {
    right: 14px;
    bottom: 18px;
    width: 42px;
    height: 42px;
    border-radius: 50%;
    display: grid;
    place-items: center;
}
.reel-sound svg { width: 19px; height: 19px; }
.reel-sound .sound-on { display: none; }
.reel-sound[aria-pressed="true"] .sound-on { display: block; }
.reel-sound[aria-pressed="true"] .sound-off { display: none; }
.reel-play {
    left: 50%;
    top: 50%;
    transform: translate(-50%, -50%);
    width: 78px;
    height: 78px;
    border-radius: 50%;
    border: 1px solid rgba(255,255,255,.25);
    box-shadow: 0 9px 30px rgba(0,0,0,.42);
}
.reel-play svg { width: 34px; height: 34px; margin: 4px 0 0 5px; }
.reel-play[hidden] { display: none; }

.reel-progress {
    position: absolute;
    z-index: 5;
    left: 0;
    right: 0;
    bottom: 0;
    height: 3px;
    background: rgba(255,255,255,.24);
}
.reel-progress span {
    display: block;
    width: 0;
    height: 100%;
    background: var(--c-primary);
    transition: width .1s linear;
}
.reel-ended {
    position: absolute;
    z-index: 3;
    inset: 0;
    display: grid;
    place-items: center;
    color: rgba(255,255,255,.9);
    background: rgba(0,0,0,.28);
    font-size: 13px;
    font-weight: 750;
    letter-spacing: .2px;
}
.reel-ended[hidden] { display: none; }

.reel-empty {
    flex: 0 0 100%;
    height: 100%;
    display: grid;
    place-items: center;
    background: linear-gradient(160deg, #0a1f0f, #1a4a25);
}

.sheet-backdrop {
    background: rgba(0,0,0,0);
    -webkit-backdrop-filter: blur(0);
    backdrop-filter: blur(0);
    transition: background .25s ease, backdrop-filter .25s ease;
}
.sheet-backdrop.active {
    background: rgba(0,0,0,.32);
    -webkit-backdrop-filter: none;
    backdrop-filter: none;
}
.reels-feed.is-behind-paywall { pointer-events: none; }
.payment-sheet { position: relative; }

@media (min-width: 560px) {
    .reels-feed {
        max-width: 520px;
        border-left: 1px solid rgba(255,255,255,.08);
        border-right: 1px solid rgba(255,255,255,.08);
        box-shadow: 0 0 70px rgba(0,0,0,.5);
    }
}

@media (max-height: 560px) {
    .reels-feed { padding-bottom: 96px; }
    .reel-card { height: calc(100vh - 96px); height: calc(100svh - 96px); }
    .reel-titlebar { height: 58px; }
    .reel-media { height: calc(100% - 58px); }
}

@media (prefers-reduced-motion: reduce) {
    .reels-feed { scroll-behavior: auto; }
    .reel-progress span { transition: none; }
}

/* Red controls, white layout, and black typography. */
:root { --c-primary: #ef4444; --c-accent: #dc2626; --c-tint12: rgba(239,68,68,.12); --c-tint30: rgba(239,68,68,.30); }
html, body, .reels-feed, .reel-card, .reel-titlebar,
.reel-media, .reel-poster, .reel-locked-cover, .reel-empty,
.payment-sheet, .phone-prefix, .phone-group input {
    background: #fff;
    color: #000;
}
.reel-titlebar { border-bottom: 1px solid #e5e5e5; }
.reel-titlebar h2, .reel-title-copy small, .reel-top-badge,
.placeholder-inner, .sheet-title, .sheet-desc, .phone-label,
.phone-prefix, .phone-group input, .status-title, .status-body,
.poll-status, .redirect-msg, .ussd-tip, .error-msg { color: #000; }
.reel-top-badge, .ussd-tip, .error-msg { background: #fff; border-color: #e5e5e5; }
.reel-title-icon, .reel-play, .reel-sound, .price-badge, .pay-btn, .retry-btn {
    background: #ef4444;
}
.price-badge, .pay-btn, .retry-btn { color: #000; }
.reel-title-icon, .reel-play, .reel-sound { color: #fff; }
.reel-play { border-color: #ef4444; }
.phone-group, .phone-group:focus-within { border-color: #ef4444; }
.phone-prefix { border-right-color: #e5e5e5; }
.phone-group input::placeholder { color: #595959; }
.reel-progress { background: #e5e5e5; }
.reel-progress span, .pulse-dots span { background: #ef4444; }
.reel-ended { color: #000; background: rgba(255,255,255,.85); }
.pay-spinner { border-color: rgba(0,0,0,.2); border-top-color: #000; }
.reels-feed { border-color: #e5e5e5; box-shadow: 0 0 40px rgba(0,0,0,.08); }
.reels-feed:focus-visible { outline: 2px solid #ef4444; outline-offset: -2px; }

/* Anchor the payment popup to the bottom on phones and desktops. */
.sheet-backdrop { align-items: flex-end; }
.payment-sheet {
    width: 100%;
    max-width: 520px;
    margin-bottom: 0;
    border-radius: 22px 22px 0 0;
    padding-bottom: calc(20px + env(safe-area-inset-bottom, 0px));
}
.sheet-backdrop { display: flex; justify-content: center; align-items: flex-end; }
.payment-sheet { top: auto; left: auto; transform: translateY(18px); }
.payment-sheet.open { transform: translateY(0); }
