/* Hikes: the panorama from a hike's high point (js/hikes-summit.js), the flight along the trail (js/hike3d.js fly) and the row under the land.
   The rest of the page's styles are in scenes.css. Tokens only. */
.hike-panobox { position: absolute; inset: 0; }
.hike-panobox[hidden] { display: none; }
.hike-pano { position: absolute; inset: 0; width: 100%; height: 100%; touch-action: none; cursor: grab; display: block; }
.hike-pano:active { cursor: grabbing; }
.hike-pano:focus-visible { outline: 2px solid var(--accent); outline-offset: -4px; border-radius: var(--r-3); }

/* the row under the land: the surfaces (Photo, Contours, Map) or, in flight, the flight's bar on the left; Panorama and
   Fly on the right, Fly the filled button. Nothing of it lies on the land (only the + - tilt stack does). */
.hike-bar { display: flex; align-items: center; gap: var(--s-2); min-width: 0; min-height: var(--tap); }
.hike-bar .hike-style { flex: 0 1 auto; min-width: 0; }
.hike-bar .hike-style[hidden], .hike[data-fly] .hike-bar .hike-style { display: none; }
.hike-actpair { margin-left: auto; flex: none; display: flex; gap: var(--s-2); }
.hike-actpair:not(:has(> :not([hidden]))) { display: none; }
.hike-act { display: inline-flex; align-items: center; justify-content: center; gap: .4rem; min-height: var(--tap); min-width: var(--tap); padding: 0 1rem 0 .85rem; border-radius: var(--r-pill); border: 1px solid var(--line); background: var(--glass); font-size: var(--t-small); font-weight: 500; color: var(--ink); white-space: nowrap; transition: color var(--fast), background var(--med) var(--ease), border-color var(--fast), transform var(--fast) var(--ease); }
.hike-act[hidden] { display: none; }
.hike-act:hover { border-color: var(--line-strong); }
.hike-act:active { transform: scale(.96); }
.hike-act[aria-pressed="true"] { background: color-mix(in srgb, var(--ink) 12%, transparent); }
.hike-act .ico { flex: none; color: var(--accent); }
/* Fly: the main thing to do with a hike, filled */
.hike-act.hike-fly { border-color: transparent; background: var(--ink); color: var(--ink-inverse); font-weight: 600; padding: 0 1.15rem 0 .95rem; }
.hike-act.hike-fly .ico { color: currentColor; }
.hike-act.hike-fly:hover { box-shadow: 0 0 0 5px color-mix(in srgb, var(--ink) 10%, transparent); }
.hike-act.hike-fly[aria-pressed="true"] { background: var(--ink); box-shadow: 0 0 0 3px var(--bg), 0 0 0 5px var(--accent); }
/* the compass: the panorama's own, in its top corner (only on a phone that can tell where it points) */
.hike-compass { border: 1px solid var(--line); background: var(--glass-strong); backdrop-filter: blur(var(--blur)); -webkit-backdrop-filter: blur(var(--blur)); }
.hike-stagebox[data-pano] .hike-scale { display: none; }

.hike-flybar { flex: 1 1 auto; min-width: 0; display: flex; align-items: center; gap: var(--s-2); padding: 3px .9rem 3px 3px; border-radius: var(--r-pill); border: 1px solid var(--line); background: var(--glass); }
.hike-flybar[hidden] { display: none; }
.hike-play { flex: none; width: var(--tap); height: var(--tap); display: grid; place-items: center; border-radius: 50%; color: var(--ink); background: color-mix(in srgb, var(--ink) 10%, transparent); }
.hike-play[hidden] { display: none; }
.hike-play:hover { background: color-mix(in srgb, var(--ink) 16%, transparent); }
.hike-flyread { flex: none; font-size: var(--t-small); font-weight: 500; color: var(--ink); font-variant-numeric: tabular-nums; white-space: nowrap; }
.hike-flybar:has(.hike-play[hidden]) .hike-flyread { padding-left: .6rem; }
.hike-flyline { flex: 1 1 auto; min-width: 1.5rem; height: 3px; border-radius: 2px; background: color-mix(in srgb, var(--ink) 14%, transparent); overflow: hidden; }
.hike-flyline b { display: block; height: 100%; background: var(--accent); transform-origin: 0 50%; transform: scaleX(0); }
/* in flight the scale note goes */
.hike-stagebox[data-fly] .hike-scale { display: none; }

/* a phone: the row has to hold Photo · Contours · Map, Panorama and Fly side by side */
@media (max-width: 520px) {
  .hike-bar { gap: .3rem; }
  .hike-bar .hike-style button { padding: 0 .55rem; font-size: .8125rem; }
  .hike-actpair { gap: .3rem; }
  .hike-act { padding: 0 .75rem; font-size: .8125rem; }
  .hike-act:not(.hike-fly):not(.hike-compass) .ico { display: none; }
  .hike-act.hike-fly { padding: 0 .9rem 0 .75rem; }
  .hike-go { padding: 0 .9rem; }
  .hike-go .ico { display: none; }
}
@media (max-width: 380px) {
  .hike-bar, .hike-actpair { gap: .25rem; }
  .hike-bar .hike-style { padding: 2px; }
  .hike-bar .hike-style button { padding: 0 .4rem; font-size: .78125rem; }
  .hike-act { padding: 0 .5rem; font-size: .78125rem; }
  .hike-act.hike-fly { padding: 0 .75rem; }
  .hike-act.hike-fly .ico { display: none; }
  .hike-head .hike-back { padding: 0 .8rem 0 .6rem; }
  .hike-go { padding: 0 .7rem; }
}
@media (prefers-reduced-motion: reduce) { .hike-act { transition: none; } }

/* in flight the land under the controls changes every frame: a blur behind them would be worked out again each frame
   (the costliest thing on a phone, more than the land itself), so in flight they are plain and a little more solid */
.hike-stagebox[data-fly] * { backdrop-filter: none !important; -webkit-backdrop-filter: none !important; }
.hike-stagebox[data-fly] :is(.glass, .seg, .chip, .btn-quiet, .hike-act, .hike-zoom) { background: color-mix(in srgb, var(--bg) 78%, transparent); }

/* glaciers then and now (js/hikes-glaciers.js): one quiet line under the facts, only when the hike has a measured glacier */
.hike-glacier { margin: var(--s-3) 0 0; font-size: var(--label-size, .8125rem); color: var(--ink-2); font-variant-numeric: tabular-nums; }
