/* ============================================================
   WP Video Encoder Widget — unified custom player UI
   ============================================================ */

.wvee {
    /* darker, blue-tinted hover highlight for the bottom controls */
    --wvee-hover: rgba(59, 130, 246, .16);
    position: relative;
    margin: 2rem 0;
    background: #000;
    border-radius: 4px;
    overflow: hidden;
}

.wvee-stage {
    position: relative;
    width: 100%;
    aspect-ratio: 16 / 9;
    background: #000;
    outline: none;
}
.wvee-stage:focus-visible {
    box-shadow: 0 0 0 2px rgba(255, 255, 255, .45) inset;
}

.wvee-video {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    object-fit: contain;
    background: #000;
    display: block;
}

/* --- logo (top-right, part of the stage markup) --- */

.wvee-logo {
    position: absolute;
    top: 8px;
    right: 16px;
    height: 18%;
    width: auto;
    z-index: 3;
    pointer-events: none;
    opacity: .92;
    transition: opacity .35s ease;
}
.wvee-idle .wvee-logo {
    opacity: .5;
}

/* --- overlay root: clicks fall through to the video except on controls --- */

.wvee-ui {
    position: absolute;
    inset: 0;
    z-index: 2;
    pointer-events: none;
    font-family: 'BAU_KSR_Normal', 'Inter', system-ui, -apple-system, 'Segoe UI', sans-serif;
}
.wvee-top,
.wvee-bigplay,
.wvee-bar,
.wvee-miniprog,
.wvee-hoverzone {
    pointer-events: auto;
}

/* --- top gradient + title (visible while paused / active) --- */

.wvee-top {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    padding: 14px 16px 34px;
    background: linear-gradient(180deg, rgba(0, 0, 0, .55) 0%, rgba(0, 0, 0, .2) 55%, transparent 100%);
    opacity: 1;
    transform: none;
    transition: opacity .35s ease, transform .35s ease;
    z-index: 3;
}
.wvee[data-state="paused"] .wvee-top {
    transform: none;
    opacity: 1;
}
.wvee[data-state="playing"] .wvee-top {
    transform: translateY(-100%);
    opacity: 0;
    pointer-events: none;
}
/* the title follows the menu bar: shown with the bar while playing (the
   bottom hover area), hidden with it. Paused and before the first play
   the bar and title are both visible, so the title shows with the big
   play button at the beginning. */
.wvee[data-state="playing"].wvee-hoverbar .wvee-top {
    transform: none;
    opacity: 1;
    pointer-events: auto;
}
.wvee-idle .wvee-top {
    opacity: 0;
}

.wvee-title {
    font-size: 1.2rem;
    font-weight: 500;
    letter-spacing: .04em;
    color: #fff;
    text-shadow: 0 1px 3px rgba(0, 0, 0, .55);
    display: block;
}

/* --- big center play button --- */

.wvee-bigplay {
    position: absolute;
    left: 50%;
    top: 50%;
    transform: translate(-50%, -50%);
    width: 104px;
    height: 104px;
    border-radius: 50%;
    background: rgba(18, 18, 18, .55);
    border: 1px solid rgba(255, 255, 255, .3);
    color: #fff;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    z-index: 4;
    transition: opacity .3s ease, transform .3s ease, background .2s ease;
}
.wvee-bigplay svg {
    width: 46px;
    height: 46px;
    margin-left: 6px;
}
.wvee-bigplay:hover {
    background: rgba(30, 30, 30, .7);
    transform: translate(-50%, -50%) scale(1.05);
}
.wvee[data-state="playing"] .wvee-bigplay {
    opacity: 0;
    pointer-events: none;
    transform: translate(-50%, -50%) scale(.8);
}

.wvee-bigplay.ripple::after {
    content: '';
    position: absolute;
    inset: -2px;
    border-radius: 50%;
    border: 2px solid rgba(255, 255, 255, .75);
    animation: wvee-ripple .6s ease-out forwards;
    pointer-events: none;
}
@keyframes wvee-ripple {
    from { transform: scale(1); opacity: 1; }
    to   { transform: scale(1.9); opacity: 0; }
}

/* --- bottom bar --- */

.wvee-bar {
    position: absolute;
    left: 0;
    right: 0;
    bottom: 0;
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 10px 14px 10px;
    background: linear-gradient(0deg, rgba(0, 0, 0, .62) 0%, rgba(0, 0, 0, .25) 60%, transparent 100%);
    transition: opacity .35s ease, transform .35s ease;
    z-index: 4;
}
/* paused / ended: the bar stays visible */
.wvee[data-state="paused"] .wvee-bar {
    transform: none;
    opacity: 1;
    pointer-events: auto;
}
/* playing: the bar is hidden until the mouse enters the bottom hover
   area (.wvee-hoverzone) or the bar itself — see .wvee-hoverbar */
