/* Sidebar Component Styles */
.channel-sidebar {
    width: 420px;
    background: var(--bg-secondary);
    display: flex;
    flex-direction: column;
    overflow-y: auto;
    position: relative;
}

.sidebar-header {
    padding: 1.25rem 1.25rem 1rem;
    position: sticky;
    top: 0;
    z-index: 2;
    background: var(--bg-secondary);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.2);
}

/* Filter Row */
.filter-row {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    margin-bottom: 8px;
    flex-wrap: nowrap;
    width: 100%;
}

.filter-btn {
    background: transparent;
    border: none;
    color: var(--text-secondary);
    padding: 8px 16px;
    border-radius: 40px;
    font-size: 0.85rem;
    font-weight: 500;
    cursor: pointer;
    transition: all var(--transition-fast);
    white-space: nowrap;
}

.filter-btn:hover {
    color: var(--accent);
    background: rgba(249, 115, 22, 0.1);
}

.filter-btn.active {
    background: var(--accent);
    color: white;
}

/* Categories Dropdown */
.categories-dropdown {
    position: relative;
}

.dropdown-btn {
    background: transparent;
    border: none;
    color: var(--text-secondary);
    padding: 8px 16px;
    border-radius: 40px;
    font-size: 0.85rem;
    font-weight: 500;
    cursor: pointer;
    display: flex;
    align-items: center;
    gap: 6px;
    transition: all var(--transition-fast);
    white-space: nowrap;
}

.dropdown-btn i {
    font-size: 0.75rem;
    transition: transform 0.3s ease;
}

.dropdown-btn:hover {
    color: var(--accent);
    background: rgba(249, 115, 22, 0.1);
}

.dropdown-btn.active {
    background: var(--accent);
    color: white;
}

.dropdown-btn.active i {
    color: white;
}

.dropdown-btn.open i {
    transform: rotate(180deg);
}

.dropdown-menu {
    position: absolute;
    top: calc(100% + 8px);
    left: 0;
    min-width: 180px;
    background: var(--bg-card);
    border: 1px solid var(--border-color);
    border-radius: 16px;
    padding: 8px 0;
    z-index: 100;
    display: none;
    box-shadow: var(--shadow-lg);
}

.dropdown-menu.show {
    display: block;
}

.dropdown-item {
    padding: 8px 16px;
    cursor: pointer;
    transition: all var(--transition-fast);
    color: var(--text-primary);
    font-size: 0.85rem;
    white-space: nowrap;
}

.dropdown-item:hover {
    background: rgba(249, 115, 22, 0.1);
    color: var(--accent);
}

.dropdown-item.active {
    background: var(--accent);
    color: white;
}

/* Favorites Button */
.favorites-btn {
    background: transparent;
    border: none;
    color: var(--text-secondary);
    padding: 8px 16px;
    border-radius: 40px;
    font-size: 0.85rem;
    font-weight: 500;
    cursor: pointer;
    display: flex;
    align-items: center;
    gap: 6px;
    transition: all var(--transition-fast);
    white-space: nowrap;
}

.favorites-btn i {
    font-size: 0.85rem;
}

.favorites-btn:hover {
    color: var(--warning);
    background: rgba(245, 158, 11, 0.1);
}

.favorites-btn.active {
    background: var(--warning);
    color: var(--bg-primary);
}

.favorites-btn.active i {
    color: var(--bg-primary);
}

/* Search Icon Button */
.search-icon-btn {
    background: transparent;
    border: none;
    color: var(--text-secondary);
    padding: 8px 12px;
    border-radius: 40px;
    cursor: pointer;
    transition: all var(--transition-fast);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1rem;
}

.search-icon-btn:hover {
    color: var(--accent);
    background: rgba(249, 115, 22, 0.1);
}

.search-icon-btn.active {
    color: var(--accent);
    background: rgba(249, 115, 22, 0.15);
}

/* Search Input Container */
.search-input-container {
    display: none;
    animation: slideDown 0.3s ease;
    margin-top: 10px;
}

.search-input-container.show {
    display: block;
}

.search-input-wrapper {
    position: relative;
    width: 100%;
}

.search-input-wrapper i {
    position: absolute;
    left: 16px;
    top: 50%;
    transform: translateY(-50%);
    color: var(--text-muted);
    font-size: 1rem;
}

.search-input-field {
    width: 100%;
    background: var(--bg-card);
    border: 1px solid var(--border-color);
    border-radius: 40px;
    padding: 10px 16px 10px 44px;
    color: var(--text-primary);
    font-size: 0.85rem;
    outline: none;
    transition: all var(--transition-fast);
}

.search-input-field:focus {
    border-color: var(--accent);
    box-shadow: 0 0 0 2px var(--accent-glow);
}

.search-input-field::placeholder {
    color: var(--text-muted);
}

