.stations-title {
  font-size: 1.5em;
}

/* Shrink panel to content when possible, keep internal scroll for long tables. */
body.mtw-body-height-100vh .mtw-table-panel {
  flex: 0 1 auto;
  max-height: calc(100dvh - var(--mtw-sticky-top, 0px) - 1.7rem);
}

body.mtw-body-height-100vh .mtw-table-panel > .mtw-table-scroll {
  overflow-y: auto;
}

/* Sort header buttons: now global via .mtw-sort-button in design.css */

.stationsname-header {
  display: flex;
  align-items: center;
  gap: 6px;
  font-family: inherit !important;
  font-size: inherit;
  font-weight: inherit;
  line-height: inherit;
}

#stationsTable th .stationsname-header > button:last-child {
  flex: 1;
}

#stationsTable th button.variant-toggle-all {
  background: none;
  border: none;
  font: inherit;
  cursor: pointer;
  width: auto;
  padding: 0;
  line-height: 1;
  font-size: 1.5em;
  text-align: center;
  text-decoration: none;
  color: inherit;
  min-width: 20px;
  transition: transform 0.15s ease;
}

#stationsTable th button.variant-toggle-all:hover {
  color: var(--accent-hover);
  text-decoration: none;
}

#stationsTable th button.variant-toggle-all.is-open {
  transform: rotate(90deg);
}

#stationsTable td button {
  background: none;
  border: none;
  font: inherit;
  cursor: pointer;
  padding: 0;
  color: var(--accent);
  text-decoration: underline;
}

#stationsTable td button:hover {
  color: var(--accent-hover);
}

#stationsTable td button.variant-toggle {
  color: var(--text-main);
  text-decoration: none;
  width: auto;
  font-weight: 700;
  font-size: 1.35em;
  line-height: 1;
  min-width: 20px;
  transition: transform 0.15s ease;
}

#stationsTable td button.variant-toggle:hover {
  color: var(--accent-hover);
  text-decoration: none;
}

#stationsTable td button.variant-toggle.is-open {
  transform: rotate(90deg);
}

.station-name-main {
  display: flex;
  align-items: flex-start;
  gap: 0;
}

#stationsTable td button.station-link {
  text-align: left;
  white-space: normal;
  min-width: 0;
  flex: 1 1 auto;
  line-height: 1.2;
  color: inherit;
}

#stationsTable td button.station-link:hover {
  color: inherit;
}

.variants-panel {
  margin-top: 6px;
  padding: 6px 8px;
  border: 1px solid var(--border-soft);
  background-color: rgba(59, 130, 246, 0.08);
  border-radius: 4px;
}

.variants-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 0.82em;
}

#stationsTable .variants-table th,
#stationsTable .variants-table td {
  min-width: 0;
  padding: 2px 4px;
  background: transparent;
  border-bottom: 1px solid var(--border-soft);
  text-align: left;
}

#stationsTable .variants-table th {
  color: var(--text-main);
  font-weight: 700;
  background-color: rgba(59, 130, 246, 0.1);
}

#stationsTable .variants-table thead,
#stationsTable .variants-table thead th {
  position: static;
  top: auto;
  z-index: auto;
}

#stationsTable .variants-table tbody tr:last-child td {
  border-bottom: none;
}

#stationsTable .variants-table tr.variant-row-active td {
  font-weight: 700;
}

#stationsTable .variants-table tr.variant-row-inactive td {
  color: var(--text-muted);
}

.variants-empty {
  color: var(--text-muted);
  font-size: 0.82em;
}

#stationsTable .status-cell {
  min-width: 68px;
  width: 68px;
  padding-left: 1rem;
  padding-right: 1rem;
  text-align: left;
}

#stationsTable > tbody > tr:hover > td {
  background-color: rgba(59, 130, 246, 0.08);
}

#stationsTable tbody tr.station-row-active td {
  font-weight: 700;
}

#stationsTable tbody tr:not(.station-row-active) td {
  color: var(--text-muted);
}

#stationsTable tbody tr:not(.station-row-active) td button {
  color: inherit;
}

