/* =====================================================================
   ZT VIDEO PLAYER — custom controls + scrub preview (ztVideoPlayer JS).
   Global (not scoped) because the control DOM is created in JavaScript.
   ===================================================================== */

.ztvp-wrap {
    position: relative;
    display: block;
    width: 100%;
    height: 100%;
    background: #000;
    overflow: hidden;
}

.ztvp-video {
    display: block;
    width: 100%;
    height: 100%;
    object-fit: contain;
    background: #000;
    cursor: pointer;
}

/* ---- CONTROL BAR ---- */
.ztvp-controls {
    position: absolute;
    left: 0;
    right: 0;
    bottom: 0;
    display: flex;
    align-items: center;
    gap: 0.6em;
    padding: 0.9em 0.9em 0.7em;
    background: linear-gradient(to top, rgba(0, 0, 0, 0.75), rgba(0, 0, 0, 0));
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.2s ease;
    z-index: 5;
}

/* SHOW WHEN ACTIVE (recent mouse move) OR WHENEVER PAUSED. */
.ztvp-wrap.ztvp-active .ztvp-controls,
.ztvp-wrap:not(.ztvp-playing) .ztvp-controls {
    opacity: 1;
    pointer-events: auto;
}

.ztvp-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 0;
    border: none;
    background: transparent;
    color: #fff;
    cursor: pointer;
    opacity: 0.92;
    transition: opacity 0.12s ease, transform 0.12s ease;
}

.ztvp-btn:hover {
    opacity: 1;
    transform: scale(1.08);
}

.ztvp-btn i {
    font-size: 1.2rem;
    line-height: 1;
}

.ztvp-time {
    color: #fff;
    font-size: 0.82rem;
    font-variant-numeric: tabular-nums;
    white-space: nowrap;
}

/* ---- SEEK BAR ---- */
.ztvp-seek {
    position: relative;
    flex: 1 1 auto;
    height: 5px;
    margin: 0 0.3em;
    background: rgba(255, 255, 255, 0.28);
    border-radius: 3px;
    cursor: pointer;
    transition: height 0.1s ease;
}

.ztvp-seek:hover {
    height: 7px;
}

.ztvp-buffered,
.ztvp-played {
    position: absolute;
    top: 0;
    left: 0;
    height: 100%;
    border-radius: 3px;
    pointer-events: none;
}

.ztvp-buffered {
    background: rgba(255, 255, 255, 0.4);
    width: 0;
}

.ztvp-played {
    background: #4a76c4;
    width: 0;
}

.ztvp-head {
    position: absolute;
    top: 50%;
    left: 0;
    width: 13px;
    height: 13px;
    margin-left: -6.5px;
    border-radius: 50%;
    background: #fff;
    transform: translateY(-50%);
    box-shadow: 0 1px 4px rgba(0, 0, 0, 0.5);
    opacity: 0;
    transition: opacity 0.12s ease;
    pointer-events: none;
}

.ztvp-seek:hover .ztvp-head {
    opacity: 1;
}

/* ---- VOLUME ---- */
.ztvp-vol {
    width: 72px;
    height: 4px;
    accent-color: #4a76c4;
    cursor: pointer;
}

/* ---- SCRUB PREVIEW (storyboard) ---- */
.ztvp-preview {
    position: absolute;
    bottom: 56px;
    transform: translateX(-50%);
    display: none;
    flex-direction: column;
    align-items: center;
    padding: 5px;
    background: rgba(0, 0, 0, 0.85);
    border-radius: 6px;
    box-shadow: 0 6px 18px rgba(0, 0, 0, 0.5);
    pointer-events: none;
    z-index: 6;
}

.ztvp-preview.ztvp-preview-on {
    display: flex;
}

.ztvp-preview-img {
    display: block;
    border-radius: 3px;
    background-repeat: no-repeat;
    background-color: #111;
}

.ztvp-preview-time {
    margin-top: 4px;
    color: #fff;
    font-size: 0.75rem;
    font-variant-numeric: tabular-nums;
}
