/*
 * Seletor unificado de canais do Board.
 * O antigo seletor Unidade/Canal/Formulário do navbar deixa de ser exibido.
 */
.desktop-formfilter {
    display: none !important;
}

.ef-board-channel-panel {
    position: relative;
}

.ef-board-channel-panel .easy-flows-overlay-body {
    padding-top: 14px;
    padding-bottom: 0;
}

/* Abas */
.ef-board-channel-tabs {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 4px;
    margin-bottom: 12px;
    padding: 4px;
    border: 1px solid #dbe7f2;
    border-radius: 12px;
    background: #f8fafc;
}

.ef-board-channel-tab {
    min-height: 36px;
    border: 0;
    border-radius: 9px;
    background: transparent;
    color: #64748b;
    font-size: 0.82rem;
    font-weight: 700;
    cursor: pointer;
    transition: background 0.16s ease, color 0.16s ease, box-shadow 0.16s ease;
}

.ef-board-channel-tab:hover,
.ef-board-channel-tab:focus {
    color: #0f6073;
    outline: none;
}

.ef-board-channel-tab.is-active {
    color: #0f6073;
    background: #ffffff;
    box-shadow: 0 2px 8px rgba(15, 96, 115, 0.12);
}

/* Pesquisa e unidade */
.ef-board-channel-search-wrap {
    position: relative;
    margin-bottom: 12px;
}

.ef-board-channel-search-wrap > i {
    position: absolute;
    top: 50%;
    left: 12px;
    z-index: 2;
    color: #94a3b8;
    transform: translateY(-50%);
    pointer-events: none;
}

.ef-board-channel-search-wrap .form-control {
    height: 38px;
    padding-left: 34px;
    border-color: #dbe7f2;
    border-radius: 10px;
    font-size: 0.86rem;
}

.ef-board-channel-search-wrap .form-control:focus {
    border-color: #8ed2df;
    box-shadow: 0 0 0 0.15rem rgba(23, 162, 184, 0.12);
}

.ef-board-channel-unit-wrap {
    display: none;
    margin-bottom: 12px;
}

.ef-board-channel-unit-wrap.is-visible {
    display: block;
}

.ef-board-channel-unit-wrap label {
    display: block;
    margin-bottom: 4px;
    color: #64748b;
    font-size: 0.76rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.04em;
}

.ef-board-channel-unit-wrap .form-control {
    height: 36px;
    border-color: #dbe7f2;
    border-radius: 9px;
    font-size: 0.84rem;
}

/* Todos os canais */
.ef-board-channel-clear-row {
    margin-bottom: 16px;
}

.ef-board-channel-all-toggle {
    width: 100%;
    min-height: 38px;
    display: grid;
    grid-template-columns: 18px minmax(0, 1fr) auto;
    align-items: center;
    gap: 9px;
    margin: 0;
    padding: 7px 12px;
    border: 1px solid #d7e3f0;
    border-radius: 12px;
    background: #f8fbff;
    color: #29445c;
    font-size: 0.82rem;
    font-weight: 700;
    cursor: pointer;
    transition: background 0.16s ease, border-color 0.16s ease, color 0.16s ease;
}

.ef-board-channel-all-toggle:hover {
    border-color: #9edcea;
    background: #e8f7fb;
    color: #0f6073;
}

.ef-board-channel-all-state {
    color: #64748b;
    font-size: 0.72rem;
    font-weight: 600;
}

.ef-board-channel-all-checkbox,
.ef-board-channel-group-checkbox,
.ef-board-channel-checkbox {
    width: 18px;
    height: 18px;
    margin: 0;
    accent-color: #0d6efd;
    cursor: pointer;
}

/* Escopos */
.ef-board-channel-scope {
    display: none;
}

.ef-board-channel-scope.is-active {
    display: block;
}

.ef-board-channel-section[hidden],
.ef-board-channel-entry[hidden] {
    display: none !important;
}

