/* ───── Phone Input with Country Selector ───── */

.phone-input-group {
    position: relative;
}

.phone-country-btn {
    display: flex;
    align-items: center;
    gap: 4px;
    white-space: nowrap;
    border-color: #dee2e6;
    background: #fff;
    color: #212529;
    font-size: 0.95rem;
}

.phone-country-btn:hover,
.phone-country-btn:focus {
    background: #f8f9fa;
    border-color: #adb5bd;
    color: #212529;
}

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

.phone-dial-code {
    font-weight: 500;
}

.phone-chevron {
    font-size: 0.7rem;
    opacity: 0.6;
    margin-left: 1px;
}

/* ───── Country Dropdown ───── */

.phone-country-dropdown {
    position: absolute;
    top: 100%;
    left: 0;
    z-index: 1050;
    width: 320px;
    max-width: 100vw;
    background: #fff;
    border: 1px solid #dee2e6;
    border-radius: 8px;
    box-shadow: 0 4px 16px rgba(0, 0, 0, 0.12);
    margin-top: 4px;
    overflow: hidden;
}

.phone-country-search {
    width: 100%;
    border: none;
    border-bottom: 1px solid #e9ecef;
    padding: 10px 14px;
    font-size: 0.9rem;
    outline: none;
}

.phone-country-search:focus {
    border-bottom-color: #0A4D82;
}

.phone-country-list {
    max-height: 280px;
    overflow-y: auto;
    overscroll-behavior: contain;
}

.phone-country-separator {
    height: 1px;
    background: #e9ecef;
    margin: 4px 0;
}

.phone-country-item {
    display: flex;
    align-items: center;
    gap: 10px;
    width: 100%;
    padding: 10px 14px;
    border: none;
    background: none;
    cursor: pointer;
    font-size: 0.9rem;
    text-align: left;
    color: #212529;
}

.phone-country-item:hover {
    background: #f0f4f8;
}

.phone-country-item--selected {
    background: #e8f4fd;
    font-weight: 500;
}

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

.phone-country-item-name {
    flex: 1;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.phone-country-item-dial {
    color: #6c757d;
    font-size: 0.85rem;
    flex-shrink: 0;
}

/* ───── Mobile responsive ───── */

@media (max-width: 575.98px) {
    .phone-country-btn {
        min-height: 44px; /* iOS touch target */
    }

    .phone-country-dropdown {
        width: calc(100vw - 32px);
        left: -1px;
    }

    .phone-country-item {
        padding: 12px 14px;
        min-height: 44px;
    }
}
