/* Busca no mapa (anfitriões): botão "Ver no mapa" ao lado dos serviços e o mapa dentro da página, no lugar dos cartões */

.bm-aviso-area { margin-top: 4px; }
.bm-aviso-area a { font-weight: 700; color: #b56d00; }

/* Serviços e o botão do mapa na mesma linha (o botão fica à direita, embaixo do Buscar) */
.fb-servicos-linha { display: flex; align-items: center; gap: 10px; }
.fb-servicos-linha .fb-servicos { flex: 1 1 auto; min-width: 0; }
.bm-alternar {
    flex: 0 0 auto; margin-top: 20px; display: inline-flex; align-items: center; justify-content: center; gap: 9px;
    padding: 10px 18px; border-radius: 14px; border: 1px solid #efe4d4; background: #fff; color: #2a2219;
    font: inherit; font-weight: 700; font-size: 0.92rem; cursor: pointer; transition: all .18s;
}
.bm-alternar i { color: #f5a623; }
.bm-alternar:hover { border-color: #e2cfb2; }
.bm-alternar[aria-expanded="true"] { background: #1f2a2f; border-color: #1f2a2f; color: #fff; }
.bm-alternar:focus-visible { outline: 2px solid #f5a623; outline-offset: 2px; }
/* Parceiros: o botão fica na linha dos filtros, à direita, junto do "Ordenar" */
.fb-linha > .bm-alternar { margin: 0 0 0 auto; }

/* Mapa aberto: ocupa o lugar dos cartões */
body.bm-modo-mapa [data-mapa-lista] { display: none; }
body.bm-modo-mapa .fb-ordem { display: none; } /* no mapa, a ordem não muda nada */
.bm-tela {
    position: relative; height: clamp(440px, calc(100vh - 230px), 760px); margin-bottom: 28px; border-radius: 26px; overflow: hidden;
    background: #efe9df; scroll-margin-top: 96px;
    /* moldura branca com contorno suave, como os cartões da lista */
    border: 10px solid #fff; outline: 1px solid #efe4d4; box-shadow: 0 12px 34px rgba(60, 40, 10, 0.12);
}
.bm-mapa { border-radius: 16px; overflow: hidden; }
.bm-tela[hidden] { display: none; }
.bm-mapa { position: absolute; inset: 0; }

.bm-topo { position: absolute; top: 14px; left: 14px; right: 14px; z-index: 2; display: flex; justify-content: center; pointer-events: none; }
.bm-topo > * { pointer-events: auto; }
.bm-nesta-area {
    display: inline-flex; align-items: center; gap: 8px; min-height: 44px; padding: 0 20px; border: 0; border-radius: 999px;
    background: #fff; color: #2a2219; font: inherit; font-weight: 800; font-size: 0.92rem; cursor: pointer;
    box-shadow: 0 6px 20px rgba(28, 31, 36, 0.2);
}
.bm-nesta-area i { color: #c97d0b; }
.bm-nesta-area.carregando { opacity: .7; cursor: wait; }
.bm-nesta-area[hidden] { display: none; }
.bm-nesta-area:focus-visible { outline: 3px solid #f5a623; outline-offset: 2px; }

.bm-aviso {
    position: absolute; top: 68px; left: 50%; transform: translateX(-50%); z-index: 2;
    width: max-content; max-width: calc(100% - 28px); margin: 0; padding: 10px 16px; border-radius: 14px;
    background: rgba(42, 34, 25, 0.92); color: #fff; font-size: 0.88rem; font-weight: 600; text-align: center; line-height: 1.4;
}
.bm-aviso[hidden] { display: none; }

/* Aviso discreto: as posições dos anfitriões são aproximadas (some enquanto o cartão está aberto) */
.bm-aproximado {
    position: absolute; left: 10px; bottom: 30px; z-index: 2; margin: 0; max-width: calc(100% - 20px);
    display: inline-flex; align-items: center; gap: 7px; padding: 6px 11px; border-radius: 999px;
    background: rgba(255, 255, 255, 0.94); color: #5b4f41; font-size: 0.8rem; font-weight: 600; line-height: 1.3;
    box-shadow: 0 2px 8px rgba(28, 31, 36, 0.15); pointer-events: none;
}
.bm-aproximado i { color: #c97d0b; }

/* Pins: foto do anfitrião e preço (ou o ícone da categoria, para parceiros) */
.bm-pin {
    display: inline-flex; align-items: center; justify-content: center; min-height: 32px; padding: 0 12px; border: 2px solid #fff;
    border-radius: 999px; background: #fff; color: #2a2219; font: 800 0.86rem/1 'Inter', system-ui, sans-serif; cursor: pointer;
    box-shadow: 0 3px 10px rgba(28, 31, 36, 0.28); transition: transform .12s, background .12s;
}
/* Parceiro: marcador redondo e compacto (contorno escuro, ícone da categoria em laranja) com uma ponta
   embaixo apontando o local; o nome aparece no cartão ao tocar. Grupo de parceiros: círculo escuro com o número. */
.bm-pin.icone {
    position: relative; width: 38px; height: 38px; min-height: 0; padding: 0; margin-bottom: 7px;
    border-color: #2a2219; transform-origin: 50% 100%;
}
.bm-pin.icone i {
    display: inline-flex; align-items: center; justify-content: center; width: 28px; height: 28px; border-radius: 50%;
    background: #f5a623; color: #2a1a00; font-size: 0.82rem;
}
.bm-pin.icone::after {
    content: ''; position: absolute; left: 50%; bottom: -8px; width: 10px; height: 10px; background: inherit;
    border-right: 2px solid #2a2219; border-bottom: 2px solid #2a2219; transform: translateX(-50%) rotate(45deg); border-radius: 0 0 3px 0;
}
.bm-pin.icone.contagem { background: #2a2219; color: #fff; font-size: 0.9rem; }
.bm-pin.com-foto { gap: 7px; min-height: 40px; padding: 3px 12px 3px 3px; }
.bm-pin.com-foto img { width: 32px; height: 32px; border-radius: 50%; object-fit: cover; flex: 0 0 auto; background: #f3ece2; }
.bm-pin.com-foto.ativo img { outline: 2px solid #f5a623; }
.bm-pin.grupo { gap: 0; min-height: 40px; padding: 3px 13px 3px 3px; background: #2a2219; color: #fff; border-color: #2a2219; }
.bm-pin.grupo img, .bm-pin.grupo i {
    width: 32px; height: 32px; border-radius: 50%; object-fit: cover; flex: 0 0 auto; border: 2px solid #2a2219; background: #f3ece2;
    display: inline-flex; align-items: center; justify-content: center; color: #2a1a00;
}
.bm-pin.grupo img + img, .bm-pin.grupo i + i, .bm-pin.grupo img + i, .bm-pin.grupo i + img { margin-left: -12px; }
.bm-pin.grupo img:last-of-type, .bm-pin.grupo i:last-of-type { margin-right: 8px; }
.bm-pin:hover { transform: scale(1.08); }
.bm-pin.ativo { background: #2a2219; color: #fff; transform: scale(1.12); }
.bm-pin.icone.ativo { background: #2a2219; }

/* Cartão do pin tocado (cópia do cartão da lista), num balão de pensamento que sai da lateral direita do pin:
   o balão fica acima e à direita, e duas bolinhas ligam o pin ao balão. O marcador do Google prende o meio
   do pé deste bloco no ponto; o "translate" leva o balão para a direita. O espaço embaixo (transparente)
   deixa o pin à mostra e não pega o toque. */
.bm-cartao {
    position: relative; width: min(340px, calc(100vw - 96px)); padding: 0 0 74px; translate: calc(50% + 26px) 0;
    pointer-events: none; cursor: default;
}
.bm-cartao > * { pointer-events: auto; }
.bm-cartao[hidden] { display: none; }
.bm-cartao-lista { position: relative; list-style: none; margin: 0; padding: 0; text-align: left; }
.bm-cartao-lista::before, .bm-cartao-lista::after {
    content: ''; position: absolute; border-radius: 50%; background: #fff; border: 1px solid #e3d8c6; box-shadow: 0 3px 8px rgba(28, 31, 36, 0.25); pointer-events: none;
}
.bm-cartao-lista::before { left: 0; bottom: -17px; width: 15px; height: 15px; }
.bm-cartao-lista::after { left: -13px; bottom: -29px; width: 9px; height: 9px; }
.bm-cartao-fechar {
    position: absolute; top: -12px; right: -6px; z-index: 4; width: 34px; height: 34px; border: 0; border-radius: 50%;
    background: #2a2219; color: #fff; cursor: pointer; box-shadow: 0 3px 10px rgba(28, 31, 36, 0.3);
}
.bm-cartao-fechar:focus-visible { outline: 3px solid #f5a623; outline-offset: 2px; }
.bm-cartao .ab-card {
    display: grid; grid-template-columns: 104px 1fr; column-gap: 14px; row-gap: 3px; align-content: start; padding: 12px;
    box-shadow: 0 12px 32px rgba(28, 31, 36, 0.22);
}
.bm-cartao .ab-card:hover { transform: none; }
.bm-cartao .ab-card-foto { grid-row: 1 / span 5; width: 104px; aspect-ratio: 1; margin: 0; border-radius: 14px; }
.bm-cartao .ab-card-distancia { left: 6px; bottom: 6px; padding: 3px 8px; font-size: 11px; }
.bm-cartao .ab-card-nome { font-size: 16px; padding-right: 44px; }
.bm-cartao .ab-card-frase, .bm-cartao .ab-card-tags, .bm-cartao .ab-card-botao { display: none; }
.bm-cartao .ab-card-item .fav-sobre-foto { top: auto; bottom: 12px; right: 12px; transform: none; }
.bm-cartao .pt-cartao { box-shadow: 0 12px 32px rgba(28, 31, 36, 0.22); }
.bm-cartao .pt-cartao:hover { transform: none; }
.bm-cartao .pt-cartao-capa { height: 96px; min-height: 0; }
.bm-cartao .pt-cartao-servicos, .bm-cartao .pt-cartao-frase { display: none; }


@media (max-width: 767px) {
    .fb-servicos-linha { flex-direction: column; align-items: stretch; gap: 0; }
    .bm-alternar { margin-top: 10px; width: 100%; padding: 11px 14px; }
    .fb-linha > .bm-alternar { grid-column: 1 / -1; order: 2; margin: 0; }
    /* sobra um pedaço da página embaixo do mapa: o dedo que toca ali rola a página (no mapa, um dedo arrasta o mapa) */
    .bm-tela { height: calc(100svh - 210px); min-height: 380px; margin: 0 -4px 22px; border-width: 6px; border-radius: 20px; scroll-margin-top: 76px; }
    .bm-mapa { border-radius: 14px; }
}
@media (prefers-reduced-motion: reduce) { .bm-alternar, .bm-pin { transition: none; } }
@media print { .bm-tela, .bm-alternar { display: none; } }
