/* Podcast Player Pro Lightbox Styles */
.ppp-video-lightbox {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: 999999;
    opacity: 0;
    visibility: hidden;
    transition: opacity 0.3s ease, visibility 0.3s ease;
}

.ppp-video-lightbox.active {
    opacity: 1;
    visibility: visible;
}

/* Overlay with opacity */
.ppp-lightbox-overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.85);
    backdrop-filter: blur(5px);
    -webkit-backdrop-filter: blur(5px);
}

/* Lightbox Container */
.ppp-lightbox-container {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    width: 95%;
    max-width: 950px;
    max-height: 84vh;
    background: #fff;
    border-radius: 20px; 
    display: flex;
    align-items: center;
    justify-content: center;
	border:3px solid #0F62FD;
}

/* Lightbox Content */
.ppp-lightbox-content {
    position: relative;
    width: 100%;
    height: 100%;
    background: transparent;
}

/* Close Button */
.ppp-lightbox-close {
    position: absolute;
    top: -20px;
    right: -20px;
    background: #0F62FD;
    border: none;
    width: 40px;
    height: 40px;
    border-radius: 50%;
    color: white;
    font-size: 20px;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.3s ease;
    z-index: 100;
}

.ppp-lightbox-close:hover {
    background: rgba(255, 255, 255, 0.3);
    transform: rotate(90deg);
}

/* Video Container */
.ppp-video-container {
    position: relative;
    width: 100%;
    height: 0;
    padding-bottom: 56.25%; /* 16:9 Aspect Ratio */
    background: #000;
    border-radius: 19px;
    overflow: hidden;
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.5);
}

/* YouTube & Vimeo Videos */
.ppp-youtube-video,
.ppp-vimeo-video {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
}

.ppp-youtube-video iframe,
.ppp-vimeo-video iframe {
    width: 100%;
    height: 100%;
    border: none;
}

/* Self-hosted Videos */
.ppp-self-hosted-video {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
}

.ppp-self-hosted-video video {
    width: 100%;
    height: 100%;
    object-fit: contain;
    background: #000;
}

/* Loading State */
.ppp-loading {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    color: white;
    background: rgba(0, 0, 0, 0.9);
    font-size: 18px;
    gap: 15px;
}

.ppp-loading i {
    font-size: 40px;
    color: #ff6b6b;
    animation: ppp-spin 1s linear infinite;
}

@keyframes ppp-spin {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}

/* No Video State */
.ppp-no-video {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    color: #aaa;
    background: #1a1a1a;
    font-size: 18px;
    gap: 15px;
}

.ppp-no-video i {
    font-size: 60px;
    color: #666;
}

.ppp-no-video p {
    margin: 0;
    font-size: 16px;
}

/* Prevent scrolling when lightbox is open */
body.ppp-lightbox-open {
    overflow: hidden;
}

/* Responsive Design */
@media (max-width: 1200px) {
    .ppp-lightbox-container {
        width: 98%;
        max-height: 95vh;
    }
}

@media (max-width: 992px) {
    .ppp-lightbox-container {
        width: 100%;
        padding: 0 20px;
    }
    
    .ppp-lightbox-close {
        top: -60px;
        right: 20px;
    }
}

@media (max-width: 768px) {
    .ppp-lightbox-container {
        max-height: 80vh;
    }
    
    .ppp-video-container {
        padding-bottom: 75%; /* 4:3 for mobile */
    }
    
    .ppp-lightbox-close {
        top: -70px;
        right: 10px;
        width: 36px;
        height: 36px;
        font-size: 18px;
    }
}

@media (max-width: 576px) {
    .ppp-lightbox-container {
        max-height: 70vh;
    }
    
    .ppp-video-container {
        padding-bottom: 100%; /* 1:1 for very small screens */
    }
    
    .ppp-lightbox-close {
        top: -80px;
        background: rgba(255, 255, 255, 0.3);
    }
}

/* Landscape mode on mobile */
@media (max-height: 600px) and (orientation: landscape) {
    .ppp-lightbox-container {
        max-height: 95vh;
        width: 95%;
    }
    
    .ppp-video-container {
        padding-bottom: 56.25%; /* Keep 16:9 */
    }
    
    .ppp-lightbox-close {
        top: 10px;
        right: 10px;
    }
}

/* Animation for lightbox opening */
@keyframes ppp-lightbox-fade-in {
    from {
        opacity: 0;
        transform: translate(-50%, -50%) scale(0.9);
    }
    to {
        opacity: 1;
        transform: translate(-50%, -50%) scale(1);
    }
}

.ppp-lightbox-container {
    animation: ppp-lightbox-fade-in 0.3s ease;
}

/* Custom scrollbar for video container (if needed) */
.ppp-video-container::-webkit-scrollbar {
    width: 8px;
}

.ppp-video-container::-webkit-scrollbar-track {
    background: rgba(0, 0, 0, 0.2);
}

.ppp-video-container::-webkit-scrollbar-thumb {
    background: rgba(255, 255, 255, 0.3);
    border-radius: 4px;
}

.ppp-video-container::-webkit-scrollbar-thumb:hover {
    background: rgba(255, 255, 255, 0.5);
}

/* High contrast mode support */
@media (prefers-contrast: high) {
    .ppp-lightbox-overlay {
        background: rgba(0, 0, 0, 0.95);
    }
    
    .ppp-lightbox-close {
        background: white;
        color: black;
        border: 2px solid black;
    }
}

/* Reduced motion support */
@media (prefers-reduced-motion: reduce) {
    .ppp-video-lightbox,
    .ppp-lightbox-close,
    .ppp-lightbox-container {
        transition: none;
        animation: none;
    }
    
    .ppp-loading i {
        animation: none;
    }
}

/* Print styles - hide lightbox when printing */
@media print {
    .ppp-video-lightbox {
        display: none !important;
    }
}