/* Persian ranking toolbar: compact, RTL-first, responsive and visually unified. */
.toolbar{
  direction:rtl !important;
  display:grid !important;
  grid-template-columns:minmax(0,1fr) auto !important;
  align-items:center !important;
  gap:12px !important;
  width:100%;
  padding:10px !important;
  margin-top:14px;
  border:1px solid #e6e9f0;
  border-radius:18px;
  background:#f8f9fc;
  box-sizing:border-box;
}

.toolbar .tabs{
  direction:rtl !important;
  order:0;
  display:flex !important;
  align-items:center;
  flex-wrap:wrap;
  justify-content:flex-start;
  gap:6px !important;
  min-width:0;
  margin:0 !important;
  padding:0 !important;
  background:transparent !important;
  border:0 !important;
}

.toolbar .tabs button{
  direction:rtl;
  text-align:center;
  min-height:42px;
  padding:9px 15px !important;
  border:1px solid transparent !important;
  border-radius:12px !important;
  background:transparent !important;
  color:#667085 !important;
  font-family:inherit;
  font-size:14px !important;
  font-weight:700 !important;
  line-height:1.4;
  white-space:nowrap;
  box-shadow:none !important;
  transition:background-color .18s ease,border-color .18s ease,color .18s ease,box-shadow .18s ease,transform .18s ease;
}

.toolbar .tabs button:hover{
  color:#4f46e5 !important;
  background:#fff !important;
  border-color:#e3e5ef !important;
}

.toolbar .tabs button.active{
  color:#4f46e5 !important;
  background:#fff !important;
  border-color:#e4e3fb !important;
  box-shadow:0 4px 12px rgba(65,55,170,.10) !important;
}

.toolbar .tabs button:active{
  transform:translateY(1px);
}

.toolbar .controls{
  direction:rtl !important;
  order:1;
  display:flex !important;
  align-items:center;
  justify-content:flex-end;
  gap:8px !important;
  margin:0 !important;
  min-width:max-content;
}

.toolbar .search,
.toolbar #available-filter{
  flex:0 0 auto;
  min-height:44px;
  box-sizing:border-box;
  border-radius:12px !important;
  background:#fff !important;
  border:1px solid #dfe3eb !important;
  box-shadow:none !important;
}

.toolbar .search{
  direction:rtl;
  text-align:right;
  width:290px;
  max-width:32vw;
  display:flex;
  align-items:center;
  gap:8px;
  padding:0 13px !important;
  color:#98a2b3;
}

.toolbar .search input{
  direction:rtl;
  text-align:right;
  width:100%;
  border:0 !important;
  outline:0 !important;
  background:transparent !important;
  font-family:inherit;
  font-size:14px;
  color:#344054;
}

.toolbar .search input::placeholder{
  color:#98a2b3;
  opacity:1;
}

.toolbar #available-filter{
  direction:rtl;
  text-align:center;
  padding:0 16px !important;
  color:#475467 !important;
  font-family:inherit;
  font-weight:700 !important;
  white-space:nowrap;
}

.toolbar #available-filter:hover{
  color:#4f46e5 !important;
  border-color:#d8d5fb !important;
}

.toolbar #available-filter.active{
  color:#4338ca !important;
  background:#f3f2ff !important;
  border-color:#c9c5fa !important;
}

@media(max-width:1100px){
  .toolbar{
    grid-template-columns:1fr !important;
    align-items:stretch !important;
  }
  .toolbar .tabs{
    width:100%;
  }
  .toolbar .controls{
    width:100%;
    justify-content:flex-start;
  }
  .toolbar .search{
    flex:1 1 280px;
    width:auto;
    max-width:none;
  }
}

@media(max-width:720px){
  .toolbar{
    padding:8px !important;
    border-radius:15px;
  }
  .toolbar .tabs{
    flex-wrap:nowrap;
    overflow-x:auto;
    justify-content:flex-start;
    padding-bottom:2px !important;
    scrollbar-width:none;
    -webkit-overflow-scrolling:touch;
  }
  .toolbar .tabs::-webkit-scrollbar{display:none}
  .toolbar .tabs button{
    flex:0 0 auto;
    min-height:40px;
    padding:8px 13px !important;
    font-size:13px !important;
  }
  .toolbar .controls{
    flex-wrap:nowrap;
  }
}

@media(max-width:560px){
  .toolbar .controls{
    display:grid !important;
    grid-template-columns:1fr auto;
    gap:7px !important;
  }
  .toolbar .search{
    width:100%;
    min-width:0;
  }
  .toolbar #available-filter{
    padding:0 12px !important;
    font-size:13px;
  }
}