/* ===== Filter Section ===== */
.filter-section {
  background-color: #f2f4f7;
  padding: 4rem 2rem;
  display: flex;
  flex-direction: column;
  align-items: center;
}

.filter-header {
  text-align: center;
  margin-bottom: 3rem;
}

.filter-header h2 {
  font-size: 2rem;
  font-weight: 700;
  color: #1a1a1a;
  margin-bottom: 0.5rem;
}

.filter-header p {
  font-size: 1rem;
  color: #666666;
}

.filter-form {
  width: 100%;
  max-width: 1400px;
  display: flex;
  justify-content: center;
}

.filter-wrapper {
  display: flex;
  align-items: center;
  background-color: white;
  border-radius: 9999px;
  padding: 0.5rem 2rem;
  box-shadow: 0 2px 10px rgba(0, 0, 0, 0.05);
  flex-wrap: nowrap;
  justify-content: space-between;
  width: 100%;
  max-width: 1200px;
}

.filter-inputs {
  display: flex;
  flex: 1;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  flex-wrap: nowrap;
}

/* === Filter-Box === */
.filter-box {
  flex: 0 0 auto;
  background: #fff;
  border: 1px solid #ccc;
  border-radius: 9999px;
  padding: 0.35rem 0.7rem;
  min-width: 135px;
  max-width: 170px;
  transition: border-color 0.3s ease;
  position: relative;
}

.filter-box:focus-within {
  border-color: #3d64ff;
}

/* === Input-Feld === */
.tag-input {
  border: none;
  outline: none;
  font-size: 1rem;
  flex: 1;
  min-width: 80px;
  padding: 0.4rem 1rem 0.4rem 0.5rem;
  background-color: transparent;
  width: 100%;
  appearance: none;
  -webkit-appearance: none;
  -moz-appearance: none;
}

/* Entfernt Kalender- & Dropdown-Indikator doppelt */
.tag-input::-webkit-calendar-picker-indicator {
  display: none !important;
  -webkit-appearance: none;
}

/* === Trennlinien === */
.divider {
  width: 1px;
  height: 4rem;
  background-color: #e0e0e0;
}

/* === Button === */
.filter-wrapper button {
  background-color: #3d64ff;
  color: white;
  font-size: 1rem;
  font-weight: 600;
  padding: 0.8rem 2rem;
  margin-left: 0rem;
  border: none;
  border-radius: 9999px;
  cursor: pointer;
  transition: background-color 0.3s ease;
  flex-shrink: 0;
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

.filter-wrapper button:hover {
  background-color: #2e50cc;
}

/* ===== Responsive Breakpoints ===== */

/* === Smartphone: max-width: 767px === */
@media only screen and (max-width: 767px) {
  .filter-wrapper {
    flex-direction: column;
    align-items: center;
    padding: 1rem;
    border-radius: 1rem;
    gap: 1rem;
  }

  .filter-inputs {
    flex-direction: column;
    align-items: center;
    gap: 1rem;
    width: 100%;
  }

  .filter-box {
    width: 90%;
    max-width: 400px;
    border-radius: 1rem;
  }

  .divider {
    display: none;
  }

  .filter-wrapper button {
    width: 90%;
    max-width: 400px;
    justify-content: center;
    border-radius: 1rem;
  }
}

/* === Tablet: 768px–1023px === */
@media only screen and (min-width: 768px) and (max-width: 1023px) {
  .filter-wrapper {
    flex-direction: column;
    align-items: stretch;
    padding: 1.5rem;
    border-radius: 1rem;
    gap: 1.5rem;
  }

  .filter-inputs {
    flex-direction: row;
    flex-wrap: wrap;
    justify-content: center;
    gap: 1rem;
  }

  .filter-box {
    flex: 1 1 calc(50% - 1rem);
    min-width: auto;
    max-width: none;
    border-radius: 1rem;
  }

  .divider {
    display: none;
  }

  .filter-wrapper button {
    width: 100%;
    justify-content: center;
    border-radius: 1rem;
  }
}
/* === small Desktop: min-width: 1024px max 1224 === */
@media (min-width: 1024px) and (max-width: 1224px) {
  .filter-wrapper {
    flex-direction: column;
    align-items: stretch;
    padding: 1.5rem;
    border-radius: 1rem;
    gap: 1.5rem;
  }

  .filter-inputs {
    flex-wrap: wrap;
    justify-content: center;
    gap: 1rem;
  }

  .filter-box {
    flex: 1 1 calc(33% - 1rem);
    min-width: 200px;
    border-radius: 1rem;
  }

  .divider {
    display: none;
  }

  .filter-wrapper button {
    width: 100%;
    justify-content: center;
    border-radius: 1rem;
  }
}

/* === Desktop: min-width: 1225px === */
@media only screen and (min-width: 1225px) {
  .filter-wrapper {
    flex-direction: row;
    align-items: center;
    padding: 0.5rem 2rem;
    border-radius: 9999px;
    gap: 1rem;
  }

  .filter-inputs {
    flex-direction: row;
    flex-wrap: nowrap;
    justify-content: space-between;
    align-items: center;
    gap: 1rem;
  }

  .filter-box {
    min-width: 135px;
    max-width: 170px;
    border-radius: 9999px;
  }

  .divider {
    display: block;
  }

  .filter-wrapper button {
    width: auto;
    justify-content: center;
    border-radius: 9999px;
  }
}
