/* Videos with Filters Layout - 20% Sidebar / 80% Content */
.videos-with-filters {
    display: flex;
    gap: 20px;
    width: 100%;
}

/* Left Sidebar - Filters (20%) */
.filters-sidebar {
    flex: 0 0 22%;
    max-width: 22%;
    background: #1a1a1a;
    border-radius: 8px;
    padding: 0;
    position: sticky;
    top: 80px;
    height: fit-content;
    max-height: calc(100vh - 100px);
    overflow-y: auto;
    overflow-x: hidden;
    transition: all 0.3s ease;
}

.filters-sidebar-inner {
    padding: 20px;
}

.filters-close-btn {
    display: none;
    position: absolute;
    top: 15px;
    right: 15px;
    background: transparent;
    border: none;
    color: #fff;
    font-size: 24px;
    cursor: pointer;
    z-index: 10;
    padding: 5px;
    line-height: 1;
}

.filters-close-btn:hover {
    color: #1e90ff;
}

/* Right Content - Videos (80%) */
.videos-content {
    flex: 1;
    min-width: 0;
}

/* Filter Search Box */
.filter-search-box {
    position: relative;
    margin-bottom: 20px;
}

.filter-search-input {
    width: 100%;
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 6px;
    padding: 12px 40px 12px 15px;
    color: #fff;
    font-size: 14px;
    transition: all 0.2s ease;
}

.filter-search-input:focus {
    outline: none;
    background: rgba(255, 255, 255, 0.08);
    border-color: #1e90ff;
}

.filter-search-input::placeholder {
    color: rgba(255, 255, 255, 0.4);
}

.filter-search-icon {
    position: absolute;
    right: 15px;
    top: 50%;
    transform: translateY(-50%);
    color: rgba(255, 255, 255, 0.4);
    pointer-events: none;
}

/* Filter Panel Items */
.filter-panel-item {
    margin-bottom: 8px;
}

.filter-panel-button {
    width: 100%;
    display: flex;
    justify-content: space-between;
    align-items: center;
    background: rgba(255, 255, 255, 0.03);
    border: 1px solid rgba(255, 255, 255, 0.08);
    border-radius: 6px;
    padding: 14px 16px;
    color: #fff;
    font-size: 15px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.2s ease;
    text-align: left;
}

.filter-panel-button:hover {
    background: rgba(255, 255, 255, 0.06);
    border-color: rgba(255, 255, 255, 0.15);
}

.filter-panel-button.active {
    background: rgba(30, 144, 255, 0.1);
    border-color: rgba(30, 144, 255, 0.3);
    color: #6aa8ff;
}

.filter-panel-button i {
    font-size: 12px;
    transition: transform 0.2s ease;
}

.filter-panel-button.active i {
    transform: rotate(180deg);
}

/* Filter Panel Content */
.filter-panel-content {
    padding: 12px 0 0 0;
    display: none;
}

.filter-panel-content.active {
    display: block;
}

/* Filter Search Box Small (inside panels) */
.filter-search-box-small {
    position: relative;
    margin-bottom: 12px;
    padding: 0 8px;
}

.filter-search-input-small {
    width: 100%;
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 4px;
    padding: 8px 30px 8px 10px;
    color: #fff;
    font-size: 13px;
}

.filter-search-input-small:focus {
    outline: none;
    background: rgba(255, 255, 255, 0.08);
    border-color: #1e90ff;
}

.filter-search-input-small::placeholder {
    color: rgba(255, 255, 255, 0.3);
}

.filter-search-box-small i {
    position: absolute;
    right: 18px;
    top: 50%;
    transform: translateY(-50%);
    color: rgba(255, 255, 255, 0.3);
    font-size: 12px;
    pointer-events: none;
}

/* Filter List */
.filter-list {
    max-height: 300px;
    overflow-y: auto;
    padding: 0 8px;
}

.filter-list::-webkit-scrollbar {
    width: 6px;
}

.filter-list::-webkit-scrollbar-track {
    background: rgba(255, 255, 255, 0.05);
    border-radius: 3px;
}

.filter-list::-webkit-scrollbar-thumb {
    background: rgba(255, 255, 255, 0.2);
    border-radius: 3px;
}

.filter-list::-webkit-scrollbar-thumb:hover {
    background: rgba(255, 255, 255, 0.3);
}

/* Filter Items */
.filter-item {
    margin-bottom: 8px;
}

.filter-label {
    display: flex;
    align-items: center;
    padding: 8px 10px;
    border-radius: 4px;
    cursor: pointer;
    transition: all 0.2s ease;
}

.filter-label:hover {
    background: rgba(255, 255, 255, 0.05);
}

.filter-label input[type="checkbox"],
.filter-label input[type="radio"] {
    margin-right: 10px;
    cursor: pointer;
    accent-color: #1e90ff;
}

.filter-name {
    color: rgba(255, 255, 255, 0.8);
    font-size: 14px;
    flex: 1;
}

.filter-label:hover .filter-name {
    color: #fff;
}

.filter-label input:checked + .filter-name {
    color: #1e90ff;
    font-weight: 600;
}

/* Filter Show More Button */
.filter-show-more {
    width: 100%;
    background: transparent;
    border: none;
    color: #1e90ff;
    font-size: 13px;
    font-weight: 600;
    padding: 12px;
    cursor: pointer;
    text-align: center;
    transition: all 0.2s ease;
    letter-spacing: 0.5px;
}

