/**
 * Enhanced Video Block - Frontend Styles
 * 
 * @package WebtronDocs
 */

/* ==========================================================================
   Container & Base Styles
   ========================================================================== */

.webtron-enhanced-video {
    --ev-accent-color: #0073aa;
    --ev-controls-bg: rgba(0, 0, 0, 0.7);
    --ev-border-radius: 8px;
    
    position: relative;
    width: 100%;
    max-width: 1920px; /* Max-width for ultrawide displays */
    margin: 0 auto;
}

.webtron-ev-container {
    position: relative;
    width: 100%;
    height: 0;
    overflow: hidden;
    border-radius: var(--ev-border-radius);
    background: #000;
}

.webtron-ev-video {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.webtron-ev-gif {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.webtron-ev-caption {
    text-align: center;
    margin-top: 8px;
    font-size: 14px;
    color: #666;
    font-style: italic;
}

/* ==========================================================================
   Big Play Button (center overlay)
   ========================================================================== */

.webtron-ev-big-play {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    width: 80px;
    height: 80px;
    border: none;
    border-radius: 50%;
    background: var(--ev-accent-color);
    color: #fff;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: transform 0.2s ease, background-color 0.2s ease;
    z-index: 10;
}

.webtron-ev-big-play:hover {
    transform: translate(-50%, -50%) scale(1.1);
    background: color-mix(in srgb, var(--ev-accent-color) 80%, #000);
}

.webtron-ev-big-play svg {
    width: 36px;
    height: 36px;
    margin-left: 4px; /* Visual center for play icon */
}

.webtron-enhanced-video.is-playing .webtron-ev-big-play {
    display: none;
}

/* ==========================================================================
   Hover Play Mode
   ========================================================================== */

.webtron-enhanced-video.is-hover-play {
    cursor: pointer;
}

.webtron-ev-hover-overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.4);
    display: flex;
    align-items: center;
    justify-content: center;
    transition: opacity 0.3s ease;
    z-index: 5;
}

.webtron-enhanced-video.is-hover-play.is-playing .webtron-ev-hover-overlay {
    opacity: 0;
    pointer-events: none;
}

.webtron-ev-hover-content {
    text-align: center;
    color: #fff;
}

.webtron-ev-play-icon {
    width: 64px;
    height: 64px;
    margin: 0 auto 12px;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.2);
    display: flex;
    align-items: center;
    justify-content: center;
    transition: transform 0.3s ease;
}

.webtron-enhanced-video.is-hover-play:hover .webtron-ev-play-icon {
    transform: scale(1.1);
}

.webtron-ev-play-icon svg {
    width: 32px;
    height: 32px;
    margin-left: 4px;
}

.webtron-ev-hover-text {
    font-size: 14px;
    font-weight: 500;
    text-shadow: 0 1px 2px rgba(0, 0, 0, 0.5);
}

/* ==========================================================================
   Custom Controls Bar
   ========================================================================== */

.webtron-ev-controls {
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 12px 16px;
    background: var(--ev-controls-bg);
    background: linear-gradient(transparent, var(--ev-controls-bg));
    transition: opacity 0.3s ease, transform 0.3s ease;
    z-index: 20;
}

.webtron-ev-controls.is-hidden {
    opacity: 0;
    transform: translateY(100%);
}

/* Control Buttons */
.webtron-ev-btn {
    flex-shrink: 0;
    width: 36px;
    height: 36px;
    border: none;
    border-radius: 4px;
    background: transparent;
    color: #fff;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: background-color 0.2s ease;
}

.webtron-ev-btn:hover {
    background: rgba(255, 255, 255, 0.1);
}

.webtron-ev-btn:focus {
    outline: 2px solid var(--ev-accent-color);
    outline-offset: 2px;
}

.webtron-ev-btn svg {
    width: 20px;
    height: 20px;
}

.webtron-ev-btn.is-active {
    color: var(--ev-accent-color);
}

/* ==========================================================================
   Progress Bar
   ========================================================================== */

.webtron-ev-progress-container {
    flex: 1;
    height: 36px;
    display: flex;
    align-items: center;
    cursor: pointer;
    padding: 0 4px;
}

