
/* Basic layout */
body {
  font-family: system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  margin: 0;
  padding: 0;
  background: #f7f9fc;
  color: #222;
  line-height: 1.6;
  padding-top: 3.25rem; /* space for fixed header */
}

.site-header {
  background: #182B49;
  color: #fff;
  padding: 0.5rem 1.5rem;
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  z-index: 1000;
  box-shadow: 0 2px 6px rgba(0,0,0,0.15);
}

.site-header-inner {
  max-width: 1200px;
  margin: 0 auto;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
}

.site-title {
  font-size: 1.3rem;
  font-weight: 600;
}

/* Top navigation */
.site-nav {
  display: flex;
  align-items: center;
  gap: 1rem;
}

.nav-link {
  color: #FFCD00;
  text-decoration: none;
  font-size: 0.9rem;
  font-weight: 500;
  padding: 0.15rem 0.45rem;
  border-radius: 999px;
}

.nav-link:hover {
  background: rgba(255, 205, 0, 0.15);
}

.site-nav .lab-link {
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  color: #FFCD00;
  text-decoration: none;
  font-size: 0.95rem;
  margin-left: 0.5rem;
}

.site-nav .lab-link:hover {
  text-decoration: underline;
}

/* White-backed Stellar Data Lab logo */
.lab-logo {
  height: 28px;
  width: auto;
  border-radius: 4px;
  background: #ffffff;
  padding: 2px 4px;
}

/* Mobile navigation toggle */
.nav-toggle {
  display: none;
  background: transparent;
  border: 1px solid rgba(255,255,255,0.6);
  color: #ffffff;
  border-radius: 4px;
  padding: 0.15rem 0.5rem;
  font-size: 1.1rem;
  cursor: pointer;
}

.nav-toggle:focus {
  outline: 2px solid #FFCD00;
  outline-offset: 2px;
}

/* Main layout */
.site-main {
  max-width: 1200px;
  margin: 0 auto;
  padding: 1.5rem 1.5rem 2.5rem;
}

.site-footer {
  background: #182B49;
  color: #fff;
  padding: 0.75rem 1.5rem;
  margin-top: 1.5rem;
}

.site-footer-inner {
  max-width: 1200px;
  margin: 0 auto;
  font-size: 0.9rem;
}

/* Transit page */
.ucsd-transit-page {
  margin-top: 0.5rem;
}

/* Hero */
.transit-hero {
  display: flex;
  flex-wrap: wrap;
  gap: 2rem;
  align-items: center;
  margin-bottom: 2.0rem;
  border-radius: 12px;
  padding: 1.5rem 1.75rem;
  background: #f5f7fb;
  border-left: 6px solid #182B49;
}

.transit-hero-text {
  flex: 2 1 260px;
}

.transit-hero-text h1 {
  margin-top: 0;
  margin-bottom: 0.5rem;
  color: #182B49;
}

.transit-hero-text .lead {
  font-size: 1.05rem;
  font-weight: 500;
  margin-bottom: 0.5rem;
}

.transit-hero-logo {
  flex: 1 1 200px;
  text-align: center;
}

.transit-hero-logo img {
  max-width: 320px;
  height: auto;
  border-radius: 0;
  border: none;
  background: transparent;
  padding: 0;
}

/* Sections */
.transit-section {
  margin-bottom: 2.2rem;
}

.transit-section h2 {
  color: #182B49;
  border-bottom: 2px solid #FFCD00;
  display: inline-block;
  padding-bottom: 0.15rem;
  margin-bottom: 0.75rem;
}

/* Tables */
.table-wrapper {
  overflow-x: auto;
}

.transit-table {
  width: 100%;
  border-collapse: collapse;
  margin-top: 0.75rem;
  font-size: 0.95rem;
  background: white;
}

.transit-table th,
.transit-table td {
  border: 1px solid #ddd;
  padding: 0.4rem 0.6rem;
  text-align: left;
  vertical-align: top;
}

.transit-table thead {
  background: #182B49;
  color: white;
}

.transit-table tbody tr:nth-child(even) {
  background: #f9fafc;
}

.transit-table tbody tr:hover {
  background: #e8f3ff;
}

/* Schedule controls */
.schedule-controls {
  display: flex;
  flex-wrap: wrap;
  gap: 1rem;
  align-items: center;
  margin: 0.75rem 0 0.5rem;
  font-size: 0.9rem;
}

.schedule-controls .control label {
  font-weight: 500;
}

.schedule-controls select {
  margin-left: 0.3rem;
  padding: 0.18rem 0.4rem;
}

