/**
 * WP Video Library - Frontend Styles with Plyr
 */

/* ============================================
   GLOBAL & VARIABLES
   ============================================ */
:root {
    --wpvl-text-color: #013c44;
    --wpvl-header-color: #4ba09f;
    --wpvl-bg-color: #ffffff;
    --wpvl-white: #ffffff;
    --wpvl-card-shadow: 0 4px 20px rgba(1, 60, 68, 0.05);
    --wpvl-card-shadow-hover: 0 8px 30px rgba(1, 60, 68, 0.10);
    --wpvl-content-max-width: 1200px;
}

body {
    background-color: #ffffff;
    /* White canvas for premium look */
}

.wpvl-library-wrapper {
    font-family: 'Montserrat', sans-serif;
    color: var(--wpvl-text-color);
    max-width: var(--wpvl-content-max-width);
    margin: 0 auto;
    padding: 20px 40px;
    background-color: #ffffff;
}

/* ============================================
   MOBILE RESPONSIVE - Full Width Layout
   Override theme container padding
   ============================================ */
@media (max-width: 768px) {

    /* Reset theme container padding */
    .main.ts-contain,
    .col-8.main-content,
    .the-post-content,
    .post-content,
    .entry-content,
    article.page,
    .container,
    .ts-contain {
        padding-left: 0 !important;
        padding-right: 0 !important;
    }

    .wpvl-library-wrapper {
        padding: 10px 8px !important;
        max-width: 100% !important;
        width: 100% !important;
        margin: 0 !important;
        box-sizing: border-box !important;
    }

    .wpvl-library-banner {
        border-radius: 12px;
        padding: 30px 20px;
        margin-bottom: 20px;
        min-height: 200px;
        width: 100% !important;
        box-sizing: border-box !important;
    }

    .wpvl-banner-content {
        max-width: 100%;
    }

    .wpvl-banner-title {
        font-size: 22px;
        margin-bottom: 15px;
    }

    .wpvl-featured-label {
        font-size: 11px;
        margin-bottom: 8px;
    }

    .wpvl-play-btn-large svg {
        width: 36px;
        height: 36px;
    }

    .wpvl-search-container {
        padding: 0 !important;
        margin: 15px 0 !important;
        max-width: 100% !important;
        width: 100% !important;
    }

    .wpvl-search-bar {
        width: 100% !important;
        box-sizing: border-box !important;
    }

    .wpvl-filter-wrapper {
        max-width: 100% !important;
        margin: 0 0 20px 0 !important;
        padding: 0 !important;
        width: 100% !important;
    }

    .wpvl-filter-bar {
        padding: 8px 0 8px 0 !important;
        gap: 8px !important;
        width: 100% !important;
    }

    .wpvl-filter-item {
        padding: 6px 14px !important;
        font-size: 12px !important;
    }

    .wpvl-video-grid {
        gap: 15px;
        width: 100% !important;
    }
}

@media (max-width: 480px) {
    .wpvl-library-wrapper {
        padding: 8px 6px !important;
    }

    .wpvl-library-banner {
        border-radius: 10px;
        padding: 25px 15px;
        min-height: 180px;
    }

    .wpvl-banner-title {
        font-size: 18px;
    }

    .wpvl-featured-label {
        font-size: 10px;
    }

    .wpvl-filter-item {
        padding: 5px 12px !important;
        font-size: 11px !important;
    }

    .wpvl-video-grid {
        gap: 12px;
    }
}

/* ============================================
   BANNER SECTION
   ============================================ */
.wpvl-library-banner {
    border-radius: 20px;
    overflow: hidden;
    position: relative;
    padding: 60px 40px;
    margin-bottom: 40px;
    background-size: cover;
    background-position: right center;
    /* Show right side on desktop */
    background-repeat: no-repeat;
    color: var(--wpvl-white);
    display: flex;
    align-items: center;
    min-height: 300px;
    box-shadow: var(--wpvl-card-shadow);
}

.wpvl-banner-content {
    max-width: 600px;
    position: relative;
    z-index: 2;
}

.wpvl-featured-label {
    font-size: 14px;
    text-transform: uppercase;
    letter-spacing: 1px;
    opacity: 0.9;
    display: block;
    margin-bottom: 10px;
}

.wpvl-banner-title {
    font-size: 42px;
    font-weight: 700;
    line-height: 1.2;
    margin: 0 0 20px 0;
    color: var(--wpvl-white);
    /* Always white on banner */
}

.wpvl-play-btn-large {
    display: inline-flex;
    align-items: center;
    gap: 10px;
    color: var(--wpvl-white);
    text-decoration: none;
    transition: transform 0.2s;
}

.wpvl-play-btn-large:hover {
    transform: scale(1.1);
    color: var(--wpvl-header-color);
}

/* ============================================
   FILTER BAR & NAVIGATION
   ============================================ */
/* ============================================
   FILTER BAR & NAVIGATION (Consolidated)
   ============================================ */
