/* =========================
   Verbindungen – Layout
   ========================= */

.search-container {
  position: relative;
  width: 100%;
}

.suggest-box {
  position: absolute;
  top: 100%;
  left: 0;
  right: 0;
  background: white;
  border: 1px solid var(--color-border);
  border-radius: 0 0 var(--radius-md) var(--radius-md);
  z-index: 1000;
  box-shadow: var(--shadow-soft);
  display: none;
  max-height: 250px;
  overflow-y: auto;
}

.suggest-item {
  padding: 12px;
  cursor: pointer;
  border-bottom: 1px solid #eee;
  font-size: 14px;
}

.suggest-item:hover {
  background-color: #f5f5f5;
  color: var(--color-accent);
}

/* =========================
   Switch (Anfahrt / Rückfahrt)
   ========================= */

.switch-container {
  display: flex;
  justify-content: center;
  margin-bottom: 25px;
}

.mode-switch {
  background: #eee;
  border-radius: 25px;
  display: flex;
  padding: 4px;
  width: 100%;
  position: relative;
  cursor: pointer;
}

.mode-switch label {
  flex: 1;
  text-align: center;
  padding: 10px 0;
  font-size: 14px;
  font-weight: 600;
  cursor: pointer;
  z-index: 2;
}

.mode-switch .slider {
  position: absolute;
  top: 4px;
  left: 4px;
  width: calc(50% - 4px);
  height: calc(100% - 8px);
  background: linear-gradient(
    90deg,
    var(--color-accent),
    var(--color-accent-soft)
  );
  border-radius: 21px;
  transition: transform 0.3s ease;
}

#mode_home:checked ~ .mode-switch .slider {
  transform: translateX(100%);
}

#mode_uni:checked ~ .mode-switch label[for="mode_uni"],
#mode_home:checked ~ .mode-switch label[for="mode_home"] {
  color: white;
}

.mode-radio {
  display: none;
}

/* =========================
   Inputs & Buttons
   ========================= */

.input-group {
  margin-bottom: 15px;
}

.input-group label {
  display: block;
  font-weight: 600;
  margin-bottom: 5px;
  font-size: 14px;
  color: var(--color-muted);
}

.btn-search {
  background: linear-gradient(
    90deg,
    var(--color-accent),
    var(--color-accent-soft)
  );
  color: white;
  border: none;
  padding: 12px;
  border-radius: 8px;
  cursor: pointer;
  width: 100%;
  font-weight: bold;
  margin-top: 10px;
}

/* =========================
   Ergebnisse
   ========================= */

.journey-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  font-weight: bold;
  color: var(--color-accent);
}

.leg {
  border-left: 3px solid var(--color-accent);
  padding-left: 15px;
  margin: 15px 0;
  font-size: 14px;
}

.arrow {
  color: var(--color-muted-soft);
  font-size: 0.9em;
  margin-left: 15px;
  display: block;
}

hr {
  border: 0;
  border-top: 1px solid #eee;
  margin: 12px 0;
}

/* =========================
   Favoriten-Button
   ========================= */

.fav-button {
  background: none;
  border: 1px solid #ddd;
  border-radius: 50%;
  width: 32px;
  height: 32px;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  color: #888;
  transition: all 0.3s ease;
}

.fav-button.active {
  color: #e74c3c;
  border-color: #e74c3c;
  background-color: #fdf2f2;
}

/* =========================
   Responsive Anpassungen
   ========================= */

@media (max-width: 600px) {
  .journey-header {
    flex-direction: column;
    align-items: flex-start;
    gap: 6px;
  }
}
