/* ============================================================================
  1. SCHEDULE VIEW CONTROLS
  ============================================================================ */
/* View container */
.view-container {
  position: relative;
  width: 100%;
  border-radius: 8px;
  box-shadow: 0 4px 20px rgba(0, 0, 0, 0.08);
  scroll-margin-top: 120px;
}

.radio-state {
  display: none;
}

/* Hash targets */
.url-scroll-target {
  position: absolute;
  top: 0;
  left: 0;
  width: 1px;
  height: 1px;
  pointer-events: none;
  visibility: hidden;
  scroll-margin-top: 250px;
}

/* Tab controls */
.button-group {
  display: flex;
  width: 100%;
  box-sizing: border-box;
  gap: 10px;
  padding: 5px;
  background-color: var(--color-bg-primary-muted);
  border: 1px solid var(--color-border);
  border-bottom: none;
  border-radius: 8px 8px 0 0;
}

.btn {
  flex: 1;
  box-sizing: border-box;
  padding: 12px 0;
  color: var(--color-text-muted);
  font-weight: 600;
  text-align: center;
  cursor: pointer;
  user-select: none;
  transition:
    color 0.3s cubic-bezier(0.16, 1, 0.3, 1),
    background-color 0.3s ease;
}

.btn.a,
.btn.b {
  padding: 12px 0;
  border: none;
  border-radius: 12px;
  background: var(--color-primary-gold);
  color: var(--color-text-dark);
  font-weight: 700;
  opacity: 0.4;
  filter: grayscale(60%);
  box-shadow: none;
}

.btn.a:hover,
.btn.b:hover {
  background-color: var(--color-secondary-gold);
}

#radio-a:checked ~ .button-group label[for="radio-a"],
#radio-b:checked ~ .button-group label[for="radio-b"] {
  background: var(--color-primary-gold);
  color: var(--color-text-dark);
  opacity: 1;
  filter: grayscale(0%);
  box-shadow:
    inset 0 2px 2px rgba(255, 255, 255, 0.4),
    inset 0 -3px 3px rgba(0, 0, 0, 0.25),
    0 6px 12px rgba(0, 0, 0, 0.15);
}

/* ============================================================================
  2. SCHEDULE VIEW PANELS
  ============================================================================ */
/* View panels */
.views-wrapper {
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  grid-template-rows: 1fr;
  width: 100%;
  background-color: var(--color-card-bg-light);
  border: 1px solid var(--color-border);
  border-radius: 0 0 8px 8px;
  position: relative;
  overflow: hidden;
}

.view {
  grid-area: 1 / 1;
  padding: 18px;
  opacity: 0;
  visibility: hidden;
  pointer-events: none;
  transition:    opacity 0.45s cubic-bezier(0.16, 1, 0.3, 1),    transform 0.45s cubic-bezier(0.16, 1, 0.3, 1),    visibility 0.45s step-end;
}

.view h3 {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 25px;
  margin: 0 0 1rem;
  color: var(--color-text-dark);
  font-size: 2.5rem;
  font-weight: 700;
  letter-spacing: 1px;
}

.view h3::before,
.view h3::after {
  content: "";
  display: block;
  width: 55px;
  height: 10px;
  background: var(--color-primary-gold);
  border-radius: 2px;
}

/* Container Queries for responsive table units across both views */
.view-a,
.view-b {
  container-type: inline-size;
}

.view-a {
  transform: translateX(-30px) scale(0.98);
}

.view-b {
  transform: translateX(30px) scale(0.98);
}

/* Custom Column Widths for view-b shuttle table */
.view-b .schedule-table th:nth-child(1),
.view-b .schedule-table td:nth-child(1) {
  width: 55%;
  padding-left: 24px;
}

.view-b .schedule-table th:nth-child(2),
.view-b .schedule-table td:nth-child(2) {
  width: 25%;
}

.view-b .schedule-table th:nth-child(3),
.view-b .schedule-table td:nth-child(3) {
  width: 20%;
}

