/* === Compact Toolbar (final) === */
.toolbar{
  display:flex;
  align-items:center;
  justify-content:flex-start;
  gap:6px;
  flex-wrap:nowrap;
  margin:6px 0 10px;
}

/* Form inline layout */
.toolbar form{
  display:flex;
  align-items:center;
  gap:6px;
  flex-wrap:nowrap;
  margin:0;
}

/* Override global .form rules inside toolbar */
.toolbar form input,
.toolbar form select,
.toolbar form button{
  display:inline-block;
  width:auto;
  min-width:unset;
  margin:0;
}

/* Input width */
.toolbar input[type="text"],
.toolbar input[type="search"]{
  width:200px;
  padding:.55rem .7rem;
  background:#fff;
  color:#0f172a;
  border:1px solid var(--border);
  border-radius:8px;
  font-size:1rem;
  line-height:1.4;
}

/* Select narrower */
.toolbar select{
  width:80px;
  padding:.55rem .7rem;
  background:#fff;
  color:#0f172a;
  border:1px solid var(--border);
  border-radius:8px;
  font-size:1rem;
  line-height:1.4;
}

/* Buttons */
.toolbar .btn,
.toolbar .icon-btn,
.toolbar a.btn,
.toolbar a.export-btn{
  padding:.55rem .7rem;
  font-size:13px;
  border-radius:8px;
  line-height:1.2;
  white-space:nowrap;
}

/* Export button highlight */
.toolbar a.export-btn{
  background:var(--primary);
  color:#fff;
  border:1px solid var(--primary);
  font-weight:600;
}
.toolbar a.export-btn:hover{ filter:brightness(.95); }

/* Search box: one control (border/background live on the .search-box
   wrapper itself), not an input and a button glued together — the input
   and its icon button both go borderless/transparent inside it, so
   there's no visible seam between two separately-styled boxes. This is
   what every search bar on the site (admin orders/Mewe users/products,
   the /products page, and the IndexCard shortcode's live-filter box in
   indexcard.css) now shares, so they all look like the same component
   rather than each rolling its own layout — deliberately NOT scoped to
   .toolbar so it renders identically wherever it's dropped in. Radius
   matches .toolbar's own input/select/button radius (8px, not a full
   pill) so it doesn't stand out as a differently-rounded shape next to
   the export/other buttons beside it in an admin toolbar row. Width is
   flexible (flex:1 1 auto on the input) rather than fixed, so a
   non-toolbar caller's own wrapper controls how wide the whole box
   gets; see the .toolbar-scoped override just below for the admin/
   product search bars' fixed pixel width. */
.search-box{
  display:flex;
  align-items:stretch;
  background:#fff;
  border:1px solid var(--border);
  border-radius:8px;
  overflow:hidden;
  width:100%;
}
.search-box input[type="text"],
.search-box input[type="search"]{
  border:none;
  border-radius:0;
  background:transparent;
  flex:1 1 auto;
  min-width:0;
}
.search-box input[type="text"]:focus,
.search-box input[type="search"]:focus{
  outline:none;
}
.search-box .icon-btn{
  border:none;
  border-radius:0;
  background:transparent;
  border-left:1px solid var(--border);
  flex:0 0 auto;
  /* style.css makes every .btn/.icon-btn full width on phones; inside a search box the icon must stay icon-sized, or it squeezes the input to nothing */
  width:auto;
  min-height:0;
  padding:0 14px;
}
.search-box .icon-btn:hover{
  background:var(--primary-weak);
  filter:none;
}

/* Admin/product search bars sit in a .toolbar row next to other fixed-
   width controls, so (unlike a standalone .search-box elsewhere) they
   keep a fixed pixel width instead of the fluid default above. */
.toolbar .search-box{
  width:200px;
}
@media (max-width:760px){
  .toolbar .search-box{width:140px}
}

/* Mobile view: keep compact, no full width */
@media (max-width:760px){
  .toolbar{flex-wrap:wrap; gap:6px}
  .toolbar input[type="text"],
  .toolbar input[type="search"]{width:140px}
  .toolbar select{width:60px}
}
