/*
 * Telefone internacional — seletor de DDI com busca + máscara.
 * Carregado direto pelo Init.php (não passa pelo build do webpack).
 */

.telefone-intl {
    display: flex;
    gap: 8px;
    align-items: stretch;
}

.telefone-intl input[type=tel],
.telefone-intl input[type=text] {
    flex: 1 1 auto;
    min-width: 0;
}

/* O ícone de telefone do .sd sobreporia o botão de DDI; input perde o recuo do ícone */
.sd.telefone:has(.telefone-ddi-wrap):before {
    display: none;
}

.sd.telefone .telefone-intl input {
    padding-left: 12px !important;
}

.telefone-ddi-wrap {
    position: relative;
    flex: 0 0 auto;
}

.telefone-ddi-toggle {
    display: flex;
    align-items: center;
    gap: 6px;
    margin-top: 6px;
    height: 32px;
    padding: 4px 10px;
    border: 1px solid #959B95;
    border-radius: 4px;
    background: #fff;
    color: #0c0c0c;
    font-size: 14px;
    font-weight: 300;
    font-family: inherit;
    cursor: pointer;
    white-space: nowrap;
}

.telefone-ddi-toggle .seta {
    font-size: 10px;
    color: #959B95;
}

.telefone-ddi-dropdown {
    position: absolute;
    top: calc(100% + 4px);
    left: 0;
    z-index: 99;
    width: min(300px, 84vw);
    background: #fff;
    border: 1px solid #959B95;
    border-radius: 4px;
    box-shadow: 0 8px 24px rgba(0, 0, 0, 0.18);
    overflow: hidden;
}

.telefone-ddi-busca {
    width: 100% !important;
    margin: 0 !important;
    height: auto !important;
    padding: 10px 12px !important;
    border: none !important;
    border-bottom: 1px solid #e4e4e4 !important;
    border-radius: 0 !important;
    background: #fff !important;
    color: #0c0c0c !important;
    font-size: 14px;
    font-family: inherit;
    outline: none;
    box-shadow: none !important;
}

.telefone-ddi-lista {
    max-height: 240px;
    overflow-y: auto;
    margin: 0;
    padding: 4px 0;
    list-style: none;
}

.telefone-ddi-lista li {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 7px 12px;
    font-size: 14px;
    color: #0c0c0c;
    cursor: pointer;
    line-height: 1.3;
}

/* display:flex acima sobrepõe o [hidden] nativo do navegador — reforça aqui */
.telefone-ddi-lista li[hidden] {
    display: none;
}

.telefone-ddi-lista li:hover {
    background: #f0f0f0;
}

.telefone-ddi-lista li .nome {
    flex: 1 1 auto;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.telefone-ddi-lista li .ddi {
    color: #757575;
    flex: 0 0 auto;
}

/* Variante do bloco fale-conosco-2 (inputs maiores, sem .sd) */
.contato-form .telefone-ddi-toggle {
    margin-top: 0;
    height: 100%;
    min-height: 47px;
    padding: 0.75rem 0.75rem;
    border: 1px solid var(--border-dark, #959B95);
    border-radius: var(--radius-sm, 4px);
    background: rgba(255, 255, 255, 0.8);
    font-size: 1rem;
}
