/* Video Embed Styling - Updated for 2025 Facebook SDK */
.facebook-video-wrapper {
    position: relative;
    margin: 20px 0;
    border-radius: 8px;
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
    background: #f8f9fa;
    overflow: hidden;
    min-height: 315px; /* Minimum height to prevent 0px height */
}

.facebook-video-wrapper .fb-video {
    display: block !important;
    width: 100% !important;
    min-height: 315px !important;
}

.facebook-video-wrapper .fb-video > span {
    width: 100% !important;
    min-height: 315px !important;
    display: block !important;
}

.facebook-video-wrapper .fb-video iframe {
    width: 100% !important;
    min-width: 500px !important;
    min-height: 315px !important;
    height: auto !important;
    border-radius: 8px;
    visibility: visible !important;
}

/* Force visibility for Facebook iframes */
.facebook-video-wrapper .fb-video .fb_iframe_widget iframe {
    width: 100% !important;
    min-width: 500px !important;
    min-height: 315px !important;
    height: 400px !important;
    visibility: visible !important;
    border: none;
}

.facebook-video-wrapper .fb-video .fb_iframe_widget {
    width: 100% !important;
    min-height: 315px !important;
}

.facebook-video-wrapper .fb-video .fb_iframe_widget span {
    width: 100% !important;
    min-height: 315px !important;
    display: block !important;
}

/* YouTube Video Wrapper */
.video-wrapper {
    position: relative;
    padding-bottom: 56.25%; /* 16:9 aspect ratio */
    height: 0;
    overflow: hidden;
    max-width: 100%;
    margin: 20px 0;
    border-radius: 8px;
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
}

.video-wrapper iframe {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    border: none;
    border-radius: 8px;
}

/* Loading state for Facebook videos */
.facebook-video-wrapper:empty::before,
.facebook-video-wrapper .fb-video:empty::before {
    content: "Loading Facebook video...";
    display: flex;
    align-items: center;
    justify-content: center;
    min-height: 315px;
    color: #666;
    font-style: italic;
    background: #f5f5f5;
    border-radius: 8px;
}

/* Responsive adjustments */
@media (max-width: 768px) {
    .facebook-video-wrapper .fb-video iframe {
        min-width: 100% !important;
        width: 100% !important;
    }
    
    .facebook-video-wrapper {
        margin: 15px 0;
    }
    
    .video-wrapper {
        margin: 15px 0;
    }
}

/* Admin Meta Box Styling */
#featured_video .inside {
    padding: 10px;
}

#featured_video input[type="url"] {
    width: 100%;
    padding: 8px;
    border: 1px solid #ddd;
    border-radius: 4px;
    font-size: 14px;
}

#featured_video input[type="url"]:focus {
    border-color: #0073aa;
    box-shadow: 0 0 0 1px #0073aa;
    outline: none;
}

/* Responsive adjustments */
@media (max-width: 768px) {
    .facebook-video-wrapper,
    .video-wrapper {
        margin: 15px 0;
    }
}

/* Video placeholder when loading */
.video-loading {
    background: #f5f5f5;
    display: flex;
    align-items: center;
    justify-content: center;
    min-height: 200px;
    border-radius: 8px;
}

.video-loading::before {
    content: "Loading video...";
    color: #666;
    font-style: italic;
}

span._39_n {
	color: #ffffff !important;
}