/* =====================================
   GERAL
===================================== */

* {
    box-sizing: border-box;
}

html,
body {
    margin: 0;
    padding: 0;

    width: 100%;
    height: 100%;

    font-family: Arial, Helvetica, sans-serif;

    background-color: #f3f4f6;

    color: #1f2937;
}

body {
    display: flex;
    flex-direction: column;

    overflow: hidden;
}

button,
input,
select {
    font-family: inherit;
}


/* =====================================
   TOPO
===================================== */

.topo {
    flex-shrink: 0;

    height: 104px;

    display: flex;
    align-items: center;

    padding: 0 28px;

    background-color: #ffffff;

    color: #0b2d4f;
}

.marca {
    display: flex;
    align-items: center;
    gap: 14px;
}

.marca-icone {
    width: 110px;
    height: 90px;

    display: flex;
    align-items: center;
    justify-content: center;

    border-radius: 12px;

    background-color: #159fd3;

    font-size: 23px;
}

.marca h1 {
    margin: 0;

    font-size: 22px;
}

.marca p {
    margin: 4px 0 0;

    color: #64748b;

    font-size: 13px;
}


/* =====================================
   BOTÃO BLOG
===================================== */

.botao-blog-topo {
    margin-left: auto;

    display: inline-flex;
    align-items: center;
    justify-content: center;

    gap: 7px;

    height: 42px;

    padding: 0 16px;

    border: none;
    border-radius: 9px;

    background-color: #159fd3;

    color: white;

    text-decoration: none;

    font-size: 14px;
    font-weight: bold;

    cursor: pointer;
}

.botao-blog-topo:hover {
    background-color: #0b2d4f;
}


/* =====================================
   BARRA DE PESQUISA
===================================== */

.area-busca {
    flex-shrink: 0;

    padding: 16px 28px;

    background-color: white;

    border-bottom: 1px solid #e5e7eb;

    box-shadow:
        0 2px 8px rgba(0, 0, 0, 0.04);

    z-index: 1000;
}

.barra-pesquisa {
    display: grid;

    grid-template-columns:
        minmax(220px, 1fr)
        170px
        150px
        180px
        180px
        120px;

    gap: 10px;

    width: 100%;
}


/* =====================================
   CAMPO DE PESQUISA
===================================== */

.campo-pesquisa {
    position: relative;
}

.icone-pesquisa {
    position: absolute;

    left: 15px;
    top: 50%;

    transform: translateY(-50%);

    pointer-events: none;
}

.campo-pesquisa input {
    width: 100%;
    height: 46px;

    padding: 0 15px 0 45px;

    border: 1px solid #d1d5db;
    border-radius: 9px;

    outline: none;

    font-size: 15px;

    background-color: white;
}

.campo-pesquisa input:focus {
    border-color: #159fd3;

    box-shadow:
        0 0 0 3px rgba(21, 159, 211, 0.16);
}


/* =====================================
   FILTROS MÚLTIPLOS
===================================== */

.filtro-multiplo {
    position: relative;

    min-width: 0;
}

.filtro-multiplo-botao {
    width: 100%;
    height: 46px;

    display: flex;
    align-items: center;
    justify-content: space-between;

    gap: 8px;

    padding: 0 11px;

    border: 1px solid #d1d5db;
    border-radius: 9px;

    background-color: white;

    color: #374151;

    outline: none;

    cursor: pointer;

    font-size: 14px;

    text-align: left;
}

.filtro-multiplo-botao:hover {
    border-color: #9ca3af;
}

.filtro-multiplo.aberto
.filtro-multiplo-botao {
    border-color: #159fd3;

    box-shadow:
        0 0 0 3px rgba(21, 159, 211, 0.16);
}

.filtro-multiplo-texto {
    flex: 1;

    min-width: 0;

    overflow: hidden;

    text-overflow: ellipsis;

    white-space: nowrap;
}