.webtron-ev-progress-bar {
    position: relative;
    width: 100%;
    height: 4px;
    background: rgba(255, 255, 255, 0.3);
    border-radius: 2px;
    overflow: hidden;
}

.webtron-ev-progress-container:hover .webtron-ev-progress-bar {
    height: 6px;
}

.webtron-ev-progress-buffered {
    position: absolute;
    top: 0;
    left: 0;
    height: 100%;
    background: rgba(255, 255, 255, 0.4);
    width: 0;
    border-radius: 2px;
}

.webtron-ev-progress-played {
    position: absolute;
    top: 0;
    left: 0;
    height: 100%;
    background: var(--ev-accent-color);
    width: 0;
    border-radius: 2px;
}

/* ==========================================================================
   Time Display
   ========================================================================== */

.webtron-ev-time {
    flex-shrink: 0;
    font-size: 13px;
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
    color: #fff;
    white-space: nowrap;
    user-select: none;
}

.webtron-ev-time-separator {
    margin: 0 4px;
    opacity: 0.6;
}

/* ==========================================================================
   Volume Controls
   ========================================================================== */

.webtron-ev-volume {
    display: flex;
    align-items: center;
    gap: 4px;
}

.webtron-ev-volume-slider-container {
    width: 0;
    overflow: hidden;
    transition: width 0.2s ease;
}

.webtron-ev-volume:hover .webtron-ev-volume-slider-container {
    width: 80px;
}

.webtron-ev-volume-slider {
    width: 80px;
    height: 4px;
    -webkit-appearance: none;
    appearance: none;
    background: rgba(255, 255, 255, 0.3);
    border-radius: 2px;
    cursor: pointer;
}

.webtron-ev-volume-slider::-webkit-slider-thumb {
    -webkit-appearance: none;
    width: 12px;
    height: 12px;
    background: #fff;
    border-radius: 50%;
    cursor: pointer;
}

.webtron-ev-volume-slider::-moz-range-thumb {
    width: 12px;
    height: 12px;
    background: #fff;
    border-radius: 50%;
    cursor: pointer;
    border: none;
}

/* ==========================================================================
   Playback Speed
   ========================================================================== */

.webtron-ev-speed {
    position: relative;
}

.webtron-ev-speed-btn {
    width: auto;
    padding: 0 8px;
    font-size: 12px;
    font-weight: 600;
}

.webtron-ev-speed-menu {
    position: absolute;
    bottom: 100%;
    right: 0;
    margin-bottom: 8px;
    background: var(--ev-controls-bg);
    border-radius: 4px;
    padding: 4px;
    flex-direction: column;
    min-width: 60px;
}

.webtron-ev-speed-menu button {
    display: block;
    width: 100%;
    padding: 8px 12px;
    border: none;
    background: transparent;
    color: #fff;
    font-size: 13px;
    text-align: center;
    cursor: pointer;
    border-radius: 2px;
}

.webtron-ev-speed-menu button:hover {
    background: rgba(255, 255, 255, 0.1);
}

.webtron-ev-speed-menu button.active {
    color: var(--ev-accent-color);
    font-weight: 600;
}

/* ==========================================================================
   Quality Selector
   ========================================================================== */

.webtron-ev-quality {
    position: relative;
}

.webtron-ev-quality-btn {
    width: auto;
    padding: 0 8px;
    font-size: 12px;
    font-weight: 600;
    display: flex;
    align-items: center;
    gap: 4px;
}

.webtron-ev-quality-btn svg {
    width: 16px;
    height: 16px;
}

.webtron-ev-quality-menu {
    position: absolute;
    bottom: 100%;
    right: 0;
    margin-bottom: 8px;
    background: var(--ev-controls-bg);
    border-radius: 6px;
    padding: 6px;
    flex-direction: column;
    min-width: 140px;
    max-height: 240px;
    overflow-y: auto;
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
}