.wvee[data-state="playing"] .wvee-bar {
    transform: translateY(10px);
    opacity: 0;
    pointer-events: none;
}
.wvee[data-state="playing"].wvee-hoverbar .wvee-bar {
    transform: none;
    opacity: 1;
    pointer-events: auto;
}
/* while playing the thin full-width seek bar (.wvee-miniprog) IS the seek
   bar, so the in-bar progress is not rendered and the time pushes the
   buttons to the right */
.wvee[data-state="playing"] .wvee-bar .wvee-progress {
    display: none;
}
.wvee[data-state="playing"] .wvee-bar .wvee-time {
    flex: 1 1 auto;
}
/* hovering the bottom area (wvee-hoverbar): the full bar is back, its
   in-bar progress becomes the seek bar and the miniprog yields */
.wvee[data-state="playing"].wvee-hoverbar .wvee-bar .wvee-progress {
    display: flex;
}
.wvee[data-state="playing"].wvee-hoverbar .wvee-bar .wvee-time {
    flex: 0 0 auto;
}
.wvee[data-state="playing"].wvee-hoverbar .wvee-miniprog {
    opacity: 0;
    pointer-events: none;
}

/* before the first play (wvee-prestart is removed on play): the bar is
   hidden as well, and only the bottom hover zone brings it up */
.wvee.wvee-prestart .wvee-bar {
    transform: translateY(10px);
    opacity: 0;
    pointer-events: none;
}
.wvee.wvee-prestart .wvee-hoverzone {
    pointer-events: auto;
}
.wvee.wvee-prestart.wvee-hoverbar .wvee-bar {
    transform: none;
    opacity: 1;
    pointer-events: auto;
}

.wvee-btn {
    position: relative;
    width: 34px;
    height: 34px;
    flex: 0 0 auto;
    display: flex;
    align-items: center;
    justify-content: center;
    background: none;
    border: 0;
    color: #fff;
    cursor: pointer;
    padding: 0;
    border-radius: 4px;
    transition: background .15s ease;
}
.wvee-btn svg {
    width: 20px;
    height: 20px;
    display: block;
}
.wvee-btn:hover {
    background: var(--wvee-hover);
}
.wvee-btn:focus-visible {
    outline: 2px solid rgba(96, 165, 250, .7);
    outline-offset: 1px;
}

/* Make room when the volume slider rolls out: the track grows to the
   left of the mute button, so push the fullscreen button over to the
   left (the flexible progress bar yields the space). */
.wvee-fs {
    transition: background .15s ease, margin-right .28s cubic-bezier(.3, .8, .3, 1);
}
.wvee-bar.wvee-volopen .wvee-fs {
    margin-right: 74px;
}

/* play/pause icon swap */
.wvee-pp .i-pause { display: none; }
.wvee[data-state="playing"] .wvee-pp .i-play { display: none; }
.wvee[data-state="playing"] .wvee-pp .i-pause { display: block; }

/* --- time --- */

.wvee-time {
    flex: 0 0 auto;
    font-family: 'Roboto Mono', 'SFMono-Regular', Consolas, monospace;
    font-size: 1.2rem;
    letter-spacing: .05em;
    color: rgba(255, 255, 255, .88);
    white-space: nowrap;
    user-select: none;
}
.wvee-sep {
    opacity: .5;
    margin: 0 3px;
}

/* --- seek progress --- */

