/* Hui Video Slider - Main Styles */

/* Debug elements - hidden by default */
.hvs-debug-overlay, 
[data-hvs-debug="1"], 
#hvs-debug-indicator {
    display: none !important;
}

/* Admin Styles - Professional Typeform Quizzes Style */
.hui-video-slider-admin {
    background: #f1f1f1;
    margin: 20px 0 0 -20px;
    padding: 0;
    min-height: calc(100vh - 32px);
}

.hui-admin-title {
    background: #fff;
    margin: 0;
    padding: 20px 30px;
    border-bottom: 1px solid #e1e1e1;
    font-size: 24px;
    font-weight: 600;
    color: #1d2327;
}

.hui-admin-tabs {
    background: #fff;
    border-bottom: 1px solid #e1e1e1;
    padding: 0 30px;
}

.hui-admin-tabs .nav-tab-wrapper {
    border: none;
    margin: 0;
    padding: 0;
}

.hui-admin-tabs .nav-tab {
    background: transparent;
    border: none;
    border-bottom: 3px solid transparent;
    color: #646970;
    font-weight: 500;
    padding: 15px 20px;
    margin: 0;
    text-decoration: none;
    display: inline-flex;
    align-items: center;
    gap: 8px;
    transition: all 0.2s ease;
    position: relative;
}

.hui-admin-tabs .nav-tab:hover {
    background: #f6f7f7;
    color: #1d2327;
}

.hui-admin-tabs .nav-tab-active {
    background: transparent;
    border-bottom-color: #2271b1;
    color: #1d2327;
    font-weight: 600;
}

.hui-admin-tabs .nav-tab .dashicons {
    font-size: 16px;
    width: 16px;
    height: 16px;
}

.hui-tab-content {
    background: #f1f1f1;
    padding: 30px;
    min-height: calc(100vh - 200px);
}

.hui-tab-content .tab-pane {
    display: none;
}

.hui-tab-content .tab-pane.active {
    display: block;
}

.hui-settings-container {
    max-width: 1200px;
    margin: 0 auto;
}

.hui-settings-section {
    background: #fff;
    border-radius: 8px;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.1);
    overflow: hidden;
    margin-bottom: 20px;
}

.hui-section-header {
    display: flex;
    align-items: flex-start;
    gap: 15px;
    padding: 25px 30px;
    border-bottom: 1px solid #e1e1e1;
    background: #fafafa;
}

.hui-section-icon {
    flex-shrink: 0;
    width: 40px;
    height: 40px;
    background: #2271b1;
    border-radius: 8px;
    display: flex;
    align-items: center;
    justify-content: center;
    margin-top: 2px;
}

.hui-section-icon .dashicons {
    color: #fff;
    font-size: 20px;
    width: 20px;
    height: 20px;
}

.hui-section-content h2 {
    margin: 0 0 8px 0;
    font-size: 20px;
    font-weight: 600;
    color: #1d2327;
}

.hui-section-content p {
    margin: 0;
    color: #646970;
    font-size: 14px;
    line-height: 1.5;
}

.hui-settings-form {
    padding: 30px;
}

.hui-settings-group {
    margin-bottom: 35px;
}

.hui-settings-group:last-child {
    margin-bottom: 0;
}

.hui-group-title {
    display: flex;
    align-items: center;
    gap: 10px;
    margin: 0 0 20px 0;
    font-size: 16px;
    font-weight: 600;
    color: #1d2327;
    padding-bottom: 10px;
    border-bottom: 2px solid #f0f0f1;
}

.hui-group-title .dashicons {
    color: #2271b1;
    font-size: 18px;
    width: 18px;
    height: 18px;
}

.hui-form-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 25px;
}

.hui-form-field {
    display: flex;
    flex-direction: column;
}

.hui-form-field-full {
    grid-column: 1 / -1;
}

.hui-form-field label {
    font-weight: 600;
    color: #1d2327;
    margin-bottom: 8px;
    font-size: 14px;
}

.hui-form-field input,
.hui-form-field select {
    padding: 10px 12px;
    border: 1px solid #8c8f94;
    border-radius: 4px;
    font-size: 14px;
    background: #fff;
    transition: border-color 0.2s ease, box-shadow 0.2s ease;
}

.hui-form-field input:focus,
.hui-form-field select:focus {
    border-color: #2271b1;
    box-shadow: 0 0 0 1px #2271b1;
    outline: none;
}

.hui-input-large {
    max-width: 500px;
}

.hui-form-field .description {
    margin: 6px 0 0 0;
    color: #646970;
    font-size: 13px;
    line-height: 1.4;
}

.hui-link {
    color: #2271b1;
    text-decoration: none;
}

.hui-link:hover {
    color: #135e96;
    text-decoration: underline;
}

.hui-form-actions {
    padding-top: 25px;
    border-top: 1px solid #e1e1e1;
    margin-top: 30px;
}

.hui-button {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 10px 20px;
    border: 1px solid;
    border-radius: 4px;
    font-size: 14px;
    font-weight: 500;
    text-decoration: none;
    cursor: pointer;
    transition: all 0.2s ease;
    background: none;
}

