/* OpenRouter category navigation: one full-width horizontal row. */

/* Override the generic ranking toolbar grid placement. Without these rules,
   .toolbar .controls creates an implicit second grid column and squeezes the
   OpenRouter navigation into half of the card. */
.toolbar.openrouter-toolbar{
  grid-template-columns:minmax(0,1fr) !important;
  grid-auto-columns:minmax(0,1fr) !important;
  width:100% !important;
}

.toolbar.openrouter-toolbar > .openrouter-toolbar-head,
.toolbar.openrouter-toolbar > .openrouter-nav-grid,
.toolbar.openrouter-toolbar > .controls{
  grid-column:1 / -1 !important;
  width:100% !important;
  max-width:100% !important;
  min-width:0 !important;
}

.toolbar.openrouter-toolbar > .openrouter-toolbar-head{
  grid-row:1 !important;
}

.toolbar.openrouter-toolbar > .openrouter-nav-grid{
  grid-row:2 !important;
}

.toolbar.openrouter-toolbar > .controls{
  grid-row:3 !important;
}

.toolbar.openrouter-toolbar .openrouter-nav-grid{
  direction:rtl !important;
  display:flex !important;
  flex-wrap:nowrap !important;
  align-items:stretch !important;
  justify-content:space-between !important;
  gap:7px !important;
  box-sizing:border-box !important;
  overflow-x:auto !important;
  overflow-y:hidden !important;
  padding:9px !important;
  scrollbar-width:thin !important;
  scrollbar-color:#c9ced9 transparent !important;
  -webkit-overflow-scrolling:touch !important;
}

.toolbar.openrouter-toolbar .openrouter-nav-grid::-webkit-scrollbar{
  height:5px !important;
}

.toolbar.openrouter-toolbar .openrouter-nav-grid::-webkit-scrollbar-track{
  background:transparent !important;
}

.toolbar.openrouter-toolbar .openrouter-nav-grid::-webkit-scrollbar-thumb{
  background:#c9ced9 !important;
  border-radius:999px !important;
}

/* Desktop: all 12 choices share the complete row. */
.toolbar.openrouter-toolbar .openrouter-nav-item{
  flex:1 1 0 !important;
  min-width:0 !important;
  min-height:46px !important;
  padding:8px 6px !important;
  box-sizing:border-box !important;
  white-space:nowrap !important;
  overflow:hidden !important;
  text-overflow:ellipsis !important;
  font-size:11.5px !important;
  line-height:1.45 !important;
}

.toolbar.openrouter-toolbar .openrouter-nav-item::before{
  flex:0 0 auto !important;
  width:6px !important;
  height:6px !important;
  margin-left:5px !important;
}

/* Search and availability are a separate full-width row. */
.toolbar.openrouter-toolbar .controls{
  direction:rtl !important;
  display:flex !important;
  align-items:center !important;
  justify-content:flex-start !important;
  gap:10px !important;
  margin:0 !important;
  margin-top:2px !important;
}

.toolbar.openrouter-toolbar .controls .search{
  width:min(440px,100%) !important;
  max-width:440px !important;
}

@media (max-width:1180px){
  .toolbar.openrouter-toolbar .openrouter-nav-grid{
    justify-content:flex-start !important;
  }

  .toolbar.openrouter-toolbar .openrouter-nav-item{
    flex:0 0 auto !important;
    min-width:126px !important;
    overflow:visible !important;
    text-overflow:clip !important;
    font-size:12px !important;
  }
}

@media (max-width:700px){
  .toolbar.openrouter-toolbar .openrouter-nav-item{
    min-width:138px !important;
  }

  .toolbar.openrouter-toolbar .controls{
    flex-wrap:wrap !important;
  }

  .toolbar.openrouter-toolbar .controls .search{
    flex:1 1 100% !important;
    max-width:none !important;
  }
}