.webtron-ev-quality-menu button {
    display: flex;
    align-items: center;
    justify-content: space-between;
    width: 100%;
    padding: 10px 12px;
    border: none;
    background: transparent;
    color: #fff;
    font-size: 13px;
    text-align: left;
    cursor: pointer;
    border-radius: 4px;
    transition: background-color 0.15s ease;
}

.webtron-ev-quality-menu button:hover {
    background: rgba(255, 255, 255, 0.1);
}

.webtron-ev-quality-menu button.active {
    color: var(--ev-accent-color);
    font-weight: 600;
}

.webtron-ev-quality-menu button.active::after {
    content: '';
    width: 8px;
    height: 8px;
    background: var(--ev-accent-color);
    border-radius: 50%;
    margin-left: 8px;
    flex-shrink: 0;
}

/* Auto quality indicator */
.webtron-ev-quality-auto-badge {
    font-size: 10px;
    font-weight: 600;
    text-transform: uppercase;
    color: rgba(255, 255, 255, 0.6);
    background: rgba(255, 255, 255, 0.1);
    padding: 2px 6px;
    border-radius: 3px;
    margin-left: 8px;
}

.webtron-ev-quality-menu button.active .webtron-ev-quality-auto-badge {
    color: var(--ev-accent-color);
    background: rgba(0, 115, 170, 0.15);
}

