/* Element vollständig ausblenden (z. B. per JavaScript) */
#livingspace-filter-section .hidden {
  display: none !important;
}

/* Standard: <hr /> */
.livingspace-filter-section-hr {
  display: block; 
}

/* <hr /> = hidden */
.livingspace-filter-section:has(.section-title.hidden) .livingspace-filter-section-hr {
  display: none;
}


/* Überschrift der Flächen-Sektion (Titelzeile mit Icon) */
#livingspace-filter-section .section-title {
  display: flex;
  justify-content: space-between;
  align-items: center;
  font-size: 1.2rem;
  font-weight: 600;
}

/* Linker Teil der Titelzeile (Text + Info-Icon) */
#livingspace-filter-section .title-left {
  display: flex;
  align-items: center;
  gap: 0.4rem;
}

/* Hülle für das Info-Icon mit Hover-Funktion */
#livingspace-filter-section .info-icon-wrapper {
  position: relative;
  width: 18px;
  height: 18px;
  flex-shrink: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
}

/* Info-Icon selbst (SVG oder Bild) */
#livingspace-filter-section .info-icon {
  width: 18px;
  height: 18px;
}

/* Tooltip, der beim Hover angezeigt wird */
#livingspace-filter-section .info-tooltip {
  position: absolute;
  bottom: 125%;
  right: 0;
  background-color: #333;
  color: var(--text-dark);
  padding: 6px 10px;
  border-radius: 4px;
  font-size: 0.75rem;
  white-space: nowrap;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.2s ease;
  z-index: 10;
}

/* Tooltip-Stil im Dark Mode */
body.dark-mode #livingspace-filter-section .info-tooltip {
  background-color: var(--border-dark);
  color: var(--text-dark);
}

/* Tooltip anzeigen, wenn Icon-Hülle gehovert wird */
#livingspace-filter-section .info-icon-wrapper:hover .info-tooltip {
  opacity: 1;
  pointer-events: auto;
}

/* Entfernt Spinner bei Zahleneingabe (Chrome) */
#livingspace-filter-section input[type=number]::-webkit-outer-spin-button,
#livingspace-filter-section input[type=number]::-webkit-inner-spin-button {
  -webkit-appearance: none;
  margin: 0;
}

/* Entfernt Spinner bei Zahleneingabe (Firefox) */
#livingspace-filter-section input[type=number] {
  appearance: textfield;
  -moz-appearance: textfield;
}



/* --- Spezielle Klassen für die 5 Flächenfelder --- */

/* 1. Allgemeines Flächenfeld bei Miete */
#livingspace-filter-section .livingspace-input-box {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 1rem; /* Abstand zwischen Label und Input */
}

#livingspace-filter-section .livingspace-input-box label {
  flex-shrink: 0; /* Label soll nicht schrumpfen */
}

#livingspace-filter-section .livingspace-input-box input {
  width: 190px; /* feste Breite für Eingabefeld */
  text-align: center; /* Zahl zentriert im Input */
}

/* Ab 797px: Label über Input, beide zentriert */
@media (max-width: 797px) {
  #livingspace-filter-section .livingspace-input-box {
    flex-direction: column;
    justify-content: center;
    align-items: center;
    gap: 0.5rem; /* kleiner Abstand zwischen Label und Input */
  }

  #livingspace-filter-section .livingspace-input-box label,
  #livingspace-filter-section .livingspace-input-box input {
    width: 100%;
    text-align: center;
  }

  #livingspace-filter-section .livingspace-input-box input {
    width: 100%; /* etwas breiter im mobilen Layout */
  }

  /* Hier: Labels fett und 1rem Schriftgröße nur unter 797px */
  #livingspace-filter-section .livingspace-input-box label {
    font-family: Arial, sans-serif;
    font-weight: bold;  /* bold */
    font-size: 0.95rem;
  }
}

/* 1. Fläche (Mieten) */
#livingspace-rent input {
background-color: var(--bg-light);
}

body.dark-mode #livingspace-rent input {
background-color: var(--bg-dark);
color: var(--text-dark);
}

#livingspace-rent input:focus {
  border: 1px solid #6200ea; /* Lila Ton */
  box-shadow: 0 0 5px rgba(98, 0, 234, 0.8);
  outline: none;
}

/* 2. Wohnfläche */
#field-wfl input {
  background-color: var(--bg-light);
}

body.dark-mode #field-wfl input {
 background-color: var(--bg-dark);
color: var(--text-dark);
}

#field-wfl input:focus {
  border: 1px solid #6200ea; /* Lila Ton */
  box-shadow: 0 0 5px rgba(98, 0, 234, 0.8);
  outline: none;
}


/* 3. Grundstücksfläche */
#field-gfl {
  margin-top: 10px;
}

#field-gfl input {
  background-color: var(--bg-light);
}

body.dark-mode #field-gfl input {
  background-color: var(--bg-dark);
  color: var(--text-dark);
}

#field-gfl input:focus {
   border: 1px solid #6200ea; /* Lila Ton */
  box-shadow: 0 0 5px rgba(98, 0, 234, 0.8);
  outline: none;
}

/* 4. Nutzfläche */
#field-nfl input {
    background-color: var(--bg-light);
}

body.dark-mode #field-nfl input {
    background-color: var(--bg-dark);
     color: var(--text-dark);
}

#field-nfl input:focus {
  border: 1px solid #6200ea; /* Lila Ton */
  box-shadow: 0 0 5px rgba(98, 0, 234, 0.8);
  outline: none;
}

/* --- Placeholder Farbe für Dark Mode --- */
body.dark-mode #livingspace-rent input::placeholder,
body.dark-mode #field-wfl input::placeholder,
body.dark-mode #field-gfl input::placeholder,
body.dark-mode #field-nfl input::placeholder {
    color: #9CA3AF;
}
