/* V2-05.4R.10.4.4 — Industry-standard compact price range panel */
.smart-price-range {
  display: grid;
  grid-template-columns: minmax(148px, 176px) minmax(320px, 1fr) minmax(148px, 176px) auto;
  align-items: center;
  gap: 18px;
  min-width: 0;
  min-height: 78px;
  margin: 0;
  padding: 10px 16px;
  border: 0;
  background: #fff;
}

.smart-price-range > legend,
.smart-price-range .visually-hidden {
  position: absolute !important;
  width: 1px !important;
  height: 1px !important;
  overflow: hidden !important;
  clip: rect(0 0 0 0) !important;
  white-space: nowrap !important;
  clip-path: inset(50%) !important;
}

.smart-price-range__field {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr);
  align-items: center;
  gap: 8px;
  min-width: 0;
  color: #676b70;
  font-size: 12px;
  font-weight: 650;
}

.smart-price-range__input {
  display: flex;
  align-items: center;
  min-width: 0;
  height: 40px;
  overflow: hidden;
  border: 1px solid rgba(20, 24, 28, 0.13);
  border-radius: 10px;
  background: #fff;
}

.smart-price-range__input:focus-within {
  border-color: #292826;
  box-shadow: 0 0 0 2px rgba(41, 40, 38, 0.08);
}

.smart-price-range__input input {
  width: 100%;
  min-width: 0;
  height: 100%;
  padding: 0 5px 0 12px;
  border: 0;
  outline: 0;
  background: transparent;
  color: #292826;
  font: inherit;
  font-size: 14px;
  font-weight: 700;
  appearance: textfield;
}

.smart-price-range__input input::-webkit-inner-spin-button,
.smart-price-range__input input::-webkit-outer-spin-button {
  margin: 0;
  appearance: none;
}

.smart-price-range__input b {
  padding-right: 12px;
  color: #777b80;
  font-size: 13px;
  font-weight: 650;
}

.smart-price-range__slider {
  --price-start: 0%;
  --price-end: 100%;
  position: relative;
  align-self: stretch;
  min-width: 0;
  height: 54px;
  margin: 0 10px;
}

.smart-price-range__track {
  position: absolute;
  top: 22px;
  right: 0;
  left: 0;
  height: 4px;
  border-radius: 999px;
  background: linear-gradient(to right,
    #e4e6e8 0 var(--price-start),
    #292826 var(--price-start) var(--price-end),
    #e4e6e8 var(--price-end) 100%);
}

.smart-price-range__slider input[type="range"] {
  position: absolute;
  top: 7px;
  right: 0;
  left: 0;
  z-index: 2;
  width: 100%;
  height: 34px;
  margin: 0;
  padding: 0;
  border: 0;
  outline: 0;
  background: transparent;
  pointer-events: none;
  appearance: none;
}

.smart-price-range__slider input[type="range"]:last-of-type {
  z-index: 3;
}

.smart-price-range__slider input[type="range"]::-webkit-slider-runnable-track {
  height: 4px;
  background: transparent;
}

.smart-price-range__slider input[type="range"]::-webkit-slider-thumb {
  width: 20px;
  height: 20px;
  margin-top: -8px;
  border: 2px solid #fff;
  border-radius: 50%;
  background: #292826;
  box-shadow: 0 0 0 1px rgba(20, 24, 28, 0.24), 0 2px 6px rgba(20, 24, 28, 0.18);
  pointer-events: auto;
  cursor: grab;
  appearance: none;
}

.smart-price-range__slider input[type="range"]:focus-visible::-webkit-slider-thumb {
  box-shadow: 0 0 0 3px rgba(41, 40, 38, 0.18);
}

.smart-price-range__slider input[type="range"]::-moz-range-track {
  height: 4px;
  background: transparent;
}

.smart-price-range__slider input[type="range"]::-moz-range-thumb {
  width: 18px;
  height: 18px;
  border: 2px solid #fff;
  border-radius: 50%;
  background: #292826;
  box-shadow: 0 0 0 1px rgba(20, 24, 28, 0.24), 0 2px 6px rgba(20, 24, 28, 0.18);
  pointer-events: auto;
  cursor: grab;
}

.smart-price-range__ticks {
  position: absolute;
  right: 0;
  bottom: 0;
  left: 0;
  height: 16px;
  color: #909398;
  font-size: 10px;
  line-height: 1;
  pointer-events: none;
}

.smart-price-range__ticks span {
  position: absolute;
  left: var(--tick-position);
  transform: translateX(-50%);
  white-space: nowrap;
}

.smart-price-range__ticks span:first-child {
  transform: none;
}

.smart-price-range__ticks span:last-child {
  transform: translateX(-100%);
}

.smart-price-range__reset {
  min-height: 34px;
  padding: 0 10px;
  border: 0;
  border-radius: 8px;
  background: transparent;
  color: #686c71;
  font-size: 12px;
  font-weight: 650;
  white-space: nowrap;
  cursor: pointer;
}

.smart-price-range__reset:hover {
  background: #f5f6f7;
  color: #292826;
}

.smart-price-range__reset:focus-visible {
  outline: 2px solid rgba(41, 40, 38, 0.28);
  outline-offset: 2px;
}

.smart-price-range__bounds,
.smart-price-range__values {
  display: none !important;
}

@media (max-width: 1024px) {
  .smart-price-range {
    grid-template-columns: minmax(140px, 1fr) minmax(140px, 1fr) auto;
    gap: 10px 12px;
    min-height: 116px;
  }

  .smart-price-range__field--min {
    grid-column: 1;
    grid-row: 1;
  }

  .smart-price-range__field--max {
    grid-column: 2;
    grid-row: 1;
  }

  .smart-price-range__reset {
    grid-column: 3;
    grid-row: 1;
  }

  .smart-price-range__slider {
    grid-column: 1 / -1;
    grid-row: 2;
    margin: 0 8px;
  }
}

@media (max-width: 520px) {
  .smart-price-range {
    grid-template-columns: minmax(0, 1fr) minmax(0, 1fr) auto;
    padding: 10px;
  }

  .smart-price-range__field {
    grid-template-columns: 1fr;
    gap: 4px;
  }

  .smart-price-range__input {
    height: 38px;
  }

  .smart-price-range__ticks span:nth-child(n+5):not(:last-child) {
    display: none;
  }
}
