/* ===== PHONE FLAG SELECTOR ===== */
.phone-wrapper {
    display: flex;
    align-items: center;
    border: 1px solid #ccc;
    border-radius: 8px;
    overflow: visible;
    background: #fff;
    position: relative;
}

.flag-selector {
    display: flex;
    align-items: center;
    gap: 4px;
    padding: 10px 10px;
    cursor: pointer;
    border-right: 1px solid #e9e9e9;
    background: #f39c12;
    border-radius: 8px 0 0 8px;
    user-select: none;
    white-space: nowrap;
    transition: background 0.2s;
}

.flag-selector:hover {
    background: #efefef;
}

.flag-icon {
    font-size: 1.3rem;
    line-height: 1;
    color: #333;
}

.dial-code {
    font-size: 0.85rem;
    font-weight: 600;
    color: #333;
    min-width: 32px;
}

.arrow {
    font-size: 0.7rem;
    color: #888;
}

.phone-wrapper input[type="tel"] {
    flex: 1;
    border: none !important;
    outline: none !important;
    padding: 10px 12px;
    font-size: 0.95rem;
    background: transparent;
    border-radius: 0 8px 8px 0;
}

/* Dropdown — anclado al body con position:fixed para ignorar cualquier overflow:hidden */
.country-dropdown {
    position: fixed;
    z-index: 99999;
    background: #fff;
    border: 1px solid #ddd;
    border-radius: 10px;
    box-shadow: 0 8px 24px rgba(0,0,0,0.18);
    max-height: 260px;
    display: flex;
    flex-direction: column;
    overflow: hidden;
}

.dropdown-search {
    padding: 8px 10px;
    border-bottom: 1px solid #eee;
}

.dropdown-search input {
    width: 100%;
    padding: 7px 10px;
    border: 1px solid #ddd;
    border-radius: 6px;
    font-size: 0.88rem;
    outline: none;
    box-sizing: border-box;
}

.country-list {
    list-style: none;
    margin: 0;
    padding: 4px 0;
    overflow-y: auto;
    flex: 1;
    color: #333;
}


.country-list li {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 8px 14px;
    cursor: pointer;
    font-size: 0.9rem;
    transition: background 0.15s;
}

.country-list li:hover {
    background: #f39c12;;

}

.country-list li .flag {
    font-size: 1.2rem;
    flex-shrink: 0;
}

.country-list li .cname {
    flex: 1;
    color: #222;
}

.country-list li .cdial {
    color: #888;
    font-size: 0.82rem;
    font-weight: 500;
}

/* ── Hint / contador de dígitos ── */
.phone-hint {
    display: block;
    font-size: 0.78rem;
    margin-top: 4px;
    min-height: 16px;
    transition: color 0.2s;
}
.hint-warn  { color: #e08000; }
.hint-ok    { color: #22a35a; font-weight: 600; }
.hint-error { color: #d32f2f; font-weight: 600; }