#radio-a:checked ~ .views-wrapper .view-a,
#radio-b:checked ~ .views-wrapper .view-b {
  opacity: 1;
  visibility: visible;
  pointer-events: auto;
  transform: translateX(0) scale(1);
  transition:
    opacity 0.45s cubic-bezier(0.16, 1, 0.3, 1),
    transform 0.45s cubic-bezier(0.16, 1, 0.3, 1),
    visibility 0s linear;
}

/* ============================================================================
  3. SCHEDULE TABLES
  ============================================================================ */
/* Shared Schedule Table Styles (Applied to both views) */
.view .table-card {
  width: 100%;
  background: var(--color-card-bg-light);
  border: clamp(1px, 0.15cqw, 2px) solid var(--color-border);
  border-radius: clamp(4px, 1.2cqw, 10px);
  box-shadow: 0 clamp(2px, 0.5cqw, 6px) clamp(6px, 1.5cqw, 16px)
    rgba(0, 0, 0, 0.08);
  overflow: hidden;
}

.view .schedule-table {
  width: 100%;
  border-collapse: collapse;
  text-align: center;
  table-layout: fixed;
}

.view .schedule-table th:nth-child(1),
.view .schedule-table th:nth-child(4) {
  width: 28%;
}

.view .schedule-table th:nth-child(2),
.view .schedule-table th:nth-child(3),
.view .schedule-table th:nth-child(5) {
  width: 14.6%;
}

.view .schedule-table th {
  
      padding: clamp(0.35rem, 1.0cqw, 0.9rem) clamp(0.15rem, 0.6cqw, 0.5rem);
    color: var(--color-text-muted);
    font-size: clamp(0.6rem, 1.7cqw, 0.7rem);
    font-weight: 700;
    border-bottom: clamp(1px, 0.1cqw, 1px) solid var(--color-border);
}

.view .route-header {
  display: table-row;
  padding: clamp(0.3rem, 1.1cqw, 0.65rem) clamp(0.4rem, 1.8cqw, 1rem);
  background-color: var(--color-primary-gold-muted);
  border-top: clamp(1px, 0.15cqw, 1.5px) solid var(--color-border);
  border-bottom: clamp(1px, 0.15cqw, 1.5px) solid var(--color-border);
  color: var(--color-text-header);
  font-size: clamp(0.55rem, 1.4cqw, 0.85rem);
  font-weight: 800;
  letter-spacing: 0.03em;
  text-align: left;
  text-transform: uppercase;
  padding-left: 14px !important;
}

.view .route-header td {
  vertical-align: middle;
}

.view .route-header td::before {
  display: inline-block;
  margin-right: 0.45em;
  line-height: 1;
  vertical-align: middle;
  font-size: 1rem;
}

.view .route-header.route-to td::before {
  content: "\2192";
}

.view .route-header.route-from td::before {
  content: "\2190";
}



.view .schedule-table td {
  padding: clamp(0.25rem, 1.1cqw, 0.75rem) clamp(0.1rem, 0.5cqw, 0.4rem);
  border-bottom: clamp(1px, 0.1cqw, 1px) solid var(--color-border);
  color: var(--color-text-dark);
  font-size: clamp(0.7rem, 1.4cqw, 0.85rem);
  vertical-align: middle;
  word-break: break-word;
}

.view .group-even td {
  background-color: var(--color-card-bg-light);
}

.view .group-odd td {
  background-color: var(--color-bg-primary-muted);
}

.view .location-cell {
  color: var(--color-text-dark);
  font-weight: 700;
}

.view .time-cell {
  white-space: nowrap;
  font-weight: 600;
}

.view .time-cell span {
  display: inline-block;
  background-color: #E3DAC7;
  padding: 5px;
  border-radius: 5px;
  -webkit-border-radius: 5px;
  -moz-border-radius: 5px;
  -ms-border-radius: 5px;
  -o-border-radius: 5px;
}

