@charset "UTF-8";
@import url(https://fonts.googleapis.com/css?family=Open+Sans:300,400,700);

body {
  font-family: 'Open Sans', sans-serif;
  font-weight: 300;
  line-height: 1.42em;
  color: #cccccc;
  background-color: #1F2739;
  margin: 0;
  padding: 0;
}

/* Add bottom padding to body to prevent content from being hidden behind footer */
body {
  padding-bottom: 60px;
}

.page-container {
  width: 90%;
  max-width: 960px;
  margin: 40px auto;
  padding: 20px;
  background: #2C3446;
  border-radius: 12px;
  box-shadow: 0 4px 20px rgba(0, 0, 0, 0.1);
}

.logo {
  display: block;
  margin: 30px auto 20px auto;
  width: clamp(60px, 10vw, 100px);
  height: auto;
  filter: drop-shadow(0 1px 2px rgba(0, 0, 0, 0.4));
  transition: transform 0.4s ease-in-out;
}

.logo:hover {
  transform: rotate(360deg);
}

h1 {
  font-size: clamp(1.8rem, 4vw, 2.5rem);
  text-align: center;
  color: #b2b2b2;
  margin-bottom: 30px;
  font-weight: 700;
  letter-spacing: 1px;
  text-shadow: 1px 1px 2px rgba(0, 0, 0, 0.6);
}

label {
  display: block;
  margin-bottom: 8px;
  color: #FFF;
}

.search-section {
  display: flex;
  flex-direction: row;
  flex-wrap: wrap;
  column-gap: 10px;
  row-gap: 10px;
  align-items: center;
  margin-bottom: 20px;
}

#stationInput {
  padding: 10px;
  font-size: 1rem;
  border: 1px solid #ccc;
  border-radius: 8px;
  width: 120px;
  flex-shrink: 0;
}

button {
  padding: 10px 16px;
  font-size: 1rem;
  background-color: #0057e7;
  color: #fff;
  border: none;
  border-radius: 8px;
  cursor: pointer;
  transition: background-color 0.2s ease;
  flex-shrink: 0;
}

button:hover {
  background-color: #0040b3;
}

#searchResults {
  margin-top: 20px;
}

/* Table Styles */
.train-table {
  width: 100%;
  border-collapse: collapse;
  margin-bottom: 20px;
  background-color: #2e3548;
  border-radius: 8px;
  overflow: hidden;
  box-shadow: 0 2px 8px rgba(0,0,0,0.1);
}

.train-table th,
.train-table td {
  padding: 12px 15px;
  text-align: left;
  border-bottom: 1px solid #444;
  vertical-align: top;
}

.train-table thead {
  background-color: #3e4659;
  color: #ffffff;
}

.train-table tbody tr:hover {
  background-color: #383f52;
}

/* Inline expansion under cells (previous stops / calling points) */
.inline-expand {
  margin-top: 8px;
  padding: 10px 12px;
  background: #263142;
  border-radius: 8px;
  border: 1px solid rgba(255,255,255,0.08);
}

.inline-expand .expand-heading {
  font-weight: 700;
  color: #bcd1e6;
  margin-bottom: 6px;
}

.inline-stops {
  list-style: disc;
  margin: 6px 0 0 18px;
  padding-left: 0;
}

/* Ensure bullet content stays neutral */
.inline-stops li,
.neutral-stop,
.neutral-time {
  color: #cccccc;
}

/* Colour only the times/status */
.on-time {
  color: #28a745;
  font-weight: 700;
}
.late {
  color: #dc3545;
  font-weight: 700;
}

/* Links for toggles */
a.toggle-prev-link,
a.toggle-next-link {
  color: #4DC3FA;
  text-decoration: underline;
}

/* Responsive Layout: Convert table to card on mobile */
@media (max-width: 600px) {
  .search-section {
    flex-direction: column;
    align-items: flex-start;
  }

  #stationInput, button {
    width: auto;
  }

  .train-table thead {
    display: none;
  }

  .train-table,
  .train-table tbody,
  .train-table tr,
  .train-table td {
    display: block;
    width: 100%;
  }

  .train-table tr {
    background-color: #2e3548;
    border-radius: 12px;
    box-shadow: 0 2px 8px rgba(0,0,0,0.1);
    padding: 12px 16px;
    margin-bottom: 12px;
  }

  .train-table td {
    padding: 6px 0;
    border-bottom: none;
  }

  .train-table td::before {
    content: attr(data-label);
    font-weight: bold;
    color: #aaa;
    display: block;
    margin-bottom: 2px;
  }

  .inline-expand {
    margin-top: 10px;
  }
}

/* Footer Styles */
#footer {
  position: fixed;
  bottom: 0;
  left: 0;
  right: 0;
  background-color: #2C3446;
  border-top: 1px solid #444;
  padding: 15px 20px;
  z-index: 1000;
  box-shadow: 0 -2px 10px rgba(0, 0, 0, 0.2);
}

.footer-content {
  display: flex;
  justify-content: center;
  align-items: center;
  max-width: 960px;
  margin: 0 auto;
  color: #cccccc;
  font-size: 0.9rem;
}

.footer-content a {
  color: inherit;
  text-decoration: none;
  transition: color 0.2s ease;
}

.footer-content a:hover {
  color: #4DC3FA;
}
/* Keep bullet lines neutral; colour only the time spans */
.previous-stops-list,
.calling-points-list,
.cp-line,
.cp-line .cp-text {
  color: #cccccc; /* your neutral body text */
}

.time-neutral {
  color: #cccccc; /* scheduled (expected) stays neutral */
}

/* Already existing in your theme:
.on-time { color:#28a745; font-weight:bold; }
.late    { color:#dc3545; font-weight:bold; }
*/