@keyframes slideDown {
    from {
        opacity: 0;
        transform: translateY(-10px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* Channel List */
.channel-list {
    flex: 1;
    overflow-y: auto;
    padding: 0.5rem 0.75rem 1rem 0.75rem;
    scroll-behavior: smooth;
    background: var(--bg-secondary);
}

.channel-item {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 0.8rem 1rem;
    margin: 4px 0;
    border-radius: 14px;
    background: var(--bg-card);
    transition: all var(--transition-fast);
    cursor: pointer;
    border-left: 3px solid transparent;
}

.channel-item:hover {
    background: var(--bg-hover);
    transform: translateX(2px);
}

.channel-item.active {
    background: var(--bg-hover);
    border-left: 3px solid var(--accent);
    box-shadow: var(--shadow-sm);
}

/* Light theme - ensure border size is exactly the same */
[data-theme="light"] .channel-item.active {
    background: var(--bg-hover);
    border-left: 3px solid var(--accent);
    box-shadow: var(--shadow-sm);
}

/* Ensure no other rules override the border */
[data-theme="light"] .channel-item {
    border-left: 3px solid transparent;
}

/* Channel Logo */
.channel-logo-wrapper {
    width: 48px;
    height: 48px;
    flex-shrink: 0;
}

.channel-logo-img {
    width: 48px;
    height: 48px;
    border-radius: 12px;
    object-fit: cover;
    background: var(--bg-tertiary);
}

.channel-logo {
    width: 48px;
    height: 48px;
    background: var(--bg-tertiary);
    border-radius: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: bold;
    font-size: 1.1rem;
    color: var(--accent);
    text-transform: uppercase;
    flex-shrink: 0;
}

.channel-logo.movie-logo {
    background: linear-gradient(135deg, var(--accent), var(--accent-dark));
    color: white;
}

.channel-logo.radio-logo {
    background: linear-gradient(135deg, var(--warning), #d97706);
    color: var(--bg-primary);
}

.channel-info-side {
    flex: 1;
    overflow: hidden;
}

.channel-name {
    font-weight: 600;
    font-size: 0.95rem;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    display: flex;
    align-items: center;
    gap: 8px;
    color: var(--text-primary);
}

.channel-category {
    font-size: 0.7rem;
    color: var(--text-muted);
    margin-top: 4px;
}

.channel-favorite {
    flex-shrink: 0;
}

.favorite-icon {
    color: var(--warning);
    font-size: 0.85rem;
    cursor: pointer;
    transition: transform 0.2s ease;
}

.favorite-icon:hover {
    transform: scale(1.1);
}

.favorite-icon.far {
    color: var(--text-muted);
}

.loading-spinner {
    text-align: center;
    padding: 2rem;
    color: var(--text-muted);
}

.empty-state {
    text-align: center;
    padding: 3rem 1rem;
    color: var(--text-muted);
}

.empty-state i {
    font-size: 3rem;
    margin-bottom: 1rem;
    opacity: 0.5;
}

/* Scroll to Top Button */
.scroll-to-top {
    position: absolute;
    bottom: 20px;
    right: 20px;
    width: 44px;
    height: 44px;
    background: linear-gradient(135deg, var(--accent), var(--accent-dark));
    border: none;
    border-radius: 50%;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 100;
    opacity: 0;
    visibility: hidden;
    transition: all var(--transition-normal);
    box-shadow: var(--shadow-md);
    color: white;
    font-size: 1.1rem;
}

.scroll-to-top.show {
    opacity: 1;
    visibility: visible;
}

.scroll-to-top:hover {
    transform: translateY(-3px);
    box-shadow: 0 6px 20px rgba(249, 115, 22, 0.4);
}

.scroll-to-top:active {
    transform: translateY(0);
}

/* Responsive */
@media (max-width: 1024px) {
    .channel-sidebar {
        width: 320px;
    }
    
    .filter-btn, .dropdown-btn, .favorites-btn {
        padding: 6px 12px;
        font-size: 0.75rem;
    }
    
    .channel-logo-wrapper,
    .channel-logo-img,
    .channel-logo {
        width: 40px;
        height: 40px;
    }
}

@media (max-width: 640px) and (orientation: portrait) {
    .channel-sidebar {
        width: 100%;
        flex: 1;
    }
    
    .sidebar-header {
        padding: 0.6rem 1rem 0.4rem;
        box-shadow: 0 2px 8px rgba(0, 0, 0, 0.2);
    }
    
    .filter-row {
        gap: 6px;
        flex-wrap: wrap;
    }
    
    .filter-btn, .dropdown-btn, .favorites-btn {
        padding: 5px 10px;
        font-size: 0.7rem;
    }
    
    .channel-list {
        padding: 0.25rem 0.5rem 0.5rem 0.5rem;
    }
    
    .channel-item {
        padding: 0.5rem 0.7rem;
        gap: 8px;
    }
    
    .channel-logo-wrapper,
    .channel-logo-img,
    .channel-logo {
        width: 36px;
        height: 36px;
    }
    
    .channel-name {
        font-size: 0.8rem;
    }
}

@media (max-width: 480px) {
    .channel-logo-wrapper,
    .channel-logo-img,
    .channel-logo {
        width: 32px;
        height: 32px;
    }
}

