/* Tag/chip input widget for the "Other Diagnoses" field.
   Progressively enhances a hidden comma-separated field into removable chips. */

.diagnosis-tags-widget {
    position: relative;
}

.diagnosis-tags-box {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 6px;
    min-height: 42px;
    padding: 6px 8px;
    border: 1px solid #ced4da;
    border-radius: 5px;
    background-color: #fff;
    cursor: text;
}

.diagnosis-tags-box.is-focused {
    border-color: #45408f;
    box-shadow: 0 0 0 0.15rem rgba(69, 64, 143, 0.15);
}

.diagnosis-tag-chip {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    max-width: 100%;
    padding: 3px 8px;
    font-size: 0.85rem;
    line-height: 1.3;
    color: #fff;
    background-color: #45408f;
    border-radius: 12px;
    word-break: break-word;
}

.diagnosis-tag-chip .diagnosis-tag-remove {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 16px;
    height: 16px;
    font-size: 0.9rem;
    line-height: 1;
    color: #fff;
    cursor: pointer;
    border-radius: 50%;
    opacity: 0.85;
}

.diagnosis-tag-chip .diagnosis-tag-remove:hover {
    opacity: 1;
    background-color: rgba(255, 255, 255, 0.25);
}

.diagnosis-tags-input {
    flex: 1 1 120px;
    min-width: 120px;
    border: none;
    outline: none;
    background: transparent;
    font-size: 0.9rem;
    padding: 4px 2px;
}

/* Keep the jQuery UI autocomplete dropdown above modals/panels */
.ui-autocomplete.diagnosis-tags-menu {
    z-index: 10000;
    max-height: 260px;
    overflow-y: auto;
    overflow-x: hidden;
}
