/* Ecossistema brasileiro de endereços 10.7 */
/* O campo original continua no DOM para preservar name/value/submit, mas nunca deve
 * aparecer ao lado do select-proxy, mesmo em telas legadas que usam display !important. */
.vt-directory-source-input,
input.vt-directory-source-input,
select.vt-directory-source-input,
[data-vt-directory-proxy-id].vt-directory-source-input {
    display: none !important;
    position: absolute !important;
    width: 1px !important;
    height: 1px !important;
    min-height: 0 !important;
    padding: 0 !important;
    margin: 0 !important;
    opacity: 0 !important;
    pointer-events: none !important;
}

.vt-directory-proxy[disabled] + .vt-smart-select,
.vt-directory-proxy:disabled { opacity: .65; }

.vt-directory-suggest {
    position: fixed;
    z-index: 2147482000;
    display: none;
    overflow: hidden;
    min-width: 260px;
    max-height: min(360px, calc(100vh - 24px));
    border: 1px solid var(--vt-address-border, rgba(113,151,180,.22));
    border-radius: 14px;
    background: var(--vt-address-bg, rgba(10,29,47,.99));
    color: var(--vt-address-text, #edf6ff);
    box-shadow: var(--vt-address-shadow, 0 24px 70px rgba(0,0,0,.34));
    backdrop-filter: blur(18px);
    -webkit-backdrop-filter: blur(18px);
}
.vt-directory-suggest.is-open { display: block; }
.vt-directory-suggest-head {
    display:flex; align-items:center; justify-content:space-between; gap:12px;
    padding:10px 13px; border-bottom:1px solid var(--vt-address-border, rgba(113,151,180,.22));
    color:var(--vt-address-muted,#9eb4c7); font-size:.72rem; font-weight:900; text-transform:uppercase; letter-spacing:.04em;
}
.vt-directory-suggest-head small { color:var(--vt-address-yellow,#ffb000); font-size:.65rem; }
.vt-directory-suggest-list { overflow:auto; max-height:290px; }
.vt-directory-suggest-option {
    width:100%; display:flex; align-items:center; gap:11px; min-height:52px; padding:10px 13px;
    border:0; border-bottom:1px solid var(--vt-address-border, rgba(113,151,180,.16)); background:transparent;
    color:inherit; text-align:left; cursor:pointer; font:inherit;
}
.vt-directory-suggest-option:hover { background:var(--vt-address-bg-soft,rgba(18,43,65,.98)); }
.vt-directory-suggest-option > i { flex:0 0 18px; text-align:center; color:var(--vt-address-yellow,#ffb000); }
.vt-directory-suggest-option span { min-width:0; display:flex; flex-direction:column; gap:2px; }
.vt-directory-suggest-option strong { overflow:hidden; text-overflow:ellipsis; white-space:nowrap; font-size:.84rem; }
.vt-directory-suggest-option small { overflow:hidden; text-overflow:ellipsis; white-space:nowrap; color:var(--vt-address-muted,#9eb4c7); font-size:.72rem; }
.vt-directory-suggest-empty { padding:14px; color:var(--vt-address-muted,#9eb4c7); font-size:.78rem; }


/* "Outro bairro" permanece dentro da MESMA caixa visual do campo. Nada de
 * aumentar altura, criar uma segunda linha ou desalinha-lo dos campos vizinhos. */
.vt-directory-neighborhood-host {
    min-width: 0;
}
.vt-directory-neighborhood-other {
    flex: 1 1 auto !important;
    min-width: 0 !important;
    width: 100% !important;
    min-height: inherit !important;
    height: 100% !important;
    margin: 0 !important;
    text-align: left !important;
}
.vt-directory-neighborhood-other[hidden] {
    display: none !important;
}

/* Em wrappers do Vantagem-UI o input manual compartilha o wrapper já existente,
 * portanto não deve desenhar outra caixa dentro da caixa do formulário. */
.ui-control-wrap.vt-directory-neighborhood-host > .vt-directory-neighborhood-other,
.student-input-wrapper.vt-directory-neighborhood-host > .vt-directory-neighborhood-other,
.school-input-wrapper.vt-directory-neighborhood-host > .vt-directory-neighborhood-other,
.marketplace-profile-control.vt-directory-neighborhood-host > .vt-directory-neighborhood-other,
.marketplace-field-control.vt-directory-neighborhood-host > .vt-directory-neighborhood-other,
.marketplace-filter-control.vt-directory-neighborhood-host > .vt-directory-neighborhood-other,
.marketplace-modal-control.vt-directory-neighborhood-host > .vt-directory-neighborhood-other,
.input-wrapper.vt-directory-neighborhood-host > .vt-directory-neighborhood-other {
    border: 0 !important;
    border-radius: 0 !important;
    background: transparent !important;
    box-shadow: none !important;
}

/* Mantém select + digitação manual na mesma linha e na mesma altura. */
.vt-directory-neighborhood-host.vt-directory-neighborhood-is-other {
    display: flex !important;
    align-items: center !important;
}
.vt-directory-neighborhood-host.vt-directory-neighborhood-is-other > .vt-smart-select {
    flex: 0 1 46% !important;
    min-width: 120px !important;
}
.vt-directory-neighborhood-host.vt-directory-neighborhood-is-other > .vt-directory-neighborhood-other {
    flex: 1 1 54% !important;
}

/* O modal de convite tem regras legadas com !important. Estas regras evitam a
 * duplicação do valor-fonte e deixam máscaras/textos alinhados à esquerda. */
body.panel-app.panel-design-system .registration-invite-grid .ui-control-wrap > input.vt-directory-source-input,
body.panel-app.panel-design-system .registration-invite-grid .ui-control-wrap > select.vt-directory-source-input {
    display: none !important;
}
body.panel-app.panel-design-system .registration-invite-grid .ui-control-wrap > input.ui-control,
body.panel-app.panel-design-system .registration-invite-grid .ui-control-wrap > .vt-directory-neighborhood-other,
body.panel-app.panel-design-system .registration-invite-grid .vt-smart-trigger,
body.panel-app.panel-design-system .registration-invite-grid .vt-smart-label {
    text-align: left !important;
}
body.panel-app.panel-design-system .registration-invite-grid .ui-control-wrap > .vt-smart-select {
    min-width: 0 !important;
    width: 100% !important;
}

/* ========================================================================== */
/* 10.8 — integração visual robusta dos bairros                               */
/* ========================================================================== */
/* Regras de páginas antigas usam display:block !important em inputs. O hidden
 * precisa ganhar em especificidade para o campo manual existir SOMENTE quando
 * "Outro bairro" foi realmente selecionado. */
html body input.vt-directory-neighborhood-other[hidden],
html body .marketplace-field-control > input.vt-directory-neighborhood-other[hidden],
html body .marketplace-modal-control > input.vt-directory-neighborhood-other[hidden],
html body .ui-control-wrap > input.vt-directory-neighborhood-other[hidden],
html body .input-wrapper > input.vt-directory-neighborhood-other[hidden] {
    display: none !important;
}

/* Nunca cria uma segunda linha. */
html body .vt-directory-neighborhood-host {
    flex-wrap: nowrap !important;
    min-height: inherit !important;
    height: auto !important;
}
html body .vt-directory-neighborhood-host > .vt-smart-select {
    min-width: 0 !important;
}
html body .vt-directory-neighborhood-host.vt-directory-neighborhood-is-other > .vt-smart-select,
html body .vt-directory-neighborhood-host.vt-directory-neighborhood-is-other > .vt-directory-neighborhood-other {
    min-height: 100% !important;
    height: 100% !important;
}
html body .marketplace-field-control.vt-directory-neighborhood-host.vt-directory-neighborhood-is-other > .vt-smart-select,
html body .marketplace-modal-control.vt-directory-neighborhood-host.vt-directory-neighborhood-is-other > .vt-smart-select,
html body .ui-control-wrap.vt-directory-neighborhood-host.vt-directory-neighborhood-is-other > .vt-smart-select {
    flex: 0 1 46% !important;
}
html body .marketplace-field-control.vt-directory-neighborhood-host.vt-directory-neighborhood-is-other > .vt-directory-neighborhood-other,
html body .marketplace-modal-control.vt-directory-neighborhood-host.vt-directory-neighborhood-is-other > .vt-directory-neighborhood-other,
html body .ui-control-wrap.vt-directory-neighborhood-host.vt-directory-neighborhood-is-other > .vt-directory-neighborhood-other {
    flex: 1 1 54% !important;
    padding-left: 8px !important;
    padding-right: 10px !important;
}
