/* Video Picture-in-Picture Styles */

#video-pip-container {
    position: fixed;
    top: 70px;
    left: 20px;
    width: 320px;
    max-width: calc(100vw - 40px);
    background: #000;
    border-radius: 12px;
    box-shadow: 0 8px 24px rgba(0, 0, 0, 0.4);
    z-index: 10000;
    overflow: hidden;
    transition: transform 0.3s ease, opacity 0.3s ease;
}

#video-pip-container:hover {
    box-shadow: 0 12px 32px rgba(0, 0, 0, 0.5);
}

#pip-video-wrapper {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
}

#pip-video-wrapper video,
#pip-video-wrapper iframe {
    width: 100%;
    height: 100%;
    object-fit: contain;
    border: none;
}

#pip-close-btn,
#pip-restore-btn {
    position: absolute;
    width: 32px;
    height: 32px;
    background: rgba(0, 0, 0, 0.6);
    border: none;
    border-radius: 50%;
    color: white;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 10;
    transition: background 0.2s, transform 0.2s;
}

#pip-close-btn {
    top: 8px;
    right: 8px;
}

#pip-restore-btn {
    top: 8px;
    left: 8px;
}

#pip-close-btn:hover,
#pip-restore-btn:hover {
    background: rgba(0, 0, 0, 0.8);
    transform: scale(1.1);
}

#pip-close-btn:active,
#pip-restore-btn:active {
    transform: scale(0.95);
}

/* Mobile responsive */
@media (max-width: 768px) {
    #video-pip-container {
        top: 60px;
        left: 10px;
        width: calc(100vw - 20px);
        max-width: 280px;
    }
}

/* Video placeholder when in PIP mode */
.post-media video[style*="opacity: 0.3"],
.post-media iframe[style*="opacity: 0.3"] {
    transition: opacity 0.3s ease;
    pointer-events: none;
}

