/* <x-form.phone> — country code + phone number in one pill */

.form-phone-box {
    position: relative;
}

.form-phone-box__row {
    display: flex;
    align-items: center;
    height: 46px;
    background: #fff;
    border: 1px solid #dee2e6;
    border-radius: 50px;
    overflow: hidden;
}

[dir="rtl"] .form-phone-box__row {
    flex-direction: row-reverse;
}

.form-phone-box__row:focus-within {
    border-color: #e88b60;
    box-shadow: 0 0 0 3px rgba(232, 139, 96, .15);
}

.form-phone-box__trigger {
    display: flex;
    align-items: center;
    gap: 4px;
    flex-shrink: 0;
    padding: 0 10px 0 14px;
    background: transparent;
    border: none;
    cursor: pointer;
    font-size: 14px;
    white-space: nowrap;
    color: #333;
}

.form-phone-box__trigger:focus {
    outline: none;
}

.form-phone-box__arrow {
    font-size: 10px;
    color: #999;
    transition: transform .2s;
}

.form-phone-box__trigger.is-open .form-phone-box__arrow {
    transform: rotate(180deg);
}

.form-phone-box__divider {
    width: 1px;
    height: 22px;
    flex-shrink: 0;
    background: #dee2e6;
}

.form-phone-box__input {
    flex: 1;
    min-width: 0;
    height: 100%;
    padding: 0 12px;
    border: none !important;
    box-shadow: none !important;
    outline: none;
    background: transparent;
    border-radius: 0 !important;
    font-size: 15px;
    text-align: left;
    direction: ltr;
}

/* ── Menu ── */
.form-phone-box__menu {
    position: absolute;
    top: calc(100% + 6px);
    left: 0;
    right: 0;
    z-index: 1050;
    min-width: 220px;
    background: #fff;
    border: 1px solid #dee2e6;
    border-radius: 12px;
    box-shadow: 0 8px 24px rgba(0, 0, 0, .12);
    overflow: hidden;
}

.form-phone-box__search-wrap {
    padding: 10px 10px 6px;
    border-bottom: 1px solid #f0f0f0;
}

.form-phone-box__list {
    list-style: none;
    margin: 0;
    padding: 4px 0;
    max-height: 220px;
    overflow-y: auto;
}

.form-phone-box__option {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 8px 12px;
    cursor: pointer;
    font-size: 14px;
    transition: background .15s;
}

.form-phone-box__option:hover,
.form-phone-box__option.is-active {
    background: #fff5f0;
}

.form-phone-box__option[hidden] {
    display: none;
}

.form-phone-box__name {
    flex: 1;
}

.form-phone-box__code {
    color: #999;
    font-size: 12px;
}

.form-phone-box__empty {
    padding: 12px;
    text-align: center;
    font-size: 13px;
    color: #999;
}
