.searchable-select {
    display: grid;
    flex: 1 1 auto;
    gap: 0.4rem;
    min-width: 0;
    width: 100%;
}

.searchable-select__search {
    padding-right: 2.25rem;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='16' height='16' fill='%236c757d' viewBox='0 0 16 16'%3E%3Cpath d='M11.742 10.344a6.5 6.5 0 1 0-1.397 1.398h-.001q.044.06.098.115l3.85 3.85a1 1 0 0 0 1.415-1.414l-3.85-3.85a1 1 0 0 0-.115-.1zM12 6.5a5.5 5.5 0 1 1-11 0 5.5 5.5 0 0 1 11 0'/%3E%3C/svg%3E");
    background-repeat: no-repeat;
    background-position: right 0.75rem center;
}

.searchable-select__status {
    min-height: 1.1em;
    color: var(--bs-secondary-color, #6c757d);
    font-size: 0.78rem;
}

.searchable-select__status:empty {
    display: none;
}

.phone-country-picker {
    position: relative;
    min-width: 0;
    width: 100%;
}

.phone-input__controls.input-group {
    display: grid;
    grid-template-columns: auto minmax(0, 1fr);
    gap: 0.5rem;
    align-items: start;
}

.phone-input__controls > .input-group-text {
    min-height: 2.75rem;
    border-radius: var(--bs-border-radius, 0.375rem) !important;
}

.phone-input__controls > .phone-country-picker,
.phone-input__controls > [data-phone-input-target="country"] {
    grid-column: 2;
    min-width: 0;
    max-width: none !important;
}

.phone-input__controls > [data-phone-input-target="number"] {
    grid-column: 1 / -1;
    width: 100% !important;
    min-width: 0;
    min-height: 2.75rem;
    margin-left: 0 !important;
    border-radius: var(--bs-border-radius, 0.375rem) !important;
}

.phone-country-picker__search.form-control {
    width: 100%;
    min-width: 0;
    min-height: 2.75rem;
    border-radius: var(--bs-border-radius, 0.375rem) !important;
}

.phone-country-picker__results {
    position: absolute;
    z-index: 1050;
    top: calc(100% + 0.25rem);
    left: 0;
    right: 0;
    width: 100%;
    max-width: 100%;
    max-height: min(20rem, 45vh);
    max-height: min(20rem, 45dvh);
    overflow-x: hidden;
    overflow-y: auto;
    overscroll-behavior: contain;
    -webkit-overflow-scrolling: touch;
    background: var(--bs-body-bg, #fff);
    border: 1px solid var(--bs-border-color, #dee2e6);
    border-radius: 0.375rem;
    box-shadow: 0 0.5rem 1rem rgba(0, 0, 0, 0.15);
}

.phone-country-picker__option {
    display: flex;
    align-items: center;
    gap: 0.625rem;
    width: 100%;
    min-height: 2.75rem;
    padding: 0.5rem 0.75rem;
    color: inherit;
    text-align: left;
    background: transparent;
    border: 0;
    touch-action: manipulation;
}

.phone-country-picker__option:hover,
.phone-country-picker__option:focus-visible,
.phone-country-picker__option.is-active,
.phone-country-picker__option.is-selected {
    background: var(--bs-tertiary-bg, #f8f9fa);
    outline: 0;
}

.phone-country-picker__option.is-selected {
    font-weight: 600;
}

.phone-country-picker__search:focus-visible {
    position: relative;
    z-index: 2;
}

.phone-country-picker__flag {
    flex: 0 0 auto;
    object-fit: cover;
}

.phone-country-picker__name {
    min-width: 0;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.phone-country-picker__dial {
    flex: 0 0 auto;
    margin-left: auto;
    color: var(--bs-secondary-color, #6c757d);
    font-variant-numeric: tabular-nums;
}

.phone-country-picker__empty {
    padding: 0.75rem;
    color: var(--bs-secondary-color, #6c757d);
    font-size: 0.875rem;
}

@media (pointer: coarse) {
    .phone-country-picker__search.form-control,
    .phone-input__controls > [data-phone-input-target="number"],
    .phone-country-picker__option {
        min-height: 3rem;
    }
}

@media (max-width: 575.98px) {
    .phone-input__controls.input-group {
        gap: 0.625rem;
    }

    .phone-country-picker__results {
        max-height: min(18rem, 42vh);
        max-height: min(18rem, 42dvh);
    }

    .phone-country-picker__option {
        gap: 0.5rem;
        padding: 0.625rem;
    }
}
