/* =========================
   SEARCH BOX
========================= */
.search-box {
  background: #fff;
  border: 1px solid var(--border);
  border-radius: 10px;
  padding: 18px;
}

/* Real-time badge */
.real-time-badge {
  background: linear-gradient(135deg, var(--primary) 0%, #2ecc71 100%);
  color: white;
  padding: 6px 14px;
  border-radius: 20px;
  font-size: 12px;
  font-weight: 500;
  display: inline-flex;
  align-items: center;
  gap: 8px;
  animation: pulse 2s infinite;
}

.real-time-badge i {
  font-size: 12px;
}

/* Results footer - NO LINE BREAK */
.results-footer {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding-top: 15px;
  border-top: 1px solid var(--border);
  flex-wrap: nowrap;
  gap: 15px;
}

.real-time-note {
  font-size: 12px;
  color: #888;
  display: flex;
  align-items: center;
  gap: 6px;
  flex-shrink: 0;
  white-space: nowrap;
}

.real-time-note i {
  font-size: 11px;
  color: var(--primary);
}

/* Inputs */
.search-box input,
.search-box select {
  width: 100%;
  padding: 10px 12px;
  font-size: 13px;
  border: 1px solid var(--border);
  border-radius: 6px;
  background: #fff;
  transition: all 0.2s ease;
}

.search-box input:focus,
.search-box select:focus {
  border-color: var(--primary);
  outline: none;
  box-shadow: 0 0 0 2px rgba(46, 125, 50, 0.1);
}

/* =========================
   TOP GRID
========================= */
.search-compact-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 12px;
}

/* =========================
   RANGE GRID (INLINE 3)
========================= */
.range-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 14px;
}

/* =========================
   RANGE GROUP
========================= */
.range-group {
  background: #fafafa;
  padding: 10px 12px;
  border-radius: 8px;
  border: 1px solid var(--border);
}

.range-group label {
  font-size: 13px;
  display: block;
  margin-bottom: 4px;
}

.range-value {
  color: var(--primary);
  font-weight: 600;
}

/* =========================
   SLIDER STYLES
========================= */
input[type="range"] {
  -webkit-appearance: none;
  width: 100%;
  height: 4px;
  background: #ddd;
  border-radius: 5px;
  margin: 6px 0;
}

input[type="range"]::-webkit-slider-runnable-track {
  height: 4px;
  background: #ddd;
  border-radius: 5px;
}

input[type="range"]::-webkit-slider-thumb {
  -webkit-appearance: none;
  width: 12px;
  height: 12px;
  background: var(--primary);
  border-radius: 50%;
  cursor: pointer;
  margin-top: -4px;
  transition: transform 0.1s ease;
}

input[type="range"]::-webkit-slider-thumb:hover {
  transform: scale(1.2);
}

input[type="range"]::-moz-range-thumb {
  width: 12px;
  height: 12px;
  background: var(--primary);
  border-radius: 50%;
  cursor: pointer;
}

/* Results counter animation */
#resultsCount {
  font-size: 18px;
  font-weight: 700;
  color: var(--primary);
  transition: all 0.2s ease;
  display: inline-block;
  white-space: nowrap;
}

/* Counter text */
.results-footer div:first-child {
  white-space: nowrap;
  flex-shrink: 0;
}

@keyframes pulse {
  0% {
    opacity: 1;
  }
  50% {
    opacity: 0.8;
  }
  100% {
    opacity: 1;
  }
}

select:disabled {
  opacity: 0.6;
  cursor: wait;
}

/* Smooth transitions */
.range-group input {
  transition: all 0.2s ease;
}

/* Highlight active filters */
select:focus, input:focus {
  border-color: var(--primary);
  outline: none;
  box-shadow: 0 0 0 2px rgba(46, 125, 50, 0.1);
}

/* =========================
   RESPONSIVE
========================= */
@media (max-width: 768px) {
  .search-compact-grid {
    grid-template-columns: 1fr;
  }

  .range-grid {
    grid-template-columns: 1fr;
  }
  
  /* Keep results footer in one line on mobile */
  .results-footer {
    flex-direction: row;
    justify-content: space-between;
    align-items: center;
    gap: 10px;
    flex-wrap: nowrap;
  }
  
  .results-footer div:first-child {
    font-size: 12px;
    white-space: nowrap;
  }
  
  .real-time-note {
    font-size: 10px;
    white-space: nowrap;
  }
  
  #resultsCount {
    font-size: 16px;
  }
}

/* Extra small devices */
@media (max-width: 480px) {
  .results-footer div:first-child {
    font-size: 11px;
  }
  
  .real-time-note {
    font-size: 9px;
  }
  
  .real-time-note i {
    font-size: 9px;
  }
  
  #resultsCount {
    font-size: 14px;
  }
}