/* 
 * Video Player - Notion Style (VP-Notion)
 * Description: A clean, minimalist video player design inspired by Notion's UI.
 * Prefix: .vp-notion-
 */

/* Player Modal Wrapper */
.video-player-notion-modal-v1 {
    position: fixed;
    inset: 0;
    z-index: 12000;
    display: none;
    align-items: center;
    justify-content: center;
    padding: 1.5rem;
    background: rgba(0, 0, 0, 0.9);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    overflow: hidden;
    /* Prevent scrollbars */
}

.video-player-notion-modal-v1.show {
    display: flex;
    animation: video-player-notion-fadeIn 0.3s ease-out;
    -ms-overflow-style: none;
    /* IE and Edge */
    scrollbar-width: none;
    /* Firefox */
}

.video-player-notion-modal-v1::-webkit-scrollbar {
    display: none;
    /* Chrome, Safari and Opera */
}

@keyframes video-player-notion-fadeIn {
    from {
        opacity: 0;
        transform: scale(0.98);
    }

    to {
        opacity: 1;
        transform: scale(1);
    }
}

/* 9:16 Card Viewport (The Window) */
.video-player-notion-modal-v1 .vp-notion-viewport {
    height: 80vh;
    aspect-ratio: 9/16;
    max-width: calc(80vh * 9 / 16);
    position: relative;
    overflow: hidden;
    /* Mask adjacent cards */
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 12px;
}

/* Slider Track (The Train) */
.video-player-notion-modal-v1 .vp-notion-slider {
    display: flex;
    flex-direction: column;
    /* Vertical stacking like TikTok */
    height: 100%;
    width: 100%;
    gap: 60px;
    /* Vertical gap between cards */
    transition: transform 0.6s cubic-bezier(0.23, 1, 0.32, 1);
    will-change: transform;
}

/* Individual Slide Card */
.video-player-notion-modal-v1 .vp-notion-slide {
    flex: 0 0 100%;
    width: 100%;
    height: 100%;
    padding: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    opacity: 0.3;
    /* Non-active slides are dimmed */
    transition: opacity 0.4s ease;
}

.video-player-notion-modal-v1 .vp-notion-slide.active {
    opacity: 1;
}

/* Slide Content (The actual Notion Card) */
.video-player-notion-modal-v1 .vp-notion-card {
    width: 100%;
    height: 100%;
    background: #191919;
    border-radius: 12px;
    overflow: hidden;
    position: relative;
    box-shadow: 0 20px 50px rgba(0, 0, 0, 0.6), 0 0 0 1px rgba(255, 255, 255, 0.05);
    display: flex;
    flex-direction: column;
}

/* Iframe Wrapper */
.video-player-notion-modal-v1 .vp-notion-content {
    width: 100%;
    height: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
    overflow: hidden;
    position: relative;
}

.video-player-notion-modal-v1 .vp-notion-iframe {
    width: 100% !important;
    height: 100% !important;
    border: none !important;
    background: black !important;
    transform: scale(1.0);
    transform-origin: 50% 50%;
    pointer-events: auto;
}

/* Interaction Overlay */
.video-player-notion-modal-v1 .vp-notion-overlay {
    position: absolute;
    inset: 0;
    z-index: 20;
    cursor: pointer;
    pointer-events: auto;
}

.video-player-notion-modal-v1 .vp-notion-overlay.passing {
    pointer-events: none;
}

/* Navigation Buttons - Vertical Stack on the Right */
.video-player-notion-modal-v1 .vp-notion-nav-btn {
    position: absolute;
    right: -80px;
    /* Positioned to the right of the card */
    width: 56px;
    height: 56px;
    border-radius: 16px;
    border: 1px solid rgba(255, 255, 255, 0.1);
    color: white;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.5rem;
    cursor: pointer;
    transition: all 0.3s cubic-bezier(0.175, 0.885, 0.32, 1.275);
    z-index: 100;
    box-shadow: 0 10px 20px rgba(0, 0, 0, 0.3);
}

