.sa-am-topbar{
  display:flex;
  gap:.75rem;
  align-items:center;
  margin:0 0 16px;
}

/* Search wrapper becomes a flex box so the input centers vertically */
.sa-am-search{
  position:relative;
  flex:1 1 auto;
  display:flex;
  align-items:center;
  min-height:44px;
  min-width:0;
}

/* Search input + interactive states */
.sa-am-search input{
  width:100%;
  height:44px;
  border-radius:999px;
  background:#ffffff;
  border:1px solid var(--line);
  color:#1f2937;
  padding:0 16px 0 42px;
  font-size:.95rem;
  line-height:normal;
  transition:border-color .18s ease, box-shadow .18s ease, background .18s ease;
}
.sa-am-search input:hover{
  border-color: var(--line-2);
  background:#ffffff;
}
.sa-am-search input:focus{
  outline:none;
  border-color: var(--brand);
  box-shadow: 0 0 0 3px rgba(194,65,12,.18),
              inset 0 1px 0 rgba(255,255,255,.6);
  background:#ffffff;
}
.sa-am-search:focus-within svg{
  stroke:var(--brand);
}

.sa-am-search svg{
  position:absolute;
  left:14px;
  width:18px;
  height:18px;
  top:50%;
  transform:translateY(-50%);
  stroke:#94a3b8; /* slate-400 */
  fill:none;
  stroke-width:2;
}

.sa-am-actions{
  display:flex;
  align-items:center;
  gap:.5rem;
  min-width:0;
}

.sa-am-sort{
  display:flex;
  align-items:center;
  gap:.5rem;
  color:#6b7280;
  font-size:.92rem;
}

.sa-am-sort select{
  height:44px;
  border-radius:10px;
  background:#ffffff;
  border:1px solid var(--line);
  color:#1f2937;
  padding:0 .75rem;
}

/* Live results counter */
.sa-am-count{
  color:#6b7280;
  font-size:.92rem;
  padding:0 .5rem;
  white-space:nowrap;
}

/* =========================
 * Mobile adjustments (+ animation)
 * =======================*/
@media (max-width:1024px){
  .sa-am-topbar{ --am-dur: .9s; }

  .sa-am-search input{
    height:52px;
    font-size:1rem;
  }

  .sa-am-search{
    transition: flex-grow var(--am-dur) ease, max-width var(--am-dur) ease, transform var(--am-dur) ease;
    flex-grow:1;
    max-width:100%;
  }
  .sa-am-actions{
    flex:0 0 auto;
    max-width:640px;
    transition: max-width var(--am-dur) ease, opacity .35s ease;
  }

  .sa-am-topbar.is-searching .sa-am-search{ flex-grow:999; }
  .sa-am-topbar.is-searching .sa-am-actions{
    max-width:0;
    opacity:0;
    overflow:hidden;
    pointer-events:none;
  }
}