.wvee-progress {
    position: relative;
    flex: 1 1 auto;
    height: 26px;
    display: flex;
    align-items: center;
    cursor: pointer;
    touch-action: none;
}
.wvee-prog-track {
    position: relative;
    width: 100%;
    height: 4px;
    border-radius: 2px;
    background: rgba(255, 255, 255, .25);
    transition: height .15s ease;
}
.wvee-progress:hover .wvee-prog-track,
.wvee-progress.dragging .wvee-prog-track {
    height: 6px;
}
.wvee-buffer,
.wvee-played {
    position: absolute;
    top: 0;
    bottom: 0;
    left: 0;
    width: 0;
    border-radius: 2px;
}
.wvee-buffer {
    background: rgba(255, 255, 255, .32);
}
.wvee-played {
    background: #fff;
}
.wvee-thumb {
    position: absolute;
    top: 50%;
    left: 0;
    width: 12px;
    height: 12px;
    border-radius: 50%;
    background: #fff;
    transform: translate(-50%, -50%);
    box-shadow: 0 0 4px rgba(0, 0, 0, .45);
}
.wvee-ttip,
.wvee-mp-tip {
    position: absolute;
    bottom: 24px;
    transform: translateX(-50%);
    background: rgba(16, 16, 16, .92);
    border: 1px solid rgba(255, 255, 255, .16);
    border-radius: 3px;
    color: #fff;
    font-family: 'Roboto Mono', Consolas, monospace;
    font-size: .68rem;
    padding: 3px 7px;
    white-space: nowrap;
    opacity: 0;
    transition: opacity .12s ease;
    pointer-events: none;
}
.wvee-progress:hover .wvee-ttip,
.wvee-progress.dragging .wvee-ttip,
.wvee-miniprog:hover .wvee-mp-tip,
.wvee-miniprog.dragging .wvee-mp-tip {
    opacity: 1;
}
.wvee-mp-tip {
    bottom: 14px;
}

/* --- volume --- */

.wvee-vol {
    position: relative;
    flex: 0 0 auto;
    display: flex;
    align-items: center;
    height: 34px;
}
.wvee-vol .i-mute { display: none; }
.wvee[data-muted="true"] .wvee-mute .i-vol { display: none; }
.wvee[data-muted="true"] .wvee-mute .i-mute { display: block; }
.wvee-voltrack {
    position: absolute;
    top: 50%;
    right: 40px;
    transform: translateY(-50%);
    width: 0;
    height: 4px;
    border-radius: 2px;
    background: rgba(255, 255, 255, .25);
    overflow: hidden;
    cursor: pointer;
    transition: width .28s cubic-bezier(.3, .8, .3, 1);
    touch-action: none;
}
.wvee-vol:hover .wvee-voltrack,
.wvee-vol:has(:focus-visible) .wvee-voltrack {
    width: 74px;
}
/* Invisible hover area to the left of the mute button, covering the
   whole open slider, so the slider stays open while the cursor moves
   onto it. It sits behind the buttons and only exists while the
   volume control is hovered, so it never blocks the seek bar. */
.wvee-vol::before {
    content: '';
    position: absolute;
    top: 0;
    right: 0;
    width: 120px;
    height: 100%;
    z-index: -1;
    pointer-events: none;
}
.wvee-vol:hover::before {
    pointer-events: auto;
}
.wvee-volfill {
    height: 100%;
    width: 100%;
    background: #fff;
}

/* --- fullscreen icon swap --- */

.wvee-fs .i-fsExit { display: none; }
.wvee[data-fs="true"] .wvee-fs .i-fs { display: none; }
.wvee[data-fs="true"] .wvee-fs .i-fsExit { display: block; }

/* ============================================================
   Playing state: thin full-width seek bar, 5px, glued to the
   bottom edge. This is the only control visible while playing
   (together with the logo), until the bottom hover area brings
   the full bar back.
   ============================================================ */

.wvee-miniprog {
    position: absolute;
    left: 0;
    right: 0;
    bottom: 0;
    height: 5px;
    z-index: 5; /* above the hover zone */
    cursor: pointer;
    touch-action: none;
    opacity: 0;
    pointer-events: none;
    transition: opacity .3s ease;
}
.wvee[data-state="playing"] .wvee-miniprog {
    opacity: 1;
    pointer-events: auto;
}
.wvee-mp-track {
    position: absolute;
    inset: 0;
}
.wvee-mp-buffer,
.wvee-mp-played {
    position: absolute;
    top: 0;
    bottom: 0;
    left: 0;
    width: 0;
}
.wvee-mp-buffer {
    background: rgba(255, 255, 255, .3);
}
.wvee-mp-played {
    background: #fff;
}
.wvee-mp-thumb {
    position: absolute;
    top: 50%;
    left: 0;
    width: 12px;
    height: 12px;
    border-radius: 50%;
    background: #fff;
    transform: translate(-50%, -50%);
    box-shadow: 0 0 4px rgba(0, 0, 0, .5);
    opacity: 0;
    transition: opacity .15s ease;
}
.wvee-miniprog:hover .wvee-mp-thumb,
.wvee-miniprog.dragging .wvee-mp-thumb {
    opacity: 1;
}

/* --- bottom hover area: hovering this strip (bottom ~16%) while
   playing brings the full control bar back --- */

