.aniyab-cm-select {
    position: relative;
    display: flex;
    align-items: stretch;
    width: 100%;
}

.aniyab-cm-select-preview {
    display: none;
    align-items: center;
    justify-content: center;
    flex: 0 0 auto;
    padding: 0 0.5rem;
    border: 1px solid var(--bs-border-color, #ced4da);
    border-inline-end: none;
    border-radius: 0.375rem 0 0 0.375rem;
    background: var(--bs-body-bg, #fff);
}

.aniyab-cm-select.has-icon .aniyab-cm-select-preview {
    display: flex;
}

.aniyab-cm-select-icon {
    width: 22px;
    height: 22px;
    object-fit: contain;
    display: block;
}

.aniyab-cm-select-native {
    flex: 1 1 auto;
    min-width: 0;
}

.aniyab-cm-select.has-icon .aniyab-cm-select-native {
    border-start-start-radius: 0;
    border-end-start-radius: 0;
}

[dir="rtl"] .aniyab-cm-select.has-icon .aniyab-cm-select-preview {
    border-inline-end: 1px solid var(--bs-border-color, #ced4da);
    border-inline-start: none;
    border-radius: 0 0.375rem 0.375rem 0;
}

[dir="rtl"] .aniyab-cm-select.has-icon .aniyab-cm-select-native {
    border-start-start-radius: 0.375rem;
    border-end-start-radius: 0.375rem;
    border-start-end-radius: 0;
    border-end-end-radius: 0;
}

/* Account modal: custom closed trigger and open list. */
.ay-contacts-dialog .ay-field {
    max-width: none;
}

.ay-contacts .ay-field__control.ay-contacts-select,
.ay-contacts-dialog .ay-field__control.ay-contacts-select {
    padding: 0;
    overflow: visible;
}

.ay-cm-combo {
    position: relative;
    display: flex;
    flex: 1 1 auto;
    width: 100%;
    height: 100%;
    min-width: 0;
}

.ay-cm-combo__native {
    position: absolute;
    width: 1px;
    height: 1px;
    margin: -1px;
    padding: 0;
    overflow: hidden;
    clip: rect(0, 0, 0, 0);
    white-space: nowrap;
    border: 0;
    pointer-events: none;
}

.ay-cm-combo__trigger {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 8px;
    width: 100%;
    height: 100%;
    margin: 0;
    padding: 0 14px;
    border: 0;
    background: transparent;
    color: var(--ay-text-title, #302E2E);
    font: inherit;
    font-size: 14px;
    font-weight: 500;
    line-height: 24px;
    text-align: start;
    cursor: pointer;
}

.ay-cm-combo__trigger:focus-visible {
    outline: none;
}

.ay-cm-combo__lead {
    display: flex;
    align-items: center;
    gap: 8px;
    min-width: 0;
    flex: 1 1 auto;
}

.ay-cm-combo__value {
    min-width: 0;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.ay-cm-combo__value.is-placeholder {
    color: var(--ay-text-secondary, #737373);
    font-weight: 500;
}

.ay-cm-combo__icon {
    width: 20px;
    height: 20px;
    flex: 0 0 auto;
    object-fit: contain;
}

.ay-cm-combo__chevron {
    width: 16px;
    height: 16px;
    flex: 0 0 auto;
    color: var(--ay-brand-primary, #002D71);
    transition: transform 0.16s ease;
}

.ay-cm-combo.is-open .ay-cm-combo__chevron {
    transform: rotate(180deg);
}

.ay-contacts .ay-field:focus-within .ay-cm-combo.is-open,
.ay-cm-combo.is-open .ay-cm-combo__trigger {
    color: var(--ay-text-title, #302E2E);
}

.ay-cm-combo__panel {
    z-index: 1080;
    max-height: 280px;
    overflow: auto;
    padding: 6px;
    border: 1px solid var(--ay-brand-primary-pale, #B9D3F9);
    border-radius: 12px;
    background: #fff;
    box-shadow:
        0 12px 32px rgba(2, 45, 113, 0.16),
        0 1px 2px rgba(16, 24, 40, 0.06);
}

.ay-cm-combo__panel[hidden] {
    display: none !important;
}

.ay-cm-combo__list {
    margin: 0;
    padding: 0;
    list-style: none;
}

.ay-cm-combo__option {
    display: flex;
    align-items: center;
    justify-content: flex-start;
    gap: 10px;
    width: 100%;
    min-height: 40px;
    padding: 8px 12px;
    border: 0;
    border-radius: 8px;
    background: transparent;
    color: var(--ay-text-main, #404040);
    font: inherit;
    font-size: 14px;
    font-weight: 600;
    line-height: 22px;
    text-align: start;
    cursor: pointer;
}

.ay-cm-combo__option > span {
    flex: 1 1 auto;
    min-width: 0;
}

.ay-cm-combo__option:hover,
.ay-cm-combo__option:focus-visible,
.ay-cm-combo__option.is-active {
    background: var(--ay-brand-primary-paler, #EBF1FB);
    color: var(--ay-brand-primary-dark, #022251);
    outline: none;
}

.ay-cm-combo__option.is-selected {
    background: var(--ay-brand-primary-paler, #EBF1FB);
    color: var(--ay-brand-primary, #002D71);
}

.ay-cm-combo__panel::-webkit-scrollbar {
    width: 8px;
}

.ay-cm-combo__panel::-webkit-scrollbar-thumb {
    background: var(--ay-brand-primary-pale, #B9D3F9);
    border-radius: 999px;
}
