/* WebFalx International Phone & Country Code Picker Styles */
.phone-input-group {
    display: flex;
    align-items: center;
    gap: 8px;
    width: 100%;
    position: relative;
}

.country-picker-wrapper {
    position: relative;
    flex-shrink: 0;
}

.country-picker-btn {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    background: rgba(15, 23, 42, 0.7);
    border: 1px solid rgba(255, 255, 255, 0.12);
    border-radius: var(--radius-sm, 6px);
    color: #ffffff;
    font-size: 0.88rem;
    font-weight: 600;
    padding: 0 10px;
    height: 42px;
    cursor: pointer;
    transition: all 0.2s ease;
    user-select: none;
    white-space: nowrap;
}

.country-picker-btn:hover,
.country-picker-btn:focus {
    border-color: var(--color-accent, #38bdf8);
    background: rgba(15, 23, 42, 0.9);
    outline: none;
}

.country-picker-btn .flag-emoji {
    font-size: 1.1rem;
    line-height: 1;
}

.country-picker-btn .dial-code {
    color: var(--color-text-primary, #ffffff);
    font-family: var(--font-heading, inherit);
}

.country-picker-btn .arrow-icon {
    font-size: 0.65rem;
    color: #94a3b8;
    transition: transform 0.2s ease;
    margin-left: 2px;
}

.country-picker-wrapper.open .country-picker-btn .arrow-icon {
    transform: rotate(180deg);
}

.country-picker-menu {
    position: absolute;
    top: calc(100% + 6px);
    left: 0;
    width: 310px;
    max-width: 90vw;
    background: #0f172a;
    border: 1px solid rgba(255, 255, 255, 0.15);
    border-radius: var(--radius-sm, 8px);
    box-shadow: 0 20px 25px -5px rgba(0, 0, 0, 0.5), 0 8px 10px -6px rgba(0, 0, 0, 0.5);
    z-index: 9999;
    display: none;
    flex-direction: column;
    overflow: hidden;
    backdrop-filter: blur(12px);
    animation: countryPickerFade 0.15s ease-out;
}

@keyframes countryPickerFade {
    from {
        opacity: 0;
        transform: translateY(-6px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.country-picker-wrapper.open .country-picker-menu {
    display: flex;
}

.country-search-wrapper {
    padding: 8px 10px;
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
    background: rgba(30, 41, 59, 0.6);
    position: relative;
}

.country-search-input {
    width: 100%;
    background: rgba(15, 23, 42, 0.8);
    border: 1px solid rgba(255, 255, 255, 0.12);
    border-radius: 4px;
    color: #ffffff;
    font-size: 0.82rem;
    padding: 6px 10px 6px 28px;
    outline: none;
    transition: border-color 0.2s ease;
}

.country-search-input:focus {
    border-color: var(--color-accent, #38bdf8);
}

.country-search-icon {
    position: absolute;
    left: 18px;
    top: 50%;
    transform: translateY(-50%);
    color: #64748b;
    pointer-events: none;
    display: flex;
    align-items: center;
}

.country-list {
    list-style: none;
    margin: 0;
    padding: 4px 0;
    max-height: 220px;
    overflow-y: auto;
    scrollbar-width: thin;
    scrollbar-color: rgba(255,255,255,0.2) transparent;
}

.country-list::-webkit-scrollbar {
    width: 5px;
}

.country-list::-webkit-scrollbar-thumb {
    background: rgba(255,255,255,0.2);
    border-radius: 3px;
}

.country-option {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 8px 12px;
    cursor: pointer;
    font-size: 0.84rem;
    color: #cbd5e1;
    transition: background 0.15s ease;
}

.country-option:hover,
.country-option.selected {
    background: rgba(56, 189, 248, 0.12);
    color: #ffffff;
}

.country-option .country-info {
    display: flex;
    align-items: center;
    gap: 8px;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.country-option .c-flag {
    font-size: 1.1rem;
    flex-shrink: 0;
}

.country-option .c-name {
    font-weight: 500;
    overflow: hidden;
    text-overflow: ellipsis;
}

.country-option .c-code {
    font-weight: 700;
    color: var(--color-accent, #38bdf8);
    font-size: 0.8rem;
    margin-left: 8px;
    flex-shrink: 0;
}

.no-countries-found {
    padding: 12px;
    font-size: 0.8rem;
    color: #94a3b8;
    text-align: center;
}

/* Ensure form controls next to country picker fit seamlessly */
.phone-input-group .phone-number-input {
    flex: 1;
    height: 42px;
}
