/* Voa Entregador — Barra superior, busca e ícones de busca
   Carregado da estrutura de componentes */

.top-bar {
    position: absolute;
    top: 16px; left: 16px; right: 16px;
    display: flex; gap: 10px; align-items: center;
    z-index: 20;
  }
  .search {
    flex: 1;
    background: var(--surface);
    border-radius: 16px;
    box-shadow: var(--shadow-md);
    display: flex; align-items: center;
    padding: 8px 8px 8px 14px;
    gap: 10px;
    border: 1px solid rgba(11,18,32,0.04);
  }
  .search > svg { flex-shrink: 0; color: var(--ink-400); }
  .search input {
    border: none; outline: none; background: transparent;
    flex: 1; font-size: 15px; font-weight: 500;
    color: var(--ink-900);
    padding: 4px 0;
    min-width: 0;
  }
  .search input::placeholder { color: var(--ink-400); font-weight: 400; }

  .clear-search {
    display: none;
    padding: 5px 10px;
    border-radius: 8px;
    background: var(--ink-100);
    color: var(--ink-700);
    font-size: 12px; font-weight: 600;
    letter-spacing: -0.01em;
    transition: background 0.15s, color 0.15s;
    flex-shrink: 0;
  }
  .clear-search.show { display: inline-flex; }
  .clear-search:hover { background: var(--ink-200); color: var(--ink-900); }

  /* Divisor vertical entre o input e o botão de filtros dentro da caixa */
  .search-divider {
    width: 1px;
    align-self: stretch;
    background: var(--ink-200);
    margin: 4px 0;
    flex-shrink: 0;
  }

  /* Botão de filtros embutido no input de busca */
  .search-filter {
    width: 36px; height: 36px;
    border-radius: 10px;
    display: grid; place-items: center;
    color: var(--ink-700);
    background: transparent;
    transition: background 0.15s, color 0.15s;
    position: relative;
    flex-shrink: 0;
  }
  .search-filter:hover { background: var(--ink-100); }
  .search-filter.active { background: var(--brand-soft); color: var(--brand); }
  .search-filter svg { color: currentColor; }

  .filter-badge {
    position: absolute;
    top: 2px; right: 2px;
    min-width: 14px; height: 14px; border-radius: 7px;
    background: var(--brand);
    color: white;
    font-size: 10px; font-weight: 700;
    display: none; align-items: center; justify-content: center;
    padding: 0 4px;
    border: 2px solid var(--surface);
  }
  .filter-badge.show { display: inline-flex; }

  /* Menu de filtros */
  .search-sheet {
    position: absolute;
    left: 16px; right: 16px;
    top: 72px;
    background: var(--surface);
    border-radius: 18px;
    box-shadow: var(--shadow-lg);
    z-index: 25;
    max-height: 0; overflow: hidden;
    opacity: 0;
    transition: max-height 0.25s, opacity 0.2s;
    border: 1px solid var(--ink-200);
  }
  .search-sheet.show { max-height: 70dvh; opacity: 1; overflow-y: auto; }
  .search-sheet .results-count {
    font-size: 12px; color: var(--ink-500); font-weight: 500;
    text-align: center; padding: 10px; border-top: 1px solid var(--ink-200);
    position: sticky; bottom: 0; background: var(--surface);
  }
  .search-sheet .item { border-radius: 0; border-bottom: 1px solid var(--ink-100); padding: 14px 16px; }
  .search-sheet .item:hover { background: var(--surface-2); }

  /* ---------- Bottom nav ---------- */
