/* =============================================================
   CCH Layout — mod_finderocb
   Home    → ícone/campo brancos
   Interna → ícone/campo vermelhos (#8D1558)
   As cores de fallback aqui são sobrescritas pelo <style> inline
   gerado pelo PHP a partir dos parâmetros do módulo.
   ============================================================= */

/* -------------------------------------------------------
   Contêiner geral
------------------------------------------------------- */
#form-mod-finder-cch {
    position: relative;
}

#form-mod-finder-cch .awesomplete {
    display: flex;
    align-items: center;
}

/* -------------------------------------------------------
   Campo de busca — expande ao clicar
------------------------------------------------------- */
#form-mod-finder-cch #mod-finder-searchword-cch {
    width: 150px;
    z-index: 100;
    top: -3px;
    transition: width 0.9s ease;
    right: -40px;
    border-radius: 100px;
    font-size: 14px;
    padding: .2rem .5rem !important;
}

/* -------------------------------------------------------
   Botão de busca
------------------------------------------------------- */
#form-mod-finder-cch .btn-mod-finder-cch {
    padding: 6px 8px 8px 8px !important;
    border-radius: 100%;
    z-index: 105;
    border: 0;
    cursor: pointer;
}

/* -------------------------------------------------------
   Placeholder — HOME (branco)
------------------------------------------------------- */
body.cch-page-home #form-mod-finder-cch #mod-finder-searchword-cch::placeholder,
body.cch-page-home #form-mod-finder-cch #mod-finder-searchword-cch:-ms-input-placeholder,
body.cch-page-home #form-mod-finder-cch #mod-finder-searchword-cch::-ms-input-placeholder,
body.cch-page-home #form-mod-finder-cch #mod-finder-searchword-cch::-webkit-input-placeholder {
    color: #ffffff !important;
    opacity: 1 !important;
}

/* -------------------------------------------------------
   Placeholder — INTERNA (vermelho)
------------------------------------------------------- */
body.cch-page-internal #form-mod-finder-cch #mod-finder-searchword-cch::placeholder,
body.cch-page-internal #form-mod-finder-cch #mod-finder-searchword-cch:-ms-input-placeholder,
body.cch-page-internal #form-mod-finder-cch #mod-finder-searchword-cch::-ms-input-placeholder,
body.cch-page-internal #form-mod-finder-cch #mod-finder-searchword-cch::-webkit-input-placeholder {
    color: #8D1558 !important;
    opacity: 1 !important;
}

/* -------------------------------------------------------
   Autocomplete dropdown
------------------------------------------------------- */
#form-mod-finder-cch .awesomplete > ul {
    z-index: 200;
    top: 40px;
    width: 300px;
    border-radius: 20px;
    padding: 15px;
}

/* -------------------------------------------------------
   Mobile (max 992px)
------------------------------------------------------- */
@media screen and (max-width: 992px) {

    /* Wrapper ocupa linha inteira com padding lateral */
    #form-mod-finder-cch {
        display: flex;
        align-items: center;
        padding: 18px 26px;
        border-top: 1px solid rgba(141, 21, 88, 0.1);
    }

    #form-mod-finder-cch .awesomplete {
        flex: 1;
    }

    /* Campo ocupa toda a área menos os 20px do ícone à direita */
    #form-mod-finder-cch #mod-finder-searchword-cch {
        width: calc(100% - 20px) !important;
        position: static !important;
        top: auto !important;
        right: auto !important;
        font-size: 14px !important;
        border-color: rgba(141, 21, 88, 0.3) !important;
        color: #8D1558 !important;
        background-color: rgba(141, 21, 88, 0.1) !important;
    }

    /* Ícone — sempre vermelho no mobile */
    #form-mod-finder-cch .btn-mod-finder-cch {
        flex-shrink: 0;
        width: 20px;
        color: #8D1558 !important;
        background: transparent !important;
        border: 0 !important;
    }

    #form-mod-finder-cch .btn-mod-finder-cch svg,
    #form-mod-finder-cch .btn-mod-finder-cch i,
    #form-mod-finder-cch .btn-mod-finder-cch .icon-search {
        color: #8D1558 !important;
        fill: #8D1558 !important;
    }

    /* Placeholder mobile — sempre vermelho */
    #form-mod-finder-cch #mod-finder-searchword-cch::placeholder,
    #form-mod-finder-cch #mod-finder-searchword-cch:-ms-input-placeholder,
    #form-mod-finder-cch #mod-finder-searchword-cch::-ms-input-placeholder,
    #form-mod-finder-cch #mod-finder-searchword-cch::-webkit-input-placeholder,
    body.cch-page-home #form-mod-finder-cch #mod-finder-searchword-cch::placeholder,
    body.cch-page-home #form-mod-finder-cch #mod-finder-searchword-cch:-ms-input-placeholder,
    body.cch-page-home #form-mod-finder-cch #mod-finder-searchword-cch::-ms-input-placeholder,
    body.cch-page-home #form-mod-finder-cch #mod-finder-searchword-cch::-webkit-input-placeholder {
        color: #8D1558 !important;
        opacity: 1 !important;
    }

    /* Home mobile — força fundo e borda vermelhos */
    body.cch-page-home #form-mod-finder-cch #mod-finder-searchword-cch {
        border-color: rgba(141, 21, 88, 0.3) !important;
        color: #8D1558 !important;
        background-color: rgba(141, 21, 88, 0.1) !important;
    }

    /* Ícone home mobile — força vermelho */
    body.cch-page-home #form-mod-finder-cch .btn-mod-finder-cch,
    body.cch-page-home #form-mod-finder-cch .btn-mod-finder-cch svg,
    body.cch-page-home #form-mod-finder-cch .btn-mod-finder-cch i,
    body.cch-page-home #form-mod-finder-cch .btn-mod-finder-cch .icon-search {
        color: #8D1558 !important;
        fill: #8D1558 !important;
        background: transparent !important;
    }
}