.bf-ip {
    position: relative;
    display: block;
    width: 100%;
}

.bf-ip * {
    box-sizing: border-box;
}

.bf-ip input[type="tel"] {
    padding-left: 58px;
}

.bf-ip__selected {
    position: absolute;
    left: 0;
    top: 0;
    bottom: 0;
    z-index: 1;
    display: flex;
    align-items: center;
    gap: 4px;
    padding: 0 6px;
    cursor: pointer;
    white-space: nowrap;
    user-select: none;
}

.bf-ip__flag {
    font-size: 18px;
    line-height: 1;
}

.bf-ip__dial {
    font-size: 14px;
    color: #333;
}

.bf-ip__arrow {
    width: 0;
    height: 0;
    margin-left: 2px;
    border-left: 4px solid transparent;
    border-right: 4px solid transparent;
    border-top: 5px solid #555;
}

.bf-ip__arrow--up {
    border-top: none;
    border-bottom: 5px solid #555;
}

.bf-ip__list {
    position: absolute;
    top: 100%;
    left: 0;
    z-index: 20;
    min-width: 220px;
    max-width: 320px;
    margin-top: 2px;
    background: #fff;
    border: 1px solid #ccc;
    border-radius: 4px;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.18);
}

.bf-ip__search {
    width: calc(100% - 16px);
    margin: 8px;
    padding: 6px 8px;
    border: 1px solid #ccc;
    border-radius: 4px;
    font-size: 14px;
    outline: none;
}

.bf-ip__listbox {
    list-style: none;
    margin: 0;
    padding: 0 0 4px;
    max-height: 220px;
    overflow-y: auto;
    -webkit-overflow-scrolling: touch;
}

.bf-ip__option {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 7px 10px;
    cursor: pointer;
    font-size: 14px;
}

.bf-ip__option .bf-ip__name {
    flex: 1;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.bf-ip__option .bf-ip__dial {
    color: #999;
}

.bf-ip__option:hover,
.bf-ip__option.bf-ip__active {
    background: rgba(0, 0, 0, 0.06);
}
