/* #region zone:disaster.style.rail — แถบเลเยอร์/สัญลักษณ์/คำเตือน (ขวาบนจอใหญ่, แผ่นล่างบนมือถือ) */
/* design-spec.md §2 "Layer switcher": a COMPACT card, not a full-height panel — it must leave room for the
   Legend card below it in the same right-edge column (Round 8 fix: they used to collide because .rail
   reached all the way to bottom:16px, same z-index-stacked column as the floating legend). `max-height`
   reserves exactly the legend card's own footprint (see .legend-panel — kept in sync by eye, both are
   this file's own numbers); `.rail-body` keeps its internal scroll for whatever list content overflows
   that budget, so nothing is ever lost, just scrolled. */
.rail {
  position: absolute;
  top: 72px;
  right: 16px;
  z-index: 18;
  width: 304px;
  max-width: calc(100vw - 32px);
  max-height: calc(100vh - 72px - 16px - 176px);
  border-radius: var(--r-panel);
  display: flex;
  flex-direction: column;
  overflow: hidden;
}
/* Round 9: the Layers/Warnings tab strip is gone from view (mockup) — warnings open from the hazard
   section's own button and return with "Back to map"; the tab buttons stay in the DOM for switchTab(). */
.rail-tabs {
  display: none;
}
.rail-body {
  flex: 1;
  min-height: 0;
  overflow-y: auto;
  padding: var(--u-space-2);
  -webkit-overflow-scrolling: touch;
}
.rail-pane[hidden] {
  display: none;
}
.rail .luna-slot {
  display: none;
}
.rail[data-hazards-open] .luna-slot {
  display: flex;
}

/* Switcher groups: a quiet uppercase head (+ "one at a time" aside), weather rows, a hairline, overlays. */
.warn-back {
  margin: 6px var(--u-space-2);
  border: 1px solid var(--card-line);
  background: var(--card);
  border-radius: var(--r-pill);
  padding: 6px var(--u-space-3);
  font-size: var(--fs-xs);
  font-weight: 650;
  color: var(--text);
}
.warn-back {
  margin: 0 0 var(--u-space-2);
}
.rail-sources {
  border-top: 1px solid var(--glass-edge);
}
.rail-sources summary {
  cursor: pointer;
  padding: var(--u-space-2) 18px;
  font-size: var(--u-text-note);
  font-weight: 600;
  color: var(--faint);
  list-style: none;
}
.rail-sources summary::-webkit-details-marker {
  display: none;
}
.rail-sources .attribution-line {
  border-top: 0;
  padding-top: 0;
}

.layer-row {
  display: grid;
  grid-template-columns: 28px minmax(0, 1fr) 28px 36px;
  align-items: center;
  gap: 5px 7px;
  padding: var(--u-space-3) 10px;
  margin: var(--u-space-1) 0;
  border: 1px solid transparent;
  border-radius: 14px;
  min-height: 46px;
  transition: background var(--t-fast) var(--ease-out);
}
.layer-row:hover {
  background: var(--card);
}
.layer-row[data-active='true'] {
  background: var(--card);
  border-color: var(--card-line);
}
.layer-row > .layer-status {
  grid-column: 2 / -1;
  line-height: 1.6;
}
.layer-row > .layer-retry {
  grid-column: 2 / -1;
  justify-self: start;
}
.layer-row :is(.layer-expand, .switch, .layer-retry):focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 3px;
}
.layer-symbol {
  flex: none;
  width: 28px;
  height: 32px;
  border-radius: 9px;
  background: var(--hz-flood-soft);
  display: flex;
  align-items: center;
  justify-content: center;
}
/* #endregion */