/* Grupos */
.ef-board-channel-section + .ef-board-channel-section {
    margin-top: 16px;
}

.ef-board-channel-group-toggle {
    display: flex;
    align-items: center;
    gap: 9px;
    min-height: 28px;
    margin-bottom: 7px;
    padding: 0 6px;
    cursor: pointer;
    user-select: none;
}

.ef-board-channel-group-toggle::after {
    content: '';
    min-width: 18px;
    height: 1px;
    flex: 1 1 auto;
    margin-left: 4px;
    background: #dbe7f2;
}

.ef-board-channel-group-toggle:hover {
    color: #334155;
}

.ef-board-channel-group-title {
    min-width: 0;
    flex: 0 1 auto;
    white-space: nowrap;
}

.ef-board-channel-group-checkbox {
    order: -1;
    flex: 0 0 auto;
}

/* Bloco compacto de canais */
.ef-board-channel-section .easy-flows-list {
    overflow: hidden;
    border: 1px solid #e2e8f0;
    border-radius: 12px;
    background: #f8fafc;
}

.ef-board-channel-section .easy-flows-list li + li {
    margin-top: 0;
}

.ef-board-channel-entry {
    position: relative;
    min-height: 78px;
    padding-left: 44px;
    background: #f8fafc;
}

.ef-board-channel-entry + .ef-board-channel-entry {
    border-top: 1px solid #e2e8f0;
}

.ef-board-channel-panel .easy-flows-list-button.ef-board-channel-card {
    position: relative;
    min-height: 78px;
    height: 78px;
    display: flex;
    flex-direction: column;
    align-items: stretch;
    justify-content: center;
    gap: 3px;
    width: 100%;
    padding: 10px 88px 10px 12px;
    border: 0;
    border-left: 1px solid #e2e8f0;
    border-radius: 0;
    background: #ffffff;
    color: #253444;
    cursor: pointer;
    transition: background 0.16s ease, box-shadow 0.16s ease, color 0.16s ease;
}

.ef-board-channel-panel .ef-board-channel-card:hover {
    background: #f8fbff;
}

.ef-board-channel-panel:not(.is-all-mode) .ef-board-channel-card.is-selected {
    background: #eefbfe;
    color: #0f6073;
    box-shadow: inset 3px 0 0 #17a2b8;
}

.ef-board-channel-panel.is-all-mode .ef-board-channel-card.is-selected {
    background: #ffffff;
    box-shadow: none;
}

.ef-board-channel-panel.is-all-mode .ef-board-channel-card.is-selected:hover {
    background: #f8fbff;
}

.ef-board-channel-main {
    min-width: 0;
    width: 100%;
    display: flex;
    flex: 0 1 auto;
    flex-direction: column;
    justify-content: center;
    gap: 2px;
    line-height: 1.22;
    word-break: break-word;
}

.ef-board-channel-main > span:first-child {
    display: block;
    overflow: hidden;
    width: 100%;
    padding-right: 0;
    white-space: nowrap;
    text-overflow: ellipsis;
    font-size: 0.86rem;
}

.ef-board-channel-main > span:first-child i {
    margin-right: 6px;
}

.ef-board-channel-main .easy-flows-list-meta {
    display: block;
    overflow: hidden;
    margin-top: 3px;
    margin-left: 24px;
    color: #7b8794;
    font-size: 0.75rem;
    font-weight: 500;
    line-height: 1.2;
    text-overflow: ellipsis;
    white-space: nowrap;
}

/* Checkbox externo à esquerda e ação Somente à direita */
.ef-board-channel-selection {
    position: absolute;
    inset: 0;
    z-index: 2;
    pointer-events: none;
}

.ef-board-channel-checkbox {
    position: absolute;
    top: 14px;
    left: -32px;
    pointer-events: auto;
}