/* HD badge for high-quality options */
.webtron-ev-quality-hd {
    font-size: 9px;
    font-weight: 700;
    color: #fff;
    background: linear-gradient(135deg, #ff6b6b, #ff8e53);
    padding: 2px 5px;
    border-radius: 3px;
    margin-left: 6px;
}

/* Quality indicator in button when not auto */
.webtron-ev-quality-btn .quality-label {
    font-size: 11px;
    text-transform: uppercase;
}

/* Loading state for quality switching */
.webtron-ev-quality.is-switching .webtron-ev-quality-btn::after {
    content: '';
    width: 12px;
    height: 12px;
    border: 2px solid transparent;
    border-top-color: currentColor;
    border-radius: 50%;
    animation: ev-quality-spin 0.8s linear infinite;
    margin-left: 4px;
}

@keyframes ev-quality-spin {
    to {
        transform: rotate(360deg);
    }
}

/* Hide quality controls when not available */
.webtron-enhanced-video:not(.has-quality-selector) .webtron-ev-quality {
    display: none;
}

/* ==========================================================================
   Controls Styles Variants
   ========================================================================== */

/* Minimal - only progress bar and essential controls */
.webtron-enhanced-video.controls-minimal .webtron-ev-time,
.webtron-enhanced-video.controls-minimal .webtron-ev-volume,
.webtron-enhanced-video.controls-minimal .webtron-ev-speed {
    display: none;
}

.webtron-enhanced-video.controls-minimal .webtron-ev-controls {
    padding: 8px 12px;
}

/* Full - larger controls with more spacing */
.webtron-enhanced-video.controls-full .webtron-ev-controls {
    padding: 16px 20px;
    gap: 12px;
}

.webtron-enhanced-video.controls-full .webtron-ev-btn {
    width: 44px;
    height: 44px;
}

.webtron-enhanced-video.controls-full .webtron-ev-btn svg {
    width: 24px;
    height: 24px;
}

.webtron-enhanced-video.controls-full .webtron-ev-time {
    font-size: 14px;
}

/* ==========================================================================
   Fullscreen Mode
   ========================================================================== */

.webtron-ev-container:fullscreen {
    background: #000;
}

.webtron-ev-container:fullscreen .webtron-ev-video {
    object-fit: contain;
}

.webtron-ev-container:fullscreen .webtron-ev-controls {
    padding: 16px 24px;
}

/* ==========================================================================
   Focus & Accessibility
   ========================================================================== */

.webtron-enhanced-video:focus {
    outline: 2px solid var(--ev-accent-color);
    outline-offset: 4px;
}

.webtron-enhanced-video:focus:not(:focus-visible) {
    outline: none;
}

/* ==========================================================================
   Responsive Adjustments
   ========================================================================== */

@media (max-width: 600px) {
    .webtron-ev-controls {
        padding: 8px 12px;
        gap: 6px;
    }
    
    .webtron-ev-btn {
        width: 32px;
        height: 32px;
    }
    
    .webtron-ev-btn svg {
        width: 18px;
        height: 18px;
    }
    
    .webtron-ev-time {
        font-size: 12px;
    }
    
    .webtron-ev-volume-slider-container {
        display: none;
    }
    
    .webtron-ev-big-play {
        width: 64px;
        height: 64px;
    }
    
    .webtron-ev-big-play svg {
        width: 28px;
        height: 28px;
    }
    
    /* Hide less important controls on mobile */
    .webtron-ev-speed,
    .webtron-ev-pip {
        display: none;
    }
}

/* ==========================================================================
   Dark Mode Support
   ========================================================================== */

[data-theme="dark"] .webtron-ev-caption {
    color: #aaa;
}

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

.webtron-enhanced-video:not(.webtron-ev-initialized) .webtron-ev-controls {
    display: none;
}

.webtron-enhanced-video:not(.webtron-ev-initialized) .webtron-ev-big-play {
    animation: pulse 1.5s ease-in-out infinite;
}

@keyframes pulse {
    0%, 100% {
        opacity: 0.8;
    }
    50% {
        opacity: 1;
    }
}

/* ==========================================================================
   GIF Fallback Mode
   ========================================================================== */

/* GIF Mode indicator class */
.webtron-enhanced-video.is-gif-mode .webtron-ev-video {
    display: none;
}

.webtron-enhanced-video.is-gif-mode .webtron-ev-gif {
    display: block;
}

/* GIF Toggle Button in Controls */
.webtron-ev-gif-toggle {
    position: relative;
}

.webtron-ev-gif-toggle svg {
    width: 18px;
    height: 18px;
}

/* Floating GIF Toggle Button */
.webtron-ev-gif-toggle-float {
    position: absolute;
    bottom: 16px;
    right: 16px;
    width: 42px;
    height: 42px;
    display: none;
    align-items: center;
    justify-content: center;
    background: var(--ev-controls-bg);
    border: 1px solid rgba(255, 255, 255, 0.2);
    border-radius: 50%;
    color: #fff;
    cursor: pointer;
    z-index: 20;
    transition: all 0.2s ease;
    backdrop-filter: blur(4px);
}

.webtron-ev-gif-toggle-float:hover {
    background: rgba(0, 0, 0, 0.85);
    border-color: var(--ev-accent-color);
    transform: scale(1.05);
}

.webtron-ev-gif-toggle-float svg {
    width: 20px;
    height: 20px;
}

.webtron-enhanced-video.is-gif-mode .webtron-ev-gif-toggle-float {
    display: flex;
}

/* GIF Mode Badge */
.webtron-ev-gif-badge {
    position: absolute;
    top: 12px;
    left: 12px;
    display: none;
    align-items: center;
    gap: 6px;
    padding: 6px 12px;
    background: var(--ev-controls-bg);
    border-radius: 4px;
    color: #fff;
    font-size: 12px;
    font-weight: 500;
    z-index: 15;
    backdrop-filter: blur(4px);
}

.webtron-enhanced-video.is-gif-mode .webtron-ev-gif-badge {
    display: flex;
}

.webtron-ev-gif-badge::before {
    content: '';
    width: 8px;
    height: 8px;
    background: #4ade80;
    border-radius: 50%;
    animation: gif-badge-pulse 2s ease-in-out infinite;
}

@keyframes gif-badge-pulse {
    0%, 100% {
        opacity: 1;
        transform: scale(1);
    }
    50% {
        opacity: 0.6;
        transform: scale(0.8);
    }
}

.webtron-ev-gif-reason {
    opacity: 0.7;
    font-weight: 400;
    font-size: 11px;
}

/* Hide controls in GIF mode */
.webtron-enhanced-video.is-gif-mode .webtron-ev-controls {
    display: none;
}

.webtron-enhanced-video.is-gif-mode .webtron-ev-big-play {
    display: none;
}

.webtron-enhanced-video.is-gif-mode .webtron-ev-hover-overlay {
    display: none;
}

/* GIF mode transitions */
.webtron-ev-gif,
.webtron-ev-video {
    transition: opacity 0.3s ease;
}

.webtron-enhanced-video.is-gif-mode .webtron-ev-gif {
    opacity: 1;
}

.webtron-enhanced-video:not(.is-gif-mode) .webtron-ev-gif {
    opacity: 0;
}

/* Mobile adjustments for GIF mode */
@media (max-width: 480px) {
    .webtron-ev-gif-toggle-float {
        width: 36px;
        height: 36px;
        bottom: 12px;
        right: 12px;
    }
    
    .webtron-ev-gif-toggle-float svg {
        width: 18px;
        height: 18px;
    }
    
    .webtron-ev-gif-badge {
        top: 8px;
        left: 8px;
        padding: 4px 8px;
        font-size: 10px;
    }
    
    .webtron-ev-gif-badge::before {
        width: 6px;
        height: 6px;
    }
    
    .webtron-ev-gif-reason {
        display: none;
    }
}

/* ==========================================================================
   Language Selector (Multi-Audio)
   ========================================================================== */

.webtron-ev-language {
    position: relative;
}

.webtron-ev-language-btn {
    width: auto;
    padding: 0 8px;
    font-size: 12px;
    font-weight: 600;
    display: flex;
    align-items: center;
    gap: 4px;
}

.webtron-ev-language-btn svg {
    width: 16px;
    height: 16px;
}

.webtron-ev-language-label {
    font-size: 11px;
    text-transform: uppercase;
    font-weight: 700;
}

.webtron-ev-language-menu {
    position: absolute;
    bottom: 100%;
    right: 0;
    margin-bottom: 8px;
    background: var(--ev-controls-bg);
    border-radius: 6px;
    padding: 6px;
    flex-direction: column;
    min-width: 140px;
    max-height: 240px;
    overflow-y: auto;
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
}

.webtron-ev-language-menu button {
    display: flex;
    align-items: center;
    justify-content: space-between;
    width: 100%;
    padding: 10px 12px;
    border: none;
    background: transparent;
    color: #fff;
    font-size: 13px;
    text-align: left;
    cursor: pointer;
    border-radius: 4px;
    transition: background-color 0.15s ease;
}

.webtron-ev-language-menu button:hover {
    background: rgba(255, 255, 255, 0.1);
}

.webtron-ev-language-menu button.active {
    color: var(--ev-accent-color);
    font-weight: 600;
}

.webtron-ev-language-menu button.active::after {
    content: '';
    width: 8px;
    height: 8px;
    background: var(--ev-accent-color);
    border-radius: 50%;
    margin-left: 8px;
    flex-shrink: 0;
}

/* Hide language controls when not available */
.webtron-enhanced-video:not(.has-language-selector) .webtron-ev-language {
    display: none;
}

/* ==========================================================================
   Transcript Panel
   ========================================================================== */

.webtron-ev-transcript-toggle {
    width: auto;
    padding: 0 8px;
}

.webtron-ev-transcript-toggle svg {
    width: 18px;
    height: 18px;
}

.webtron-ev-transcript-toggle.active {
    color: var(--ev-accent-color);
    background: rgba(0, 115, 170, 0.2);
}

.webtron-ev-transcript-panel {
    background: var(--ev-controls-bg);
    border-radius: var(--ev-border-radius);
    margin-top: 12px;
    overflow: hidden;
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
}

.webtron-ev-transcript-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 12px 16px;
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
}

