/* Barra de pesquisa do topo — Mestre Aristaque */
html { scroll-padding-top: calc(var(--nav-h, 0px) + 8px); }
#topo { padding-top: calc(var(--nav-h, 170px) + 24px) !important; }

.busca-topo { background: #17304f; border-top: 1px solid rgba(255,255,255,.08); padding: 9px 16px; }
.busca-form { position: relative; max-width: 820px; margin: 0 auto; display: flex; align-items: center;
  background: #fff; border-radius: 999px; border: 2px solid transparent; box-shadow: 0 4px 14px rgba(0,0,0,.25); }
.busca-form:focus-within { border-color: #fb923c; }
.busca-sr { position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden; clip: rect(0,0,0,0); white-space: nowrap; border: 0; }
.busca-ico { color: #64748b; padding-left: 16px; font-size: 15px; }
#busca-site { flex: 1; min-width: 0; border: 0; outline: 0; background: transparent; padding: 10px 10px;
  font: 500 16px Roboto, sans-serif; color: #0f172a; -webkit-appearance: none; appearance: none; }
#busca-site::placeholder { color: #94a3b8; }
#busca-site::-webkit-search-cancel-button { display: none; }
.busca-limpar { border: 0; background: none; color: #64748b; font-size: 22px; line-height: 1; padding: 0 8px; cursor: pointer; }
.busca-limpar:hover { color: #ea580c; }
.busca-btn { margin: 4px; border: 0; border-radius: 999px; padding: 8px 20px; cursor: pointer; white-space: nowrap;
  font: 700 14px Montserrat, sans-serif; color: #fff; background: linear-gradient(135deg, #ea580c, #fb923c); }
.busca-btn:hover { filter: brightness(1.07); }
.busca-btn:focus-visible, .busca-limpar:focus-visible { outline: 3px solid #1e3a5f; outline-offset: 2px; }

.busca-painel { position: absolute; left: 0; right: 0; top: calc(100% + 8px); z-index: 70; text-align: left;
  background: #fff; color: #1f2937; border-radius: 16px; box-shadow: 0 20px 50px rgba(0,0,0,.35);
  max-height: min(560px, calc(100vh - var(--nav-h, 170px) - 16px)); overflow-y: auto; overscroll-behavior: contain; }
.busca-painel[hidden], .busca-sugestoes[hidden] { display: none; }
.busca-info { margin: 0; padding: 12px 16px 6px; font-size: 13px; color: #64748b; }
.busca-info b { color: #1e3a5f; }
.busca-sugestoes { display: flex; flex-wrap: wrap; gap: 6px; padding: 4px 16px 14px; }
.busca-sugestoes button { border: 1px solid #e2e8f0; background: #f8fafc; color: #1e3a5f; border-radius: 999px;
  padding: 5px 12px; font: 500 13px Roboto, sans-serif; cursor: pointer; }
.busca-sugestoes button:hover { border-color: #fb923c; background: #fff3ed; }
#busca-lista { list-style: none; margin: 0; padding: 0 6px 6px; }
.busca-item { display: block; padding: 10px 12px; border-radius: 10px; color: inherit; text-decoration: none; }
.busca-item:hover, .busca-item.ativo { background: #fff3ed; }
.busca-item:focus-visible { outline: 2px solid #ea580c; outline-offset: -2px; }
.busca-tipo { display: inline-block; margin-bottom: 3px; padding: 1px 8px; border-radius: 999px; background: #eff6ff;
  color: #1e3a5f; font-size: 10.5px; font-weight: 700; letter-spacing: .06em; text-transform: uppercase; }
.busca-titulo { display: block; font: 700 15px/1.3 Montserrat, sans-serif; color: #1e3a5f; }
.busca-ext { font-size: 11px; color: #94a3b8; margin-left: 2px; }
.busca-pai { display: block; font-size: 12px; color: #64748b; margin-top: 1px; }
.busca-trecho { display: block; margin-top: 3px; font-size: 13px; line-height: 1.45; color: #475569; }
.busca-painel mark { background: #fde68a; color: inherit; border-radius: 3px; padding: 0 1px; }
.busca-rodape { display: flex; flex-wrap: wrap; gap: 8px 18px; padding: 10px 16px 14px; border-top: 1px solid #e5e7eb; font-size: 13px; }
.busca-rodape:empty { display: none; }
.busca-rodape a { color: #15803d; font-weight: 600; text-decoration: none; }
.busca-rodape a:hover { text-decoration: underline; }
.busca-mais { width: 100%; padding: 8px 12px; border: 1px solid #cbd5e1; border-radius: 9px; background: #f8fafc;
  color: #1e3a5f; font: 600 13.5px Roboto, sans-serif; cursor: pointer; }
.busca-mais:hover { border-color: #fb923c; background: #fff3ed; }

/* com a pesquisa aberta, botões flutuantes não tampam os resultados */
.busca-aberta .whatsapp-float, .busca-aberta #installBtn { visibility: hidden; }

@media (max-width: 640px) {
  .busca-topo { padding: 7px 10px; }
  .busca-ico { padding-left: 13px; }
  #busca-site { padding: 9px 8px; }
  .busca-btn { padding: 8px 14px; font-size: 13px; }
  .busca-painel { position: fixed; left: 8px; right: 8px; top: calc(var(--nav-h, 160px) + 4px);
    max-height: calc(100vh - var(--nav-h, 160px) - 12px); }
}