.schedule-status {
  font-size: 0.9rem;
  color: #555;
  margin-bottom: 0.5rem;
}

/* Current conditions panel */
.current-conditions {
  margin: 0.75rem 0 0.5rem;
  padding: 0.75rem 0.9rem;
  border-radius: 10px;
  background: #eef3fb;
  border-left: 4px solid #00629B;
  font-size: 0.9rem;
}

.current-conditions h3 {
  margin: 0 0 0.4rem;
  font-size: 1rem;
  color: #182B49;
}

.current-row {
  display: flex;
  flex-wrap: wrap;
  gap: 1rem;
}

.current-block {
  min-width: 180px;
}

.cc-label {
  font-weight: 600;
  margin-bottom: 0.1rem;
}

.cc-value {
  font-size: 0.9rem;
}

/* View toggle buttons */
.view-toggle {
  margin-left: auto;
  display: flex;
  align-items: center;
  gap: 0.4rem;
}

.view-btn {
  border: 1px solid #ccc;
  background: #fff;
  padding: 0.2rem 0.6rem;
  border-radius: 14px;
  font-size: 0.85rem;
  cursor: pointer;
}

.view-btn.active {
  border-color: #00629B;
  background: #00629B;
  color: white;
}

/* Calendar style */
.calendar-view {
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  gap: 1rem;
  margin-top: 0.75rem;
}

.calendar-day {
  background: #ffffff;
  border-radius: 10px;
  padding: 0.75rem 0.9rem;
  box-shadow: 0 2px 6px rgba(0,0,0,0.04);
}

.calendar-day h3 {
  margin-top: 0;
  margin-bottom: 0.4rem;
  font-size: 1rem;
  color: #182B49;
}

.calendar-entry {
  border-radius: 8px;
  border: 1px solid #e0e3ea;
  padding: 0.4rem 0.6rem;
  margin-top: 0.35rem;
  background: #f8f9fc;
}

.ce-main {
  display: flex;
  justify-content: space-between;
  gap: 0.5rem;
  font-size: 0.9rem;
}

.ce-target {
  font-weight: 600;
}

.ce-meta {
  margin-top: 0.15rem;
  font-size: 0.8rem;
  color: #555;
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
}

.ce-meta span {
  background: #e5edf7;
  padding: 0.05rem 0.35rem;
  border-radius: 999px;
}

/* Weather / status representations */
.ce-weather {
  margin-top: 0.2rem;
  font-size: 0.85rem;
}

.weather-cell {
  display: flex;
  flex-direction: column;
  gap: 0.15rem;
}

.weather-icon-small {
  width: 28px;
  height: 28px;
}

.weather-cell-main {
  display: flex;
  align-items: center;
  gap: 0.35rem;
}

.weather-confidence {
  display: inline-block;
  padding: 0.05rem 0.4rem;
  border-radius: 999px;
  font-size: 0.75rem;
  font-weight: 500;
}

/* Confidence colors */
.conf-high {
  background: #d6f5d6;
  color: #135c13;
}

.conf-medium {
  background: #fff3c4;
  color: #7a5b00;
}

.conf-low {
  background: #ffe0e0;
  color: #8b1e1e;
}

/* Quality background tints */
.weather-quality-good {
  background-color: #e7f7e7;
}

.weather-quality-ok {
  background-color: #fdf5df;
}

.weather-quality-bad {
  background-color: #fde5e5;
}

/* Resource button */
.resource-button {
  display: inline-block;
  margin-top: 0.75rem;
  padding: 0.5rem 1.0rem;
  border-radius: 999px;
  border: none;
  background: #00629B;
  color: #fff;
  font-size: 0.95rem;
  font-weight: 500;
  text-decoration: none;
  cursor: pointer;
}

.resource-button:hover {
  background: #004d78;
}

/* Responsive */
@media (max-width: 768px) {
  body {
    padding-top: 4.25rem; /* extra space for taller header/nav */
  }

  .site-header-inner {
    flex-wrap: wrap;
    align-items: center;
  }

  .nav-toggle {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    margin-left: auto;
  }

  .site-nav {
    width: 100%;
    flex-direction: column;
    align-items: flex-start;
    gap: 0.35rem;
    margin-top: 0.5rem;
    display: none; /* hidden by default on small screens */
  }

  .site-header.nav-open .site-nav {
    display: flex; /* show when header has nav-open class */
  }

  .site-nav .lab-link {
    margin-left: 0;
  }

  .transit-hero {
    margin-top: 0.5rem;
  }

  .view-toggle {
    margin-left: 0;
  }
}
