/* rede-busca.css — componente de busca da rede credenciada (rede-busca.js).
   Serve o site público e os painéis: a cor vem de --blue (tema da empresa na
   landing) ou --brand-600 (painéis), com o azul da marca como último recurso.
   Tamanhos em px, e não rem: o site usa 62.5% e os painéis uma escala fluida. */

.rb {
  --rb-cor: var(--blue, var(--brand-600, #2563eb));
  --rb-cor-h: var(--blue-h, var(--brand-700, #1d4ed8));
  --rb-cor-clara: var(--brand-50, #eff6ff);
  --rb-texto: var(--ink, var(--text-primary, #0b1f33));
  --rb-texto-2: var(--text-secondary, #475569);
  --rb-texto-3: #64748b;
  --rb-borda: rgba(15, 23, 42, 0.10);
  --rb-campo: #f5f8fc;
  font-size: 15px;
  color: var(--rb-texto);
}
.rb *, .rb *::before, .rb *::after { box-sizing: border-box; }
/* display da classe (flex/grid) venceria o [hidden] do navegador */
.rb [hidden] { display: none !important; }

/* ---------------------------------------------------------------- filtros */
.rb-filtros {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 1.4fr) auto auto;
  align-items: end;
  gap: 14px;
  padding: 20px 22px;
  background: #fff;
  border: 1px solid var(--rb-borda);
  border-radius: 16px;
  box-shadow: 0 12px 32px -12px rgba(15, 23, 42, 0.18);
}
.rb-campo { display: flex; flex-direction: column; gap: 8px; min-width: 0; margin: 0; }
.rb-rotulo {
  font-size: 12px;
  font-weight: 700;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--rb-texto-3);
}
.rb-select { position: relative; display: block; }
.rb-select select {
  width: 100%;
  height: 50px;
  padding: 0 44px 0 16px;
  border: 1px solid var(--rb-borda);
  border-radius: 10px;
  background: var(--rb-campo);
  color: var(--rb-texto);
  font: inherit;
  font-size: 15px;
  font-weight: 500;
  -webkit-appearance: none;
  appearance: none;
  cursor: pointer;
  transition: border-color 150ms ease, box-shadow 150ms ease;
}
.rb-select select:hover:not(:disabled) { border-color: rgba(15, 23, 42, 0.24); }
.rb-select select:focus { outline: none; border-color: var(--rb-cor); box-shadow: 0 0 0 3px rgba(37, 99, 235, 0.15); }
.rb-select select:disabled { cursor: not-allowed; color: var(--rb-texto-3); }
.rb-select svg {
  position: absolute; right: 14px; top: 50%;
  width: 18px; height: 18px;
  transform: translateY(-50%);
  color: var(--rb-cor);
  pointer-events: none;
}

.rb-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  height: 50px;
  padding: 0 22px;
  border-radius: 10px;
  border: 1px solid transparent;
  font: inherit;
  font-size: 15px;
  font-weight: 700;
  text-decoration: none;
  white-space: nowrap;
  cursor: pointer;
  transition: background 150ms ease, border-color 150ms ease, color 150ms ease;
}
.rb-btn svg { width: 17px; height: 17px; stroke-width: 2.2; }
.rb-btn:focus-visible { outline: 2px solid var(--rb-cor); outline-offset: 2px; }
.rb-btn--procurar { background: var(--rb-cor); color: #fff; }
.rb-btn--procurar:hover:not(:disabled) { background: var(--rb-cor-h); }
.rb-btn--procurar:disabled { opacity: 0.5; cursor: not-allowed; }
.rb-btn--limpar { background: #fff; color: var(--rb-cor); border-color: var(--rb-borda); }
.rb-btn--limpar:hover { background: var(--rb-cor-clara); border-color: rgba(37, 99, 235, 0.35); }

/* ---------------------------------------------------------------- estados */
.rb-resultado { margin-top: 28px; }
.rb-vazio { max-width: 460px; margin: 40px auto; text-align: center; }
.rb-vazio__ic {
  display: inline-flex; align-items: center; justify-content: center;
  width: 72px; height: 72px; margin-bottom: 16px;
  border-radius: 50%;
  background: var(--rb-cor-clara);
  color: var(--rb-cor);
}
.rb-vazio__ic svg { width: 30px; height: 30px; }
.rb-vazio h3 { margin: 0 0 8px; font-size: 20px; font-weight: 700; color: var(--rb-texto); }
.rb-vazio p { margin: 0; font-size: 15px; line-height: 1.6; color: var(--rb-texto-2); }
.rb-carregando {
  display: flex; align-items: center; justify-content: center; gap: 10px;
  padding: 48px 0; color: var(--rb-texto-2); font-weight: 500;
}
.rb-carregando svg { width: 20px; height: 20px; animation: rb-gira 900ms linear infinite; }
@keyframes rb-gira { to { transform: rotate(360deg); } }

.rb-contagem { margin: 0 0 16px; font-size: 15px; color: var(--rb-texto-2); }
.rb-contagem strong { color: var(--rb-texto); }

/* ---------------------------------------------------------------- cards */
.rb-grade {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(320px, 1fr));
  gap: 18px;
}
.rb-card {
  position: relative;
  display: flex;
  flex-direction: column;
  padding: 22px 22px 20px;
  background: #fff;
  border: 1px solid var(--rb-borda);
  border-radius: 14px;
  overflow: hidden;
}
.rb-card::before {
  content: "";
  position: absolute; left: 0; right: 0; top: 0;
  height: 4px;
  background: linear-gradient(90deg, var(--rb-cor-h), var(--rb-cor));
}
.rb-card__topo { display: flex; align-items: center; gap: 12px; margin-bottom: 14px; }
.rb-card__icone {
  display: inline-flex; align-items: center; justify-content: center;
  flex-shrink: 0;
  width: 44px; height: 44px;
  border-radius: 12px;
  background: var(--rb-cor);
  color: #fff;
}
.rb-card__icone svg { width: 22px; height: 22px; }
.rb-card__chips { display: flex; flex-wrap: wrap; gap: 6px; min-width: 0; }
.rb-chip {
  display: inline-flex; align-items: center; gap: 4px;
  padding: 5px 10px;
  border-radius: 999px;
  background: var(--rb-cor-clara);
  color: var(--rb-cor-h);
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.04em;
  text-transform: uppercase;
}
.rb-chip svg { width: 12px; height: 12px; }
.rb-chip--cidade { background: #f1f5f9; color: #334155; }
.rb-chip--mais { background: #f1f5f9; color: #475569; }
.rb-card__nome { margin: 0; font-size: 19px; font-weight: 700; line-height: 1.3; color: var(--rb-cor-h); }
.rb-card__cat { margin: 4px 0 0; font-size: 14px; color: var(--rb-texto-3); }
.rb-card__info {
  list-style: none;
  margin: 16px 0 0;
  padding: 16px 0 0;
  border-top: 1px solid rgba(15, 23, 42, 0.07);
  display: flex; flex-direction: column; gap: 12px;
}
.rb-card__info li { display: flex; align-items: flex-start; gap: 12px; font-size: 14px; line-height: 1.5; color: var(--rb-texto-2); }
.rb-card__info a { color: inherit; text-decoration: none; }
.rb-card__info a:hover { color: var(--rb-cor); }
.rb-card__info strong { color: var(--rb-texto); }
.rb-card__info-ic {
  display: inline-flex; align-items: center; justify-content: center;
  flex-shrink: 0;
  width: 28px; height: 28px;
  border-radius: 8px;
  background: var(--rb-cor-clara);
  color: var(--rb-cor);
}
.rb-card__info-ic svg { width: 15px; height: 15px; }
.rb-card__acoes { display: flex; gap: 10px; margin-top: auto; padding-top: 18px; }
.rb-card__acoes .rb-btn { flex: 1 1 0; height: 46px; padding: 0 14px; }
.rb-btn--mapa { background: var(--rb-cor); color: #fff; }
.rb-btn--mapa:hover { background: var(--rb-cor-h); color: #fff; }
.rb-btn--whats { background: #25d366; color: #fff; }
.rb-btn--whats:hover { background: #1ebe5b; color: #fff; }
.rb-btn--site { flex: 0 0 46px !important; padding: 0 !important; background: #fff; color: var(--rb-cor); border-color: var(--rb-borda); }
.rb-btn--site:hover { background: var(--rb-cor-clara); }
.rb-mais { display: flex; justify-content: center; margin-top: 22px; }

/* ---------------------------------------------------------------- celular */
@media (max-width: 900px) {
  .rb-filtros { grid-template-columns: 1fr 1fr; }
  .rb-campo--largo { grid-column: auto; }
}
@media (max-width: 600px) {
  .rb-filtros { grid-template-columns: 1fr; padding: 16px; }
  .rb-grade { grid-template-columns: 1fr; }
}
@media (prefers-reduced-motion: reduce) { .rb-carregando svg { animation: none; } }