.wvee-hoverzone {
    position: absolute;
    left: 0;
    right: 0;
    bottom: 0;
    height: 16%;
    z-index: 3;
    pointer-events: none;
}
.wvee[data-state="playing"] .wvee-hoverzone {
    pointer-events: auto;
}

/* ============================================================
   Resolution dots — at rest: ONE dot at the bottom-right, the
   Auto dot (a teal ring holding a marker in the color of the
   resolution currently playing).
   Hover (or focus): the other dots rise up and stack on top of
   the anchor dot — a "dropup" menu. Each row is [label][dot];
   all dots line up in one column above the anchor.
   Each resolution keeps its own fixed color: 1080p white, 720p
   50% gray, 360p black.
   ============================================================ */

.wvee-res {
    position: relative;
    flex: 0 0 auto;
    display: flex;
    align-items: center;
    height: 34px;
    margin-left: 4px;
}
/* Invisible hover bridge so the menu stays open while the cursor
   travels from the anchor dot up to the top row (the top row sits
   120px above the anchor, so the bridge covers 130px). */
.wvee-res::before {
    content: '';
    position: absolute;
    right: 0;
    bottom: 100%;
    width: 140px;
    height: 130px;
    pointer-events: none;
}
.wvee-res:hover::before {
    pointer-events: auto;
}

.wvee-res .wvee-dot {
    box-sizing: border-box;
    display: flex;
    align-items: center;
    justify-content: center;
    width: 34px;
    height: 34px;
    padding: 0;
    margin: 0;
    border: 1px solid rgba(255, 255, 255, .25);
    border-radius: 50%;
    background: rgba(0, 0, 0, .55);
    cursor: pointer;
    transition: opacity .18s ease, transform .22s cubic-bezier(.3, .8, .3, 1),
                background .18s ease, border-color .18s ease;
}
/* The anchor (Auto) dot is the only dot in flow: it sits at the
   right edge of the bar, its core 2px from the right side. */
.wvee-res .wvee-dot-auto {
    position: relative;
    flex: 0 0 auto;
}
/* The raised rows: hidden at rest, absolutely positioned so they
   can stack above the anchor. Right edge pinned to the anchor's
   right edge, so the dot cores form one vertical column. */
.wvee-res .wvee-dot:not(.wvee-dot-auto) {
    position: absolute;
    right: 0;
    opacity: 0;
    transform: translateY(6px);
    pointer-events: none;
}
/* Stack order (bottom → top): 360p, 720p, 1080p. Positioned by
   data-q, so it does not depend on DOM order.
   Rows are 34px tall (same as the other bar buttons) with a 6px gap. */
.wvee-res .wvee-dot[data-q="360p"]  { bottom: calc(100% + 6px); }
.wvee-res .wvee-dot[data-q="720p"]  { bottom: calc(100% + 46px); }
.wvee-res .wvee-dot[data-q="1080p"] { bottom: calc(100% + 86px); }
.wvee-res:hover .wvee-dot:not(.wvee-dot-auto),
.wvee-res:focus-within .wvee-dot:not(.wvee-dot-auto) {
    opacity: 1;
    transform: none;
    pointer-events: auto;
}
/* No hover highlight on the resolution rows: the black capsule
   appears on hover, nothing else changes. */
.wvee-res .wvee-dot:focus-visible {
    outline: 2px solid rgba(96, 165, 250, .7);
    outline-offset: 1px;
}

/* the dot core (border-box: the ring is part of the 9px, so every dot
   is the same exact circle and the Auto marker stays centered) */
.wvee-dot-core {
    box-sizing: border-box;
    flex: 0 0 auto;
    width: 9px;
    height: 9px;
    border-radius: 50%;
    background: transparent;
    border: 1.5px solid rgba(255, 255, 255, .6);
    transition: background .2s ease, border-color .2s ease, box-shadow .2s ease, transform .2s ease;
}
.wvee-res:hover .wvee-dot .wvee-dot-core,
.wvee-res:focus-within .wvee-dot .wvee-dot-core {
    transform: scale(1.12);
}


/* rows that roll out: on/off only, no color code. Off = hollow ring,
   on (the resolution playing) = filled white. */
.wvee-res .wvee-dot.active .wvee-dot-label {
    color: #fff;
}

/* Anchor dot (closed menu): the core is filled with the color of the
   resolution currently playing (it changes while Auto is on). The ring
   is blue when Auto is on and white when Auto is off. The player keeps
   data-current on .wvee-res and data-auto on the root in sync. */
