/* Video Playah — Frontend Player */
.vp-player-wrap {
    position: relative;
    width: 100%;
    max-width: 100%;
    margin: 0 auto;
    border-radius: var(--vp-radius, 12px);
    overflow: hidden;
    background: #000;
    line-height: 0;
}

.vp-aspect {
    position: relative;
    width: 100%;
    height: 0;
    overflow: hidden;
}

/* HTML5 video */
.vp-html5 {
    position: absolute;
    top: 0; left: 0;
    width: 100%; height: 100%;
    object-fit: cover;
}

/* Original aspect ratio mode — let the video dictate its own size */
.vp-aspect-original {
    height: auto;
    padding-bottom: 0 !important;
}
.vp-html5-original {
    position: relative;
    display: block;
    width: 100%;
    height: auto;
    object-fit: contain;
}

/* Embed container */
.vp-embed-container {
    position: absolute;
    top: 0; left: 0;
    width: 100%; height: 100%;
}
.vp-embed-container iframe {
    position: absolute;
    top: 0; left: 0;
    width: 100%; height: 100%;
    border: 0;
}
.vp-embed-player {
    position: absolute;
    top: 0; left: 0;
    width: 100%; height: 100%;
}

.vp-poster {
    position: absolute;
    top: 0; left: 0;
    width: 100%; height: 100%;
    object-fit: cover;
    z-index: 1;
}