.filtro-multiplo-seta {
    flex-shrink: 0;

    color: #6b7280;

    font-size: 12px;

    transition: transform 0.15s ease;
}

.filtro-multiplo.aberto
.filtro-multiplo-seta {
    transform: rotate(180deg);
}


/* =====================================
   MENU DO FILTRO
===================================== */

.filtro-multiplo-menu {
    display: none;

    position: absolute;

    top: calc(100% + 7px);
    left: 0;

    width: max-content;
    min-width: 100%;
    max-width: 320px;

    background-color: white;

    border: 1px solid #e5e7eb;
    border-radius: 10px;

    box-shadow:
        0 12px 30px rgba(0, 0, 0, 0.14);

    overflow: hidden;

    z-index: 2000;
}

.filtro-multiplo.aberto
.filtro-multiplo-menu {
    display: block;
}


/* =====================================
   CABEÇALHO DO FILTRO
===================================== */

.filtro-multiplo-cabecalho {
    min-width: 200px;

    display: flex;
    align-items: center;
    justify-content: space-between;

    gap: 15px;

    padding: 11px 12px;

    border-bottom: 1px solid #e5e7eb;

    background-color: #f8fafc;

    font-size: 13px;
}

.filtro-limpar {
    padding: 0;

    border: none;

    background: none;

    color: #159fd3;

    font-size: 12px;
    font-weight: bold;

    cursor: pointer;
}

.filtro-limpar:hover {
    color: #0b2d4f;

    text-decoration: underline;
}


/* =====================================
   OPÇÕES DO FILTRO
===================================== */

.filtro-multiplo-opcoes {
    max-height: 260px;

    min-width: 200px;

    overflow-y: auto;

    padding: 6px;
}

.filtro-multiplo-opcoes::-webkit-scrollbar {
    width: 7px;
}

.filtro-multiplo-opcoes::-webkit-scrollbar-track {
    background-color: transparent;
}

.filtro-multiplo-opcoes::-webkit-scrollbar-thumb {
    background-color: #d1d5db;

    border-radius: 10px;
}


/* =====================================
   ITEM COM CHECKBOX
===================================== */

.filtro-opcao {
    display: flex;
    align-items: center;

    gap: 9px;

    width: 100%;

    padding: 9px 8px;

    border-radius: 7px;

    color: #374151;

    cursor: pointer;

    font-size: 13px;

    white-space: nowrap;
}

.filtro-opcao:hover {
    background-color: #f3f4f6;
}

.filtro-opcao input {
    width: 16px;
    height: 16px;

    margin: 0;

    flex-shrink: 0;

    accent-color: #159fd3;

    cursor: pointer;
}

.filtro-opcao span {
    overflow: hidden;

    text-overflow: ellipsis;
}


/* =====================================
   FILTRO SEM OPÇÕES
===================================== */

.filtro-sem-opcoes {
    padding: 15px 12px;

    color: #9ca3af;

    font-size: 12px;

    text-align: center;
}


/* =====================================
   TAGS DOS FILTROS
===================================== */

.filtros-selecionados {
    display: none;

    align-items: center;
    flex-wrap: wrap;

    gap: 7px;

    margin-top: 10px;
}

.filtros-selecionados.tem-filtros {
    display: flex;
}

.filtro-tag {
    display: inline-flex;
    align-items: center;

    gap: 6px;

    max-width: 220px;

    padding: 5px 9px;

    border-radius: 20px;

    background-color: #e8f7fc;

    color: #0b2d4f;

    font-size: 12px;
    font-weight: bold;
}

.filtro-tag-texto {
    overflow: hidden;

    text-overflow: ellipsis;

    white-space: nowrap;
}

.filtro-tag-remover {
    width: 17px;
    height: 17px;

    display: flex;
    align-items: center;
    justify-content: center;

    flex-shrink: 0;

    padding: 0;

    border: none;
    border-radius: 50%;

    background-color: #cceef8;

    color: #0b2d4f;

    cursor: pointer;

    font-size: 12px;
    font-weight: bold;

    line-height: 1;
}

