/* Glacier Hollow trail map page (trail-map.html, trail-map.js) */

.tm-section { padding-top: 32px; }

.tm-toolbar { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 12px 24px; margin-bottom: 16px; }
.tm-toolbar .filters { margin-bottom: 0; }
.tm-legend { display: flex; flex-wrap: wrap; gap: 6px 16px; list-style: none; margin: 0; padding: 0; font-size: .9rem; color: var(--muted); }
.tm-legend li { display: flex; align-items: center; gap: 6px; }
.key { display: inline-block; width: 22px; height: 4px; border-radius: 2px; }
.key-green { background: var(--green); }
.key-blue { background: var(--blue); }
.key-black { background: var(--black); }
.key-lift { height: 2px; background: #1d1d1f; box-shadow: 0 0 0 1px #fff; }
.key-closed { height: 0; border-top: 3px dashed #8a96a3; }
.key-park { width: 10px; height: 10px; border-radius: 50% 50% 50% 0; transform: rotate(-45deg); background: var(--poi-park); margin: 0 6px 2px; }

.tm-layout { display: grid; grid-template-columns: minmax(0, 1fr) 320px; gap: 24px; align-items: start; }

.tm-map-wrap {
  border-radius: var(--radius); overflow: hidden; border: 1px solid #dde6ef;
  background: #e8f2fb; scroll-margin-top: 80px;
}
.tm-map { display: block; width: 100%; height: auto; }

/* Runs */
.tm-run { cursor: pointer; outline: none; }
.tm-run-edge { fill: none; stroke: #fff; stroke-width: 9; stroke-linecap: round; }
.tm-run-line { fill: none; stroke-width: 5; stroke-linecap: round; }
.tm-run.green .tm-run-line { stroke: var(--green); }
.tm-run.blue .tm-run-line { stroke: var(--blue); }
.tm-run.black .tm-run-line { stroke: var(--black); }
.tm-run.closed .tm-run-line { stroke-dasharray: 10 8; opacity: .5; }
.tm-hit { fill: none; stroke: transparent; stroke-width: 26; stroke-linecap: round; pointer-events: stroke; }

/* Lifts */
.tm-lift { cursor: pointer; outline: none; }
.tm-lift-edge { stroke: #fff; stroke-width: 5; stroke-linecap: round; }
.tm-lift-line { stroke: #1d1d1f; stroke-width: 2.2; stroke-linecap: round; }
.tm-pylon { fill: #1d1d1f; stroke: #fff; stroke-width: 1; }
.tm-station { fill: #1d1d1f; stroke: #fff; stroke-width: 1.5; }
.tm-lift.closed .tm-lift-line { stroke: #8a96a3; stroke-dasharray: 6 5; }
.tm-lift.closed .tm-pylon, .tm-lift.closed .tm-station { fill: #8a96a3; }

/* Snow parks: a pin in the park colour (design/tokens.css), grey when closed */
.tm-park { cursor: pointer; outline: none; }
.tm-pin { fill: var(--poi-park); stroke: #fff; stroke-width: 2.5; stroke-linejoin: round; }
.tm-pin-glyph { fill: #fff; }
.tm-hit-pin { fill: transparent; }
.tm-park.closed .tm-pin { fill: #8a96a3; }
.tm-park.is-selected .tm-pin { stroke: #ffcc00; stroke-width: 5; }
.tm-park:focus-visible .tm-pin { stroke: #0a84ff; stroke-width: 5; }

/* Labels */
.tm-label {
  font: 600 19px -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
  fill: #16202c; paint-order: stroke; stroke: #fff; stroke-width: 5px; stroke-linejoin: round;
  pointer-events: none;
}
.tm-label.closed { fill: #6b7785; font-style: italic; }
.tm-label.lift-label { font-size: 16px; font-weight: 500; }
.tm-label.park-label { font-size: 15px; fill: var(--poi-park); }
.tm-label.park-label.closed { fill: #6b7785; }
.tm-label.place-label { font-size: 19px; font-weight: 700; fill: #0b2545; }
.tm-peak { fill: #0b2545; }

/* Selection: everything else fades */
.tm-map.has-selection .tm-run:not(.is-selected),
.tm-map.has-selection .tm-lift:not(.is-selected),
.tm-map.has-selection .tm-park:not(.is-selected),
.tm-map.has-selection .tm-label:not(.is-selected):not(.place-label) { opacity: .28; }
.tm-run.is-selected .tm-run-edge { stroke: #ffcc00; stroke-width: 14; }
.tm-lift.is-selected .tm-lift-edge { stroke: #ffcc00; stroke-width: 10; }
.tm-run:focus-visible .tm-run-edge, .tm-lift:focus-visible .tm-lift-edge { stroke: #0a84ff; stroke-width: 12; }
.tm-run, .tm-lift, .tm-park, .tm-label { transition: opacity .25s; }
.is-hidden { display: none; }

/* Side panel */
.tm-side { display: flex; flex-direction: column; gap: 8px; }
.tm-card {
  border: 1px solid #dde6ef; border-radius: var(--radius); padding: 18px 20px; background: #fff;
  min-height: 92px; box-shadow: 0 8px 24px rgba(11, 37, 69, .06);
}
.tm-card-hint { margin: 0; color: var(--muted); }
.tm-card-head { display: flex; justify-content: space-between; gap: 12px; align-items: flex-start; }
.tm-card h2 { font-size: 1.35rem; margin: 0; }
.tm-card p { margin: 8px 0 0; }
.tm-card-kind { margin: 0 !important; font-size: .85rem; font-weight: 600; color: var(--muted); }
.tm-card-kind.green { color: var(--green); }
.tm-card-kind.blue { color: var(--blue); }
.tm-card-kind.black { color: var(--black); }
.tm-card-kind.park { color: var(--poi-park); }
.tm-close {
  border: 0; background: var(--ice); width: 30px; height: 30px; border-radius: 50%;
  font-size: 1.2rem; line-height: 1; cursor: pointer; color: var(--muted); flex: none;
}
.tm-close:hover { background: #dde6ef; }
.tm-facts { display: grid; grid-template-columns: auto 1fr; gap: 4px 14px; margin: 12px 0 0; font-size: .95rem; }
.tm-facts dt { color: var(--muted); }
.tm-facts dd { margin: 0; }

.tm-list-title { font-size: 1rem; margin: 14px 0 0; color: var(--navy); }
.tm-list { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 4px; }
.tm-item {
  width: 100%; display: flex; align-items: center; gap: 10px; text-align: left;
  font: inherit; color: inherit; background: #fff; border: 1px solid transparent; border-radius: 10px;
  padding: 8px 10px; cursor: pointer;
}
.tm-item:hover { background: var(--ice); }
.tm-item[aria-pressed="true"] { border-color: var(--blue); background: #eaf2fd; }
.tm-item-name { flex: 1; display: flex; flex-direction: column; line-height: 1.3; font-weight: 600; }
.tm-item-name small { font-weight: 400; color: var(--muted); }
.tm-sym { width: 20px; text-align: center; flex: none; }
.tm-sym.lift { height: 2px; background: #1d1d1f; }
.tm-sym.park { width: 10px; height: 10px; border-radius: 50% 50% 50% 0; transform: rotate(-45deg); background: var(--poi-park); margin: 0 5px; }
.tm-more { font-size: .9rem; margin-top: 12px; }

/* Webcams */
.webcams { display: grid; grid-template-columns: repeat(auto-fit, minmax(260px, 1fr)); gap: 20px; margin-top: 24px; }
.webcam { margin: 0; background: #fff; border-radius: var(--radius); overflow: hidden; border: 1px solid #dde6ef; }
.webcam-frame { position: relative; }
.webcam-frame svg { display: block; width: 100%; height: auto; }
.webcam-tag, .webcam-time {
  position: absolute; font-size: .75rem; font-weight: 600; padding: 3px 9px; border-radius: 999px;
  background: rgba(11, 37, 69, .72); color: #fff;
}
.webcam-tag { top: 10px; left: 10px; text-transform: uppercase; letter-spacing: .05em; }
.webcam-time { bottom: 10px; right: 10px; }
.webcam figcaption { padding: 14px 16px; display: flex; flex-direction: column; gap: 2px; font-size: .95rem; }
.webcam figcaption .muted { margin: 0; }

@media (max-width: 980px) {
  .tm-layout { grid-template-columns: 1fr; }
}
@media (max-width: 760px) {
  /* The map keeps a readable size and scrolls sideways inside its frame */
  .tm-map-wrap { overflow-x: auto; -webkit-overflow-scrolling: touch; }
  .tm-map { width: 760px; max-width: none; }
  .tm-legend { font-size: .85rem; }
}
@media (prefers-reduced-motion: reduce) {
  .tm-run, .tm-lift, .tm-park, .tm-label { transition: none; }
}

/* Real resort chosen (resort.js): note under the summary card */
.tm-switch { margin: 0; }