.webtron-ev-transcript-title {
    margin: 0;
    font-size: 14px;
    font-weight: 600;
    color: #fff;
}

.webtron-ev-transcript-controls {
    display: flex;
    gap: 8px;
}

.webtron-ev-transcript-controls button {
    width: 32px;
    height: 32px;
    border: none;
    background: rgba(255, 255, 255, 0.1);
    border-radius: 6px;
    color: #fff;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: background-color 0.15s ease;
}

.webtron-ev-transcript-controls button:hover {
    background: rgba(255, 255, 255, 0.2);
}

.webtron-ev-transcript-search {
    padding: 8px 16px;
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
    display: flex;
    gap: 8px;
    align-items: center;
}

.webtron-ev-transcript-search-input {
    flex: 1;
    padding: 8px 12px;
    border: 1px solid rgba(255, 255, 255, 0.2);
    border-radius: 6px;
    background: rgba(255, 255, 255, 0.1);
    color: #fff;
    font-size: 13px;
}

.webtron-ev-transcript-search-input::placeholder {
    color: rgba(255, 255, 255, 0.5);
}

.webtron-ev-transcript-search-input:focus {
    outline: none;
    border-color: var(--ev-accent-color);
}

.webtron-ev-transcript-search-count {
    font-size: 12px;
    color: rgba(255, 255, 255, 0.6);
    white-space: nowrap;
}

