/* The site's video player (player.js): visitor photo viewer and admin editor.
   White on black whatever the page theme, since it sits on footage. Plain
   values, no tokens: the visitor site doesn't load the admin's tokens.css. */

.vp {
    position: relative;
    width: 100%;
    height: 100%;
    background: #000;
    color: #fff;
    overflow: hidden;
    user-select: none;
    -webkit-user-select: none;
    -webkit-tap-highlight-color: transparent;
    font-family: inherit;
    line-height: 1;
}
.vp.is-idle {
    cursor: none;
}
.vp video {
    width: 100%;
    height: 100%;
    object-fit: contain;
    display: block;
    outline: none;
}
.vp svg {
    width: 20px;
    height: 20px;
    fill: currentColor;
    display: block;
}
.vp button {
    font: inherit;
    -webkit-tap-highlight-color: transparent;
}

/* ---------- centre ---------- */
.vp-big {
    position: absolute;
    top: 50%;
    left: 50%;
    width: 68px;
    height: 68px;
    margin: -34px 0 0 -34px;
    border: 0;
    border-radius: 50%;
    background: rgba(0, 0, 0, 0.55);
    color: #fff;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition:
        transform 0.15s,
        background 0.15s;
}
.vp-big svg {
    width: 30px;
    height: 30px;
    margin-left: 3px; /* the triangle's visual centre is right of its box */
}
.vp-big:hover {
    background: rgba(0, 0, 0, 0.75);
    transform: scale(1.06);
}
.vp.is-started .vp-big {
    display: none;
}

.vp-spinner {
    position: absolute;
    top: 50%;
    left: 50%;
    width: 44px;
    height: 44px;
    margin: -22px 0 0 -22px;
    border-radius: 50%;
    border: 3px solid rgba(255, 255, 255, 0.25);
    border-top-color: rgba(255, 255, 255, 0.95);
    animation: vp-spin 0.8s linear infinite;
    pointer-events: none;
}
.vp-spinner[hidden] {
    display: none;
}
@keyframes vp-spin {
    to {
        transform: rotate(360deg);
    }
}

/* ---------- control bar ---------- */
.vp-controls {
    position: absolute;
    left: 0;
    right: 0;
    bottom: 0;
    padding: 40px 12px 4px;
    background: linear-gradient(to top, rgba(0, 0, 0, 0.7), rgba(0, 0, 0, 0));
    transition: opacity 0.25s;
}
.vp.is-idle .vp-controls {
    opacity: 0;
    pointer-events: none;
}
/* Not started: the big button is the only control. */
.vp:not(.is-started) .vp-controls {
    opacity: 0;
    pointer-events: none;
}

/* Tall hit area, thin track that thickens on hover. */
.vp-bar {
    position: relative;
    height: 16px;
    display: flex;
    align-items: center;
    cursor: pointer;
    touch-action: none;
    outline: none;
}
.vp-track {
    position: relative;
    width: 100%;
    height: 3px;
    border-radius: 2px;
    background: rgba(255, 255, 255, 0.25);
    overflow: hidden;
    transition: height 0.1s;
}
.vp-bar:hover .vp-track,
.vp-bar:focus-visible .vp-track {
    height: 5px;
}
.vp-buffered,
.vp-hoverfill,
.vp-played {
    position: absolute;
    top: 0;
    bottom: 0;
    left: 0;
}
.vp-buffered {
    background: rgba(255, 255, 255, 0.35);
}
.vp-hoverfill {
    background: rgba(255, 255, 255, 0.5);
}
.vp-played {
    background: #fff;
}
.vp-thumb {
    position: absolute;
    top: 50%;
    width: 13px;
    height: 13px;
    margin: -6.5px 0 0 -6.5px;
    border-radius: 50%;
    background: #fff;
    transform: scale(0);
    transition: transform 0.1s;
}
.vp-bar:hover .vp-thumb,
.vp-bar:focus-visible .vp-thumb,
.vp-bar:active .vp-thumb {
    transform: scale(1);
}
.vp-tip {
    position: absolute;
    bottom: 18px;
    transform: translateX(-50%);
    padding: 3px 6px;
    border-radius: 4px;
    background: rgba(0, 0, 0, 0.8);
    font-size: 12px;
    font-variant-numeric: tabular-nums;
    white-space: nowrap;
    pointer-events: none;
}
.vp-tip[hidden] {
    display: none;
}