.view .time-cell .time-value + .time-value {
  margin-left: 0.75em;
}

.view .border-bottom-inner {
  border-bottom: clamp(1px, 0.15cqw, 1.5px) solid var(--color-border);
}

/* ============================================================================
  4. ROUTE NAVIGATION & SCHEDULE CARDS
  ============================================================================ */
/* Route Sub-Navigation */
.route-tabs {
  display: flex;
  gap: 12px;
  margin-bottom: 24px;
  flex-wrap: wrap;
  justify-content: center;
}

.route-tab {
  padding: 10px 24px;
  background-color: var(--color-card-bg-light);
  border: 1px solid var(--color-border);
  border-radius: 8px;
  color: var(--color-text-header);
  font-weight: 600;
  font-size: 0.9rem;
  cursor: pointer;
  transition: all 0.2s ease;
  background-color: rgb(212 215 248 / 99%);
      min-width: 215px;
}

.route-tab.active {
  background-color: var(--color-text-header) !important;
  color: var(--color-text-light);
  border-color: var(--color-text-header);
}

.route-tab:hover:not(.active) {
  border-color: var(--color-secondary-gold);
}

/* Card Container */
.schedule-cards-container {
  display: none;
  flex-direction: column;
  gap: 20px;
}

.schedule-cards-container.active-route {
  display: flex;
}

/* Individual Schedule Card */
.schedule-card {
  background: var(--color-card-bg-light);
  border: 1px solid var(--color-border);
  border-radius: var(--radius-card);
  padding: clamp(1rem, 2.5cqw, 1.5rem);
  box-shadow: var(--shadow-card);
}

/* Card Header */
.card-header {
  display: flex;
  align-items: center;
  gap: clamp(0.5rem, 1.8cqw, 1rem);
  margin-bottom: clamp(1rem, 2.5cqw, 1.5rem);
  font-style: italic;
}

.origin-label {
  display: inline-flex;
  align-items: center;
  gap: clamp(0.4rem, 1.5cqw, 0.75rem);
  color: var(--color-text-header-muted);
  font-size: clamp(0.85rem, 2.2cqw, 1rem);
  font-weight: 500;
  min-width: clamp(4.25rem, 14cqw, 5.625rem);
}

.origin-label::after {
  content: "\2192";
  color: var(--color-text-dark-secondary);
  font-size: clamp(1.2rem, 3.5cqw, 1.5rem);
  font-weight: 800;
  line-height: 1;
}

.destination-label {
  font-family: var(--font-primary);
  min-width: 0;
  font-size: clamp(1.2rem, 3.4cqw, 1.5rem);
  color: var(--color-text-header);
  margin: 0;
  flex: 1;
  font-weight: 700;
}

/* Time Slots Layout */
.time-slots {
  display: flex;
  flex-direction: column;
}

.time-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.time-block {
  display: flex;
  flex-direction: column;
  min-width: clamp(3.25rem, 12cqw, 5rem);
}

.time-val {
  font-size: clamp(1.2rem, 4cqw, 1.6rem);
  font-weight: 800;
  color: var(--color-text-dark);
  line-height: 1.1;
}

.time-val.arrival {
  color: var(--color-secondary-gold);
}

.time-type {
  font-size: clamp(0.7rem, 1.8cqw, 0.8rem);
  color: var(--color-text-header-muted);
  font-weight: 500;
  margin-top: clamp(0.15rem, 0.6cqw, 0.25rem);
}

/* Connectors and Dividers */
.time-connector {
  flex: 1;
  height: clamp(2px, 0.25cqw, 2px);
  background-color: #E3DAC7;
  margin: 0 clamp(0.4rem, 2.5cqw, 1.25rem);
  margin-bottom: clamp(0.5rem, 2cqw, 1rem);
}

.slot-divider {
  border: none;
  border-top: clamp(1px, 0.15cqw, 1px) solid var(--color-border);
  margin: clamp(0.8rem, 2.5cqw, 1.25rem) 0;
  width: 100%;
}