.webtron-ev-transcript-content {
    max-height: 300px;
    overflow-y: auto;
    padding: 16px;
}

.webtron-ev-transcript-loading {
    text-align: center;
    color: rgba(255, 255, 255, 0.6);
    font-style: italic;
}

.webtron-ev-transcript-text {
    color: rgba(255, 255, 255, 0.9);
    font-size: 14px;
    line-height: 1.7;
}

/* Timestamped transcript cues */
.webtron-ev-transcript-cue {
    padding: 8px 12px;
    border-radius: 6px;
    cursor: pointer;
    transition: background-color 0.15s ease;
    margin-bottom: 4px;
}

.webtron-ev-transcript-cue:hover {
    background: rgba(255, 255, 255, 0.1);
}

.webtron-ev-transcript-cue.active {
    background: rgba(0, 115, 170, 0.2);
    border-left: 3px solid var(--ev-accent-color);
}

.webtron-ev-cue-time {
    font-size: 12px;
    font-weight: 600;
    color: var(--ev-accent-color);
    margin-right: 8px;
}

.webtron-ev-cue-text {
    color: rgba(255, 255, 255, 0.9);
    font-size: 14px;
    line-height: 1.5;
}

.webtron-ev-transcript-cue.active .webtron-ev-cue-text {
    color: #fff;
}

/* Search highlight */
.webtron-ev-search-highlight {
    background: rgba(255, 220, 0, 0.4);
    color: #fff;
    padding: 1px 2px;
    border-radius: 2px;
}

/* Hide transcript when not available */
.webtron-enhanced-video:not(.has-transcript) .webtron-ev-transcript-toggle,
.webtron-enhanced-video:not(.has-transcript) .webtron-ev-transcript-panel {
    display: none;
}

/* Transcript position variants */
.webtron-enhanced-video.transcript-side .webtron-ev-transcript-panel {
    position: absolute;
    right: calc(-100% - 20px);
    top: 0;
    width: 100%;
    max-width: 400px;
    margin-top: 0;
    height: 100%;
    max-height: none;
    border-radius: var(--ev-border-radius);
}

.webtron-enhanced-video.transcript-side .webtron-ev-transcript-content {
    max-height: calc(100% - 60px);
}

.webtron-enhanced-video.transcript-side.transcript-open {
    display: flex;
    gap: 20px;
}

/* Mobile adjustments for language & transcript */
@media (max-width: 768px) {
    .webtron-ev-language-menu {
        right: auto;
        left: 50%;
        transform: translateX(-50%);
    }
    
    .webtron-ev-transcript-panel {
        margin-top: 8px;
    }
    
    .webtron-ev-transcript-content {
        max-height: 200px;
        padding: 12px;
    }
    
    .webtron-ev-transcript-cue {
        padding: 6px 10px;
    }
    
    .webtron-ev-cue-time {
        font-size: 11px;
    }
    
    .webtron-ev-cue-text {
        font-size: 13px;
    }
    
    .webtron-enhanced-video.transcript-side .webtron-ev-transcript-panel {
        position: relative;
        right: auto;
        width: 100%;
        max-width: none;
    }
}

@media (max-width: 480px) {
    .webtron-ev-language-label {
        display: none;
    }
    
    .webtron-ev-transcript-header {
        padding: 10px 12px;
    }
    
    .webtron-ev-transcript-title {
        font-size: 13px;
    }
    
    .webtron-ev-transcript-controls button {
        width: 28px;
        height: 28px;
    }
}