.wpvl-filter-wrapper {
    position: relative;
    max-width: var(--wpvl-content-max-width);
    margin: 0 auto 40px auto;
    display: flex;
    align-items: center;
}

/* ============================================
   SEARCH BAR - Clean Simple Design
   ============================================ */
.wpvl-search-container {
    max-width: var(--wpvl-content-max-width);
    margin: 25px auto 25px auto;
    padding: 0 20px;
}

.wpvl-search-bar {
    display: flex !important;
    align-items: center !important;
    background: var(--wpvl-white) !important;
    background-color: #ffffff !important;
    border-radius: 50px !important;
    padding: 12px 20px !important;
    border: 1.5px solid #e0e0e0 !important;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.04) !important;
    transition: border-color 0.3s ease, box-shadow 0.3s ease;
    position: relative;
    width: 100%;
    box-sizing: border-box;
}

.wpvl-search-bar:hover {
    border-color: var(--wpvl-header-color);
}

.wpvl-search-bar:focus-within {
    border-color: var(--wpvl-header-color);
    box-shadow: 0 4px 12px rgba(75, 160, 159, 0.12) !important;
}

/* Search Icon - Simple outline style */
.wpvl-search-icon {
    display: flex;
    align-items: center;
    justify-content: center;
    background: transparent;
    margin-right: 12px;
    flex-shrink: 0;
}

.wpvl-search-icon svg {
    width: 20px !important;
    height: 20px !important;
    stroke: #999;
    stroke-width: 2px;
    flex-shrink: 0;
}

.wpvl-search-bar:focus-within .wpvl-search-icon svg {
    stroke: var(--wpvl-header-color);
}

/* Search Input */
.wpvl-search-input {
    flex: 1;
    border: none;
    outline: none;
    background: transparent;
    font-family: 'Montserrat', sans-serif;
    font-weight: 400;
    font-size: 15px;
    color: var(--wpvl-text-color);
    padding: 4px 0;
    min-width: 0;
}

.wpvl-search-input::placeholder {
    color: #999;
    font-weight: 400;
}

.wpvl-search-input:focus::placeholder {
    opacity: 0.6;
}

/* Clear Button */
.wpvl-search-clear {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 24px;
    height: 24px;
    background: transparent;
    border: none;
    border-radius: 50%;
    cursor: pointer;
    padding: 0;
    margin-left: 8px;
    opacity: 0;
    visibility: hidden;
    transition: all 0.2s ease;
    flex-shrink: 0;
}

.wpvl-search-clear svg {
    width: 16px;
    height: 16px;
    fill: #999;
    transition: fill 0.2s ease;
}

.wpvl-search-clear:hover svg {
    fill: var(--wpvl-text-color);
}

.wpvl-search-clear.wpvl-visible {
    opacity: 1;
    visibility: visible;
}

/* No Results Message */
.wpvl-no-results {
    text-align: center;
    padding: 40px 20px;
    color: var(--wpvl-text-color);
    font-family: 'Montserrat', sans-serif;
}

.wpvl-no-results h3 {
    font-size: 20px;
    font-weight: 600;
    margin-bottom: 10px;
    color: var(--wpvl-header-color);
}

.wpvl-no-results p {
    font-size: 14px;
    opacity: 0.7;
    margin: 0;
}

/* Search Bar Mobile Responsive */
@media (max-width: 768px) {
    .wpvl-search-container {
        margin: 15px auto;
        padding: 0 15px;
    }

    .wpvl-search-bar {
        padding: 10px 15px;
    }

    .wpvl-search-icon {
        margin-right: 10px;
    }

    .wpvl-search-icon svg {
        width: 18px !important;
        height: 18px !important;
    }

    .wpvl-search-input {
        font-size: 14px;
        min-width: 0;
        width: 100%;
    }

    .wpvl-search-input::placeholder {
        font-size: 13px;
    }
}

/* Extra small screens */
@media (max-width: 480px) {
    .wpvl-search-container {
        margin: 12px auto;
        padding: 0 12px;
    }

    .wpvl-search-bar {
        padding: 8px 12px;
    }

    .wpvl-search-icon svg {
        width: 16px !important;
        height: 16px !important;
    }

    .wpvl-search-input {
        font-size: 13px;
    }

    .wpvl-search-input::placeholder {
        font-size: 12px;
    }
}

/* Filter Bar - Forced Pill Style */
.wpvl-filter-bar {
    display: flex !important;
    justify-content: flex-start !important;
    gap: 12px !important;
    margin-bottom: 0 !important;
    /* Wrapper allows margin */
    flex-wrap: nowrap !important;
    overflow-x: auto !important;
    /* The "Safety Gap" - 40px padding right */
    padding: 10px 40px 10px 20px !important;
    position: relative;
    -webkit-overflow-scrolling: touch;
    scrollbar-width: none;
    /* Firefox */
    -ms-overflow-style: none;
    /* IE */
    width: 100%;
    /* Ensure full width */
}