.filtro-tag-remover:hover {
    background-color: #9edff1;
}


/* =====================================
   LIMPAR TODOS OS FILTROS
===================================== */

.botao-limpar-todos-filtros {
    display: inline-flex;
    align-items: center;
    justify-content: center;

    min-height: 28px;

    padding: 5px 10px;

    border: 1px solid #d1d5db;
    border-radius: 20px;

    background-color: white;

    color: #6b7280;

    cursor: pointer;

    font-size: 12px;
    font-weight: bold;

    white-space: nowrap;
}

.botao-limpar-todos-filtros:hover {
    border-color: #ef4444;

    background-color: #fef2f2;

    color: #dc2626;
}


/* =====================================
   BOTÃO PESQUISAR
===================================== */

.botao-pesquisar {
    height: 46px;

    border: none;
    border-radius: 9px;

    background-color: #159fd3;

    color: white;

    font-size: 15px;
    font-weight: bold;

    cursor: pointer;
}

.botao-pesquisar:hover {
    background-color: #0b2d4f;
}


/* =====================================
   CONTEÚDO
===================================== */

.conteudo-principal {
    flex: 1;

    display: grid;

    grid-template-columns:
        420px
        minmax(0, 1fr);

    min-height: 0;
}


/* =====================================
   RESULTADOS
===================================== */

.painel-resultados {
    min-height: 0;

    display: flex;
    flex-direction: column;

    background-color: #f8fafc;

    border-right: 1px solid #e5e7eb;
}

.cabecalho-resultados {
    flex-shrink: 0;

    padding: 20px;

    background-color: white;

    border-bottom: 1px solid #e5e7eb;
}

.cabecalho-resultados h2 {
    margin: 0 0 6px;

    font-size: 20px;
}

.cabecalho-resultados p {
    margin: 0;

    color: #6b7280;

    font-size: 13px;

    line-height: 1.4;
}


/* =====================================
   BOTÕES VOLTAR
===================================== */

.botoes-voltar {
    display: flex;

    flex-wrap: wrap;

    gap: 7px;

    margin-top: 13px;
}

.botao-voltar {
    display: none;

    padding: 8px 10px;

    border: none;
    border-radius: 7px;

    background-color: #e5e7eb;

    color: #111827;

    cursor: pointer;

    font-size: 12px;
}

.botao-voltar:hover {
    background-color: #d1d5db;
}


/* =====================================
   LISTA DE RESULTADOS
===================================== */

#resultados {
    flex: 1;

    min-height: 0;

    overflow-y: auto;

    padding: 15px;
}


/* =====================================
   CARDS
===================================== */

.resultado {
    padding: 16px;

    margin-bottom: 11px;

    background-color: white;

    border: 1px solid #e5e7eb;

    border-radius: 11px;

    cursor: pointer;

    transition: 0.15s;
}

.resultado:hover {
    transform: translateY(-2px);

    border-color: #9edff1;

    box-shadow:
        0 5px 15px rgba(0, 0, 0, 0.07);
}

.resultado-nome {
    margin-bottom: 7px;

    color: #111827;

    font-size: 16px;
}

.resultado-categoria {
    display: inline-block;

    margin-bottom: 9px;

    padding: 4px 9px;

    border-radius: 20px;

    background-color: #e8f7fc;

    color: #0b2d4f;

    font-size: 12px;

    font-weight: bold;
}

.resultado-endereco {
    color: #6b7280;

    font-size: 13px;

    line-height: 1.5;
}


/* =====================================
   ESTADO INICIAL
===================================== */

.estado-inicial {
    padding: 60px 25px;

    text-align: center;

    color: #6b7280;
}

.estado-icone {
    margin-bottom: 14px;

    font-size: 38px;
}

.estado-inicial h3 {
    margin: 0 0 8px;

    color: #374151;
}

.estado-inicial p {
    margin: 0;

    font-size: 14px;

    line-height: 1.5;
}


