
/* PETERPLAYER - SCREW WEBSITE */

/* VIDEO STAGE */
#screwTrailerHolder .pp-stage {
    position: relative;
    width: 100%;
    aspect-ratio: 16 / 9;
    background: #000;
    overflow: hidden;
    color: #fff;
    font-family: Arial, Helvetica, sans-serif;
    isolation: isolate;
}

#screwTrailerHolder .pp-stage .video-js,
#screwTrailerHolder .pp-stage video {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    object-fit: contain;
    background: #000;
}

#screwTrailerHolder .pp-stage .vjs-tech {
    object-fit: contain;
}

#screwTrailerHolder .pp-stage .video-js .vjs-control-bar,
#screwTrailerHolder .pp-stage .video-js .vjs-big-play-button {
    display: none !important;
}

/* VIDEO TITLE */
#screwTrailerHolder .pp-top {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    z-index: 25;

    padding: 16px 55px 22px 20px;

    background: linear-gradient(
        to bottom,
        rgba(4,5,8,.76),
        rgba(4,5,8,0)
    );

    color: #fa3ca4;
    font-weight: 700;
    font-size: clamp(14px, 2.1vw, 21px);

    pointer-events: none;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;

    transition: opacity .16s ease;
}

/* BOTTOM CONTROL OVERLAY */
#screwTrailerHolder .pp-bottom {
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    z-index: 25;

    background: rgba(8,10,15,.65);
    backdrop-filter: blur(9px);
    -webkit-backdrop-filter: blur(9px);

    padding: 9px 18px 11px;

    transition:
        opacity .16s ease,
        transform .16s ease;
}

/* AUTO-HIDE */
#screwTrailerHolder .pp-stage.pp-hide:not(.pp-ad) .pp-top,
#screwTrailerHolder .pp-stage.pp-hide:not(.pp-ad) .pp-bottom {
    opacity: 0;
    pointer-events: none;
}

/* PROGRESS BAR */
#screwTrailerHolder .pp-progress {
    display: block;
    width: 100%;
    height: 5px;
    margin: 0 0 4px;

    accent-color: #fa3ca4;
    cursor: pointer;

    border: 0;
    outline: 0;
    box-shadow: none;
}

/* CONTROL ROW
   Equal-width columns keep the center group
   aligned with the progress bar midpoint.
*/
#screwTrailerHolder .pp-row {
    display: grid;
    grid-template-columns:
        minmax(0,1fr)
        minmax(0,1fr)
        minmax(0,1fr);

    align-items: center;
    gap: 0;
    width: 100%;
    min-height: 45px;
}

/* THREE CONTROL GROUPS */
#screwTrailerHolder .pp-left,
#screwTrailerHolder .pp-center,
#screwTrailerHolder .pp-right {
    display: flex;
    align-items: center;
    height: 45px;
    min-height: 0;
    gap: 9px;
}

/* LEFT: VOLUME */
#screwTrailerHolder .pp-left {
    justify-self: start;
    justify-content: flex-start;
    min-width: 0;
}

/* CENTER: REWIND / PLAY / FAST FORWARD */
#screwTrailerHolder .pp-center {
    position: relative;
    justify-self: center;
    justify-content: center;

    width: max-content;
    margin: 0;
    padding: 0;

    /* No absolute positioning or horizontal offset */
    left: auto;
    right: auto;
    transform: none;
}

/* RIGHT: TIME / FULLSCREEN */
#screwTrailerHolder .pp-right {
    justify-self: end;
    justify-content: flex-end;
    min-width: 0;
}

/* BUTTONS */
#screwTrailerHolder .pp-icon {
    display: inline-flex;
    align-items: center;
    justify-content: center;

    flex-shrink: 0;

    border: 0;
    border-radius: 6px;
    color: #fff;
    background: transparent;

    cursor: pointer;

    padding: 5px 7px;
    font-size: 21px;
    line-height: 1;

    min-width: 35px;
    min-height: 37px;

    margin: 0;
    vertical-align: middle;
}

/* VCR BUTTONS */
#screwTrailerHolder .pp-center .pp-icon {
    background: rgba(255,255,255,.1);
    min-width: 49px;
}

#screwTrailerHolder .pp-icon:hover,
#screwTrailerHolder .pp-icon:focus-visible {
    background: rgba(250,60,164,.26);
    outline: none;
}

/* VOLUME SLIDER */
#screwTrailerHolder .pp-volume {
    width: 73px;
    max-width: 100%;
    height: 18px;

    margin: 0;
    padding: 0;

    accent-color: #fa3ca4;
    cursor: pointer;

    border: 0;
    outline: 0;
    box-shadow: none;

    align-self: center;
}