/* Hide scrollbar */
.wpvl-filter-bar::-webkit-scrollbar {
    display: none;
}

/* Pill Items */
.wpvl-filter-item {
    display: inline-flex !important;
    align-items: center;
    justify-content: center;
    font-weight: 500 !important;
    color: var(--wpvl-text-color) !important;
    background: transparent !important;
    border: 1px solid var(--wpvl-header-color) !important;
    padding: 8px 20px !important;
    border-radius: 50px !important;
    font-size: 14px !important;
    white-space: nowrap !important;
    flex-shrink: 0 !important;
    transition: all 0.2s ease;
    opacity: 1 !important;
    text-decoration: none !important;
    margin: 0 !important;
    /* Reset any margins */
}

.wpvl-filter-item:hover {
    background: rgba(75, 160, 159, 0.1) !important;
    transform: translateY(-1px);
    color: var(--wpvl-header-color) !important;
}

.wpvl-filter-item.active {
    background: var(--wpvl-header-color) !important;
    color: #ffffff !important;
    border-color: var(--wpvl-header-color) !important;
    box-shadow: 0 4px 10px rgba(75, 160, 159, 0.3);
}

/* ============================================
   VIDEO GRID
   ============================================ */
.wpvl-video-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    /* Default PC */
    gap: 30px;
}

.wpvl-grid-item {
    background: var(--wpvl-white);
    border-radius: 16px;
    overflow: hidden;
    box-shadow: var(--wpvl-card-shadow);
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.wpvl-grid-item:hover {
    transform: translateY(-5px);
    box-shadow: var(--wpvl-card-shadow-hover);
}

/* Category Filter Animation */
.wpvl-grid-item.wpvl-visible {
    opacity: 1;
    transform: scale(1);
    transition: opacity 0.3s ease, transform 0.3s ease;
}

.wpvl-grid-item.wpvl-hidden {
    opacity: 0;
    transform: scale(0.95);
    transition: opacity 0.3s ease, transform 0.3s ease;
}

.wpvl-video-card {
    text-decoration: none;
    color: inherit;
    display: block;
    height: 100%;
}

.wpvl-card-thumb {
    position: relative;
    padding-top: 56.25%;
    /* 16:9 Aspect Ratio */
    background: #000;
    overflow: hidden;
}

.wpvl-card-thumb img {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.3s ease;
}

.wpvl-card-overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.2);
    display: flex;
    align-items: center;
    justify-content: center;
    opacity: 0;
    transition: opacity 0.3s;
}

.wpvl-video-card:hover .wpvl-card-overlay {
    opacity: 1;
}

.wpvl-video-card:hover .wpvl-card-thumb img {
    transform: scale(1.05);
}

.wpvl-mini-play {
    width: 50px;
    height: 50px;
    background: var(--wpvl-header-color);
    border-radius: 50%;
    color: #fff;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 12px;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.3);
}

.wpvl-duration-badge {
    position: absolute;
    bottom: 8px;
    right: 8px;
    background: rgba(0, 0, 0, 0.85);
    /* Darker black pill */
    color: #fff;
    padding: 3px 6px;
    border-radius: 4px;
    font-size: 11px;
    font-weight: 600;
    line-height: 1;
    z-index: 2;
}

.wpvl-card-content {
    padding: 15px;
}

.wpvl-card-title {
    font-size: 16px;
    font-weight: 700;
    margin: 0 0 10px 0;
    color: var(--wpvl-text-color);
    line-height: 1.4;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

/* Category Tags on Video Cards */
.wpvl-card-categories {
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
    margin-top: 8px;
}

.wpvl-category-tag {
    display: inline-block;
    background: rgba(75, 160, 159, 0.15);
    color: var(--wpvl-header-color);
    font-size: 11px;
    font-weight: 600;
    padding: 4px 10px;
    border-radius: 12px;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

/* ============================================
   EXISTING PLAYER STYLES (Preserved & Adjusted)
   ============================================ */
.wpvl-video-container {
    margin-bottom: 30px;
    border-radius: 12px;
    overflow: hidden;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.15);
    background: #000;
    padding-bottom: 15px;
}

.wpvl-language-tabs {
    display: flex;
    gap: 0;
    background: var(--wpvl-header-color);
    padding: 0;
    border-radius: 12px 12px 0 0;
}

.wpvl-lang-btn {
    flex: 1;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    padding: 16px 24px;
    background: transparent;
    border: none;
    cursor: pointer;
    font-size: 16px;
    font-weight: 600;
    color: rgba(1, 60, 68, 0.7);
    transition: all 0.3s ease;
    position: relative;
    overflow: hidden;
    font-family: 'Montserrat', sans-serif;
    /* Update font */
}

/* ... (Rest of existing styles can be kept or included if needed, but I'll write the full file to be safe and ensure everything is consistent) */

/* ... (Including all previous CSS content + new styles) ... */

/* To save context space, I will append the NEW styles to the existing file logic. 
   Wait, the `write_to_file` tool replaces the whole file. 
   I need to make sure I include the OLD styles too. 
   Let me read the old file again to be absolutely sure I have it all? 
   No, I already read it in Step 6 & 7. I have the content.
   I will merge them.
*/

/* Video Container */
.wpvl-video-container {
    margin-bottom: 30px;
    border-radius: 12px;
    overflow: hidden;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.15);
    background: #000;
    padding-bottom: 15px;
    /* Space below player */
}

