/* Korsakow Scroll Interface styles. All selectors scoped under
 * .ScrollPlayer (added to #korsakow-root by org.korsakow.scroll.Bootstrap)
 * so this file can never affect the classic click-based player when it's
 * the one that's active. korsakow.css is always loaded too and already
 * supplies the generic .scalingPolicy-* / .MediaUI rules this file relies
 * on (object-fit + show-once-loaded), reused as-is rather than redefined.
 */

.ScrollPlayer {
    background-color: #000;
}

.ScrollBoot {
    position: relative;
    width: 100%;
    height: 100%;
}

.ScrollFeed {
    width: 100%;
    height: 100%;
    overflow-y: auto;
    overflow-x: hidden;
    scroll-snap-type: y mandatory;
    -webkit-overflow-scrolling: touch;
    /* Without this, overscrolling past the last card (e.g. a single-card
       feed with no links yet) rubber-bands and briefly reveals the black
       .ScrollPlayer background behind the feed, reading as "screen goes
       black" rather than as "nothing more to scroll to yet". */
    overscroll-behavior-y: contain;
}

.ScrollCard {
    position: relative;
    width: 100%;
    height: 100%;
    scroll-snap-align: start;
    scroll-snap-stop: always;
    overflow: hidden;
    background-color: #111;
    background-size: cover;
    background-position: center center;
    background-repeat: no-repeat;
}

.ScrollCard .mainMediaContainer,
.ScrollCard .teaser {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
}

.ScrollCard .teaser {
    z-index: 2;
}

.ScrollCard .teaserText {
    position: absolute;
    left: 0;
    right: 0;
    bottom: 0;
    z-index: 3;
    box-sizing: border-box;
    padding: 1.5em 1.25em calc(1.5em + env(safe-area-inset-bottom, 0px));
    color: #fff;
    font-size: 1.1em;
    line-height: 1.4;
    text-shadow: 0 1px 3px rgba(0, 0, 0, 0.8);
    background: linear-gradient(to top, rgba(0, 0, 0, 0.75), rgba(0, 0, 0, 0));
    pointer-events: none;
}

.ScrollCard .UnmuteAffordance {
    position: absolute;
    right: 1em;
    bottom: calc(1.5em + env(safe-area-inset-bottom, 0px));
    z-index: 4;
    width: 2.2em;
    height: 2.2em;
    line-height: 2.2em;
    text-align: center;
    font-size: 1.2em;
    color: #fff;
    background: rgba(0, 0, 0, 0.55);
    border-radius: 50%;
    cursor: pointer;
}
