/* Route panel (stats pills + GPX elevation profile) for the Ascent page.
   Rendered by assets/js/ascent-route.js into the #route section. */

/* Start/finish photo pair in the route section: equal 4:3 crops + captions. */
.asc-route-photos figure {
  margin: 0;
}

.asc-route-photos img {
  width: 100%;
  aspect-ratio: 4 / 3;
  object-fit: cover;
  border-radius: 14px;
}

.asc-route-photos figcaption {
  margin-top: 6px;
  font-size: 0.85rem;
  text-align: center;
  color: color-mix(in srgb, var(--default-color), transparent 25%);
}

.asc-route-photos figcaption .bi {
  color: var(--accent-color);
}

/* Regulations section: accent the heading icons + the contact-info icon. */
.regulations h4 i {
  color: var(--accent-color);
  margin-right: 4px;
}

.regulations p > .bi {
  color: var(--accent-color);
}

/* Sized for their home in the narrow middle column of the route row: two
   pills per line. */
.asc-route-stats-list {
  list-style: none;
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 12px;
  padding: 0;
  margin: 0 0 18px;
}

.asc-route-stats-list li {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 2px;
  flex: 1 1 40%;
  min-width: 120px;
  padding: 12px 14px;
  background-color: var(--surface-color);
  border-radius: 14px;
  box-shadow: 0 4px 16px color-mix(in srgb, var(--default-color), transparent 92%);
}

.asc-route-stats-list li i {
  font-size: 1.35rem;
  color: var(--accent-color);
}

.asc-route-stats-list li b {
  font-size: 1.25rem;
  line-height: 1.2;
}

.asc-route-stats-list li span {
  font-size: 0.8rem;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  color: color-mix(in srgb, var(--default-color), transparent 35%);
}

.asc-route-profile-title {
  margin-top: 24px;
  font-size: 1.15rem;
  text-align: center;
}

/* Interactive Leaflet map. position + z-index:0 create an isolated stacking
   context so Leaflet's internal high-z panes/controls stay under the site's
   fixed header while scrolling. */
.asc-route-map {
  position: relative;
  z-index: 0;
  height: min(60vh, 460px);
  border-radius: 14px;
  overflow: hidden;
  box-shadow: 0 4px 16px color-mix(in srgb, var(--default-color), transparent 92%);
}

.asc-route-profile {
  position: relative;
  margin-top: 10px;
}

.asc-route-profile svg {
  display: block;
  width: 100%;
  height: auto;
}

.asc-route-profile .asc-grid {
  stroke: color-mix(in srgb, var(--default-color), transparent 88%);
  stroke-width: 1;
}

.asc-route-profile .asc-axis {
  fill: color-mix(in srgb, var(--default-color), transparent 35%);
  font-size: 11px;
}

.asc-route-profile .asc-endpoint-label {
  font-size: 11px;
  font-weight: 600;
}

.asc-route-profile .asc-profile-line {
  fill: none;
  stroke: var(--accent-color);
  stroke-width: 2.5;
  stroke-linejoin: round;
}

.asc-route-profile .asc-profile-area {
  fill: url(#ascRouteGrad);
}

.asc-route-profile .asc-grad-top {
  stop-color: var(--accent-color);
  stop-opacity: 0.4;
}

.asc-route-profile .asc-grad-bottom {
  stop-color: var(--accent-color);
  stop-opacity: 0.04;
}

.asc-route-profile .asc-endpoint {
  fill: var(--accent-color);
}

.asc-route-profile .asc-cursor-line {
  stroke: color-mix(in srgb, var(--default-color), transparent 55%);
  stroke-width: 1;
  stroke-dasharray: 3 3;
}

.asc-route-profile .asc-cursor-dot {
  fill: var(--surface-color);
  stroke: var(--accent-color);
  stroke-width: 2.5;
}

.asc-route-tooltip {
  position: absolute;
  transform: translate(-50%, -130%);
  padding: 5px 10px;
  background-color: var(--surface-color);
  border-radius: 8px;
  box-shadow: 0 4px 14px color-mix(in srgb, var(--default-color), transparent 80%);
  font-size: 0.82rem;
  white-space: nowrap;
  pointer-events: none;
}