/* ============================================
   LANGUAGE TOGGLE - Glassmorphism Pill Design
   ============================================ */

/* Import Inter font for modern typography */
@import url('https://fonts.googleapis.com/css2?family=Inter:wght@400;500;600&display=swap');

/* Container positions the pill in the top-right corner */
.wpvl-language-toggle-container {
    position: absolute;
    top: 12px;
    right: 12px;
    z-index: 100;
}

/* The frosted glass pill container */
.wpvl-language-pill {
    display: inline-flex;
    flex-direction: row !important;
    align-items: center;
    position: relative;
    padding: 2px;
    border-radius: 50px;
    /* Glassmorphism effects */
    background: rgba(255, 255, 255, 0.15);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    /* Subtle glass edge border */
    border: 1px solid rgba(255, 255, 255, 0.25);
    box-shadow: 0 2px 12px rgba(0, 0, 0, 0.12);
}

/* The sliding background indicator */
.wpvl-pill-slider {
    position: absolute;
    top: 2px;
    left: 2px;
    width: calc(50% - 2px);
    height: calc(100% - 4px);
    background: #f1fbfd;
    border-radius: 50px;
    transition: transform 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    box-shadow: 0 1px 4px rgba(0, 0, 0, 0.08);
    z-index: 0;
}

/* Move slider to right when English is active */
.wpvl-language-pill.english-active .wpvl-pill-slider {
    transform: translateX(100%);
}

/* Language button base styles */
.wpvl-lang-btn {
    position: relative;
    z-index: 1;
    display: inline-flex !important;
    flex-direction: row !important;
    align-items: center !important;
    justify-content: center !important;
    flex-shrink: 0;
    padding: 5px 12px !important;
    margin: 0 !important;
    background: transparent !important;
    border: none !important;
    cursor: pointer;
    transition: all 0.3s ease;
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, sans-serif;
    width: auto !important;
    height: auto !important;
    min-height: 0 !important;
    max-height: none !important;
    line-height: 1 !important;
    box-sizing: border-box !important;
}

/* Language name text styling */
.wpvl-lang-name {
    font-size: 11px !important;
    font-weight: 500 !important;
    letter-spacing: 0.3px !important;
    color: rgba(255, 255, 255, 0.5);
    transition: color 0.3s ease;
    white-space: nowrap !important;
    line-height: 1 !important;
    display: inline !important;
    padding: 0 !important;
    margin: 0 !important;
}

/* Active button text - dark brand color on light pill */
.wpvl-lang-btn.active .wpvl-lang-name {
    color: #013c44 !important;
    font-weight: 600 !important;
}

/* Hover state for inactive button */
.wpvl-lang-btn:not(.active):hover .wpvl-lang-name {
    color: rgba(255, 255, 255, 0.7);
}

/* Remove old styles that are no longer needed */
.wpvl-language-tabs {
    display: none !important;
}

.wpvl-lang-flag {
    display: none;
}

/* Adjust video container for overlay positioning */
.wpvl-video-container {
    position: relative;
    margin-bottom: 30px;
    border-radius: 12px;
    overflow: hidden;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.15);
    background: #000;
}

/* Player wrapper needs relative positioning for the toggle */
.wpvl-player-wrapper {
    position: relative;
    background: #000;
}

/* Mobile responsive styles for language toggle */
@media (max-width: 768px) {
    .wpvl-language-toggle-container {
        top: 8px;
        right: 8px;
    }

    .wpvl-language-pill {
        padding: 3px;
    }

    .wpvl-lang-btn {
        padding: 8px 14px;
    }

    .wpvl-lang-name {
        font-size: 11px;
    }

    .wpvl-pill-slider {
        top: 3px;
        left: 3px;
        width: calc(50% - 3px);
        height: calc(100% - 6px);
        border-radius: 22px;
    }
}

@media (max-width: 480px) {
    .wpvl-language-toggle-container {
        top: 6px;
        right: 6px;
    }

    .wpvl-lang-btn {
        padding: 6px 12px;
    }

    .wpvl-lang-name {
        font-size: 10px;
        letter-spacing: 0.3px;
    }
}


/* ============================================
   YOUTUBE-STYLE TAP CONTROLS OVERLAY
   ============================================ */