.filter-show-more:hover {
    color: #6aa8ff;
    background: rgba(30, 144, 255, 0.05);
}

/* Mobile Filter Toggle Button */
.btn-filter-toggle {
    display: none;
    margin-right: 10px;
    padding: 10px 16px;
    background: rgba(30, 144, 255, 0.1);
    border: 1px solid rgba(30, 144, 255, 0.3);
    color: #6aa8ff;
    font-size: 14px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.2s ease;
}

.btn-filter-toggle:hover {
    background: rgba(30, 144, 255, 0.2);
    border-color: rgba(30, 144, 255, 0.5);
}

.btn-filter-toggle i {
    margin-right: 6px;
}

/* Responsive - Tablets */
@media (max-width: 991px) {
    .filters-sidebar {
        flex: 0 0 30%;
        max-width: 30%;
    }
}

/* Responsive - Mobile */
@media (max-width: 768px) {
    .btn-filter-toggle {
        display: inline-flex;
        align-items: center;
    }

    .filters-sidebar {
        position: fixed;
        top: 0;
        left: -100%;
        width: 320px;
        max-width: 85%;
        height: 100vh;
        max-height: 100vh;
        z-index: 9999;
        box-shadow: 2px 0 20px rgba(0, 0, 0, 0.5);
        transition: left 0.3s ease;
    }

    .filters-sidebar.active {
        left: 0;
    }

    .filters-close-btn {
        display: block;
    }

    .filters-sidebar-inner {
        padding: 60px 20px 20px 20px;
    }

    .videos-content {
        flex: 1;
        width: 100%;
    }

    /* Mobile Overlay */
    .filters-overlay {
        display: none;
        position: fixed;
        top: 0;
        left: 0;
        width: 100%;
        height: 100%;
        background: rgba(0, 0, 0, 0.7);
        z-index: 9998;
    }

    .filters-overlay.active {
        display: block;
    }
}

@media (max-width: 575.98px) {
    .videos-toolbar .sort-group {
        flex-wrap: wrap;
        gap: 8px;
        width: 100%;
    }

    .videos-toolbar .btn-sort {
        flex: 1 1 auto;
        min-width: calc(33.333% - 6px);
        font-size: 13px;
        padding: 8px;
    }

    .title-wrapper {
        flex-direction: column;
        align-items: flex-start !important;
        gap: 15px;
    }

    .videos-toolbar {
        width: 100%;
    }
}

/* Scrollbar for Filter Sidebar */
.filters-sidebar::-webkit-scrollbar {
    width: 8px;
}

.filters-sidebar::-webkit-scrollbar-track {
    background: rgba(255, 255, 255, 0.05);
}

.filters-sidebar::-webkit-scrollbar-thumb {
    background: rgba(255, 255, 255, 0.2);
    border-radius: 4px;
}

.filters-sidebar::-webkit-scrollbar-thumb:hover {
    background: rgba(255, 255, 255, 0.3);
}

/* Loading States - Modern AJAX */
.videos-loading-spinner {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    text-align: center;
    z-index: 100;
    background: rgba(0, 0, 0, 0.9);
    padding: 40px 60px;
    border-radius: 12px;
    box-shadow: 0 10px 40px rgba(0, 0, 0, 0.5);
}

.videos-loading-spinner .spinner-icon {
    font-size: 48px;
    color: #1e90ff;
    margin-bottom: 15px;
    animation: pulse 1.5s ease-in-out infinite;
}

.videos-loading-spinner i {
    animation: spin 1s linear infinite;
}

.videos-loading-spinner p {
    color: #fff;
    font-size: 16px;
    font-weight: 600;
    margin: 0;
}

@keyframes spin {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}

@keyframes pulse {
    0%, 100% { opacity: 1; transform: scale(1); }
    50% { opacity: 0.8; transform: scale(1.05); }
}

/* Videos Content Loading State */
.videos-content {
    position: relative;
    min-height: 400px;
    transition: all 0.3s ease;
}

/* Smooth fade transition for videos */
.videos-content .row.gutter-25 {
    transition: opacity 0.3s ease;
}

/* Active Filter Indicators */
.filter-label input:checked {
    accent-color: #1e90ff;
}

.filter-label input:checked ~ .filter-name {
    color: #1e90ff;
    font-weight: 600;
}

/* Filter Count Badge */
.filter-panel-button .filter-count {
    background: #1e90ff;
    color: #fff;
    font-size: 11px;
    padding: 2px 8px;
    border-radius: 10px;
    margin-left: 8px;
    font-weight: 700;
}

/* Clear Filters Button */
.clear-filters-btn {
    width: 100%;
    background: rgba(255, 68, 68, 0.1);
    border: 1px solid rgba(255, 68, 68, 0.3);
    color: #ff4444;
    padding: 12px;
    border-radius: 6px;
    font-size: 14px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.2s ease;
    margin-top: 15px;
}

.clear-filters-btn:hover {
    background: rgba(255, 68, 68, 0.2);
    border-color: rgba(255, 68, 68, 0.5);
}

.clear-filters-btn i {
    margin-right: 6px;
}

/* Responsive Loading Spinner */
@media (max-width: 768px) {
    .videos-loading-spinner {
        padding: 30px 40px;
    }
    
    .videos-loading-spinner .spinner-icon {
        font-size: 36px;
    }
    
    .videos-loading-spinner p {
        font-size: 14px;
    }
}

