/**
 * Orthodox Albania Video Embed Styles
 * 
 * @package OA_Video_Embed
 * @version 1.0.0
 */

/* ==========================================================================
   Video Wrapper
   ========================================================================== */

.oa-video-wrapper {
    margin: 1.5em auto;
    width: 100%;
    max-width: 100%;
}

.oa-video-wrapper.oa-youtube-wrapper {
    /* YouTube specific styles */
}

.oa-video-wrapper.oa-facebook-wrapper {
    /* Facebook specific styles */
}

/* ==========================================================================
   Responsive Video Container (16:9 aspect ratio)
   ========================================================================== */

.oa-video-responsive {
    position: relative;
    width: 100%;
    padding-bottom: 56.25%; /* 16:9 Aspect Ratio */
    height: 0;
    overflow: hidden;
    background-color: #000;
    border-radius: 8px;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
}

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

/* Facebook videos may need different aspect ratio */
.oa-facebook-responsive {
    padding-bottom: 56.25%; /* Default 16:9, Facebook adjusts automatically */
}

/* ==========================================================================
   Non-Responsive Mode
   ========================================================================== */

.oa-video-wrapper:not(:has(.oa-video-responsive)) iframe {
    max-width: 100%;
    height: auto;
    display: block;
    margin: 0 auto;
    border-radius: 8px;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
}

/* ==========================================================================
   Loading State
   ========================================================================== */

.oa-video-responsive::before {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    width: 50px;
    height: 50px;
    border: 3px solid rgba(255, 255, 255, 0.3);
    border-top-color: #722F37; /* Orthodox burgundy */
    border-radius: 50%;
    animation: oa-video-spin 1s linear infinite;
    z-index: 1;
}

.oa-video-responsive iframe {
    z-index: 2;
}

@keyframes oa-video-spin {
    to {
        transform: translate(-50%, -50%) rotate(360deg);
    }
}

/* ==========================================================================
   Orthodox Theme Integration
   ========================================================================== */

/* Subtle gold accent on hover */
.oa-video-wrapper:hover .oa-video-responsive {
    box-shadow: 0 6px 20px rgba(212, 175, 55, 0.25); /* Byzantine gold */
}

/* ==========================================================================
   Responsive Breakpoints
   ========================================================================== */

/* Tablets */
@media screen and (max-width: 1024px) {
    .oa-video-wrapper {
        margin: 1.25em auto;
    }
}

/* Mobile */
@media screen and (max-width: 768px) {
    .oa-video-wrapper {
        margin: 1em auto;
    }
    
    .oa-video-responsive {
        border-radius: 4px;
    }
    
    .oa-video-responsive iframe {
        border-radius: 4px;
    }
}

/* Small Mobile */
@media screen and (max-width: 480px) {
    .oa-video-wrapper {
        margin: 0.75em auto;
    }
}

/* ==========================================================================
   Dark Mode Support (if theme supports)
   ========================================================================== */

@media (prefers-color-scheme: dark) {
    .oa-video-responsive {
        background-color: #1a1a1a;
    }
}

/* ==========================================================================
   Print Styles
   ========================================================================== */

@media print {
    .oa-video-wrapper {
        display: none;
    }
}

/* ==========================================================================
   Accessibility
   ========================================================================== */

.oa-video-responsive iframe:focus {
    outline: 3px solid #D4AF37; /* Byzantine gold focus ring */
    outline-offset: 2px;
}

/* Reduced motion preference */
@media (prefers-reduced-motion: reduce) {
    .oa-video-responsive::before {
        animation: none;
    }
}