.wpvl-tap-controls {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 40px;
    background: rgba(0, 0, 0, 0.3);
    opacity: 0;
    visibility: hidden;
    transition: opacity 0.3s ease, visibility 0.3s ease;
    z-index: 50;
    pointer-events: none;
}

.wpvl-tap-controls.wpvl-visible {
    opacity: 1;
    visibility: visible;
    pointer-events: auto;
}

/* Base tap button style */
.wpvl-tap-btn {
    display: flex;
    align-items: center;
    justify-content: center;
    background: rgba(0, 0, 0, 0.6);
    border: none;
    border-radius: 50%;
    cursor: pointer;
    transition: all 0.2s ease;
    backdrop-filter: blur(4px);
    -webkit-backdrop-filter: blur(4px);
}

.wpvl-tap-btn:hover {
    background: rgba(0, 0, 0, 0.8);
    transform: scale(1.1);
}

.wpvl-tap-btn:active {
    transform: scale(0.95);
}

.wpvl-tap-btn svg {
    fill: #ffffff;
}

/* Skip buttons (-15 / +15) */
.wpvl-tap-btn-skip {
    width: 50px;
    height: 50px;
}

.wpvl-tap-btn-skip svg {
    width: 28px;
    height: 28px;
}

/* Center Play/Pause button (larger) */
.wpvl-tap-btn-play {
    width: 70px;
    height: 70px;
}

.wpvl-tap-btn-play svg {
    width: 36px;
    height: 36px;
}

/* Mobile adjustments */
@media (max-width: 768px) {
    .wpvl-tap-controls {
        gap: 25px;
    }

    .wpvl-tap-btn-skip {
        width: 44px;
        height: 44px;
    }

    .wpvl-tap-btn-skip svg {
        width: 24px;
        height: 24px;
    }

    .wpvl-tap-btn-play {
        width: 60px;
        height: 60px;
    }

    .wpvl-tap-btn-play svg {
        width: 30px;
        height: 30px;
    }
}

/* Hide old mobile pause button */
.wpvl-mobile-pause-btn {
    display: none !important;
}

/* ============================================
   FULLSCREEN TAP CONTROLS
   ============================================ */
/* When Plyr is in fullscreen mode, these rules ensure tap controls still work */
.plyr--fullscreen-enabled .wpvl-tap-controls,
.plyr--fullscreen .wpvl-tap-controls,
.plyr:fullscreen .wpvl-tap-controls,
.plyr:-webkit-full-screen .wpvl-tap-controls,
.plyr:-moz-full-screen .wpvl-tap-controls,
.plyr:-ms-fullscreen .wpvl-tap-controls {
    position: fixed !important;
    top: 0 !important;
    left: 0 !important;
    right: 0 !important;
    bottom: 0 !important;
    width: 100vw !important;
    height: 100vh !important;
    z-index: 9999 !important;
}

/* Ensure controls are larger in fullscreen for better touch targets */
.plyr--fullscreen .wpvl-tap-btn-skip,
.plyr:fullscreen .wpvl-tap-btn-skip {
    width: 70px !important;
    height: 70px !important;
}

.plyr--fullscreen .wpvl-tap-btn-skip svg,
.plyr:fullscreen .wpvl-tap-btn-skip svg {
    width: 38px !important;
    height: 38px !important;
}

.plyr--fullscreen .wpvl-tap-btn-play,
.plyr:fullscreen .wpvl-tap-btn-play {
    width: 100px !important;
    height: 100px !important;
}

.plyr--fullscreen .wpvl-tap-btn-play svg,
.plyr:fullscreen .wpvl-tap-btn-play svg {
    width: 50px !important;
    height: 50px !important;
}

.plyr--fullscreen .wpvl-tap-controls,
.plyr:fullscreen .wpvl-tap-controls {
    gap: 50px !important;
}

.wpvl-player-wrapper.wpvl-switching::after {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.7);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 10;
    animation: wpvl-fade-in 0.2s ease;
}

@keyframes wpvl-fade-in {
    from {
        opacity: 0;
    }

    to {
        opacity: 1;
    }
}

/* ============================================
   INLINE PROGRESS BAR - Inside Plyr Controls
   ============================================ */

/* Main container - inline with Plyr buttons */
.wpvl-inline-progress {
    display: flex !important;
    align-items: center;
    gap: 10px;
    flex: 1;
    min-width: 0;
    margin: 0 8px;
    height: 100%;
}

/* Time displays */
.wpvl-inline-progress .wpvl-time {
    font-size: 13px;
    font-weight: 500;
    color: #fff;
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
    white-space: nowrap;
    min-width: 40px;
    text-align: center;
}

.wpvl-inline-progress .wpvl-current-time {
    color: #5dc0bf;
}

.wpvl-inline-progress .wpvl-duration {
    opacity: 0.7;
}

/* Progress track - the seekable bar */
.wpvl-inline-progress .wpvl-progress-track {
    flex: 1;
    position: relative;
    height: 30px;
    cursor: pointer;
    min-width: 80px;
    display: flex;
    align-items: center;
}