.wvee-res .wvee-dot-auto .wvee-dot-core {
    box-sizing: border-box;
    width: 12px;
    height: 12px;
    min-width: 12px;
    min-height: 12px;
    aspect-ratio: 1 / 1;
    border-radius: 50%;
    background: #fff;
    border: 2.5px solid #fff;
    box-shadow: none;
    transition: background .2s ease, border-color .2s ease;
}
.wvee-res[data-current="720p"] .wvee-dot-auto .wvee-dot-core {
    background: #808080;
}
.wvee-res[data-current="360p"] .wvee-dot-auto .wvee-dot-core {
    background: #000;
}
.wvee[data-auto="true"] .wvee-res .wvee-dot-auto .wvee-dot-core {
    border-color: #1c4280;
}

/* Labels: each dot's text appears in its own capsule only while
   that dot is rolled over — except the Auto capsule, which opens
   first (as soon as the menu opens) and stays open the whole time. */
/* Label pill: the same fixed size and look for Auto and every
   resolution. It sits beside the dot, outside the layout, so it never
   changes the dot's size or position; only its opacity changes. */
.wvee-dot-label {
    position: absolute;
    right: 100%;
    top: 50%;
    transform: translateY(-50%);
    margin-right: 8px;
    box-sizing: border-box;
    display: flex;
    align-items: center;
    justify-content: center;
    width: 60px;
    height: 24px;
    padding: 0 0 1px;
    border: 1px solid #1c4280;
    border-radius: 999px;
    background: #0000002a;
    color: #fff;
    font-size: 1.1rem;
    font-weight: 100;
    letter-spacing: .04em;
    line-height: 1;
    white-space: nowrap;
    opacity: 0;
    transition: opacity .22s ease;
}
/* the Auto pill reads in lowercase, as in the reference, and takes
   its place in the bar's flow: it opens like before and pushes the
   volume and fullscreen buttons to the left instead of covering them */
.wvee-res .wvee-auto-label {
    position: relative;
    right: auto;
    top: auto;
    transform: none;
    width: 0;
    margin-right: 0;
    border-width: 0;
    overflow: hidden;
    text-transform: lowercase;
    transition: width .3s cubic-bezier(.3, .8, .3, 1), margin-right .3s cubic-bezier(.3, .8, .3, 1),
                border-width .3s ease, opacity .22s ease;
}
.wvee-res:hover .wvee-auto-label,
.wvee-res:focus-within .wvee-auto-label {
    width: 60px;
    margin-right: 8px;
    border-width: 1px;
    opacity: 1;
}
/* Auto capsule: opens as soon as the menu opens, stays open while it
   is open (group hover includes the invisible bridge). */
.wvee-res .wvee-dot:not(.wvee-dot-auto):hover .wvee-dot-label,
.wvee-res .wvee-dot:not(.wvee-dot-auto):focus-visible .wvee-dot-label {
    opacity: 1;
}

/* the stacked dot of the resolution currently playing gets a halo in
   its own color, so the color coding reads at a glance */
.wvee-res .wvee-dot:not(.wvee-dot-auto).active .wvee-dot-core {
    background: #fff;
    border-color: #fff;
}

/* Auto capsule: clickable; gray text while Auto is off, white while on */
.wvee-res .wvee-auto-label {
    cursor: pointer;
}
.wvee[data-auto="false"] .wvee-res .wvee-auto-label {
    color: #8a8a8a;
}
.wvee[data-auto="true"] .wvee-res .wvee-auto-label {
    color: #fff;
}

/* dim unavailable qualities */
.wvee-res .wvee-dot[aria-disabled="true"] {
    cursor: not-allowed;
    opacity: .38;
}

/* Video list: previous / next buttons. Hidden for a single video;
   dimmed at the first and last video. */
.wvee-single .wvee-prev,
.wvee-single .wvee-next {
    display: none;
}
.wvee-btn:disabled {
    opacity: .35;
    cursor: default;
}

/* Counter under the big play button, e.g. "3/5". Same visibility as the
   big play button: shown while paused, hidden while playing. */
.wvee-counter {
    position: absolute;
    left: 50%;
    top: calc(50% + 52px + 12px);
    transform: translateX(-50%);
    z-index: 4;
    color: #fff;
    font-size: 2rem;
    font-weight: 600;
    letter-spacing: .04em;
    line-height: 1;
    white-space: nowrap;
    text-shadow: 0 1px 6px rgba(0, 0, 0, .6);
    pointer-events: none;
    transition: opacity .3s ease;
}
.wvee[data-state="playing"] .wvee-counter {
    opacity: 0;
}
.wvee-single .wvee-counter {
    display: none;
}