/* Big play button for embeds */
.vp-big-play {
    position: absolute;
    top: 50%; left: 50%;
    transform: translate(-50%, -50%);
    z-index: 2;
    background: rgba(0,0,0,0.6);
    border: none;
    border-radius: 50%;
    width: 72px; height: 72px;
    display: flex;
    align-items: center;
    justify-content: center;
    color: #fff;
    cursor: pointer;
    transition: background 0.2s, transform 0.2s;
}
.vp-big-play:hover {
    background: var(--vp-accent, #E84855);
    transform: translate(-50%, -50%) scale(1.1);
}

/* ── CTA Overlay ────────────────────────────────────── */
.vp-cta-overlay {
    position: absolute;
    top: 0; left: 0;
    width: 100%; height: 100%;
    display: flex;
    z-index: 10;
    background: rgba(0, 0, 0, 0.55);
    animation: vpFadeIn 0.3s ease;
    padding: 20px;
    box-sizing: border-box;
}

/* Placement positions */
.vp-cta-place-center       { align-items: center;    justify-content: center; }
.vp-cta-place-top-left     { align-items: flex-start; justify-content: flex-start; }
.vp-cta-place-top-center   { align-items: flex-start; justify-content: center; }
.vp-cta-place-top-right    { align-items: flex-start; justify-content: flex-end; }
.vp-cta-place-middle-left  { align-items: center;    justify-content: flex-start; }
.vp-cta-place-middle-right { align-items: center;    justify-content: flex-end; }
.vp-cta-place-bottom-left  { align-items: flex-end;  justify-content: flex-start; }
.vp-cta-place-bottom-center{ align-items: flex-end;  justify-content: center; }
.vp-cta-place-bottom-right { align-items: flex-end;  justify-content: flex-end; }

.vp-cta-overlay.vp-cta-always {
    background: transparent;
    pointer-events: none;
}
.vp-cta-overlay.vp-cta-always .vp-cta-btn,
.vp-cta-overlay.vp-cta-always .vp-cta-close {
    pointer-events: auto;
}

/* Close button */
.vp-cta-close {
    position: absolute;
    top: 10px; right: 10px;
    width: 32px; height: 32px;
    border-radius: 50%;
    border: none;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    opacity: 0.85;
    transition: opacity 0.2s, transform 0.2s;
    z-index: 11;
}
.vp-cta-close:hover {
    opacity: 1;
    transform: scale(1.1);
}

.vp-cta-btn {
    display: inline-block;
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
    font-weight: 700;
    text-decoration: none;
    border-radius: 10px;
    cursor: pointer;
    transition: transform 0.2s, box-shadow 0.2s;
    line-height: 1.2;
    text-align: center;
}
.vp-cta-btn:hover {
    transform: scale(1.06);
    box-shadow: 0 4px 24px rgba(0,0,0,0.3);
}

.vp-cta-small  { padding: 7px 16px;  font-size: 13px; }
.vp-cta-medium { padding: 11px 26px; font-size: 16px; }
.vp-cta-large  { padding: 15px 38px; font-size: 20px; }

@keyframes vpFadeIn {
    from { opacity: 0; }
    to   { opacity: 1; }
}

/* Theme: light */
.vp-theme-light {
    background: #f5f5f5;
    box-shadow: 0 2px 12px rgba(0,0,0,0.08);
}

/* ── No Audio Locked State ───────────────────────────── */
/* When noaudio mode is active, hide the controls row entirely — only seek bar + prompt visible */
.vp-noaudio-active .vp-controls-row {
    display: none !important;
}
/* Also prevent hover from showing controls row */
.vp-noaudio-active:hover .vp-controls-row {
    display: none !important;
}
/* Disable pause cursor on video during noaudio */
.vp-noaudio-active .vp-html5 {
    cursor: default;
}

/* ── No Audio Prompt ─────────────────────────────────── */
.vp-noaudio-prompt {
    position: absolute;
    top: 14px;
    right: 14px;
    z-index: 13;
    display: flex;
    align-items: center;
    gap: 6px;
    background: rgba(0, 0, 0, 0.7);
    backdrop-filter: blur(6px);
    color: #fff;
    border: 1px solid rgba(255,255,255,0.15);
    border-radius: 8px;
    padding: 8px 14px 8px 10px;
    cursor: pointer;
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
    font-size: 13px;
    font-weight: 600;
    line-height: 1;
    transition: background 0.2s, transform 0.2s, border-color 0.2s;
}
.vp-noaudio-prompt:hover {
    background: rgba(0, 0, 0, 0.85);
    transform: scale(1.05);
    animation: none !important;
}
.vp-noaudio-prompt svg {
    flex-shrink: 0;
}

/* ── Animation: Pulsate — gentle scale + glow breathing ── */
.vp-anim-pulsate {
    animation: vpAnimPulsate calc(2s / var(--vp-anim-speed, 1)) ease-in-out infinite;
}
@keyframes vpAnimPulsate {
    0%, 100% { opacity: 0.85; transform: scale(1); box-shadow: 0 0 0 rgba(255,255,255,0); }
    50% { opacity: 1; transform: scale(1.04); box-shadow: 0 0 16px rgba(255,255,255,0.2); }
}

/* ── Animation: Bounce — subtle up-and-down hop ── */
.vp-anim-bounce {
    animation: vpAnimBounce calc(1.8s / var(--vp-anim-speed, 1)) ease-in-out infinite;
}
@keyframes vpAnimBounce {
    0%, 100% { transform: translateY(0); }
    30% { transform: translateY(-6px); }
    50% { transform: translateY(0); }
    65% { transform: translateY(-3px); }
    80% { transform: translateY(0); }
}

/* ── Animation: Shake — quick horizontal wiggle ── */
.vp-anim-shake {
    animation: vpAnimShake calc(3s / var(--vp-anim-speed, 1)) ease-in-out infinite;
}
@keyframes vpAnimShake {
    0%, 20%, 100% { transform: translateX(0); }
    2% { transform: translateX(-4px); }
    4% { transform: translateX(4px); }
    6% { transform: translateX(-4px); }
    8% { transform: translateX(4px); }
    10% { transform: translateX(-2px); }
    12% { transform: translateX(0); }
}

/* ── Animation: Slide-In — slides in from the right edge ── */
.vp-anim-slidein {
    animation: vpAnimSlideIn 0.6s cubic-bezier(0.16, 1, 0.3, 1) both,
               vpAnimSlideInIdle calc(2.5s / var(--vp-anim-speed, 1)) ease-in-out 0.6s infinite;
}
@keyframes vpAnimSlideIn {
    0% { transform: translateX(120%); opacity: 0; }
    100% { transform: translateX(0); opacity: 1; }
}
@keyframes vpAnimSlideInIdle {
    0%, 100% { opacity: 0.85; }
    50% { opacity: 1; }
}

/* ── Animation: Glow Ring — expanding ring radiates outward ── */
.vp-anim-glowring {
    position: absolute;
    overflow: visible;
    animation: vpAnimGlowFade calc(2.5s / var(--vp-anim-speed, 1)) ease-in-out infinite;
}
.vp-anim-glowring::before {
    content: '';
    position: absolute;
    top: -4px; left: -4px; right: -4px; bottom: -4px;
    border-radius: 12px;
    border: 2px solid rgba(255,255,255,0.5);
    animation: vpAnimGlowRing calc(2.5s / var(--vp-anim-speed, 1)) ease-out infinite;
    pointer-events: none;
}
@keyframes vpAnimGlowRing {
    0% { transform: scale(1); opacity: 0.6; }
    70% { transform: scale(1.25); opacity: 0; }
    100% { transform: scale(1.25); opacity: 0; }
}
@keyframes vpAnimGlowFade {
    0%, 100% { opacity: 0.85; }
    50% { opacity: 1; }
}

/* No-audio active state — hide controls row, only show seek bar */
.vp-noaudio-active .vp-controls-row {
    display: none !important;
}
/* Also disable hover reveal of controls row */
.vp-noaudio-active:hover .vp-controls-row {
    display: none !important;
}
/* Disable click-to-pause on video during noaudio (optional: let them pause) */

/* ── Custom Control Bar ──────────────────────────────── */
.vp-controls {
    position: absolute;
    bottom: 0; left: 0; right: 0;
    z-index: 12;
    display: flex;
    flex-direction: column;
    gap: 0;
}

/* Gradient background — only visible on hover */
.vp-controls::before {
    content: '';
    position: absolute;
    top: 0; left: 0; right: 0; bottom: 0;
    background: linear-gradient(transparent, rgba(0,0,0,0.85));
    opacity: 0;
    transition: opacity 0.25s ease;
    pointer-events: none;
    z-index: -1;
}
.vp-player-wrap:hover .vp-controls::before,
.vp-player-wrap.vp-paused .vp-controls::before {
    opacity: 1;
}

/* Seek bar — always visible */
.vp-seek {
    position: relative;
    height: 4px;
    background: rgba(255,255,255,0.2);
    border-radius: 3px;
    cursor: pointer;
    margin: 0 12px;
    transition: height 0.15s ease, margin-bottom 0.15s ease;
}
/* Grow seek bar on hover for easier interaction */
.vp-player-wrap:hover .vp-seek {
    height: 6px;
}

.vp-seek-loaded {
    position: absolute;
    top: 0; left: 0; height: 100%;
    background: rgba(255,255,255,0.15);
    border-radius: 3px;
}
.vp-seek-fill {
    position: absolute;
    top: 0; left: 0; height: 100%;
    background: var(--vp-accent, #E84855);
    border-radius: 3px;
    pointer-events: none;
}
.vp-seek-input {
    position: absolute;
    top: -4px; left: 0;
    width: 100%; height: 13px;
    margin: 0; padding: 0;
    opacity: 0;
    cursor: pointer;
    z-index: 2;
    -webkit-appearance: none;
    appearance: none;
}
/* Custom seek bar — non-interactive */
.vp-seek-custom {
    pointer-events: none;
    cursor: default;
}

/* Controls row — hidden by default, shows on hover */
.vp-controls-row {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 6px;
    line-height: 1;
    padding: 6px 12px 8px;
    opacity: 0;
    visibility: hidden;
    transition: opacity 0.25s ease, visibility 0.25s ease;
}
.vp-player-wrap:hover .vp-controls-row,
.vp-player-wrap.vp-paused .vp-controls-row {
    opacity: 1;
    visibility: visible;
}
.vp-controls-left,
.vp-controls-right {
    display: flex;
    align-items: center;
    gap: 6px;
}

/* Buttons */
.vp-btn {
    background: none;
    border: none;
    color: #fff;
    cursor: pointer;
    padding: 4px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 4px;
    transition: background 0.15s;
    font-family: inherit;
    font-size: 12px;
    font-weight: 600;
    line-height: 1;
    text-decoration: none;
}
.vp-btn:hover {
    background: rgba(255,255,255,0.15);
}

/* Time display */
.vp-time {
    font-size: 12px;
    color: rgba(255,255,255,0.7);
    font-variant-numeric: tabular-nums;
    white-space: nowrap;
    line-height: 1;
    padding: 0 2px;
}

/* ── Horizontal Volume Slider ───────────────────────── */
.vp-volume-wrap {
    display: flex;
    align-items: center;
    gap: 4px;
}
.vp-vol-slider {
    width: 0;
    height: 4px;
    margin: 0;
    padding: 0;
    cursor: pointer;
    -webkit-appearance: none;
    appearance: none;
    background: transparent;
    opacity: 0;
    transition: width 0.2s ease, opacity 0.2s ease;
}
.vp-volume-wrap:hover .vp-vol-slider {
    width: 70px;
    opacity: 1;
}
/* Webkit track */
.vp-vol-slider::-webkit-slider-runnable-track {
    height: 4px;
    background: rgba(255,255,255,0.2);
    border-radius: 3px;
}
.vp-vol-slider::-webkit-slider-thumb {
    -webkit-appearance: none;
    appearance: none;
    width: 12px;
    height: 12px;
    background: #fff;
    border-radius: 50%;
    margin-top: -4px;
    cursor: pointer;
    box-shadow: 0 1px 4px rgba(0,0,0,0.3);
}
/* Firefox */
.vp-vol-slider::-moz-range-track {
    height: 4px;
    background: rgba(255,255,255,0.2);
    border-radius: 3px;
    border: none;
}
.vp-vol-slider::-moz-range-thumb {
    width: 12px;
    height: 12px;
    background: #fff;
    border-radius: 50%;
    border: none;
    cursor: pointer;
}

/* Speed button */
.vp-btn-speed {
    min-width: 30px;
    text-align: center;
}