.video-player-notion-modal-v1 .vp-notion-nav-btn:hover {
    transform: scale(1.1);
    box-shadow: 0 15px 30px rgba(0, 0, 0, 0.5);
    border-color: rgba(255, 255, 255, 0.3);
}

.video-player-notion-modal-v1 .vp-notion-nav-btn:active {
    transform: scale(0.95);
}

.video-player-notion-modal-v1 .vp-notion-nav-btn.prev {
    top: calc(50% - 65px);
    background: linear-gradient(135deg, #9333ea 0%, #6b21a8 100%);
    /* Premium Purple */
}

.video-player-notion-modal-v1 .vp-notion-nav-btn.next {
    top: calc(50% + 5px);
    background: linear-gradient(135deg, #0891b2 0%, #0e7490 100%);
    /* Vibrant Cyan */
}

@media (max-width: 768px) {
    .video-player-notion-modal-v1 {
        padding: 0.5rem;
    }

    .video-player-notion-modal-v1 .vp-notion-viewport {
        width: 360px;
        height: 75vh;
        max-width: calc(100vw - 32px);
        max-height: 800px;
        margin: 0 auto;
        overflow: hidden;
        position: relative;
        /* Base for inner elements */
    }

    .video-player-notion-modal-v1 .vp-notion-iframe {
        transform: scale(1.2);
        transform-origin: top center;
        /* Scale up to clip the bottom Watch Now bar on mobile
           → triggers TikTok pure player mode (tap = play + sound) */
    }

    .video-player-notion-modal-v1 .vp-notion-nav-btn {
        width: 42px;
        height: 42px;
        font-size: 1rem;
        right: 15px;
        /* Stay inside the padding area */
        background: rgba(255, 255, 255, 0.15);
        backdrop-filter: blur(8px);
        -webkit-backdrop-filter: blur(8px);
        z-index: 150;
    }

    .video-player-notion-modal-v1 .vp-notion-nav-btn.prev {
        top: calc(50% - 50px);
    }

    .video-player-notion-modal-v1 .vp-notion-nav-btn.next {
        top: calc(50% + 10px);
    }

    .video-player-notion-modal-v1 .vp-notion-title {
        margin-top: 0.8rem;
        font-size: 10px;
        padding: 0 1rem;
    }

    .video-player-notion-modal-v1 .vp-notion-overlay {
        display: none !important;
        /* Remove on mobile to allow direct iframe interaction */
    }

    /* On mobile: badge in the bottom tappable zone with downward arrow guide */
    .video-player-notion-modal-v1 .sound-hint-badge {
        bottom: 150px !important;
        left: 20% !important;
        transform: translateX(-50%);
        font-size: 14px;
        padding: 14px 22px 20px;
        gap: 12px;
        border-radius: 16px;
        background: rgba(0, 0, 0, 0.65);
        border: 1px solid rgba(255, 255, 255, 0.3);
        flex-direction: column;
        align-items: center;
        animation: video-player-notion-hint-float-mobile 2s ease-in-out infinite, fadeOut 1s forwards 5s;
    }

    /* Row: icon + text */
    .video-player-notion-modal-v1 .sound-hint-badge>i,
    .video-player-notion-modal-v1 .sound-hint-badge>i+* {
        display: flex;
        align-items: center;
    }

    /* Downward arrow bounce */
    .video-player-notion-modal-v1 .sound-hint-badge::after {
        content: '▼';
        font-size: 16px;
        color: rgba(255, 255, 255, 0.7);
        animation: video-player-notion-tap-arrow-bounce 0.8s ease-in-out infinite alternate;
        display: block;
        margin-top: -4px;
    }
}

@keyframes video-player-notion-tap-arrow-bounce {
    from {
        transform: translateY(0);
        opacity: 0.5;
    }

    to {
        transform: translateY(5px);
        opacity: 1;
    }
}

@keyframes video-player-notion-hint-float-mobile {

    0%,
    100% {
        transform: translateX(-50%) translateY(0);
    }

    50% {
        transform: translateX(-50%) translateY(-4px);
    }
}

@media (max-width: 1100px) {
    .video-player-notion-modal-v1 .vp-notion-nav-btn {
        right: 20px;
        /* Move inside on smaller screens */
        background: rgba(255, 255, 255, 0.1);
        backdrop-filter: blur(10px);
        -webkit-backdrop-filter: blur(10px);
    }
}

@media (max-width: 900px) {
    .video-player-notion-modal-v1 .vp-notion-nav-btn {
        display: none !important;
    }
}

/* Caption/Title Area */
.video-player-notion-modal-v1 .vp-notion-title {
    margin-top: 1.5rem;
    text-align: center;
    color: rgba(255, 255, 255, 0.4);
    font-size: 11px;
    font-weight: 500;
    letter-spacing: 0.05em;
    max-width: 400px;
    line-height: 1.5;
}

/* Scroll/Swipe Hint */
.video-player-notion-modal-v1 .vp-notion-hint {
    position: absolute;
    bottom: 2rem;
    left: 50%;
    transform: translateX(-50%);
    color: rgba(255, 255, 255, 0.2);
    font-size: 9px;
    font-weight: 900;
    letter-spacing: 0.2em;
    text-transform: uppercase;
    pointer-events: none;
    animation: video-player-notion-bounce 2s infinite;
}

@keyframes video-player-notion-bounce {

    0%,
    20%,
    50%,
    80%,
    100% {
        transform: translateX(-50%) translateY(0);
    }

    40% {
        transform: translateX(-50%) translateY(-5px);
    }

    60% {
        transform: translateX(-50%) translateY(-3px);
    }
}

/* Sound Hint Badge */
.video-player-notion-modal-v1 .sound-hint-badge {
    position: absolute;
    bottom: 220px;
    left: 82px;
    padding: 8px 12px;
    background: rgba(255, 255, 255, 0.1);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    border: 1px solid rgba(255, 255, 255, 0.2);
    border-radius: 12px;
    display: flex;
    align-items: center;
    gap: 8px;
    color: white;
    font-size: 10px;
    font-weight: 900;
    z-index: 100;
    pointer-events: none;
    animation: video-player-notion-hint-float 2s ease-in-out infinite, video-player-notion-fadeOut 1s forwards 4s;
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.3);
}

/* PC (>768px): show TAP FOR SOUND via ::after, hide HTML text */
@media (min-width: 769px) {
    .video-player-notion-modal-v1 .sound-hint-badge {
        font-size: 0 !important;
    }

    .video-player-notion-modal-v1 .sound-hint-badge::after {
        content: 'TAP FOR SOUND';
        font-size: 10px;
        font-weight: 900;
        color: white;
        letter-spacing: 0.05em;
    }
}

.video-player-notion-modal-v1 .sound-hint-badge i {
    font-style: normal;
    display: flex;
    gap: 2px;
}

.video-player-notion-modal-v1 .sound-hint-badge i span {
    width: 2px;
    background: #ff0050;
    border-radius: 1px;
    animation: video-player-notion-sound-wave 0.8s ease-in-out infinite alternate;
}

@keyframes video-player-notion-sound-wave {
    from {
        height: 4px;
    }

    to {
        height: 12px;
    }
}

@keyframes video-player-notion-hint-float {

    0%,
    100% {
        transform: translateY(0);
    }

    50% {
        transform: translateY(-5px);
    }
}

@keyframes video-player-notion-fadeOut {
    from {
        opacity: 1;
    }

    to {
        opacity: 0;
        visibility: hidden;
    }
}

/* Intelligent Scroll Layer */
.video-player-notion-modal-v1 .vp-scroll-layer {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 60%;
    /* Top 60% for swipe navigation, bottom 40% left open for TikTok controls */
    z-index: 40;
    background: transparent;
    cursor: ns-resize;
}