/* Our map and the interactive hikes / ski areas: public site (home, explore.php) and guest area (guest/mountain.php). */

/* ---------- Map ---------- */
.map-box { position: relative; min-height: 400px; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 14px; text-align: center; padding: 24px; border-radius: var(--radius-lg); overflow: hidden; border: 1px solid var(--line);
  background: repeating-linear-gradient(0deg, transparent 0 38px, rgba(75, 63, 107, .07) 38px 39px), repeating-linear-gradient(90deg, transparent 0 38px, rgba(75, 63, 107, .07) 38px 39px), var(--white); }
.map-box__pin { width: 46px; height: 46px; color: var(--rose-deep); }
.map-box__fallback { display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 12px; height: 100%; padding: 24px; text-align: center; }
.map-box__fallback p { max-width: 34rem; margin: 0; }

/* Our map (assets/js/map.js): fills its box; the fallback underneath shows until it is drawn. */
.skymap, .skymap.maplibregl-map { position: absolute; inset: 0; z-index: 1; font-family: var(--font-body); }
.skymap.is-live + .map-box__fallback { visibility: hidden; }
.skymap-failed-only { display: none; }
.skymap.is-failed { display: none; }
.skymap.is-failed + .map-box__fallback .skymap-failed-only { display: block; }
.skymap .maplibregl-ctrl-group button.skymap__view { width: auto; min-width: 29px; padding: 0 6px; font: 700 .78rem/1 var(--font-body); color: var(--charcoal); }
.skymap .maplibregl-popup-content { padding: 12px 14px; border-radius: 10px; font-size: .9rem; line-height: 1.4; }
.skymap .maplibregl-popup-content a { color: var(--rose-ink); font-weight: 600; }
.skymap .maplibregl-cooperative-gesture-screen { font-family: var(--font-body); }
.skymap-home { display: flex; align-items: center; gap: 6px; pointer-events: none; }
.skymap-home__mark { display: grid; place-items: center; width: 48px; height: 48px; border-radius: 50%; background: var(--white); border: 3px solid var(--terracotta); box-shadow: 0 3px 10px rgba(33, 28, 21, .3); }
.skymap-home__mark .brand__mark { width: 30px; height: 33px; background: var(--terracotta); }
.skymap-home__label { padding: 3px 9px; border-radius: 999px; background: var(--terracotta); color: #fff; font-weight: 700; font-size: .85rem; box-shadow: 0 2px 8px rgba(33, 28, 21, .25); }
.skymap-dot { width: 20px; height: 20px; padding: 0; border: 3px solid #fff; border-radius: 50%; background: #555; box-shadow: 0 2px 6px rgba(33, 28, 21, .35); cursor: pointer; }
.skymap-dot--easy { background: #3f8f5a; }
.skymap-dot--medium { background: #c98a1b; }
.skymap-dot--hard { background: #b3413a; }
.skymap-dot--ski { background: var(--terracotta); }
.skymap-dot--xc { background: #6a4fb3; }
.skymap-legend { display: flex; flex-wrap: wrap; gap: 6px 18px; margin: -.8rem 0 1.6rem; padding: 0; list-style: none; color: var(--charcoal-soft); }
.skymap-legend li { display: flex; align-items: center; gap: 7px; }
.skymap-legend__line { width: 26px; height: 0; border-top: 4px solid; }
.skymap-legend__line--easy { border-color: #2f6db5; }
.skymap-legend__line--medium { border-color: #d0342c; }
.skymap-legend__line--hard { border-color: #1d1d1d; }
.skymap-legend__line--xc { border-top: 3px dashed #6a4fb3; }
.skymap-legend__line--lift { border-top: 2px solid #211c15; }
.skymap-legend__line--trail { border-top: 3px dashed #c0392b; }
.skymap-legend__line--route { height: 5px; border: 0; border-radius: 3px; background: linear-gradient(90deg, #3f8f5a 33%, #c98a1b 33% 66%, #b3413a 66%); }
.skymap-legend__line--sellaronda { height: 5px; border: 0; border-radius: 3px; background: linear-gradient(90deg, #f07a12 50%, #1f9a3a 50%); }
.skymap-legend__hint { flex-basis: 100%; }

/* Interactive hikes / ski areas (partials/explore-places.php, assets/js/explore.js) */
.explore__filters { display: flex; flex-wrap: wrap; gap: 8px; margin-bottom: 1.2rem; }
.explore .chip { padding: 8px 16px; border: 1px solid var(--line); border-radius: 999px; background: var(--white); color: inherit; font: inherit; font-size: .92rem; cursor: pointer; }
.explore .chip.is-active { background: var(--rose-deep); border-color: var(--rose-deep); color: #fff; }
.explore__map { position: relative; height: clamp(360px, 62vh, 600px); margin-bottom: 1.6rem; border: 1px solid var(--line); border-radius: var(--radius-md); overflow: hidden; background: var(--white); color: var(--charcoal-soft); }
.explore__map-icon { width: 40px; height: 40px; color: var(--rose-deep); }
/* What the map is showing (explore.js tell()): over the map, top left, clear of the controls on the right */
.explore__now { position: absolute; top: 10px; left: 10px; right: 56px; z-index: 2; max-width: 340px; padding: 9px 12px 10px; border-radius: 10px; background: rgba(255, 253, 249, .96); box-shadow: 0 2px 10px rgba(33, 28, 21, .22); color: var(--charcoal); font-size: .88rem; line-height: 1.35; }
.explore__now[hidden] { display: none; }
.explore__now p { margin: 0; }
.explore__now-head { display: flex; align-items: center; justify-content: space-between; gap: 10px; margin-bottom: 3px !important; }
.explore__now-label { font-size: var(--fs-xs); font-weight: 700; text-transform: uppercase; letter-spacing: .04em; color: var(--brown-muted); }
.explore__now-close { padding: 2px 8px; border: 1px solid var(--line); border-radius: 999px; background: var(--white); color: var(--rose-deep); font: inherit; font-size: .8rem; font-weight: 600; cursor: pointer; white-space: nowrap; }
.explore__now-name { display: flex; align-items: center; gap: 8px; font-weight: 700; font-size: .98rem; }
.explore__now-facts { color: var(--charcoal-soft); }
.explore__now-facts a { color: #a8452f; font-weight: 600; white-space: nowrap; }
.explore__now-key { flex: none; width: 22px; height: 5px; border-radius: 3px; background: #6f6556; }
.explore__now-key--easy { background: #3f8f5a; }
.explore__now-key--medium { background: #c98a1b; }
.explore__now-key--hard { background: #b3413a; }
.explore__now-key--ski { width: 12px; height: 12px; border-radius: 50%; background: var(--terracotta); }
.explore__now-key--xc { width: 12px; height: 12px; border-radius: 50%; background: #6a4fb3; }
.explore__now-key--sellaronda { background: linear-gradient(90deg, #f07a12 50%, #1f9a3a 50%); }
.explore__list { display: grid; grid-template-columns: repeat(auto-fill, minmax(min(300px, 100%), 1fr)); gap: 14px; margin: 0 0 1rem; padding: 0; list-style: none; }
.explore-card { display: flex; flex-direction: column; gap: 6px; padding: 18px 20px; background: var(--white); border: 1px solid var(--line); border-radius: var(--radius-md); transition: border-color .2s; }
.explore-card[hidden] { display: none; }
.explore-card.is-current { border-color: var(--rose-deep); box-shadow: 0 0 0 2px var(--rose-deep) inset; }
.explore-card__badge { display: flex; align-items: center; gap: 8px; margin: 0; font-size: var(--fs-xs); font-weight: 700; text-transform: uppercase; letter-spacing: .04em; color: var(--brown-muted); }
.explore-card__dot { width: 10px; height: 10px; border-radius: 50%; background: #555; flex: none; }
.explore-card--easy .explore-card__dot { background: #3f8f5a; }
.explore-card--medium .explore-card__dot { background: #c98a1b; }
.explore-card--hard .explore-card__dot { background: #b3413a; }
.explore-card--ski .explore-card__dot { background: var(--terracotta); }
.explore-card--xc .explore-card__dot { background: #6a4fb3; }
.explore-card--featured { grid-column: 1 / -1; border-color: #f07a12; background: linear-gradient(135deg, #fff7ee, var(--white) 60%); }
.explore-card--featured .explore-card__name { font-size: 1.35rem; }
.explore-card__star { margin-left: auto; padding: 2px 9px; border-radius: 999px; background: #f07a12; color: #fff; letter-spacing: .03em; }
.explore-card__name { margin: 0; font-size: 1.15rem; }
.explore-card__facts { margin: 0; font-weight: 600; color: var(--rose-deep); font-size: .92rem; }
.explore-card__text { margin: 0; font-size: .95rem; color: var(--charcoal-soft); flex: 1; }
.explore-card__links { display: flex; flex-wrap: wrap; gap: 6px 16px; margin: 6px 0 0; font-size: .9rem; }
.explore-card__links a, .explore .link-button { color: var(--rose-deep); font-weight: 600; }
.explore .link-button { padding: 0; border: 0; background: none; font: inherit; font-weight: 600; cursor: pointer; text-decoration: underline; }
