/* ============================================
   ESTILOS GLOBAIS DO BSMULTISELECT
   ============================================ */

/* Badges (chips) dos itens selecionados */
.dashboardcode-bsmultiselect .badge {
    max-width: 350px;
    display: inline-flex !important;
    align-items: center;
    gap: 4px;
    font-size: 0.875rem;
    padding: 0.35em 0.65em;
    font-weight: 500;
    margin: 0.125rem;
}

/* Truncar apenas o texto, não o botão X */
.dashboardcode-bsmultiselect .badge span:first-child {
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
    flex: 1;
    min-width: 0;
}

/* Garantir que o botão X sempre apareça */
.dashboardcode-bsmultiselect .badge button,
.dashboardcode-bsmultiselect .badge .btn-close {
    flex-shrink: 0;
    margin-left: auto;
    font-size: 0.7em;
    padding: 0.25em;
    opacity: 0.8;
    background-size: 0.7em;
}

.dashboardcode-bsmultiselect .badge .btn-close:hover {
    opacity: 1;
}

/* Truncar texto no dropdown */
.dashboardcode-bsmultiselect .dropdown-menu label {
    max-width: 100%;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
    display: block;
}

/* Truncar texto nos itens selecionados (chips) */
.dashboardcode-bsmultiselect .dropdown-toggle .badge-primary,
.dashboardcode-bsmultiselect .dropdown-toggle .badge {
    max-width: 350px;
    display: inline-flex !important;
    align-items: center;
}

/* Ajustar tamanho do container do BsMultiSelect */
.dashboardcode-bsmultiselect .dropdown-toggle {
    max-width: 100%;
    overflow: hidden;
}

/* Campo desabilitado - BsMultiSelect */
.dashboardcode-bsmultiselect.disabled-field {
    opacity: 0.6 !important;
    pointer-events: none !important;
    cursor: not-allowed !important;
}

.dashboardcode-bsmultiselect.disabled-field .dropdown-toggle {
    background-color: #e9ecef !important;
    cursor: not-allowed !important;
}

/* ============================================
   ESTILOS ESPECÍFICOS PARA CAMPO DE ALERGIAS
   ============================================ */

/* Container principal do campo de alergias */
.dashboardcode-bsmultiselect.allergies-multiselect {
    position: relative;
}

/* Área de picks (tags selecionadas) */
.allergies-picks {
    min-height: 38px;
    border: 1px solid #ced4da;
    border-radius: 0.375rem;
    background-color: #fff;
    transition: border-color 0.15s ease-in-out, box-shadow 0.15s ease-in-out;
}

.allergies-picks:focus-within {
    border-color: #80bdff;
    box-shadow: 0 0 0 0.2rem rgba(0, 123, 255, 0.25);
    outline: 0;
}

/* Estilo para quando há tags selecionadas */
.allergies-picks:not(:empty) {
    padding: 0.25rem 0.5rem;
}

/* Input de filtro dentro do campo de alergias */
.allergy-filter-input {
    font-size: 0.875rem;
    padding: 0.25rem 0;
    border: none;
    outline: none;
    background: transparent;
    min-width: 120px;
    flex: 1;
}

.allergy-filter-input::placeholder {
    color: #6c757d;
    opacity: 0.6;
}

/* Dropdown de escolhas */
.allergies-choices {
    max-height: 300px;
    overflow-y: auto;
    z-index: 1050;
}

/* Itens do dropdown */
.allergy-choice {
    padding: 0.5rem 1rem;
    cursor: pointer;
    font-size: 0.875rem;
}

.allergy-choice:hover {
    background-color: #f8f9fa;
    color: #0d6efd;
}

.allergy-choice.selected {
    background-color: #0d6efd;
    color: white;
}