.phone-country {
    position: relative;
    display: flex;
    align-items: stretch;
}

.phone-country-btn {
    display: inline-flex;
    align-items: center;
    gap: 0.35rem;
    flex: 0 0 auto;
    border: 1px solid var(--bs-border-color, #dee2e6);
    border-right: 0;
    border-radius: 0.375rem 0 0 0.375rem;
    background: #fff;
    padding: 0.375rem 0.65rem;
    line-height: 1.5;
    cursor: pointer;
    color: inherit;
}

.phone-country-btn:focus {
    outline: 0;
    box-shadow: 0 0 0 0.25rem rgba(13, 110, 253, 0.25);
    z-index: 2;
}

.phone-country-flag {
    font-size: 1.15rem;
    line-height: 1;
}

.phone-country-dial {
    font-variant-numeric: tabular-nums;
    white-space: nowrap;
}

.phone-country-caret {
    font-size: 0.7rem;
    opacity: 0.7;
}

.phone-country .form-control {
    border-top-left-radius: 0;
    border-bottom-left-radius: 0;
}

.phone-country-menu {
    position: absolute;
    z-index: 30;
    top: calc(100% + 4px);
    left: 0;
    width: min(320px, 90vw);
    background: #fff;
    border: 1px solid var(--bs-border-color, #dee2e6);
    border-radius: 0.375rem;
    box-shadow: 0 8px 24px rgba(0, 0, 0, 0.12);
    padding: 0.5rem;
}

.phone-country-search {
    width: 100%;
    margin-bottom: 0.4rem;
}

.phone-country-list {
    list-style: none;
    margin: 0;
    padding: 0;
    max-height: 240px;
    overflow: auto;
}

.phone-country-option {
    width: 100%;
    display: flex;
    align-items: center;
    gap: 0.5rem;
    border: 0;
    background: transparent;
    text-align: left;
    padding: 0.4rem 0.45rem;
    border-radius: 0.25rem;
    cursor: pointer;
}

.phone-country-option:hover,
.phone-country-option.is-active {
    background: #f1f3f5;
}

.phone-country-option-name {
    flex: 1;
}

.phone-country-option-dial {
    color: #6c757d;
    font-variant-numeric: tabular-nums;
}