/* Visible track bar using pseudo-element */
.wpvl-inline-progress .wpvl-progress-track::before {
    content: '';
    position: absolute;
    left: 0;
    right: 0;
    top: 50%;
    transform: translateY(-50%);
    height: 6px;
    background: rgba(255, 255, 255, 0.3);
    border-radius: 3px;
}

/* Buffer bar */
.wpvl-inline-progress .wpvl-progress-buffer {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    left: 0;
    height: 6px;
    background: rgba(255, 255, 255, 0.5);
    border-radius: 3px;
    width: 0%;
    pointer-events: none;
    z-index: 1;
}

/* Progress fill */
.wpvl-inline-progress .wpvl-progress-fill {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    left: 0;
    height: 6px;
    background: linear-gradient(90deg, #4ba09f 0%, #5dc0bf 100%);
    border-radius: 3px;
    width: 0%;
    pointer-events: none;
    z-index: 2;
}

/* Thumb */
.wpvl-inline-progress .wpvl-progress-thumb {
    position: absolute;
    top: 50%;
    left: 0%;
    width: 16px;
    height: 16px;
    background: #fff;
    border: 2px solid #4ba09f;
    border-radius: 50%;
    transform: translate(-50%, -50%);
    cursor: grab;
    box-shadow: 0 1px 6px rgba(0, 0, 0, 0.3);
    z-index: 10;
    transition: transform 0.1s ease;
}

.wpvl-inline-progress .wpvl-progress-thumb:hover {
    transform: translate(-50%, -50%) scale(1.2);
}

.wpvl-inline-progress .wpvl-progress-thumb.wpvl-dragging {
    cursor: grabbing;
    transform: translate(-50%, -50%) scale(1.3);
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.4);
}

/* Mobile - Larger touch targets */
@media (max-width: 768px) {
    .wpvl-inline-progress {
        gap: 8px;
        margin: 0 5px;
    }

    .wpvl-inline-progress .wpvl-time {
        font-size: 12px;
        min-width: 35px;
    }

    .wpvl-inline-progress .wpvl-progress-track {
        height: 8px;
        padding: 16px 0;
        margin: -16px 0;
        min-width: 60px;
    }

    .wpvl-inline-progress .wpvl-progress-buffer,
    .wpvl-inline-progress .wpvl-progress-fill {
        top: 16px;
        height: 8px;
    }

    .wpvl-inline-progress .wpvl-progress-thumb {
        width: 24px;
        height: 24px;
        border-width: 3px;
    }
}

/* Fullscreen mode - ensure visibility */
.plyr--fullscreen .wpvl-inline-progress,
.plyr--fullscreen-active .wpvl-inline-progress,
.plyr:fullscreen .wpvl-inline-progress {
    display: flex !important;
}

/* ============================================
   MOBILE SIMPLIFIED CONTROLS
   Only show: Progress bar + Fullscreen
   Hide: Play, Restart, Volume, Settings, PiP
   ============================================ */
@media (max-width: 768px) {

    /* Hide play/pause button */
    .wpvl-video-container .plyr__controls [data-plyr="play"] {
        display: none !important;
    }

    /* Hide restart button */
    .wpvl-video-container .plyr__controls [data-plyr="restart"] {
        display: none !important;
    }

    /* Hide mute button */
    .wpvl-video-container .plyr__controls [data-plyr="mute"] {
        display: none !important;
    }

    /* Hide volume slider */
    .wpvl-video-container .plyr__volume {
        display: none !important;
    }

    /* Hide settings button */
    .wpvl-video-container .plyr__controls [data-plyr="settings"] {
        display: none !important;
    }

    /* Hide PiP button */
    .wpvl-video-container .plyr__controls [data-plyr="pip"] {
        display: none !important;
    }

    /* Hide time displays on mobile for cleaner look - track only */
    .wpvl-inline-progress .wpvl-time {
        display: none !important;
    }

    /* Make progress bar take full width */
    .wpvl-inline-progress {
        flex: 1;
        margin: 0 10px;
    }

    /* Keep fullscreen button visible - it will show by default */
}



