/* Combos remotos: misma apariencia que select.form-control.ei-select (ej. ConsultationService_GroupService) */
.ei-select-remote-wrapper {
    position: relative;
    width: 100%;
}

.ei-select-remote-wrapper select.ei-select-remote-native {
    position: absolute;
    width: 1px;
    height: 1px;
    opacity: 0;
    pointer-events: none;
}

.ei-select-remote-display.form-control.ei-select {
    display: block;
    box-sizing: border-box;
    width: 100%;
    height: auto;
    min-height: 0;
    padding: 6px 8px;
    padding-right: 28px;
    border: 1px solid #ccc;
    border-radius: 2px;
    background: #fff;
    box-shadow: none;
    cursor: pointer;
    position: relative;
    overflow: hidden;
    white-space: nowrap;
    text-overflow: ellipsis;
}

.ei-select-remote-display.form-control.ei-select::after {
    content: '';
    position: absolute;
    right: 8px;
    top: 50%;
    margin-top: -2px;
    border: 4px solid transparent;
    border-top-color: #666;
    pointer-events: none;
}

.ei-select-remote-display.form-control.ei-select.placeholder {
    color: #999;
}

.ei-select-remote-display.form-control.ei-select:focus {
    background: #fff;
    border-color: #B4B4B4;
    box-shadow: none;
    outline: none;
}

.ei-select-remote-panel {
    display: none;
    position: absolute;
    z-index: 1050;
    left: 0;
    right: 0;
    margin-top: 1px;
    background: #fff;
    border: 1px solid #ccc;
    border-radius: 2px;
    box-shadow: 0 2px 6px rgba(0, 0, 0, 0.08);
}

.ei-select-remote-panel.open {
    display: block;
}

.ei-select-remote-search {
    width: 100%;
    box-sizing: border-box;
    border: none;
    border-bottom: 1px solid #e8ebed;
    padding: 6px 8px;
    height: auto;
    outline: none;
}

.ei-select-remote-list {
    max-height: 240px;
    overflow-y: auto;
}

.ei-select-remote-item {
    padding: 6px 8px;
    cursor: pointer;
    border-bottom: 1px solid #f5f5f5;
}

.ei-select-remote-item:hover,
.ei-select-remote-item.active {
    background: #f0f7ff;
}

.ei-select-remote-item-name {
    display: block;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.ei-select-remote-status {
    padding: 6px 8px;
    color: #6c757d;
}

.ei-select-remote-clear {
    position: absolute;
    right: 22px;
    top: 50%;
    transform: translateY(-50%);
    color: #999;
    cursor: pointer;
    line-height: 1;
    display: none;
}

.ei-select-remote-wrapper.has-value .ei-select-remote-clear {
    display: block;
}

/* Carga masiva: tipografia compacta igual a los demas combos del formulario */
#newServiceModal .ei-select-remote-wrapper,
#newUserModal .ei-select-remote-wrapper {
    font-size: 12px;
    line-height: 1.35;
}

#newServiceModal .ei-select-remote-display.form-control.ei-select,
#newUserModal .ei-select-remote-display.form-control.ei-select,
#newServiceModal .ei-select-remote-panel,
#newUserModal .ei-select-remote-panel,
#newServiceModal .ei-select-remote-search,
#newUserModal .ei-select-remote-search,
#newServiceModal .ei-select-remote-item,
#newUserModal .ei-select-remote-item,
#newServiceModal .ei-select-remote-status,
#newUserModal .ei-select-remote-status {
    font-size: 12px;
    line-height: 1.35;
}

/* Combo ancho: CUDS / ConsultationService_Code — panel amplio y descripciones multilinea (solo Name) */
.ei-select-remote-wrapper.ei-select-remote-wide .ei-select-remote-panel {
    min-width: min(640px, 95vw);
    width: max(100%, 640px);
    left: 0;
    right: auto;
}

.ei-select-remote-wrapper.ei-select-remote-wide .ei-select-remote-list {
    max-height: 360px;
}

.ei-select-remote-wrapper.ei-select-remote-wide .ei-select-remote-item {
    padding: 8px 10px;
    line-height: 1.4;
}

.ei-select-remote-wrapper.ei-select-remote-wide .ei-select-remote-item-name {
    white-space: normal;
    overflow: visible;
    text-overflow: unset;
    word-break: break-word;
}

.ei-select-remote-wrapper.ei-select-remote-wide .ei-select-remote-item-code {
    display: block;
    font-weight: 600;
    color: #333;
    margin-bottom: 2px;
}

.ei-select-remote-wrapper.ei-select-remote-wide .ei-select-remote-display.form-control.ei-select {
    white-space: normal;
    overflow: hidden;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    min-height: 2.6em;
    max-height: 3.2em;
    line-height: 1.35;
}