/* ELAPSED TIME */
#screwTrailerHolder .pp-time {
    display: inline-flex;
    align-items: center;
    justify-content: center;

    height: 37px;

    font-size: 12px;
    line-height: 1;
    font-variant-numeric: tabular-nums;
    white-space: nowrap;

    margin: 0;
}

/* SPEED INDICATOR
   Absolutely positioned OUTSIDE the center group
   so it cannot shift the playback buttons.
*/
#screwTrailerHolder .pp-speed {
    position: absolute;
    top: 50%;
    left: calc(100% + 9px);

    transform: translateY(-50%);

    display: inline-flex;
    align-items: center;

    height: 37px;
    min-width: 0;

    color: #ff61b5;
    font-size: 13px;
    font-weight: 700;
    line-height: 1;
    white-space: nowrap;

    margin: 0;
    padding: 0;
    pointer-events: none;
}

/* ADVERTISEMENT LABEL */
#screwTrailerHolder .pp-adlabel {
    display: none;

    position: absolute;
    top: 16px;
    left: 18px;
    z-index: 27;

    background: rgba(0,0,0,.72);
    padding: 7px 11px;
    border-radius: 4px;

    font-size: 12px;
}

#screwTrailerHolder .pp-stage.pp-ad .pp-adlabel {
    display: block;
}

/* HIDE CUSTOM CONTROLS DURING VAST ADS */
#screwTrailerHolder .pp-stage.pp-ad .pp-top,
#screwTrailerHolder .pp-stage.pp-ad .pp-bottom {
    display: none !important;
}

/* VAST / GOOGLE IMA */
#screwTrailerHolder .pp-stage.pp-ad
.video-js .vjs-ima-ad-container {
    z-index: 22 !important;
    pointer-events: auto !important;
}

#screwTrailerHolder .pp-stage.pp-ad
.video-js .vjs-control-bar {
    display: flex !important;
    z-index: 23;
}

/* PRESERVE CLICKABLE VAST SKIP BUTTON */
#screwTrailerModal #screwTrailerHolder
.pp-stage.pp-ad .video-js .vjs-ima-ad-container,
#screwTrailerModal #screwTrailerHolder
.pp-stage.pp-ad .video-js .ima-ad-container {
    pointer-events: auto !important;
    z-index: 50 !important;
}

#screwTrailerModal #screwTrailerHolder
.pp-stage.pp-ad .pp-adlabel {
    pointer-events: none !important;
    z-index: 51;
}

#screwTrailerModal #screwTrailerHolder
.pp-stage.pp-ad .video-js .vjs-ima-ad-container iframe {
    pointer-events: auto !important;
}

/* FULLSCREEN */
#screwTrailerHolder .pp-stage:fullscreen {
    width: 100vw;
    height: 100vh;
    aspect-ratio: auto;
}

/* MOBILE */
@media (max-width: 600px) {

    #screwTrailerHolder .pp-bottom {
        padding: 7px 9px 9px;
    }

    #screwTrailerHolder .pp-row {
        grid-template-columns:
            minmax(0,1fr)
            minmax(0,1fr)
            minmax(0,1fr);

        gap: 0;
        min-height: 36px;
    }

    #screwTrailerHolder .pp-left,
    #screwTrailerHolder .pp-center,
    #screwTrailerHolder .pp-right {
        height: 36px;
        gap: 2px;
    }

    #screwTrailerHolder .pp-icon {
        font-size: 17px;
        min-width: 27px;
        min-height: 30px;
        padding: 3px;
    }

    #screwTrailerHolder .pp-center .pp-icon {
        min-width: 33px;
    }

    #screwTrailerHolder .pp-volume {
        width: 40px;
        height: 18px;
    }

    #screwTrailerHolder .pp-time {
        font-size: 10px;
        height: 30px;
    }

    #screwTrailerHolder .pp-speed {
        font-size: 11px;
        height: 30px;
        left: calc(100% + 4px);
    }

    #screwTrailerHolder .pp-progress {
        margin-bottom: 7px;
    }
}
/* Prevent mobile text selection and long-press popups */
#screwTrailerHolder .pp-center,
#screwTrailerHolder .pp-center .pp-icon {
    -webkit-user-select: none !important;
    user-select: none !important;
    -webkit-touch-callout: none !important;
    touch-action: none;
    -webkit-tap-highlight-color: transparent;
}