/* =====================================
   MAPA
===================================== */

.painel-mapa {
    position: relative;

    min-width: 0;
    min-height: 0;
}

#map {
    position: absolute;

    inset: 0;

    width: 100%;
    height: 100%;
}


/* =====================================
   POPUP
===================================== */

.popup-nome {
    margin-bottom: 5px;

    font-size: 15px;
}

.popup-categoria {
    margin-bottom: 5px;

    color: #159fd3;

    font-size: 12px;
}

.popup-endereco {
    color: #4b5563;

    font-size: 12px;
}


/* =====================================
   GOOGLE ADS / ADSENSE
   TELA PRINCIPAL

   ESPAÇO RESERVADO: 970 x 90
===================================== */

.area-google-ads-principal {
    flex-shrink: 0;

    width: 100%;

    min-height: 90px;

    display: flex;
    align-items: center;
    justify-content: center;

    overflow: hidden;

    background-color: white;
}


/*
   SLOT EXCLUSIVO DO GOOGLE ADS.

   DEVE PERMANECER VAZIO ATÉ A
   INSERÇÃO DO CÓDIGO DO ADSENSE.

   NÃO COLOCAR MAPA, RESULTADOS,
   FILTROS OU OUTROS ELEMENTOS AQUI.
*/

.google-ads-principal,
#googleAdsPrincipal {
    width: 970px;
    height: 90px;

    min-height: 90px;

    max-width: 100%;

    margin: 0 auto;

    overflow: hidden;
}


/* =====================================
   RESPONSIVO
===================================== */

@media (max-width: 1250px) {

    .barra-pesquisa {
        grid-template-columns:
            minmax(240px, 1fr)
            1fr
            1fr;
    }

    .campo-pesquisa {
        grid-column: span 2;
    }

}


@media (max-width: 1100px) {

    .barra-pesquisa {
        grid-template-columns:
            1fr
            1fr
            1fr;
    }

    .campo-pesquisa {
        grid-column: span 2;
    }

}


@media (max-width: 900px) {

    body {
        overflow: auto;
    }

    .topo {
        height: auto;

        min-height: 82px;

        gap: 15px;
    }

    .barra-pesquisa {
        grid-template-columns: 1fr;
    }

    .campo-pesquisa {
        grid-column: span 1;
    }

    .filtro-multiplo-menu {
        width: 100%;
        max-width: none;
    }

    .conteudo-principal {
        display: flex;

        flex-direction: column;
    }

    .painel-resultados {
        min-height: 400px;
    }

    #resultados {
        max-height: 500px;
    }

    .painel-mapa {
        height: 500px;

        min-height: 500px;
    }

    /*
       O ESPAÇO DO ANÚNCIO CONTINUA
       EXISTINDO NO RESPONSIVO.
    */

    .area-google-ads-principal {
        min-height: 90px;
    }

    .google-ads-principal,
    #googleAdsPrincipal {
        width: 970px;
        max-width: 100%;

        height: 90px;
        min-height: 90px;
    }

}


@media (max-width: 600px) {

    .topo {
        padding: 10px 16px;
    }

    .marca-icone,
    .marca-icone img {
        width: 82px;
        height: 68px;
    }

    .marca p {
        display: none;
    }

    .botao-blog-topo {
        padding: 0 12px;

        font-size: 12px;
    }

    .area-busca {
        padding: 12px 16px;
    }

    .filtro-tag {
        max-width: 100%;
    }

    .botao-limpar-todos-filtros {
        min-height: 30px;
    }

}

/* =====================================
   LOGO LC
===================================== */

.marca-icone {
    background: transparent;
    border-radius: 0;
    overflow: visible;
}

.marca-icone img {
    display: block;
    width: 110px;
    height: 90px;
    object-fit: contain;
}


/* =====================================
   CARD DO ESTABELECIMENTO SOBRE O MAPA
   POSICIONADO À DIREITA
===================================== */