.hui-button .dashicons {
    font-size: 16px;
    width: 16px;
    height: 16px;
}

.hui-button-primary {
    background: #2271b1;
    border-color: #2271b1;
    color: #fff;
}

.hui-button-primary:hover {
    background: #135e96;
    border-color: #135e96;
    color: #fff;
}

.hui-button-secondary {
    background: #f6f7f7;
    border-color: #8c8f94;
    color: #1d2327;
}

.hui-button-secondary:hover {
    background: #f0f0f1;
    border-color: #646970;
    color: #1d2327;
}

.hui-button-danger {
    background: #d63638;
    border-color: #d63638;
    color: #fff;
}

.hui-button-danger:hover {
    background: #b32d2e;
    border-color: #b32d2e;
    color: #fff;
}

.hui-cache-actions {
    padding: 20px;
    background: #f9f9f9;
    border-radius: 6px;
    border: 1px solid #e1e1e1;
}

.hui-cache-warning {
    display: flex;
    align-items: flex-start;
    gap: 10px;
    padding: 15px;
    background: #fff3cd;
    border: 1px solid #ffeaa7;
    border-radius: 4px;
    margin-bottom: 20px;
    color: #856404;
    font-size: 14px;
}

.hui-cache-warning .dashicons {
    color: #f0ad4e;
    font-size: 18px;
    width: 18px;
    height: 18px;
    margin-top: 1px;
}

.hui-code-example {
    background: #f6f7f7;
    border: 1px solid #e1e1e1;
    border-radius: 4px;
    padding: 15px;
    margin: 15px 0;
    overflow-x: auto;
}

.hui-code-example code {
    background: none;
    color: #1d2327;
    font-family: 'Monaco', 'Menlo', 'Ubuntu Mono', monospace;
    font-size: 13px;
    line-height: 1.4;
    white-space: pre-wrap;
    word-break: break-all;
}

.hui-attributes-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 15px;
    margin-top: 15px;
}

.hui-attribute-item {
    padding: 12px 15px;
    background: #f6f7f7;
    border: 1px solid #e1e1e1;
    border-radius: 4px;
    font-size: 14px;
    line-height: 1.4;
}

.hui-attribute-item strong {
    color: #1d2327;
    font-weight: 600;
}

/* Responsive Design */
@media (max-width: 768px) {
    .hui-video-slider-admin {
        margin: 20px 0 0 -10px;
    }
    
    .hui-admin-title {
        padding: 15px 20px;
        font-size: 20px;
    }
    
    .hui-admin-tabs {
        padding: 0 20px;
    }
    
    .hui-admin-tabs .nav-tab {
        padding: 12px 15px;
        font-size: 14px;
    }
    
    .hui-tab-content {
        padding: 20px;
    }
    
    .hui-section-header {
        padding: 20px;
        flex-direction: column;
        text-align: center;
    }
    
    .hui-settings-form {
        padding: 20px;
    }
    
    .hui-form-grid {
        grid-template-columns: 1fr;
        gap: 20px;
    }
    
    .hui-attributes-grid {
        grid-template-columns: 1fr;
    }
}

/* Hui Video Slider - Arrow Controls (Plugin-specific selectors) */
.hvs-video-slider-arrow {
    position: relative;
    display: flex;
    align-items: center;
    justify-content: center;
}

.hvs-video-slider-arrow span {
    position: relative;
    display: flex;
    align-items: center;
    justify-content: center;
    width: 100%;
    height: 100%;
}

/* FontAwesome icons styling - compatible with FA 5.x and 6.x */
.hvs-video-slider-arrow .fa,
.hvs-video-slider-arrow .fas,
.hvs-video-slider-arrow .fa-solid,
.hvs-video-slider-arrow .fa-angle-left,
.hvs-video-slider-arrow .fa-angle-right {
    font-size: inherit;
    line-height: 1;
    display: block;
    color: inherit;
    font-family: "Font Awesome 5 Free", "Font Awesome 6 Free", "FontAwesome" !important;
}

/* FontAwesome fallback with explicit Unicode content (same as typeform-quizzes) */
.hvs-video-slider-arrow.fa-fallback[data-dir="prev"]::before {
    content: "\f104"; /* fa-angle-left */
    font-family: "Font Awesome 5 Free", "Font Awesome 6 Free", "FontAwesome" !important;
    font-weight: 900;
    font-size: inherit;
    line-height: 1;
    display: block;
    color: inherit;
}

.hvs-video-slider-arrow.fa-fallback[data-dir="next"]::before {
    content: "\f105"; /* fa-angle-right */
    font-family: "Font Awesome 5 Free", "Font Awesome 6 Free", "FontAwesome" !important;
    font-weight: 900;
    font-size: inherit;
    line-height: 1;
    display: block;
    color: inherit;
}

/* Ensure proper icon sizing and positioning */
.hvs-video-slider-arrow i {
    font-size: inherit !important;
    line-height: 1 !important;
    display: block !important;
    width: auto !important;
    height: auto !important;
    margin: 0 !important;
    padding: 0 !important;
}

