/* ===================================================================
   4. REDESIGNED FILTER CARD (Clean, High-Contrast, Intuitive)
   =================================================================== */

.filter-card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 14px;
  padding: 16px 18px;
  margin-bottom: 14px;
  display: flex;
  flex-direction: column;
  gap: 12px;
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.25);
}

.filter-row {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  align-items: flex-end;
}

.filter-row-main {
  width: 100%;
}

.filter-group {
  display: flex;
  flex-direction: column;
  gap: 4px;
  flex: 1 1 140px;
}
.filter-group.sm {
  flex: 0 1 125px;
}
.filter-group.search-group {
  flex: 3 1 280px;
}

.filter-label {
  font-size: 11px;
  font-weight: 700;
  color: var(--text-muted);
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

/* Search input with icon */
.search-input-wrapper {
  position: relative;
  display: flex;
  align-items: center;
}

.search-icon {
  position: absolute;
  left: 12px;
  font-size: 14px;
  pointer-events: none;
  opacity: 0.7;
}

.filter-control {
  background: var(--surface-input);
  border: 1px solid var(--border);
  color: #f1f5f9;
  padding: 8px 12px;
  border-radius: 8px;
  font-size: 13px;
  font-weight: 500;
  width: 100%;
  transition: all 0.18s ease;
}

.search-input {
  padding-top: 10px;
  padding-bottom: 10px;
  font-size: 13.5px;
}

/* Scoped to the wrapper so responsive `.filter-control` shorthand overrides
   (equal specificity, later in the cascade) can never remove the clearance
   reserved for the absolutely positioned search icon. */
.search-input-wrapper .search-input {
  padding-left: 36px;
}

.filter-control:focus {
  outline: none;
  border-color: var(--border-focus);
  box-shadow: 0 0 0 3px rgba(56, 189, 248, 0.15);
  background: #111a2c;
}

select.filter-control {
  cursor: pointer;
}
select.filter-control option {
  background: #0f172a;
  color: #fff;
}

/* Row 2: Size Filter Cluster & Quick Toggles */
.filter-row-sub {
  padding-top: 10px;
  border-top: 1px solid rgba(255, 255, 255, 0.05);
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex-wrap: wrap;
  gap: 12px;
}

.size-filter-cluster {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  background: rgba(255, 255, 255, 0.02);
  border: 1px solid var(--border);
  padding: 6px 12px;
  border-radius: 10px;
  flex-wrap: wrap;
}

.size-cluster-label {
  font-size: 11.5px;
  font-weight: 700;
  color: #94a3b8;
  white-space: nowrap;
}

.size-inputs-pair {
  display: inline-flex;
  align-items: center;
  gap: 6px;
}

.size-input-item {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  font-size: 11px;
  color: var(--text-muted);
}

.size-input {
  width: 62px;
  padding: 5px 8px;
  text-align: center;
  font-weight: 700;
}

.size-quick-presets {
  display: inline-flex;
  gap: 4px;
  align-items: center;
}

.quick-status-toggles {
  display: inline-flex;
  gap: 6px;
  align-items: center;
}

/* Clean pill buttons */
.pill-btn {
  background: #151e30;
  border: 1px solid var(--border);
  color: var(--text-secondary);
  padding: 5px 11px;
  border-radius: 999px;
  font-size: 12px;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.15s ease;
  display: inline-flex;
  align-items: center;
  gap: 4px;
  white-space: nowrap;
}
.pill-btn:hover {
  background: #1c2842;
  color: #fff;
  border-color: rgba(255, 255, 255, 0.18);
}
.pill-btn.active {
  background: #0284c7;
  border-color: #38bdf8;
  color: #fff;
  box-shadow: none;
}

/* Reset button */
.filter-group-reset {
  flex: 0 0 auto;
  align-self: flex-end;
}
.btn-reset {
  background: transparent;
  border: 1px solid rgba(239, 68, 68, 0.4);
  color: #f87171;
  height: 38px;
  line-height: 36px;
  padding: 0 14px;
  border-radius: 8px;
  font-size: 12px;
  font-weight: 700;
  cursor: pointer;
  transition: all 0.18s;
  white-space: nowrap;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  box-sizing: border-box;
}
.btn-reset:hover {
  background: rgba(239, 68, 68, 0.15);
  border-color: #ef4444;
  color: #fff;
}
.btn-reset.sm {
  height: 32px;
  line-height: 30px;
  padding: 0 10px;
  font-size: 11px;
}