.mapa-card-estabelecimento {
    position: absolute;
    top: 18px;
    right: 18px;
    z-index: 1000;

    width: 370px;
    max-width: calc(100% - 36px);
    max-height: calc(100% - 36px);

    overflow: hidden;

    background-color: white;

    border: 1px solid rgba(15, 23, 42, 0.10);
    border-radius: 16px;

    box-shadow:
        0 18px 45px rgba(15, 23, 42, 0.18),
        0 4px 12px rgba(15, 23, 42, 0.08);
}

.mapa-card-estabelecimento.escondido {
    display: none;
}

.mapa-card-fechar {
    position: absolute;
    top: 12px;
    right: 12px;
    z-index: 2;

    width: 32px;
    height: 32px;

    display: flex;
    align-items: center;
    justify-content: center;

    padding: 0;

    border: 1px solid #e5e7eb;
    border-radius: 50%;

    background-color: white;
    color: #64748b;

    cursor: pointer;

    font-size: 22px;
    line-height: 1;
}

.mapa-card-fechar:hover {
    background-color: #f8fafc;
    color: #111827;
}

.mapa-card-cabecalho {
    padding: 20px 54px 17px 20px;
}

.mapa-card-nome {
    margin: 0 0 9px;
    color: #111827;
    font-size: 18px;
    line-height: 1.25;
}

.mapa-card-categoria {
    display: inline-flex;
    align-items: center;

    margin-bottom: 13px;
    padding: 5px 9px;

    border-radius: 999px;

    background-color: #e8f7fc;
    color: #0b2d4f;

    font-size: 12px;
    font-weight: bold;
}

.mapa-card-endereco {
    display: flex;
    align-items: flex-start;
    gap: 7px;

    color: #475569;

    font-size: 13px;
    line-height: 1.45;
}

.mapa-card-endereco-icone {
    flex-shrink: 0;
    font-size: 13px;
}

.mapa-card-localidade {
    margin-top: 4px;
    margin-left: 20px;

    color: #94a3b8;

    font-size: 12px;
    line-height: 1.4;
}

.mapa-card-divisor {
    height: 1px;
    background-color: #e5e7eb;
}

.mapa-card-publicacoes {
    display: flex;
    flex-direction: column;

    min-height: 0;
    max-height: 360px;
}

.mapa-card-publicacoes-topo {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;

    padding: 15px 18px 11px;
}

.mapa-card-publicacoes-topo h4 {
    margin: 0;

    color: #334155;

    font-size: 13px;
    font-weight: 800;

    text-transform: uppercase;
    letter-spacing: 0.04em;
}

.mapa-card-contador {
    min-width: 26px;
    height: 26px;

    display: inline-flex;
    align-items: center;
    justify-content: center;

    padding: 0 8px;

    border-radius: 999px;

    background-color: #f1f5f9;
    color: #475569;

    font-size: 12px;
    font-weight: bold;
}

.mapa-card-lista-posts {
    overflow-y: auto;
    padding: 0 12px 12px;
}

.mapa-card-carregando,
.mapa-card-sem-posts {
    padding: 18px 12px;

    color: #94a3b8;

    font-size: 13px;
    line-height: 1.45;
    text-align: center;
}

.mapa-card-post {
    display: flex;
    align-items: center;
    gap: 10px;

    padding: 12px;

    border-radius: 11px;

    color: inherit;
    text-decoration: none;

    transition:
        background-color 0.15s,
        transform 0.15s;
}

.mapa-card-post + .mapa-card-post {
    margin-top: 3px;
}

.mapa-card-post:hover {
    background-color: #f8fafc;
    transform: translateX(-2px);
}

.mapa-card-post-conteudo {
    min-width: 0;

    display: flex;
    flex: 1;
    flex-direction: column;
    gap: 4px;
}

.mapa-card-post-titulo {
    overflow: hidden;

    color: #0f172a;

    font-size: 13px;
    line-height: 1.35;

    text-overflow: ellipsis;
    white-space: nowrap;
}

