/* Container für den Preisfilter */
.price-filter-section {
     width: 100%;
     max-width: 500px;
     margin: 0 auto;
     font-family: Arial, sans-serif;
     color: var(--text-light);
}

body.dark-mode .price-filter-section {
  color: var(--text-dark);
}

/* Horizontale Linie (Trenner) */
.price-filter-section hr {
     border: none;
     height: 1px;
     background-color: #ddd;
     margin: 10px 0;
}

/* Überschrift Preisbereich mit Icon */
.price-filter-section h3.section-title {
     font-weight: bold;
     font-size: 1.1rem;
     display: flex;
     align-items: center;
     gap: 8px;
     margin: 10px 0;
}

/* Icon Preisbereich */
.price-filter-section h3.section-title .icon-left {
  width: 24px;
  height: 24px;
  vertical-align: middle;
  flex-shrink: 0;
}

/* Überschrift allgemein (flex für Icon + Text) */
.section-title {
    display: flex;
     align-items: center;
     justify-content: baseline;
     gap: 5px;
     background: none;
     cursor: default;
}

/* Balkendiagramm Container */
.price-histogram {
     display: flex;
     align-items: flex-end;
     justify-content: space-between;
     height: 100px;
     margin-bottom: 0px;
     padding: 0 5px;
     gap: 3px;
}

/* Balken im Preisdiagramm */
.price-histogram .bar {
     flex: 1;
     background: var(--hover-light);
     border-radius: 4px 4px 0 0;
     transition: background-color 0.3s;
}

body.dark-mode .price-histogram .bar {
  background: var(--hover-dark);
}

/* Balken Hover-Effekt */
.price-histogram .bar:hover {
     background-color: #f28bae;
}

body.dark-mode .price-histogram .bar:hover {
     background-color: #e899bf;
}

/* Container für den Range Slider */
.range-input {
  position: relative;
  width: 100%;
  height: 40px;
  padding: 0 20px;
  box-sizing: border-box;
}

/* Range Slider Grundstil */
.range-input input[type="range"] {
  position: absolute;
  top: 0;
  left: -20px;
  width: calc(100% + 40px); /* erweitert, um Thumbs außen zu platzieren */
  height: 40px;
  pointer-events: all;
  appearance: none;
  -webkit-appearance: none;
  background: transparent;
  margin: 0;
  border: none;
}

/* Schieberegler-Knopf (Webkit) */
.range-input input[type="range"]::-webkit-slider-thumb {
  -webkit-appearance: none;
  height: 20px;
  width: 20px;
  background: var(--hover-light);
  border-radius: 50%;
  cursor: pointer;
  margin-top: -8px;
  position: relative;
  z-index: 2;
  border: none;
  box-shadow: 0 0 5px rgba(244, 167, 193, 0.7);
}

body.dark-mode .range-input input[type="range"]::-webkit-slider-thumb {
  background: var(--hover-dark);
  box-shadow: 0 0 5px rgba(232, 107, 168, 0.7);
}

/* Schieberegler-Knopf (Firefox) */
.range-input input[type="range"]::-moz-range-thumb {
  height: 20px;
  width: 20px;
  background: var(--hover-light);
  border-radius: 50%;
  cursor: pointer;
  border: none;
  box-shadow: 0 0 5px rgba(244, 167, 193, 0.7);
}

body.dark-mode .range-input input[type="range"]::-moz-range-thumb {
  background: var(--hover-dark);
  box-shadow: 0 0 5px rgba(232, 107, 168, 0.7);
}

/* Laufleiste des Sliders (Webkit) */
.range-input input[type="range"]::-webkit-slider-runnable-track {
  height: 5px;
  background: var(--bg-light);
  border-radius: 5px;
}

body.dark-mode .range-input input[type="range"]::-webkit-slider-runnable-track {
  height: 5px;
  background: var(--bg-dark);
  border-radius: 5px;
}

/* Laufleiste des Sliders (Firefox) */
.range-input input[type="range"]::-moz-range-track {
  height: 5px;
  background: var(--bg-light);
  border-radius: 5px;
}

