/* =============================================================
   FMS360 Filtro de Produtos — Estilos Frontend
   Todos os seletores escopados em .fms360-filtro-container
   ============================================================= */

.fms360-filtro-container {
    font-family: inherit;
    font-size: 14px;
    width: 100%;
    color: #333;
}

/* ── Painel ──────────────────────────────────────────────── */

.fms360-panel {
    border: 1px solid #ddd;
    border-radius: 4px;
    margin-bottom: 12px;
    background: #fff;
    overflow: hidden;
}

.fms360-panel--active {
    border-color: #7f54b3;
}

/* ── Cabecalho do Painel ─────────────────────────────────── */

.fms360-panel__header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 10px 14px;
    background: #f5f5f5;
    border-bottom: 1px solid #ddd;
    user-select: none;
}

.fms360-panel--collapsed .fms360-panel__header {
    border-bottom: none;
}

.fms360-panel__title {
    font-weight: 700;
    font-size: 13px;
    letter-spacing: 0.05em;
    text-transform: uppercase;
    color: #222;
}

.fms360-panel__toggle {
    background: none;
    border: 1px solid #bbb;
    border-radius: 3px;
    width: 24px;
    height: 24px;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 0;
    transition: background 0.15s;
    flex-shrink: 0;
    color: #555;
    font-size: 18px;
    line-height: 1;
}

.fms360-panel__toggle::before {
    content: '\2013'; /* en dash — */
    font-size: 16px;
    line-height: 1;
}

.fms360-panel__toggle[aria-expanded="false"]::before {
    content: '+';
}

.fms360-panel__toggle:hover {
    background: #e0e0e0;
}

/* ── Corpo Colapsavel ────────────────────────────────────── */

.fms360-panel__body {
    padding: 10px 14px 8px;
}

.fms360-panel--collapsed .fms360-panel__body {
    display: none;
}

/* ── Campo de Busca ──────────────────────────────────────── */

.fms360-panel__search-wrap {
    margin-bottom: 8px;
    position: sticky;
    top: 0;
    background: #fff;
    z-index: 1;
    padding-bottom: 2px;
}

.fms360-panel__search {
    width: 100%;
    padding: 6px 10px;
    border: 1px solid #ccc;
    border-radius: 3px;
    font-size: 13px;
    box-sizing: border-box;
    outline: none;
    color: #333;
}

.fms360-panel__search:focus {
    border-color: #7f54b3;
    box-shadow: 0 0 0 2px rgba(127, 84, 179, 0.12);
}

.fms360-panel__search::placeholder {
    color: #aaa;
}

/* ── Lista de Checkboxes (com scroll) ────────────────────── */

.fms360-panel__list {
    list-style: none;
    margin: 0;
    padding: 0;
    max-height: 220px;
    overflow-y: auto;
    scrollbar-width: thin;
    scrollbar-color: #ccc #f5f5f5;
}

.fms360-panel__list::-webkit-scrollbar {
    width: 5px;
}

.fms360-panel__list::-webkit-scrollbar-track {
    background: #f5f5f5;
}

.fms360-panel__list::-webkit-scrollbar-thumb {
    background: #ccc;
    border-radius: 3px;
}

.fms360-panel__item {
    padding: 1px 0;
}

.fms360-panel__item--hidden {
    display: none;
}

/* Item selecionado: fixo no topo com destaque suave */
.fms360-panel__item--selected .fms360-panel__label {
    background: #f0eaf8;
    border-radius: 3px;
}

.fms360-panel__item--selected .fms360-panel__term-name {
    font-weight: 600;
    color: #5b3a8a;
}

/* Separador entre selecionados e nao selecionados */
.fms360-panel__separator {
    height: 1px;
    background: #ddd;
    margin: 5px 0;
    list-style: none;
}

.fms360-panel__label {
    display: flex;
    align-items: center;
    gap: 8px;
    cursor: pointer;
    padding: 4px 3px;
    border-radius: 3px;
    transition: background 0.1s;
    color: #444;
}

.fms360-panel__label:hover {
    background: #f3eeff;
}

.fms360-panel__checkbox {
    flex-shrink: 0;
    width: 15px;
    height: 15px;
    cursor: pointer;
    accent-color: #7f54b3;
    margin: 0;
}

.fms360-panel__term-name {
    flex: 1;
    font-size: 13px;
    line-height: 1.3;
}

.fms360-panel__count {
    color: #999;
    font-size: 11px;
    white-space: nowrap;
}

/* ── Rodape: Botao Remover Filtro ────────────────────────── */

.fms360-panel__footer {
    padding: 7px 0 2px;
    border-top: 1px solid #eee;
    margin-top: 7px;
    text-align: center;
}

.fms360-panel__remove {
    display: inline-block;
    font-size: 12px;
    color: #555;
    text-decoration: none;
    padding: 5px 16px;
    border: 1px solid #ccc;
    border-radius: 3px;
    background: #fafafa;
    transition: background 0.15s, color 0.15s;
    width: 100%;
    box-sizing: border-box;
    text-align: center;
    cursor: pointer;
}

.fms360-panel__remove:hover {
    background: #f5eeff;
    border-color: #7f54b3;
    color: #5b3a8a;
}

/* ── Utilitarios ─────────────────────────────────────────── */

.fms360-hidden {
    display: none !important;
}

.fms360-no-filters {
    color: #999;
    font-style: italic;
    font-size: 13px;
}