.ef-board-channel-only {
    position: absolute;
    right: 10px;
    bottom: 10px;
    min-width: 68px;
    min-height: 26px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 4px 9px;
    border: 1px solid #cbd5e1;
    border-radius: 8px;
    background: #ffffff;
    color: #475569;
    font-size: 0.72rem;
    font-weight: 700;
    line-height: 1;
    opacity: 1;
    pointer-events: auto;
    transition: background 0.14s ease, border-color 0.14s ease, color 0.14s ease, box-shadow 0.14s ease;
}

.ef-board-channel-only::before {
    content: none;
}

.ef-board-channel-only:hover,
.ef-board-channel-only:focus {
    border-color: #7dd3fc;
    background: #e0f2fe;
    color: #0369a1;
    box-shadow: 0 0 0 0.12rem rgba(14, 165, 233, 0.12);
    outline: none;
}

/* O papel já é identificado pelo cabeçalho do grupo. */
.ef-board-channel-panel .easy-flows-role-badge {
    display: none !important;
}

/* Estados vazios */
.ef-board-channel-empty,
.ef-board-channel-no-results {
    padding: 16px 12px;
    border: 1px dashed #cbd5e1;
    border-radius: 10px;
    background: #f8fafc;
    color: #64748b;
    font-size: 0.84rem;
    line-height: 1.45;
    text-align: center;
}

/* Rodapé fixo */
.ef-board-channel-actions {
    position: sticky;
    bottom: 0;
    z-index: 5;
    margin: 18px -18px 0;
    padding: 12px 18px 14px;
    border-top: 1px solid #e2e8f0;
    background: rgba(255, 255, 255, 0.97);
    box-shadow: 0 -8px 20px rgba(15, 23, 42, 0.06);
    backdrop-filter: blur(5px);
}

.ef-board-channel-selection-summary {
    display: flex;
    align-items: baseline;
    justify-content: space-between;
    gap: 10px;
    margin-bottom: 9px;
    color: #334155;
    font-size: 0.78rem;
}

.ef-board-channel-selection-summary strong {
    font-size: 0.82rem;
}

.ef-board-channel-selection-summary span {
    color: #64748b;
    font-size: 0.72rem;
    text-align: right;
}

.ef-board-channel-feedback {
    margin-bottom: 9px;
    padding: 7px 9px;
    border: 1px solid #fed7aa;
    border-radius: 8px;
    background: #fff7ed;
    color: #9a3412;
    font-size: 0.76rem;
    line-height: 1.35;
}

.ef-board-channel-feedback[hidden] {
    display: none !important;
}

.ef-board-channel-action-buttons {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 8px;
}

.ef-board-channel-action-buttons .btn {
    min-height: 34px;
    border-radius: 8px;
    font-size: 0.78rem;
    font-weight: 700;
}

/* Badge no ícone do sidebar */
.ef-board-channel-icon-badge {
    position: absolute;
    top: 4px;
    right: 4px;
    min-width: 17px;
    height: 17px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 0 4px;
    border: 2px solid #223447;
    border-radius: 999px;
    background: #0d6efd;
    color: #ffffff;
    font-size: 0.58rem;
    font-weight: 800;
    line-height: 1;
}

.ef-board-channel-icon-badge[hidden] {
    display: none !important;
}

/* Bloqueio durante envio */
.ef-board-channel-panel.is-submitting {
    pointer-events: none;
}

.ef-board-channel-panel.is-submitting::after {
    content: '';
    position: absolute;
    inset: 0;
    z-index: 10;
    background: rgba(255, 255, 255, 0.45);
}

@media (max-width: 767.98px) {
    .ef-board-channel-panel .easy-flows-list-button.ef-board-channel-card {
        padding-right: 78px;
    }

    .ef-board-channel-only {
        right: 8px;
        bottom: 10px;
        min-width: 60px;
        padding-right: 7px;
        padding-left: 7px;
        font-size: 0.68rem;
    }
}
