.o-mail-DiscussSidebar {
    .o-mail-DiscussSidebarCategory-icon {
        width: 15px;
        height: 15px;
    }
}

$o-mail-DiscussSidebarChannel-borderOpacity: .1;

.o-mail-DiscussSidebarChannel-container {
    --border-opacity: var(--mail-DiscussSidebarChannel-borderOpacity, #{$o-mail-DiscussSidebarChannel-borderOpacity});
    gap: 1px;

    &.o-bordered {
        background-color: var(---mail-DiscussSidebarChannel-borderedBgColor, mix($white, $dark, 99%)) !important;
    }
}

.o-mail-DiscussSidebarChannel-country {
    bottom: -2px;
    left: -4px;
    width: 12px;
}

.o-mail-DiscussSidebar-floatingMenu {
    max-width: 250px !important;
    --border-opacity: 0.25;
}

.o-mail-DiscussSidebar-item {
    line-height: 2; // so that same height as actions
    background-color: inherit !important;

    &:hover .o-mail-DiscussSidebarChannel-commands {
        display: flex !important;
        .btn-group .btn {
            &:hover {
                border-color: rgba($o-action, .25);
                background-color: $o-view-background-color !important;
            }
            &:not(:hover) {
                border-color: transparent;
                background-color: transparent;
            }
        }
    }
}

.o-mail-DiscussSidebarCategory-toggler {
    &.o-compact {
        font-size: .65rem;
    }
    &:not(.o-compact) {
        line-height: 2.35; // so that same height as actions, so folding doesn't resize
    }
}

.o-mail-DiscussSidebarChannel-badge.o-nonCompact {
    margin-right: map-get($spacers, 2) + map-get($spacers, 2) / 2;
}

.o-mail-DiscussSidebarChannel-itemMain {
    background-color: inherit !important; // Not 'bg-inherit' so it cancels btn hover effect too
}

.o-mail-DiscussSidebarChannel-threadIcon {
    font-size: xx-small;
    width: 13px;
    height: 13px;
}

.o-mail-DiscussSidebarChannel-indicatorCompact {
    top: 3px;
    left: 3px;
}

.o-mail-DiscussSidebarChannel-subChannel.o-nonCompact {
    margin-left: map-get($spacers, 4) + map-get($spacers, 2) + map-get($spacers, 1);
}

.o-mail-DiscussSidebar-unreadIndicator {
    font-size: 0.35rem;
    left: 6px;
    opacity: 35%;

    &.o-compact {
        left: 1px;
    }

    .o-mail-DiscussSidebarSubchannel &:not(.o-compact) {
        left: 12px;
    }
}

.o-mail-DiscussSidebarCategories-quickSearchBtn {
    padding-top: map-get($spacers, 1) + map-get($spacers, 2) / 2; // so that button is square like other items
    padding-bottom: map-get($spacers, 1) + map-get($spacers, 2) / 2; // so that button is square like other items

    &.o-active {
        background-color: rgba($o-action, .75);
        color: #fff;
    }
}

.o-mail-DiscussSidebarQuickSearchInput {
    outline: 1px solid rgba($border-color, 1);
    outline-offset: -1px;

    &.o-active {
        outline-color: $o-action;
    }
}

.o-mail-DiscussSidebarSubchannel svg {
    color: var(--mail-DiscussSidebarSubchannel-svgColor, $gray-300);
}