/* CSS-only arrow sizing based on container */
.hvs-video-slider-arrow.fa-fallback[data-dir="prev"]::before,
.hvs-video-slider-arrow.fa-fallback[data-dir="next"]::before {
    border-width: calc(var(--arrow-icon-size, 28px) * 0.3);
}

/* Ensure arrows are visible and properly sized */
.hvs-video-slider-arrow .fa-solid.fa-angle-left,
.hvs-video-slider-arrow .fa-solid.fa-angle-right {
    font-size: var(--arrow-icon-size, 28px) !important;
    color: var(--arrow-icon-color, #ffffff) !important;
}

/* Hide Font Awesome icons when using CSS fallback */
.hvs-video-slider-arrow.fa-fallback .fa,
.hvs-video-slider-arrow.fa-fallback .fas,
.hvs-video-slider-arrow.fa-fallback .fa-solid,
.hvs-video-slider-arrow.fa-fallback .fa-angle-left,
.hvs-video-slider-arrow.fa-fallback .fa-angle-right {
    display: none !important;
}

/* Video Slider Styles - Based on Reference Implementation */
.hvs-video-slider-outer {
    position: relative;
    width: 100%;
}

.hvs-video-slider-wrap {
    position: relative;
    width: 100%;
    --cols: var(--cols-mobile);
    --cardw: calc((100% - (var(--cols) - 1) * var(--gap)) / var(--cols));
    --radius: var(--border-radius);
    --muted: #666;
    --ink: #111;
}

/* Responsive column settings */
@media (min-width: 768px) { 
    .hvs-video-slider-wrap { --cols: var(--cols-tablet); } 
}
@media (min-width: 1024px) { 
    .hvs-video-slider-wrap { --cols: var(--cols-desktop); } 
}

/* Scroller = grid with fixed column width per card */
.hvs-video-slider-strip {
    display: grid;
    grid-auto-flow: column;
    grid-auto-columns: var(--cardw);
    gap: var(--gap);
    overflow-x: auto;
    overflow-y: visible;
    scroll-behavior: smooth;
    width: 100%;
    scrollbar-width: none;
    -ms-overflow-style: none;
    /* Add padding to create space for hover effects */
    padding: 20px 0;
    margin: -20px 0;
}

.hvs-video-slider-strip::-webkit-scrollbar { 
    display: none; 
}

/* Card: width is from grid-auto-columns; no max/mins - Based on ytrow-card */
.hvs-video-slider-card {
    display: flex;
    flex-direction: column;
    cursor: pointer;
    border: 0;
    background: transparent;
    padding: 0;
    text-align: left;
    scroll-snap-align: start;
    border-radius: var(--radius);
    overflow: hidden;
    transition: transform 0.2s ease, box-shadow 0.2s ease;
    position: relative;
}

.hvs-video-slider-card:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
}

/* Thumb: Based on ytrow-thumb pattern */
.hvs-video-slider-thumb {
    position: relative;
    width: 100%;
    aspect-ratio: var(--aspect-ratio);
    height: auto;
    background: #000;
    border-radius: var(--radius);
    overflow: hidden;
}

.hvs-video-slider-thumb > * {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    border: 0 !important;
    display: block;
    object-fit: cover;
}

