/* ===============================
   SEARCH NAVBAR
================================*/
/* Navbar styles are now handled in main.css */
/* Removed old red navbar styles to match home.html design */

/* ===============================
   SEARCH OVERLAY
================================*/
.search-overlay-section {
  position: fixed;
  top: 50px;
  left: 0;
  width: 30%;
  height: 100vh;
  padding: 20px;
  font-family: "Open Sans";
  display: flex;
  align-items: flex-start;
  z-index: 1;
}
.search-container {
  width: 100%;
  background-color: var(--red);
  border-radius: 18px;
  padding: 10px;
  display: flex;
  flex-direction: column;
}
.input-container {
  display: flex;
  padding: 2px;
}
.search-input {
  flex-grow: 1;
  display: flex;
  justify-content: center;
  text-align: center;
  padding: 5px 0 5px 8px;
  background-color: white;
  border-radius: 10px 0 0 10px;
}
.search-input input {
  width: 100%;
  font: inherit;
  color: var(--gray);
  border: none;
  border-right: 1px solid var(--light-gray);
  border-radius: 10px 0 0 10px;
}
.search-input input::placeholder {
  color: var(--gray);
}
.search-button {
  flex-grow: 1;
  padding: 0 8px;
  font: inherit;
  text-align: center;
  color: white;
  border: none;
  border-radius: 0 10px 10px 0;
  box-shadow: none;
}
.search-button:hover {
  background-color: var(--red);
  color: var(--gray);
  padding: 0 15px;
}

/* ===============================
   RESULTS
================================*/
.results {
  flex-grow: 1;
  width: 100%;
  margin-bottom: 100px;
}
.result-tile {
  background-color: var(--red);
  color: white;
  border-radius: 5px;
  margin-top: 10px;
  padding: 10px;
  height: auto;
}
.result-tile h4 {
  margin: 0;
}
.result-tile p {
  font-size: 12px;
}
.result-divider {
  margin: 5px 0;
  width: 95%;
}

/* ===============================
   ROUTE CARDS
================================*/
.route-header-block {
  background-color: #b30738;
  color: white;
  padding: 15px;
  border-radius: 10px;
  margin-bottom: 10px;
  text-align: left;
}
.route-card {
  width: 95%;
  max-width: 600px;
  margin: 12px auto;
  padding: 15px;
  border: 1px solid #ddd;
  border-radius: 10px;
  background: white;
  box-shadow: 0px 2px 6px rgba(0,0,0,0.2);
  font-family: "Open Sans", sans-serif;
  display: flex;
  flex-direction: column;
}
.route-card h4 {
  margin: 0 0 5px;
  color: #b30738;
}
.route-card p {
  margin: 0 0 8px;
  font-size: 14px;
}

/* Mode chips */
.mode-chips {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
}
.mode-chip {
  display: inline-block;
  background-color: #e7e7fa;
  color: #2d2d31;
  padding: 3px 8px;
  border-radius: 12px;
  font-size: 12px;
}

/* ===============================
   BUTTONS
================================*/
.more-options-btn,
.go-button,
.back-button {
  width: 100%;
  border: none;
  border-radius: 8px;
  padding: 10px;
  font-size: 14px;
  cursor: pointer;
  margin-top: 10px;
}
.more-options-btn {
  background-color: #2d2d31;
  color: white;
}
.go-button {
  background-color: #b30738;
  color: white;
}
.go-button:hover {
  background-color: #8c062c;
}
.back-button {
  background-color: #2d2d31;
  color: white;
}
.back-button:hover {
  background-color: #1f1f21;
}

/* ===============================
   TIMELINE
================================*/
.timeline {
  display: flex;
  flex-direction: column;
  gap: 12px;
  margin: 15px 0;
}
.timeline-step {
  background: #f8f8f8;
  border-radius: 8px;
  padding: 10px;
  box-shadow: 0px 1px 4px rgba(0,0,0,0.1);
}
.timeline-step p {
  margin: 4px 0;
  font-size: 14px;
}

/* ===============================
   PREVIEW (route overview)
================================*/
.route-preview {
  width: 90%;
  max-width: 600px;
  margin: 20px auto;
  padding: 16px;
  border-radius: 12px;
  background: white;
  box-shadow: 0 2px 6px rgba(0,0,0,0.15);
}
.preview-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  background: #b30738;
  color: white;
  padding: 12px 16px;
  border-radius: 12px 12px 0 0;
  font-size: 16px;
  font-weight: bold;
}
.preview-steps {
  margin-top: 15px;
  border-left: 3px solid #ddd;
  padding-left: 40px;
}
.preview-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin: 6px 0;
  padding: 8px 12px;
  background: #f5f5f5;
  border-radius: 8px;
  font-size: 14px;
}

/* ===============================
   TIMELINE ICONS
================================*/
.timeline-icon {
  width: 28px;
  height: 28px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 16px;
  color: white;
}
.timeline-icon.walk { background: #777; }
.timeline-icon.bus { background: orange; }
.timeline-icon.train { background: #2980b9; }
.timeline-icon.dest { background: #b30738; }
.timeline-icon.current { background: #2ecc71; }

/* ===============================
   MAP + FOOTER
================================*/
.map {
  width: 100vw;
  height: 100vh;
  z-index: -1;
}
footer {
  height: 0;
  z-index: 1;
}

/* ===============================
   RESPONSIVE STYLES
================================*/
@media (max-width: 1024px) {
  .search-overlay-section { width: 40%; }
  .route-card { max-width: 500px; }
}
@media (max-width: 768px) {
  .search-overlay-section {
    position: relative;
    width: 100%;
    height: auto;
    margin-top: 20px;
  }
  .result-tile { font-size: 14px; }
  .route-card { width: 95%; }
}
@media (max-width: 480px) {
  .search-overlay-section {
    width: 100%;
    margin-top: 15px;
    padding: 10px;
  }
  .search-input input { font-size: 14px; }
  .search-button { font-size: 14px; padding: 5px; }
  .route-card { padding: 10px; }
  .preview-header { font-size: 14px; }
  .timeline-step p,
  .route-card p { font-size: 12px; }
}

.result-tile.active {
  background-color: white;
  color: var(--red);
  border: 2px solid var(--red);
}
.result-tile:hover {
  cursor: pointer;
  background-color: #fff3f6;
  color: var(--gray);
}