.mapa-card-post-resumo {
    display: -webkit-box;
    overflow: hidden;

    color: #64748b;

    font-size: 12px;
    line-height: 1.35;

    -webkit-box-orient: vertical;
    -webkit-line-clamp: 2;
}

.mapa-card-post-data {
    color: #94a3b8;
    font-size: 11px;
}

.mapa-card-post-seta {
    flex-shrink: 0;

    color: #159fd3;

    font-size: 22px;
    font-weight: bold;
    line-height: 1;
}


@media (max-width: 900px) {

    .mapa-card-estabelecimento {
        top: auto;
        right: 12px;
        bottom: 12px;
        left: 12px;

        width: auto;
        max-width: none;
        max-height: 65%;
    }

    .mapa-card-publicacoes {
        max-height: 260px;
    }

}


@media (max-width: 520px) {

    .mapa-card-cabecalho {
        padding: 17px 50px 14px 16px;
    }

    .mapa-card-publicacoes-topo {
        padding: 13px 15px 9px;
    }

    .mapa-card-lista-posts {
        padding: 0 9px 9px;
    }

}


/* =====================================
   AJUSTES MOBILE - CORREÇÃO 07
===================================== */

@media (max-width: 600px) {

    .topo {
        gap: 10px;
    }

    .marca {
        min-width: 0;
    }

    .botao-blog-topo {
        flex-shrink: 0;
        min-height: 44px;
    }

    .filtro-multiplo-botao,
    .botao-pesquisar {
        min-height: 46px;
    }

    .filtro-opcao {
        min-height: 44px;
        white-space: normal;
        line-height: 1.3;
    }

    .botao-voltar {
        min-height: 40px;
    }

}

@media (max-width: 520px) {

    .mapa-card-fechar {
        width: 40px;
        height: 40px;
    }

}


/* =====================================
   MOBILE REFINADO - CORREÇÃO 08
   SOMENTE TELAS PEQUENAS
===================================== */

@media (max-width: 600px) {

    .area-busca {
        padding: 10px 12px;
    }

    .barra-pesquisa {
        grid-template-columns:
            minmax(0, 1fr)
            minmax(0, 1fr);

        gap: 8px;
    }

    .campo-pesquisa {
        grid-column: 1 / -1;
    }

    .campo-pesquisa input {
        height: 44px;

        font-size: 14px;
    }

    .filtro-multiplo-botao {
        height: 42px;
        min-height: 42px;

        padding: 0 9px;

        font-size: 12px;
    }

    .filtro-multiplo-texto {
        overflow: hidden;

        text-overflow: ellipsis;

        white-space: nowrap;
    }

    .botao-pesquisar {
        grid-column: 1 / -1;

        height: 44px;
        min-height: 44px;
    }

    .filtros-selecionados.tem-filtros {
        margin-top: 9px;
    }

    .conteudo-principal {
        display: flex;

        flex-direction: column;
    }

    .painel-mapa {
        order: 1;

        height: 56vh;
        min-height: 360px;
        max-height: 520px;
    }

    .painel-resultados {
        order: 2;

        min-height: 0;

        border-right: none;
        border-top: 1px solid #e5e7eb;
    }

    .cabecalho-resultados {
        padding: 15px 16px;
    }

    .cabecalho-resultados h2 {
        font-size: 18px;
    }

    #resultados {
        max-height: none;

        padding: 12px;
    }

    .estado-inicial {
        padding: 32px 20px;
    }

    .resultado {
        padding: 14px;
    }

}

@media (max-width: 390px) {

    .filtro-multiplo-botao {
        font-size: 11px;
    }

}


/* =====================================
   ACESSIBILIDADE - CORREÇÃO 09
===================================== */

a:focus-visible,
button:focus-visible,
input:focus-visible,
select:focus-visible,
textarea:focus-visible,
[tabindex]:focus-visible {
    outline: 3px solid currentColor;
    outline-offset: 3px;
}
