/* Fonte canônica do CSS: edite esta parcial. NÃO é gerado de main.css (legado). Ver docs/SKILLS_CLAUDE.md, "Fonte canônica do CSS". */

/* ============================================================================
   09. BUSCA
   ============================================================================ */
.header-search {
    width: 15rem;
}

.search-div {
    max-width: 40rem;
}

#searchform-offcanvas {
    width: 97%;
}

/* Formulário real: .search-form > .input-group > input + button
   (legado #searchform não existe no markup) */
.header-search .search-form,
.prestige-faixa-util .search-form {
    margin: 0;
    width: 100%;
}

.header-search .input-group,
.prestige-faixa-util .input-group {
    flex-wrap: nowrap;
    align-items: stretch;
    gap: 0;
}

.header-search .form-control {
    min-width: 0;
}

.header-search .input-group-text,
.search-header-buttom {
    color: var(--cor-search-icone, var(--cor-primaria));
    cursor: pointer;
}

/* Faixa extra / busca visível: um bloco (input + lupa), padrão unida. */
.prestige-faixa-util .header-search .search-form .input-group,
.redes-nav .header-search .search-form .input-group {
    align-self: center;
    background-color: var(--cor-search-botao-bg, #fff);
    border-radius: 6px;
    overflow: hidden;
    width: 14.5rem;
    height: 2.25rem;
    min-height: 2.25rem;
    max-height: 2.25rem;
}

.prestige-faixa-util .header-search .search-form .form-control,
.redes-nav .header-search .search-form .form-control {
    background-color: #fff;
    border: 0;
    box-shadow: none !important;
    border-radius: 0;
    height: 2.25rem;
    min-height: 2.25rem;
    padding: .35rem .75rem;
}

.prestige-faixa-util .header-search .search-form .input-group-text,
.redes-nav .header-search .search-form .input-group-text {
    appearance: none;
    -webkit-appearance: none;
    background-color: var(--cor-search-botao-bg, #fff);
    border: 0;
    border-radius: 0;
    color: var(--cor-search-icone, var(--cor-primaria));
    height: 2.25rem;
    min-height: 2.25rem;
    width: 2.5rem;
    padding: 0;
    display: inline-flex;
    align-items: center;
    justify-content: center;
}

.prestige-faixa-util .header-search .search-form .input-group-text i,
.redes-nav .header-search .search-form .input-group-text i {
    color: inherit;
    font-size: 1.1rem;
}

/* Estilo separado (Customizer): campo e lupa como peças distintas. */
body.prestige-busca-separada .prestige-faixa-util .header-search .search-form .input-group,
body.prestige-busca-separada .redes-nav .header-search .search-form .input-group {
    align-items: center;
    background: transparent;
    overflow: visible;
    gap: 6px;
    height: auto;
    min-height: 0;
    max-height: none;
}

body.prestige-busca-separada .prestige-faixa-util .header-search .search-form .form-control,
body.prestige-busca-separada .redes-nav .header-search .search-form .form-control {
    border: 0;
    border-radius: 6px;
    background-color: #fff;
}

body.prestige-busca-separada .prestige-faixa-util .header-search .search-form .input-group-text,
body.prestige-busca-separada .redes-nav .header-search .search-form .input-group-text {
    border-radius: 6px;
    background-color: var(--cor-search-botao-bg, #fff);
    height: 2.25rem;
    min-height: 2.25rem;
}

.search-header-buttom i {
    color: var(--cor-primaria);
}

/* ---- Compacta na faixa da logo (hambúrguer + lupa alinhados) ---- */
.prestige-logo-bar .header-search,
.prestige-logo-bar .search-div {
    display: flex !important;
    align-items: center;
    width: auto;
    max-width: none;
    flex: 0 0 auto;
    margin: 0;
    min-width: 0;
}

.prestige-logo-bar .header-search .search-form {
    display: block !important;
    width: auto;
    max-width: 100%;
}

.prestige-logo-bar .header-search .input-group {
    width: auto;
    max-width: 100%;
    background: transparent;
    border-radius: var(--raio);
}

.prestige-logo-bar .header-search .form-control {
    width: 0;
    flex: 0 1 auto;
    padding: 0;
    border: 0;
    opacity: 0;
    height: 2.375rem;
    line-height: 1.25;
    box-shadow: none !important;
    background: #fff;
    transition: width .25s ease, opacity .2s ease, padding .2s ease, border-color .2s ease;
}

.prestige-logo-bar .header-search:hover .form-control,
.prestige-logo-bar .header-search:focus-within .form-control {
    width: 10.5rem;
    max-width: min(10.5rem, 42vw);
    opacity: 1;
    padding: .35rem .65rem;
    border: 1px solid rgba(0, 0, 0, .12);
    border-right: 0;
    border-radius: var(--raio) 0 0 var(--raio);
}

.prestige-logo-bar .header-search .input-group-text {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    flex: 0 0 auto;
    width: 2.375rem;
    height: 2.375rem;
    padding: 0;
    margin: 0;
    border: 0;
    border-radius: var(--raio);
    background: transparent;
    color: var(--cor-primaria);
    line-height: 1;
    box-shadow: none;
}

.prestige-logo-bar .header-search .input-group-text i {
    font-size: 1.25rem;
    line-height: 1;
    color: inherit;
}

.prestige-logo-bar .header-search:hover .input-group-text,
.prestige-logo-bar .header-search:focus-within .input-group-text {
    background: #fff;
    border: 1px solid rgba(0, 0, 0, .12);
    border-left: 0;
    border-radius: 0 var(--raio) var(--raio) 0;
}

@media (max-width: 575.98px) {
    .prestige-logo-bar .header-search:hover .form-control,
    .prestige-logo-bar .header-search:focus-within .form-control {
        width: 7.5rem;
        max-width: 36vw;
    }
}
