@use '@angular/material' as mat;

:host {
    display: flex;
    flex-direction: column;
    height: 100%;
    min-height: 0;
}

.scroll-viewport {
    height: 100%;
    overflow-x: hidden;
    width: 100%;

    ::ng-deep .cdk-virtual-scroll-content-wrapper {
        width: 100%;
        max-width: 100%;
    }
}

.search-panel {
    padding: 10px 0 0 0;
    display: flex;
    justify-content: center;
}

.search-bar {
    @include mat.form-field-density(-5);

    & {
        width: 96%;
    }
}

.all-channels-header {
    padding: 12px 16px 8px;
    flex-shrink: 0;
}

.all-channels-header__top {
    display: flex;
    align-items: center;
    gap: 8px;

    h2 {
        flex: 1;
        min-width: 0;
        overflow: hidden;
        margin: 0;
        color: var(--mat-sys-on-surface);
        font-size: 0.94rem;
        font-weight: 600;
        letter-spacing: 0;
        text-overflow: ellipsis;
        white-space: nowrap;
    }
}

.all-channels-sort-button {
    flex: 0 0 auto;
}

.all-channels-sidebar-toggle {
    flex: 0 0 auto;
    margin-right: -4px;
}

.all-channels-divider {
    height: 1px;
    background: var(--mat-sys-outline-variant);
    margin: 0 0 6px;
    opacity: 0.6;
    flex-shrink: 0;
}

#all-channels {
    flex: 1;
    min-height: 0;
    overflow: hidden;
}

.channel-list {
    overflow-x: hidden;
}

.channel-context-menu-anchor {
    position: fixed;
    width: 0;
    height: 0;
    opacity: 0;
    pointer-events: none;
}

:host ::ng-deep .search-bar div {
    border-radius: 20px;
}

:host ::ng-deep .search-bar div[matformfieldlineripple],
:host ::ng-deep .search-bar .mat-mdc-form-field-subscript-wrapper {
    display: none;
}

[type='search']::-webkit-search-cancel-button {
    -webkit-appearance: none;
    cursor: pointer;
    appearance: none;
    height: 10px;
    width: 10px;
    background-image: url('data:image/svg+xml;base64,PD94bWwgdmVyc2lvbj0iMS4wIiBlbmNvZGluZz0idXRmLTgiPz4NCjwhRE9DVFlQRSBzdmcgUFVCTElDICItLy9XM0MvL0RURCBTVkcgMS4xLy9FTiIgImh0dHA6Ly93d3cudzMub3JnL0dyYXBoaWNzL1NWRy8xLjEvRFREL3N2ZzExLmR0ZCI+DQo8c3ZnIHZlcnNpb249IjEuMSIgeG1sbnM9Imh0dHA6Ly93d3cudzMub3JnLzIwMDAvc3ZnIiB4bWxuczp4bGluaz0iaHR0cDovL3d3dy53My5vcmcvMTk5OS94bGluayIgeD0iMHB4IiB5PSIwcHgiDQoJIHZpZXdCb3g9IjAgMCA5NiA5NiIgZW5hYmxlLWJhY2tncm91bmQ9Im5ldyAwIDAgOTYgOTYiIHhtbDpzcGFjZT0icHJlc2VydmUiPg0KPHBvbHlnb24gZmlsbD0iI2VlZSIgcG9pbnRzPSI5NiwxNCA4MiwwIDQ4LDM0IDE0LDAgMCwxNCAzNCw0OCAwLDgyIDE0LDk2IDQ4LDYyIDgyLDk2IDk2LDgyIDYyLDQ4ICIvPg0KPC9zdmc+DQo=');
    background-size: 10px 10px;
    color: #fff;
}

.no-results {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: 48px 24px;
    text-align: center;
    height: calc(100vh - 220px);
}

.no-results-icon {
    font-size: 48px;
    width: 48px;
    height: 48px;
    opacity: 0.5;
    margin-bottom: 16px;
}

.no-results-title {
    font-size: 1.05rem;
    font-weight: 520;
    letter-spacing: -0.01em;
    margin-bottom: 8px;
}

.no-results-hint {
    opacity: 0.65;
    font-size: 0.85rem;
}

@media only screen and (max-width: 599px) {
    /* Mobile responsive tweaks if needed */
}