/* Plyr Custom Styling */
.wpvl-video-container .plyr {
    --plyr-color-main: var(--wpvl-header-color, #4ba09f);
    /* Teal for progress bar */
    --plyr-video-background: #000;
    --plyr-menu-background: rgba(255, 255, 255, 0.95);
    --plyr-menu-color: var(--wpvl-text-color, #013c44);
    /* Deep Brand Teal */
    --plyr-control-icon-size: 18px;
    --plyr-control-spacing: 10px;
    --plyr-tooltip-background: var(--wpvl-text-color, #013c44);
    /* Deep Brand Teal */
    --plyr-tooltip-color: #fff;
    --plyr-tooltip-padding: 5px 10px;
    --plyr-tooltip-radius: 4px;
    --plyr-font-size-small: 13px;
    --plyr-font-size-time: 13px;
    /* PROGRESS BAR VARIABLES - Make it visible and touchable */
    --plyr-range-track-height: 8px;
    --plyr-range-thumb-height: 20px;
    --plyr-range-thumb-background: #fff;
    --plyr-range-fill-background: #4ba09f;
    --plyr-range-thumb-shadow: 0 2px 8px rgba(0, 0, 0, 0.4);
    border-radius: 12px;
}

/* Mobile: Larger progress bar for touch */
@media (max-width: 768px) {
    .wpvl-video-container .plyr {
        --plyr-range-track-height: 12px;
        --plyr-range-thumb-height: 32px;
        --plyr-control-spacing: 8px;
    }
}

/* Control bar styling */
.wpvl-video-container .plyr__controls {
    background: linear-gradient(transparent, rgba(1, 60, 68, 0.85));
    /* Deep Brand Teal translucent */
    padding: 15px 15px 12px;
    color: #fff;
    /* White text for contrast */
}

/* ============================================
   HIDE PLYR'S BUILT-IN PROGRESS BAR
   (We use our custom progress bar instead)
   ============================================ */
.wpvl-video-container .plyr__progress__container,
.wpvl-video-container .plyr__progress,
.wpvl-video-container .plyr__time,
.wpvl-video-container .plyr__time--current,
.wpvl-video-container .plyr__time--duration,
.wpvl-video-container .plyr__progress__buffer,
.wpvl-video-container .plyr__tooltip,
/* Also hide in fullscreen mode */
.plyr--fullscreen-active .plyr__progress__container,
.plyr--fullscreen-active .plyr__progress,
.plyr--fullscreen-active .plyr__time,
.plyr--fullscreen-active .plyr__time--current,
.plyr--fullscreen-active .plyr__time--duration,
.plyr--fullscreen-active .plyr__progress__buffer,
.plyr--fullscreen-active .plyr__tooltip,
.plyr--fullscreen .plyr__progress__container,
.plyr--fullscreen .plyr__progress,
.plyr--fullscreen .plyr__time,
.plyr--fullscreen .plyr__time--current,
.plyr--fullscreen .plyr__time--duration,
.plyr--fullscreen .plyr__progress__buffer,
.plyr--fullscreen .plyr__tooltip,
/* Global catch-all for any escaped fullscreen elements */
.plyr:fullscreen .plyr__progress__container,
.plyr:fullscreen .plyr__progress,
.plyr:fullscreen .plyr__time,
.plyr:-webkit-full-screen .plyr__progress__container,
.plyr:-webkit-full-screen .plyr__progress,
.plyr:-webkit-full-screen .plyr__time {
    display: none !important;
    visibility: hidden !important;
    opacity: 0 !important;
    height: 0 !important;
    width: 0 !important;
    overflow: hidden !important;
    pointer-events: none !important;
}

/* Control buttons */
.wpvl-video-container .plyr__control {
    padding: 10px;
    /* Larger padding for easier touch */
    border-radius: 6px;
    transition: all 0.2s ease;
    color: #fff;
    /* White icons */
    min-width: 40px;
    /* Minimum touch target size */
    min-height: 40px;
}

.wpvl-video-container .plyr__control:hover {
    background: rgba(75, 160, 159, 0.3);
    /* Light teal hover */
}

.wpvl-video-container .plyr__control svg {
    fill: #fff;
    /* White icons */
}

.wpvl-video-container .plyr__time {
    color: #fff;
    /* White time text */
    padding: 0 8px;
    /* More spacing */
}

/* Mobile touch improvements */
@media (max-width: 768px) {
    .wpvl-video-container .plyr__control {
        padding: 12px;
        /* Even larger on mobile */
        min-width: 48px;
        /* iOS recommended minimum */
        min-height: 48px;
    }

    .wpvl-video-container .plyr__controls {
        padding: 20px 15px 16px;
        /* More vertical space */
    }
}

/* ============================================
   BIG PLAY BUTTON - Clean Modern Design
   ============================================ */
.wpvl-video-container .plyr__control--overlaid {
    background: rgba(0, 0, 0, 0.55);
    padding: 24px;
    border-radius: 50%;
    border: none;
    box-shadow: 0 4px 24px rgba(0, 0, 0, 0.35);
    transition: all 0.25s ease;
    /* No animation - clean and static */
}

.wpvl-video-container .plyr__control--overlaid:hover {
    background: rgba(75, 160, 159, 0.9);
    /* Brand teal on hover */
    transform: scale(1.08);
    box-shadow: 0 6px 30px rgba(0, 0, 0, 0.45);
}

.wpvl-video-container .plyr__control--overlaid:active {
    transform: scale(1.02);
    background: rgba(75, 160, 159, 1);
}

/* Play icon styling */
.wpvl-video-container .plyr__control--overlaid svg {
    width: 28px;
    height: 28px;
    fill: #fff;
    filter: none;
    transition: transform 0.2s ease;
}

.wpvl-video-container .plyr__control--overlaid:hover svg {
    transform: scale(1.05);
}

/* Mobile - slightly smaller button */
@media (max-width: 768px) {
    .wpvl-video-container .plyr__control--overlaid {
        padding: 20px;
    }

    .wpvl-video-container .plyr__control--overlaid svg {
        width: 24px;
        height: 24px;
    }
}

/* Volume slider */
.wpvl-video-container .plyr__volume {
    min-width: 80px;
}

/* Speed menu */
.wpvl-video-container .plyr__menu__container {
    background: rgba(255, 255, 255, 0.98) !important;
    border-radius: 8px;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.2);
}

/* Menu text - ensure visibility */
.wpvl-video-container .plyr__menu__container * {
    color: #333 !important;
}

.wpvl-video-container .plyr__menu__container label,
.wpvl-video-container .plyr__menu__container button,
.wpvl-video-container .plyr__menu__container span {
    color: #333 !important;
    padding: 8px 16px;
}

/* Menu item hover */
.wpvl-video-container .plyr__menu__container [role="menuitemradio"]:hover,
.wpvl-video-container .plyr__menu__container button:hover,
.wpvl-video-container .plyr__menu__container label:hover {
    background: #4ba09f !important;
    color: #fff !important;
}

/* Selected/checked menu item */
.wpvl-video-container .plyr__menu__container [aria-checked="true"],
.wpvl-video-container .plyr__menu__container [role="menuitemradio"][aria-checked="true"] {
    background: rgba(75, 160, 159, 0.15) !important;
}

/* Value text (like speed numbers) */
.wpvl-video-container .plyr__menu__value {
    color: #333 !important;
    margin-left: auto;
    opacity: 0.8;
}

/* Time display */
.wpvl-video-container .plyr__time {
    font-weight: 500;
}

/* Fullscreen */
.wpvl-video-container .plyr--fullscreen-enabled {
    border-radius: 0;
}

/* Video Info Bar */
.wpvl-video-info {
    display: flex;
    flex-wrap: wrap;
    gap: 20px;
    padding: 15px 20px;
    background: var(--wpvl-secondary-color, #1a1a2e);
    color: #fff;
    font-size: 14px;
    border-radius: 0 0 12px 12px;
}

.wpvl-video-info span {
    display: inline-flex;
    align-items: center;
    gap: 6px;
}

.wpvl-video-info strong {
    opacity: 0.7;
    font-weight: 500;
}

/* Loading state */
.wpvl-video-loading {
    display: flex;
    align-items: center;
    justify-content: center;
    min-height: 400px;
    background: #000;
    color: #fff;
}

.wpvl-video-loading::after {
    content: '';
    width: 40px;
    height: 40px;
    border: 3px solid rgba(255, 255, 255, 0.2);
    border-top-color: var(--wpvl-primary-color, #00b3ff);
    border-radius: 50%;
    animation: wpvl-spin 0.8s linear infinite;
}

@keyframes wpvl-spin {
    to {
        transform: rotate(360deg);
    }
}

/* Responsive */
@media screen and (max-width: 768px) {
    .wpvl-video-container {
        border-radius: 8px;
        margin-left: -15px;
        margin-right: -15px;
    }

    .wpvl-video-container .plyr {
        border-radius: 8px;
    }

    /* Play button already handled in the main play button section above */

    .wpvl-language-tabs {
        border-radius: 8px 8px 0 0;
    }

    .wpvl-lang-btn {
        padding: 12px 15px;
        font-size: 14px;
    }

    .wpvl-lang-flag {
        font-size: 18px;
    }

    .wpvl-video-info {
        flex-direction: column;
        gap: 10px;
        padding: 12px 15px;
        border-radius: 0 0 8px 8px;
    }

    .wpvl-video-grid {
        grid-template-columns: 1fr;
        /* Mobile 1 col */
        gap: 20px;
    }

    .wpvl-library-banner {
        padding: 40px 20px;
        min-height: 220px;
        background-position: center top;
        /* Mobile: show top portion */
        background-size: 100% auto;
        /* Fit width, auto height */
    }

    .wpvl-banner-title {
        font-size: 28px;
    }
}

/* Media query for Tablets/Small Laptops */
@media screen and (min-width: 769px) and (max-width: 1024px) {
    .wpvl-video-grid {
        grid-template-columns: repeat(2, 1fr);
    }

    .wpvl-library-banner {
        background-position: center center;
        /* Tablets: center */
    }
}

/* TV Media Query (Large screens) */
@media screen and (min-width: 1921px) {
    .wpvl-video-grid {
        grid-template-columns: repeat(5, 1fr);
        /* 5 cols for big TV screens */
    }

    .wpvl-library-wrapper {
        max-width: 1800px;
    }

    .wpvl-banner-title {
        font-size: 56px;
    }
}