/* Title - Based on ytrow-meta pattern */
.hvs-video-slider-title {
    padding: 10px 2px 0;
    margin: 0;
    color: var(--title-color, var(--ink, #111));
    font-size: 16px;
    font-weight: 700;
    line-height: 1.25;
    display: -webkit-box;
    -webkit-box-orient: vertical;
    -webkit-line-clamp: 2;
    overflow: hidden;
    transition: color 0.2s ease;
}

.hvs-video-slider-card:hover .hvs-video-slider-title {
    color: var(--title-hover-color, var(--ink-hover, #000));
}


/* Controls */
.hvs-video-slider-controls {
    display: flex;
    align-items: center;
    justify-content: center;
    margin-top: var(--controls-bottom-spacing);
    position: relative;
    /* Ensure controls don't overlap slider content */
    padding: 16px 0;
    min-height: 60px;
    width: 100%;
    box-sizing: border-box;
    flex-wrap: nowrap;
}

/* General arrow styles */
.hvs-video-slider-arrow {
    width: var(--arrow-width);
    height: var(--arrow-height);
    border-radius: var(--arrow-border-radius);
    border: 0;
    background: var(--arrow-bg-color);
    position: relative;
    cursor: pointer;
    flex: 0 0 auto;
    transition: transform 0.12s ease, background-color 0.12s ease, box-shadow 0.12s ease;
    display: flex;
    align-items: center;
    justify-content: center;
}

.hvs-video-slider-arrow:hover {
    background: var(--arrow-hover-bg-color);
    box-shadow: 0 4px 10px rgba(0, 0, 0, 0.12);
}

.hvs-video-slider-arrow:hover span i {
    color: var(--arrow-icon-hover-color) !important;
}

.hvs-video-slider-arrow:hover .fa-solid.fa-angle-left,
.hvs-video-slider-arrow:hover .fa-solid.fa-angle-right {
    color: var(--arrow-icon-hover-color) !important;
}

.hvs-video-slider-arrow:focus {
    background: var(--arrow-hover-bg-color);
    box-shadow: 0 4px 10px rgba(0, 0, 0, 0.12);
    outline: none;
}

.hvs-video-slider-arrow:focus span i {
    color: var(--arrow-icon-hover-color) !important;
}

.hvs-video-slider-arrow:focus .fa-solid.fa-angle-left,
.hvs-video-slider-arrow:focus .fa-solid.fa-angle-right {
    color: var(--arrow-icon-hover-color) !important;
}

.hvs-video-slider-arrow:active {
    background: var(--arrow-hover-bg-color);
    transform: translateY(0);
    box-shadow: none;
}

.hvs-video-slider-arrow:active span i {
    color: var(--arrow-icon-hover-color) !important;
}

.hvs-video-slider-arrow:active .fa-solid.fa-angle-left,
.hvs-video-slider-arrow:active .fa-solid.fa-angle-right {
    color: var(--arrow-icon-hover-color) !important;
}

.hvs-video-slider-arrow span {
    position: relative;
    display: flex;
    align-items: center;
    justify-content: center;
    width: 100%;
    height: 100%;
}

.hvs-video-slider-arrow span i {
    color: var(--arrow-icon-color);
    font-size: var(--arrow-icon-size);
    line-height: 1;
    display: block;
    width: auto;
    height: auto;
}

/* Mobile: Stack arrows and dots vertically */
@media (max-width: 767px) {
    .hvs-video-slider-controls {
        flex-direction: column;
        gap: 12px;
        margin-top: var(--controls-bottom-spacing);
        position: relative;
        bottom: 0;
        /* Ensure proper spacing on mobile */
        padding: 20px 0;
        min-height: 80px;
        align-items: center;
    }
    
    /* Reset order for mobile layout */
    .hvs-video-slider-arrow[data-dir="prev"],
    .hvs-video-slider-arrow[data-dir="next"] {
        order: unset;
        margin: 0;
    }
    
    .hvs-video-slider-dots {
        order: unset;
    }
    
    .hvs-video-slider-arrow {
        position: absolute !important;
        top: 50%;
        transform: translateY(-50%);
        z-index: 1;
    }
    
    .hvs-video-slider-arrow[data-dir="prev"] {
        left: 0;
    }
    
    .hvs-video-slider-arrow[data-dir="next"] {
        right: 0;
    }
    
    .hvs-video-slider-dots {
        position: absolute !important;
        left: 50%;
        top: 50%;
        transform: translate(-50%, -50%);
        z-index: 0;
    }
    
    .hvs-video-slider-arrow:active {
        background: var(--arrow-hover-bg-color);
        transform: translateY(-50%) !important;
    }
    
    .hvs-video-slider-arrow:active span i {
        color: var(--arrow-icon-hover-color) !important;
    }
    
    .hvs-video-slider-arrow:active .fa-solid.fa-angle-left,
    .hvs-video-slider-arrow:active .fa-solid.fa-angle-right {
        color: var(--arrow-icon-hover-color) !important;
    }
    
    .hvs-video-slider-arrow span i {
        font-size: var(--arrow-icon-size) !important;
    }
}

/* Tablet: Horizontal layout with arrows next to dots - ALL STYLES */
@media (min-width: 768px) and (max-width: 1023px) {
    .hvs-video-slider-controls {
        flex-direction: row !important;
        justify-content: center;
        align-items: center;
    }
    
    /* Position arrows next to dots with tablet spacing - ALL STYLES */
    .hvs-video-slider-arrow[data-dir="prev"] {
        order: 1 !important;
        margin-right: var(--controls-spacing-tablet) !important;
        margin-left: 0 !important;
    }
    
    .hvs-video-slider-dots {
        order: 2 !important;
    }
    
    .hvs-video-slider-arrow[data-dir="next"] {
        order: 3 !important;
        margin-left: var(--controls-spacing-tablet) !important;
        margin-right: 0 !important;
    }
}

/* Desktop: Horizontal layout with arrows next to dots - ALL STYLES */
@media (min-width: 1024px) {
    .hvs-video-slider-controls {
        flex-direction: row !important;
        justify-content: center;
        align-items: center;
    }
    
    /* Position arrows next to dots with desktop spacing - ALL STYLES */
    .hvs-video-slider-arrow[data-dir="prev"] {
        order: 1 !important;
        margin-right: var(--controls-spacing) !important;
        margin-left: 0 !important;
    }
    
    .hvs-video-slider-dots {
        order: 2 !important;
    }
    
    .hvs-video-slider-arrow[data-dir="next"] {
        order: 3 !important;
        margin-left: var(--controls-spacing) !important;
        margin-right: 0 !important;
    }
}

/* Dots */
.hvs-video-slider-dots {
    display: flex;
    gap: var(--pagination-dot-gap, 10px);
    align-items: center;
    flex-wrap: wrap;
    justify-content: center;
    max-width: 100%;
    /* Ensure dots don't cause overlap */
    padding: 8px 0;
    min-height: 40px;
    width: auto;
    flex: 0 0 auto;
    box-sizing: border-box;
}

.hvs-video-slider-dot {
    width: var(--pagination-dot-size, 10px);
    height: var(--pagination-dot-size, 10px);
    border-radius: 50%;
    background: var(--pagination-dot-color);
    border: 0;
    cursor: pointer;
    padding: 0;
    flex-shrink: 0;
    transition: background-color 0.3s ease, opacity 0.3s ease;
}

.hvs-video-slider-dot.active {
    background: var(--pagination-active-dot-color);
}

.hvs-video-slider-dot:hover {
    background: var(--pagination-active-dot-color);
    opacity: 0.9;
}

/* Handle excessive pagination dots - allow container to expand automatically */
.hvs-video-slider-dots:has(.hvs-video-slider-dot:nth-child(20)) {
    /* When there are 20+ dots, increase spacing but allow expansion */
    padding: 16px 0;
    min-height: 60px;
    /* Remove height restrictions to allow natural expansion */
}

/* Mobile: Allow dots to wrap and ensure they don't interfere with arrows */
@media (max-width: 767px) {
    .hvs-video-slider-dots {
        gap: calc(var(--pagination-dot-gap, 10px) * 0.8);
        margin: 0 10px;
        /* Ensure proper containment on mobile */
        padding: 12px 0;
        min-height: 50px;
        width: auto;
        flex: 0 0 auto;
    }
    
    .hvs-video-slider-dot {
        width: calc(var(--pagination-dot-size, 10px) * 0.8);
        height: calc(var(--pagination-dot-size, 10px) * 0.8);
    }
}

/* ========================================
   BOXED STYLE - Modern Card Design with Borders and Shadows
   ======================================== */

.hvs-video-slider-wrap[data-style="boxed"] .hvs-video-slider-card {
    display: flex;
    flex-direction: column;
    cursor: pointer;
    background: #fff;
    border: 1px solid #e1e5e9;
    padding: 0;
    text-align: left;
    scroll-snap-align: start;
    border-radius: var(--radius);
    overflow: visible;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    position: relative;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.08);
}

.hvs-video-slider-wrap[data-style="boxed"] .hvs-video-slider-card:hover {
    transform: translateY(-4px);
    box-shadow: 0 8px 25px rgba(0, 0, 0, 0.15);
    border-color: var(--active-slide-border-color, #0073aa);
}

.hvs-video-slider-wrap[data-style="boxed"] .hvs-video-slider-thumb {
    position: relative;
    width: 100%;
    aspect-ratio: var(--aspect-ratio);
    height: auto;
    background: #000;
    border-radius: var(--radius) var(--radius) 0 0;
    overflow: hidden;
}

.hvs-video-slider-wrap[data-style="boxed"] .hvs-video-slider-thumb > * {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    border: 0 !important;
    display: block;
    object-fit: cover;
    transition: transform 0.3s ease;
}

.hvs-video-slider-wrap[data-style="boxed"] .hvs-video-slider-card:hover .hvs-video-slider-thumb > * {
    transform: scale(1.05);
}

/* Keep padding on the OUTER container */
.hvs-video-slider-wrap[data-style="boxed"] .hvs-video-slider-title {
    padding: 16px 16px 20px;
    margin: 0;
    color: var(--title-color, #111);
    font-size: 15px;
    font-weight: 600;
    transition: color 0.2s ease;
    background: #fff;
    border-radius: 0 0 var(--radius) var(--radius);
    box-sizing: border-box;
    flex: 1;
}

/* Clamp on the INNER element (no padding) */
.hvs-video-slider-wrap[data-style="boxed"] .hvs-title-text {
    line-height: 1.25;

    /* WebKit clamp */
    display: -webkit-box;
    -webkit-box-orient: vertical;
    -webkit-line-clamp: 2;
    overflow: hidden;

    /* Non-WebKit fallback: cap height to 2 lines */
    /* (safe because this element has no padding) */
    max-height: calc(1.25em * 2);
}

.hvs-video-slider-wrap[data-style="boxed"] .hvs-video-slider-card:hover .hvs-video-slider-title {
    color: var(--title-hover-color, #000);
}

.hvs-video-slider-wrap[data-style="boxed"] .hvs-video-slider-card:hover .hvs-title-text {
    color: var(--title-hover-color, #000);
}

/* Boxed style - Active slide highlighting (only for viewer mode) */
.hvs-video-slider-wrap[data-style="boxed"][data-play="viewer"] .hvs-video-slider-card.active {
    border-color: var(--active-slide-border-color, #0073aa);
    box-shadow: 0 4px 15px rgba(0, 115, 170, 0.2);
}

/* Boxed style - Darken inactive slides (only for viewer mode and not on mobile) */
@media (min-width: 768px) {
    .hvs-video-slider-wrap[data-style="boxed"][data-play="viewer"][data-darken-inactive="true"] .hvs-video-slider-card:not(.active) {
        filter: brightness(0.7) grayscale(0.3);
        transition: filter 0.3s ease;
    }

    .hvs-video-slider-wrap[data-style="boxed"][data-play="viewer"][data-darken-inactive="true"] .hvs-video-slider-card:not(.active):hover {
        filter: brightness(1) grayscale(0);
    }
}

/* Ensure opacity is 1 for all play modes except viewer */
.hvs-video-slider-wrap[data-play="inline"] .hvs-video-slider-card,
.hvs-video-slider-wrap[data-play="popup"] .hvs-video-slider-card,
.hvs-video-slider-wrap[data-play="redirect"] .hvs-video-slider-card {
    opacity: 1 !important;
}

.hvs-video-slider-wrap[data-play="inline"] .hvs-video-slider-card:hover,
.hvs-video-slider-wrap[data-play="popup"] .hvs-video-slider-card:hover,
.hvs-video-slider-wrap[data-play="redirect"] .hvs-video-slider-card:hover {
    opacity: 1 !important;
}


/* ========================================
   UNBOXED STYLE - Clean Video Thumbnails with Titles Below
   ======================================== */
.hvs-video-slider-wrap[data-style="unboxed"] .hvs-video-slider-card {
    display: flex;
    flex-direction: column;
    cursor: pointer;
    background: transparent;
    border: 0;
    padding: 0;
    text-align: left;
    scroll-snap-align: start;
    border-radius: 0;
    overflow: visible;
    transition: all 0.2s ease;
    position: relative;
    align-items: stretch;
    gap: 0;
}

.hvs-video-slider-wrap[data-style="unboxed"] .hvs-video-slider-card:hover {
    transform: none;
    box-shadow: none;
    background: transparent;
}

.hvs-video-slider-wrap[data-style="unboxed"] .hvs-video-slider-thumb {
    position: relative;
    width: 100%;
    aspect-ratio: var(--aspect-ratio);
    height: auto;
    background: #000;
    border-radius: var(--radius);
    overflow: hidden;
    flex-shrink: 0;
}

.hvs-video-slider-wrap[data-style="unboxed"] .hvs-video-slider-thumb > * {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    border: 0 !important;
    display: block;
    object-fit: cover;
    border-radius: var(--radius);
}

.hvs-video-slider-wrap[data-style="unboxed"] .hvs-video-slider-title {
    padding: 10px 2px 0;
    margin: 0;
    color: var(--title-color, #111);
    font-size: 16px;
    font-weight: 700;
    line-height: 1.25;
    display: -webkit-box;
    -webkit-box-orient: vertical;
    -webkit-line-clamp: 2;
    overflow: hidden;
    text-overflow: ellipsis;
    transition: color 0.2s ease;
    flex: 1;
}

.hvs-video-slider-wrap[data-style="unboxed"] .hvs-video-slider-card:hover .hvs-video-slider-title {
    color: var(--title-hover-color, #000);
}

/* Unboxed style - Active slide highlighting (only for viewer mode) */
.hvs-video-slider-wrap[data-style="unboxed"][data-play="viewer"] .hvs-video-slider-card.active {
    background: transparent;
    border-radius: 0;
    border: 0;
}

.hvs-video-slider-wrap[data-style="unboxed"][data-play="viewer"] .hvs-video-slider-card.active .hvs-video-slider-thumb {
    border: 3px solid var(--active-slide-border-color, #0073aa);
    box-shadow: 0 0 0 1px var(--active-slide-border-color, #0073aa);
}

.hvs-video-slider-wrap[data-style="unboxed"][data-play="viewer"] .hvs-video-slider-card.active .hvs-video-slider-title {
    color: var(--active-slide-border-color, #0073aa);
}

/* Unboxed style - Darken inactive slides (only for viewer mode and not on mobile) */
@media (min-width: 768px) {
    .hvs-video-slider-wrap[data-style="unboxed"][data-play="viewer"][data-darken-inactive="true"] .hvs-video-slider-card:not(.active) {
        filter: brightness(0.7) grayscale(0.3);
        transition: filter 0.3s ease;
    }

    .hvs-video-slider-wrap[data-style="unboxed"][data-play="viewer"][data-darken-inactive="true"] .hvs-video-slider-card:not(.active):hover {
        filter: brightness(1) grayscale(0);
    }
}

/* Unboxed style - Responsive adjustments */
@media (max-width: 768px) {
    .hvs-video-slider-wrap[data-style="unboxed"] .hvs-video-slider-title {
        font-size: 14px;
        -webkit-line-clamp: 2;
    }
}

/* ========================================
   COMMON STYLE ENHANCEMENTS
   ======================================== */

/* Play button overlay for both styles */
.hvs-video-slider-thumb::after {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.4);
    opacity: 0;
    transition: opacity 0.3s ease;
    pointer-events: none;
    z-index: 1;
}

.hvs-video-slider-thumb::before {
    content: '\f04b'; /* FontAwesome play icon */
    font-family: 'Font Awesome 6 Free', 'Font Awesome 5 Free', 'FontAwesome';
    font-weight: 900;
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    color: white;
    font-size: 48px;
    opacity: 0;
    transition: opacity 0.3s ease;
    pointer-events: none;
    z-index: 2;
    text-shadow: 0 2px 8px rgba(0, 0, 0, 0.6);
}

.hvs-video-slider-card:hover .hvs-video-slider-thumb::after {
    opacity: 1;
    background: rgba(0, 0, 0, 0.5);
}

.hvs-video-slider-card:hover .hvs-video-slider-thumb::before {
    opacity: 1;
    transform: translate(-50%, -50%) scale(1.1);
}

/* Responsive play button adjustments */
@media (max-width: 768px) {
    .hvs-video-slider-thumb::before {
        font-size: 36px;
    }
}

@media (max-width: 480px) {
    .hvs-video-slider-thumb::before {
        font-size: 28px;
    }
}

/* Loading state */
.hvs-video-slider-thumb[data-playing="1"]::after,
.hvs-video-slider-thumb[data-playing="1"]::before {
    opacity: 0;
}

/* Focus states for accessibility */
.hvs-video-slider-card:focus {
    outline: 2px solid var(--active-slide-border-color, #0073aa);
    outline-offset: 2px;
}

.hvs-video-slider-card:focus:not(:focus-visible) {
    outline: none;
}

/* Error styling */
.hvs-error {
    padding: 20px;
    background: #f8d7da;
    color: #721c24;
    border: 1px solid #f5c6cb;
    border-radius: 4px;
    margin: 20px 0;
}

/* ========================================
   VIDEO VIEWER WINDOW STYLES
   ======================================== */

.hvs-video-viewer-outer {
    position: relative;
    width: 100%;
    margin: 20px 0;
}

.hvs-video-viewer-wrap {
    position: relative;
    width: 100%;
    background: #000;
    border-radius: 12px;
    overflow: hidden;
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.3);
}

.hvs-video-viewer-container {
    position: relative;
    width: 100%;
    aspect-ratio: var(--aspect-ratio);
    background: #000;
    display: flex;
    align-items: center;
    justify-content: center;
    min-height: var(--viewer-height-mobile, 300px); /* Default mobile height */
}

/* Responsive viewer heights */
@media (min-width: 768px) {
    .hvs-video-viewer-container {
        min-height: var(--viewer-height-tablet, 400px); /* Tablet height */
    }
}

@media (min-width: 1024px) {
    .hvs-video-viewer-container {
        min-height: var(--viewer-height-desktop, 500px); /* Desktop height */
    }
}

.hvs-video-viewer-placeholder {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
    background: linear-gradient(135deg, #1a1a1a 0%, #2d2d2d 100%);
    z-index: 1;
}

.hvs-video-viewer-placeholder-content {
    text-align: center;
    color: #fff;
}

.hvs-video-viewer-placeholder-icon {
    font-size: 48px;
    margin-bottom: 16px;
    opacity: 0.7;
    color: #ff0000;
}

.hvs-video-viewer-placeholder-icon i {
    font-size: inherit;
    color: inherit;
    font-family: 'Font Awesome 6 Free', 'Font Awesome 5 Free', 'FontAwesome';
    font-weight: 900;
}

.hvs-video-viewer-placeholder-text {
    font-size: 18px;
    font-weight: 500;
    opacity: 0.8;
}

.hvs-video-viewer-player {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: 2;
}

.hvs-video-viewer-player iframe {
    width: 100%;
    height: 100%;
    border: none;
    border-radius: 12px;
}

/* Responsive adjustments for viewer */
@media (max-width: 768px) {
    .hvs-video-viewer-placeholder-icon {
        font-size: 36px;
        margin-bottom: 12px;
    }
    
    .hvs-video-viewer-placeholder-text {
        font-size: 16px;
    }
}

/* Viewer window with custom dimensions */
.hvs-video-viewer-wrap[data-viewer-width] {
    width: var(--viewer-width);
    margin: 0 auto;
}

.hvs-video-viewer-wrap[data-viewer-height] .hvs-video-viewer-container {
    aspect-ratio: unset;
    height: var(--viewer-height);
}

/* Fallback for browsers that don't support aspect-ratio */
@supports not (aspect-ratio: 1) {
    .hvs-video-viewer-container {
        height: var(--viewer-height-mobile, 300px); /* Fallback mobile height */
    }
    
    @media (min-width: 768px) {
        .hvs-video-viewer-container {
            height: var(--viewer-height-tablet, 400px); /* Fallback tablet height */
        }
    }
    
    @media (min-width: 1024px) {
        .hvs-video-viewer-container {
            height: var(--viewer-height-desktop, 500px); /* Fallback desktop height */
        }
    }
}

/* ========================================
   ADMIN REFRESH BUTTON STYLES
   ======================================== */
.hvs-admin-controls {
    display: flex;
    justify-content: center;
    padding: 0 20px;
}

.hvs-refresh-playlist {
    background: #0073aa;
}

/* Import/Export Section Styles */
.hvs-import-export-section {
    margin: 0;
}

.hvs-import-export-section h3 {
    margin: 0 0 15px 0;
    color: #0073aa;
    font-size: 20px;
    border-bottom: 2px solid #0073aa;
    padding-bottom: 10px;
}

.hvs-import-export-section p {
    margin: 0 0 20px 0;
    color: #666;
    font-size: 14px;
    line-height: 1.5;
}

.hvs-import-export-actions {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 30px;
    margin-bottom: 30px;
}

.hvs-export-section,
.hvs-import-section {
    background: #fff;
    border: 1px solid #e1e5e9;
    border-radius: 8px;
    padding: 20px;
}

.hvs-export-section h4,
.hvs-import-section h4 {
    margin: 0 0 10px 0;
    color: #333;
    font-size: 16px;
}

.hvs-export-section p,
.hvs-import-section p {
    margin: 0 0 15px 0;
    color: #666;
    font-size: 13px;
}

.hvs-import-section input[type="file"] {
    margin-bottom: 15px;
    padding: 8px;
    border: 1px solid #ddd;
    border-radius: 4px;
    width: 100%;
}

.hvs-import-export-info {
    background: #fff3cd;
    border: 1px solid #ffeaa7;
    border-radius: 6px;
    padding: 15px;
}

.hvs-import-export-info h4 {
    margin: 0 0 10px 0;
    color: #856404;
    font-size: 14px;
}

.hvs-import-export-info ul {
    margin: 0;
    padding-left: 20px;
}

.hvs-import-export-info li {
    margin-bottom: 5px;
    color: #856404;
    font-size: 13px;
}

@media (max-width: 768px) {
    .hvs-import-export-actions {
        grid-template-columns: 1fr;
        gap: 20px;
    }
}

.hvs-refresh-playlist:hover {
    background: #005a87;
    transform: translateY(-1px);
    box-shadow: 0 4px 8px rgba(0, 115, 170, 0.3);
}

.hvs-refresh-playlist:active {
    transform: translateY(0);
    box-shadow: 0 2px 4px rgba(0, 115, 170, 0.2);
}

/* Responsive adjustments for admin button */
@media (max-width: 768px) {
    .hvs-admin-controls {
        margin-top: 15px;
        padding: 0 15px;
    }
    
    .hvs-refresh-playlist {
        padding: 8px 16px;
        font-size: 13px;
    }
}

/* ========================================
   LIGHTBOX MODAL STYLES
   ======================================== */
.hvs-lightbox-modal {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: 9999;
    display: none;
}

.hvs-lightbox-overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.8);
    backdrop-filter: blur(4px);
    z-index: 1;
}

.hvs-lightbox-container {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    width: 90%;
    max-width: 90vw;
    max-height: 90vh;
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 2;
}

.hvs-lightbox-content {
    position: relative;
    width: 100%;
    height: 100%;
    background: #000;
    border-radius: 12px;
    overflow: hidden;
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.5);
}

.hvs-lightbox-close {
    position: absolute;
    top: 20px;
    right: 20px;
    background: rgba(0, 0, 0, 0.9);
    color: white;
    border: 2px solid rgba(255, 255, 255, 0.3);
    width: 50px;
    height: 50px;
    border-radius: 50%;
    cursor: pointer;
    z-index: 1000;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 20px;
    transition: all 0.3s ease;
    pointer-events: auto;
    user-select: none;
    -webkit-user-select: none;
    -moz-user-select: none;
    -ms-user-select: none;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.3);
}

.hvs-lightbox-close:hover {
    background: rgba(0, 0, 0, 0.9);
    transform: scale(1.1);
}

.hvs-lightbox-video {
    position: relative;
    width: 100%;
    height: 0;
    padding-bottom: 56.25%; /* Default 16:9 aspect ratio - will be overridden by JavaScript */
    background: #000;
}

.hvs-lightbox-video iframe {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    border: none;
}

/* Responsive lightbox adjustments */
@media (max-width: 768px) {
    .hvs-lightbox-container {
        width: 95%;
        max-height: 85vh;
    }
    
    .hvs-lightbox-close {
        top: 15px;
        right: 15px;
        width: 40px;
        height: 40px;
        font-size: 18px;
    }
    
    .hvs-lightbox-content {
        border-radius: 8px;
    }
}

@media (max-width: 480px) {
    .hvs-lightbox-container {
        width: 98%;
        max-height: 80vh;
    }
    
    .hvs-lightbox-close {
        top: 12px;
        right: 12px;
        width: 36px;
        height: 36px;
        font-size: 16px;
    }
}

/* Animation for smooth modal appearance */
.hvs-lightbox-modal.show {
    animation: hvs-fadeIn 0.3s ease-out;
}

.hvs-lightbox-content.show {
    animation: hvs-scaleIn 0.3s ease-out;
}

@keyframes hvs-fadeIn {
    from {
        opacity: 0;
    }
    to {
        opacity: 1;
    }
}

@keyframes hvs-scaleIn {
    from {
        transform: scale(0.8);
        opacity: 0;
    }
    to {
        transform: scale(1);
        opacity: 1;
    }
}