/* BUSCA ÚNICA DA WIKI (wiki_busca.py / wiki_busca.js). Sugestões no mesmo escuro da caixa da página inicial. */
.wkb-topo { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: .5rem 1rem; margin-bottom: var(--s-3); }
.wkb-topo .wk-migalhas { margin-bottom: 0; min-width: 0; }
.wkb-mini { position: relative; display: flex; flex: 0 1 300px; min-width: 0; }
.wkb-mini input { width: 100%; min-width: 0; min-height: 38px; padding: 0 2.6rem 0 .9rem; border-radius: var(--r-pill);
  border: 1px solid rgba(255, 255, 255, .28); background: rgba(255, 255, 255, .12); color: #fff; font-size: var(--fs-sm); }
.wkb-mini input::placeholder { color: rgba(255, 255, 255, .65); }
.wkb-mini input:focus { border-color: #ffb35c; box-shadow: 0 0 0 3px rgba(255, 140, 40, .3); outline: none; }
.wkb-mini button { position: absolute; right: 4px; top: 50%; transform: translateY(-50%); width: 32px; height: 32px; display: grid; place-items: center;
  border: 0; border-radius: 50%; background: rgba(255, 140, 40, .85); color: #231003; cursor: pointer; }
.wkb-mini button .ic { width: 16px; height: 16px; }
@media (max-width: 600px) { .wkb-mini { flex: 1 1 100%; } }

/* caixa grande da página de resultados */
.wkb-grande { display: flex; gap: .5rem; align-items: center; max-width: 720px; margin-top: var(--s-3); }
.wkb-grande input { flex: 1; min-width: 0; }
.wkb-grande .botao { flex: none; min-height: 56px; }
@media (max-width: 520px) { .wkb-grande .botao { display: none; } }

/* sugestões (todas as caixas) */
.wkb-sug { position: absolute; left: 0; right: 0; top: calc(100% + 8px); z-index: 40; list-style: none; margin: 0; padding: .4rem;
  border-radius: var(--r-md); background: #1d1424; border: 1px solid rgba(255, 255, 255, .14); box-shadow: 0 20px 50px rgba(0, 0, 0, .5);
  max-height: min(70vh, 460px); overflow: auto; text-align: left; }
.wkb-mini .wkb-sug { left: auto; width: min(420px, calc(100vw - 32px)); }
.wkb-sug[hidden] { display: none; }
.wkb-sug .wkb-item { display: flex; align-items: center; gap: .7rem; padding: .45rem .6rem; border-radius: var(--r-sm); color: #fff; text-decoration: none; }
.wkb-sug .wkb-item:hover, .wkb-sug .wkb-item.ativo { background: rgba(255, 140, 40, .2); }
.wkb-sug img, .wkb-sug .wkb-ic { width: 36px; height: 36px; flex: none; border-radius: 50%; object-fit: cover; background: #2a1f33; }
.wkb-ic { display: grid; place-items: center; color: #e9d5ff; background: rgba(124, 58, 237, .35); font-weight: 800; }
.wkb-txt { display: grid; min-width: 0; }
.wkb-txt b { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.wkb-sug .wkb-txt span { color: rgba(255, 255, 255, .62); font-size: var(--fs-xs); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.wkb-todos a { display: block; margin-top: .2rem; padding: .5rem .6rem; border-top: 1px solid rgba(255, 255, 255, .1); color: #ffcf7a; font-weight: 700;
  font-size: var(--fs-sm); text-decoration: none; text-align: center; }
.wkb-todos a:hover, .wkb-todos a.ativo { background: rgba(255, 140, 40, .15); border-radius: var(--r-sm); }

/* página de resultados */
.wkb-lista { list-style: none; margin: 0 0 var(--s-2); padding: 0; display: grid; grid-template-columns: repeat(auto-fill, minmax(260px, 1fr)); gap: .5rem; }
.wkb-lista .wkb-item { display: flex; align-items: center; gap: .75rem; padding: .55rem .7rem; border-radius: 12px; text-decoration: none; color: var(--text);
  background: var(--surface); border: 1px solid var(--border); transition: border-color .15s, transform .15s; min-width: 0; }
.wkb-lista .wkb-item:hover, .wkb-lista .wkb-item:focus-visible { border-color: var(--brand); transform: translateY(-2px); }
.wkb-lista img, .wkb-lista .wkb-ic { width: 48px; height: 48px; flex: none; border-radius: 10px; object-fit: contain; background: var(--tint-2); }
.wkb-lista .wkb-txt span { color: var(--text-3); font-size: .82rem; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.wkb-grupo { scroll-margin-top: 90px; }
.wkb-vazio p { margin: .3rem 0; }
@media (prefers-reduced-motion: reduce) { .wkb-lista .wkb-item { transition: none; } }
/* o hero da wiki corta o que passa da borda: com as sugestões abertas ele fica por cima do resto da página */
.wk-hero:has(.wkb-sug:not([hidden])), .jn-hero:has(.wkb-sug:not([hidden])), .wk-ninja-topo:has(.wkb-sug:not([hidden])) { overflow-x: clip; overflow-y: visible; z-index: 30; }