/* ==========================================================================
   Variant Toggle Buttons (Mode Switcher)
   Positioned below the video player to avoid obstructing content
   ========================================================================== */

.webtron-ev-variants {
    display: flex;
    justify-content: center;
    gap: 8px;
}

.webtron-ev-variant-btn {
    --variant-color: #0073aa;
    
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 8px 16px;
    border: 1px solid #000;
    border-radius: 6px;
    background: transparent;
    color: #000;
    font-size: 13px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.2s ease;
    white-space: nowrap;
}

.webtron-ev-variant-btn:hover {
    background: rgba(0, 0, 0, 0.05);
}

.webtron-ev-variant-btn.active {
    background: var(--variant-color);
    color: #fff;
    border-color: var(--variant-color);
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.3);
}

.webtron-ev-variant-btn i {
    font-size: 14px;
}

/* Fullscreen variant positioning - move back to overlay */
.webtron-enhanced-video:fullscreen .webtron-ev-variants,
.webtron-enhanced-video:-webkit-full-screen .webtron-ev-variants {
    position: absolute;
    top: 24px;
    left: 50%;
    transform: translateX(-50%);
    padding: 4px;
    background: rgba(0, 0, 0, 0.8);
    border-radius: 6px;
    backdrop-filter: blur(8px);
    -webkit-backdrop-filter: blur(8px);
    z-index: 20;
}

.webtron-enhanced-video:fullscreen .webtron-ev-variant-btn,
.webtron-enhanced-video:-webkit-full-screen .webtron-ev-variant-btn {
    border-color: rgba(255, 255, 255, 0.3);
    color: rgba(255, 255, 255, 0.8);
}

.webtron-enhanced-video:fullscreen .webtron-ev-variant-btn:hover,
.webtron-enhanced-video:-webkit-full-screen .webtron-ev-variant-btn:hover {
    color: #fff;
    background: rgba(255, 255, 255, 0.1);
}

.webtron-enhanced-video:fullscreen .webtron-ev-variant-btn.active,
.webtron-enhanced-video:-webkit-full-screen .webtron-ev-variant-btn.active {
    border-color: var(--variant-color);
    color: #fff;
}

@media (max-width: 600px) {
    .webtron-ev-variants {
        gap: 4px;
    }
    
    .webtron-ev-variant-btn {
        padding: 6px 12px;
        font-size: 12px;
    }
    
    .webtron-ev-variant-btn i {
        font-size: 12px;
    }
}

/* ============================================================================
   CAPTION / SUBTITLE STYLES
   ============================================================================ */

/* Caption toggle button */
.webtron-ev-captions-btn {
    position: relative;
}

.webtron-ev-captions-btn.active {
    color: var(--ev-accent-color, #0073aa);
}

.webtron-ev-captions-btn.active::after {
    content: '';
    position: absolute;
    bottom: 4px;
    left: 50%;
    transform: translateX(-50%);
    width: 4px;
    height: 4px;
    background: var(--ev-accent-color, #0073aa);
    border-radius: 50%;
}

.webtron-ev-captions-btn svg {
    width: 20px;
    height: 20px;
}

/* Video caption styling - enhance default browser captions */
.webtron-enhanced-video video::cue {
    background: rgba(0, 0, 0, 0.8);
    color: #fff;
    font-size: 16px;
    line-height: 1.4;
    padding: 4px 8px;
    border-radius: 4px;
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Oxygen, Ubuntu, sans-serif;
}

/* WebVTT styling customization */
.webtron-enhanced-video.captions-active video::cue {
    background: rgba(0, 0, 0, 0.85);
}

/* Fullscreen caption sizing */
.webtron-enhanced-video:fullscreen video::cue,
.webtron-enhanced-video:-webkit-full-screen video::cue {
    font-size: 24px;
    padding: 8px 16px;
}

@media (max-width: 600px) {
    .webtron-enhanced-video video::cue {
        font-size: 14px;
        padding: 2px 6px;
    }
}
