/* section-loader.css — the loading cover over a page's map (section-loader.js): the trail map's look since it was
   first drawn, now shared with the Ski Map. A frosted veil over the map, which is laid out and drawn under it, with a
   few words and a spinner; an error or "nothing to show" message without the spinner. It fades out when the map is
   ready (at once with reduced motion, design/tokens.css) and lets presses through to the map while it does. */
.section-loader {
  position: absolute; inset: 0; display: grid; place-content: center; justify-items: center; gap: 12px; padding: 24px; text-align: center;
  background: rgb(231 237 245 / .7); -webkit-backdrop-filter: blur(6px); backdrop-filter: blur(6px);
  font-size: 15px; font-weight: 600; color: var(--navy); cursor: default;
  opacity: 1; transition: opacity .22s var(--ease);
}
.section-loader[hidden] { display: none; }
.section-loader.is-leaving { opacity: 0; pointer-events: none; }
.section-loader-text { margin: 0; max-width: 420px; }
/* The spinner turns by transform alone, which the compositor runs: it keeps turning while the page works */
.section-loader:not(.error):not(.empty) .section-loader-text::before {
  content: ""; display: block; width: 26px; height: 26px; margin: 0 auto 12px; border-radius: 50%;
  border: 3px solid rgb(var(--navy-rgb) / .15); border-top-color: var(--navy); animation: section-loader-spin .9s linear infinite;
}
@keyframes section-loader-spin { to { transform: rotate(360deg); } }
/* Try again: the trail map's primary button (trail-map.css .tm-btn.primary), here for both maps */
.section-loader-retry {
  display: inline-flex; align-items: center; height: 36px; padding: 0 14px; border-radius: 999px; border: 0; cursor: pointer;
  background: var(--accent); color: var(--on-accent); font: inherit; font-size: 14px; font-weight: 600;
  transition: background var(--dur-fast) var(--ease);
}
.section-loader-retry:hover { background: var(--accent-hover); }
.section-loader-retry[hidden] { display: none; }
.section-loader.error { color: var(--sos-dark); }
.section-loader.empty { color: var(--muted); font-weight: 500; }
@media (prefers-reduced-motion: reduce) { .section-loader { transition: none; } }