.vp-row {
    display: flex;
    align-items: center;
    gap: 2px;
    height: 40px;
}
.vp-spacer {
    flex: 1;
}
.vp-btn {
    width: 36px;
    height: 36px;
    padding: 0;
    border: 0;
    border-radius: 8px;
    background: none;
    color: #fff;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    opacity: 0.9;
    flex-shrink: 0;
}
.vp-btn:hover,
.vp-btn:focus-visible {
    opacity: 1;
    background: rgba(255, 255, 255, 0.12);
    outline: none;
}
.vp-gear svg {
    width: 18px;
    height: 18px;
    transition: transform 0.25s;
}
.vp.menu-open .vp-gear svg {
    transform: rotate(30deg);
}

/* Volume slider slides out of the mute button on hover. */
.vp-volume {
    display: flex;
    align-items: center;
}
.vp-slider {
    width: 0;
    opacity: 0;
    margin: 0;
    height: 16px;
    background: transparent;
    cursor: pointer;
    -webkit-appearance: none;
    appearance: none;
    transition:
        width 0.2s,
        opacity 0.2s,
        margin 0.2s;
}
.vp-volume:hover .vp-slider,
.vp-slider:focus-visible {
    width: 64px;
    opacity: 1;
    margin: 0 6px 0 2px;
}
.vp-slider::-webkit-slider-runnable-track {
    height: 3px;
    background: linear-gradient(
        to right,
        rgba(255, 255, 255, 0.95) var(--fill),
        rgba(255, 255, 255, 0.3) var(--fill)
    );
}
.vp-slider::-moz-range-track {
    height: 3px;
    background: linear-gradient(
        to right,
        rgba(255, 255, 255, 0.95) var(--fill),
        rgba(255, 255, 255, 0.3) var(--fill)
    );
}
.vp-slider::-webkit-slider-thumb {
    -webkit-appearance: none;
    width: 12px;
    height: 12px;
    margin-top: -4.5px;
    border: 0;
    border-radius: 50%;
    background: #fff;
}
.vp-slider::-moz-range-thumb {
    width: 12px;
    height: 12px;
    border: 0;
    border-radius: 50%;
    background: #fff;
}

.vp-time {
    margin-left: 6px;
    font-size: 13px;
    font-variant-numeric: tabular-nums;
    white-space: nowrap;
}
.vp-sep {
    opacity: 0.6;
    margin: 0 4px;
}

/* ---------- settings menu ---------- */
.vp-menu-wrap {
    position: relative;
}
.vp-menu {
    position: absolute;
    right: 0;
    bottom: calc(100% + 8px);
    min-width: 210px;
    max-height: 60vh;
    overflow-y: auto;
    padding: 6px 0;
    border-radius: 12px;
    background: rgba(28, 28, 28, 0.92);
    backdrop-filter: blur(8px);
    -webkit-backdrop-filter: blur(8px);
    display: flex;
    flex-direction: column;
    z-index: 2;
}
.vp-menu[hidden] {
    display: none;
}
.vp-menu button {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 16px;
    padding: 9px 14px;
    border: 0;
    background: none;
    color: #fff;
    font-size: 13px;
    text-align: left;
    cursor: pointer;
}
.vp-menu button:hover,
.vp-menu button:focus-visible {
    background: rgba(255, 255, 255, 0.1);
    outline: none;
}
.vp-menu button[aria-checked='true'] {
    font-weight: 600;
}
.vp-menu button[aria-checked='true']::after {
    content: '';
    width: 6px;
    height: 6px;
    border-radius: 50%;
    background: #fff;
}
.vp-menu-val {
    display: flex;
    align-items: center;
    gap: 6px;
    opacity: 0.75;
}
.vp-menu svg {
    width: 14px;
    height: 14px;
}
.vp-menu .vp-menu-back {
    justify-content: flex-start;
    gap: 8px;
    font-weight: 600;
    border-bottom: 1px solid rgba(255, 255, 255, 0.15);
    margin-bottom: 4px;
}

/* Touch: no hover to reveal the volume slider (phone volume is the hardware
   buttons anyway), so just the mute button. Bigger seek target. */
@media (pointer: coarse) {
    .vp-volume:hover .vp-slider {
        width: 0;
        opacity: 0;
        margin: 0;
    }
    .vp-bar {
        height: 22px;
    }
    .vp-thumb {
        transform: scale(1);
    }
    .vp-controls {
        padding-top: 24px;
    }
}