body.dark-mode .range-input input[type="range"]::-moz-range-track {
  height: 5px;
  background: var(--bg-dark);
  border-radius: 5px;
}

/* Farbiger Fortschrittsbalken Slider */
.slider-track {
  position: absolute;
  max-width: 100%;
  height: 6px;
  background: var(--hover-light);
  top: 50%;
  left: 0;      
  right: auto;   
  transform: translateY(-50%);
  border-radius: 3px;
  z-index: 1;
}

body.dark-mode .slider-track {
  background: var(--hover-dark);
}

/* Überschrift Preisbereich */
.price-filter-section>h3.section-title {
     text-align: left;
     margin-bottom: 15px;
     font-weight: 600;
     font-size: 1.1rem;
}

/* Container für Preis-Eingabefelder */
.price-inputs {
  display: flex;
  flex-wrap: wrap;
  gap: 20px;
  margin-top: 0px;
  justify-content: space-between;
  align-items: flex-end;
}

/* Mobile Darstellung der Eingabefelder (bis 797px) */
@media (max-width: 797px) {
  .price-inputs {
    flex-direction: column;
    align-items: stretch;
    gap: 10px;
  }

  .price-inputs .input-box {
    flex: unset;
    width: 100%;
  }
}

/* Ab 798px: Inputs nebeneinander mit space-between */
@media (min-width: 798px) {
  .price-inputs {
    flex-direction: row;
    flex-wrap: nowrap; /* keine Umbrüche */
    justify-content: space-between;
  }

  .price-inputs .input-box {
    flex: 0 0 48%; /* ca. halb mit Abstand */
    max-width: 48%;
  }
}

.priceInputMin,
.priceInputMax {
  text-align: center;
  background-color: var(--bg-light);
  color: var(--text-light);
}

body.dark-mode .priceInputMin,
body.dark-mode .priceInputMax {
  text-align: center;
  background-color: var(--bg-dark);
  color: var(--text-dark);
}

/* Fokus-Lila-Box-Shadow nur, wenn KEIN Fehler */
.priceInputMin:focus:not(.invalid-input),
.priceInputMax:focus:not(.invalid-input) {
  border: 1px solid #6200ea; /* Lila Ton */
  box-shadow: 0 0 5px rgba(98, 0, 234, 0.8);
  outline: none;
}

body.dark-mode .priceInputMin:focus:not(.invalid-input),
body.dark-mode .priceInputMax:focus:not(.invalid-input) {
  border: 1px solid #6200ea; /* Lila Ton */
  box-shadow: 0 0 5px rgba(98, 0, 234, 0.8);
  outline: none;
}

/* Fehler-Rot überschreibt Fokus */
.priceInputMin.invalid-input,
.priceInputMax.invalid-input {
  border: 1px solid red;
  background-color: #ffeaea;
  outline: none;
  box-shadow: 0 0 5px #e74c3c !important; /* wichtig, um Fokus zu überschreiben */
  color: inherit;
}

body.dark-mode .priceInputMin.invalid-input,
body.dark-mode .priceInputMax.invalid-input {
  border: 1px solid #ff6b6b;
  background-color: #3b0a0a;
  color: var(--text-dark);
  box-shadow: 0 0 5px #ff6b6b !important;
}

body.dark-mode .priceInputMin::placeholder,
body.dark-mode .priceInputMax::placeholder {
   color: #9CA3AF;
}

/* Jede Input-Box flexibler Container */
.price-inputs .input-box {
  display: flex;
  flex-direction: column;
}

/* Label Styling */
.price-inputs label {
  font-weight: bold;
  margin-bottom: 5px;
  font-size: 0.9rem;
}

/* Pfeile bei Nummern-Inputs entfernen (Webkit) */
.price-inputs input[type="number"]::-webkit-outer-spin-button,
.price-inputs input[type="number"]::-webkit-inner-spin-button {
  -webkit-appearance: none;
  margin: 0;
}

/* Pfeile bei Nummern-Inputs entfernen (allgemein) */
.price-inputs input[type="number"] {
  appearance: textfield;
  -moz-appearance: textfield;
}



