/* ============================================
   FILTER BAR BASE
============================================ */
.filters-wrapper {
  top: 60px;
  z-index: 1040;
  background: #fff;
  border-bottom: 1px solid #ddd;
}
.filters-wrapper input,
.filters-wrapper select {
  cursor: pointer;
}

/* ============================================
     ADVANCED FILTERS — smooth collapse
  ============================================ */
#advancedFilters {
  overflow: visible !important;
  height: auto !important;
  opacity: 1 !important;
  padding: 12px;
  display: none; /* حالت اولیه بسته */
  background: #f7f7f7;
  border-radius: 6px;
}

/* وقتی show فعال شد → فقط display: block */
#advancedFilters.show {
  display: block !important;
}

/* ============================================
     Inputs + Selects
  ============================================ */
#filtersBar select,
#filtersBar input {
  font-size: 0.85rem;
}

/* remove default select arrow */
#filtersBar select.form-select {
  appearance: none;
  -webkit-appearance: none;
  -moz-appearance: none;
  background: none !important;
  text-align: right;
  direction: rtl;
  padding-right: 10px !important;
}

/* ============================================
     Buttons
  ============================================ */
#filtersBar .btn-sm {
  font-size: 0.8rem;
  padding: 5px 10px;
  border-radius: 5px;
}

/* ✅ Blue button hover (replaced) */
.advancedFiltersBlueBtn {
  background-color: #318fe3 !important; /* was #3490e3 */
  color: white;
  border-color: #318fe3 !important; /* was #3490e3 */
}
.advancedFiltersBlueBtn:hover {
  background-color: #318fe3 !important; /* was #267ac7 */
  filter: brightness(0.9); /* keeps same color family */
}

/* ============================================
     TOGGLE ADVANCED BUTTON — RESPONSIVE
  ============================================ */
#toggleAdvanced {
  white-space: nowrap !important;
  padding: 6px 10px;
}

#toggleAdvanced span {
  font-size: 0.78rem;
}
#toggleAdvanced i {
  font-size: 0.85rem;
}

/* sm */
@media (max-width: 767px) {
  #toggleAdvanced span {
    font-size: 0.66rem;
  }
  #toggleAdvanced i {
    font-size: 0.72rem;
  }
}

/* xs */
@media (max-width: 575px) {
  #toggleAdvanced span {
    font-size: 0.62rem;
  }
  #toggleAdvanced i {
    font-size: 0.7rem;
  }
}

/* FIX: 1200 → 1523px (your problematic range) */
@media (min-width: 1200px) and (max-width: 1523px) {
  #toggleAdvanced {
    padding: 6px 6px !important;
  }
  #toggleAdvanced span {
    font-size: 0.65rem !important;
  }
  #toggleAdvanced i {
    font-size: 0.75rem !important;
  }
}

/* ============================================
   UNIFIED INPUT/SELECT STYLING
============================================ */
.filter-input {
  border: 1px solid #ced4da !important;
  box-shadow: none !important;
  transition: border 0.2s ease;
}

.filter-input:focus {
  border: 1px solid #318fe3 !important; /* already your blue */
  box-shadow: none !important;
}

.actions-left {
  justify-content: flex-start !important; /* Stick to LEFT */
  direction: ltr !important; /* Override RTL alignment */
}
.actions-left > * {
  direction: rtl; /* Keep text/icons RTL while container is LTR */
}

@media (max-width: 1199px) {
  .filters-wrapper {
    top: 53px;
  }
}
