.bhgpxe__divider {
  background: #999;
  height: 1px;
  margin: 1.5rem 0;
}

.bhgpxe {
  background: #f3f4f6;
  border: 1px solid #d1d5db;
  border-radius: 8px;
  color: #173026;
  margin: 0;
  overflow: hidden;
  padding: 1rem 0.75rem;
  position: relative;
}

.bhgpxe__controls {
  align-items: center;
  background: #f3f4f6;
  border: 0;
  display: flex;
  flex-wrap: wrap;
  gap: 0.75rem;
  justify-content: space-between;
  padding: 0.5rem 0;
}

.bhgpxe__dropzone {
  cursor: pointer;
  line-height: 1.2;
}

.bhgpxe__dropzone.dragover {
  outline: 3px solid rgba(34, 197, 94, 0.35);
  outline-offset: 3px;
}

.bhgpxe__gpxInput {
  display: none;
}

.bhgpxe__status {
  color: #53645c;
  flex: 1 1 240px;
  font-size: 14px;
  margin: 0;
}

.bhgpxe__status--error {
  color: #b91c1c;
  font-weight: 700;
}

.bhgpxe__stats {
  display: grid;
  gap: 0.75rem;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  margin: 1rem 0;
}

.bhgpxe__stats[hidden] {
  display: none;
}

.bhgpxe__kmStats {
  display: flex;
  gap: 0.75rem;
  margin: -0.25rem 0 1rem;
  overflow-x: auto;
  padding: 0.25rem 0 0.65rem;
  scroll-snap-type: x proximity;
}

.bhgpxe__kmStats[hidden] {
  display: none;
}

.bhgpxe__stat {
  background: #ffffff;
  border: 1px solid rgba(148, 163, 184, 0.28);
  border-radius: 8px;
  padding: 0.85rem;
}

.bhgpxe__stat span {
  color: #64748b;
  display: block;
  font-size: 12px;
  letter-spacing: 0.04em;
  text-transform: uppercase;
}

.bhgpxe__stat strong {
  color: #0f3d2e;
  display: block;
  font-size: clamp(20px, 3vw, 30px);
  line-height: 1.1;
  margin-top: 0.25rem;
}

.bhgpxe__kmStat {
  background: #ffffff;
  border: 1px solid rgba(148, 163, 184, 0.28);
  border-radius: 8px;
  flex: 0 0 148px;
  padding: 0.75rem;
  scroll-snap-align: start;
}

.bhgpxe__kmStat span,
.bhgpxe__kmStat em {
  color: #64748b;
  display: block;
  font-size: 12px;
  font-style: normal;
}

.bhgpxe__kmStat > span {
  font-weight: 700;
  letter-spacing: 0.04em;
  text-transform: uppercase;
}

.bhgpxe__kmStat strong {
  color: #0f3d2e;
  display: block;
  font-size: 22px;
  line-height: 1.1;
  margin: 0.35rem 0 0.15rem;
}

.bhgpxe__kmStat strong span,
.bhgpxe__kmStat em span {
  color: inherit;
  display: inline;
  font-size: inherit;
}

.bhgpxe__kmStat em {
  margin-top: 0.15rem;
}

.bhgpxe__chartWrap {
  background: #f9fafb;
  border: 1px solid #d1d5db;
  border-radius: 0;
  margin-top: 1rem;
  min-height: 260px;
  overflow-x: hidden;
  position: relative;
}

.bhgpxe__empty {
  align-items: center;
  color: #64748b;
  display: flex;
  font-size: 15px;
  inset: 0;
  justify-content: center;
  min-height: 260px;
  padding: 2rem;
  text-align: center;
}

.bhgpxe__chart:not(:empty) + .bhgpxe__empty,
.bhgpxe__chartWrap.has-chart .bhgpxe__empty {
  display: none;
}

.bhgpxe__svg {
  display: block;
  max-width: 100%;
  min-width: 100%;
}

.bhgpxe__grid {
  stroke: #dbe7df;
  stroke-width: 1;
}

.bhgpxe__axisLabel,
.bhgpxe__km-label,
.bhgpxe__elevation-label {
  fill: #64748b;
  font-family: system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  font-size: 11px;
}

.bhgpxe__area {
  fill: url(#bhgpxe-area-gradient);
}

.bhgpxe__line {
  fill: none;
  filter: drop-shadow(0 8px 10px rgba(21, 128, 61, 0.2));
  stroke: url(#bhgpxe-line-gradient);
  stroke-linecap: round;
  stroke-linejoin: round;
  stroke-width: 4;
}

.bhgpxe__km-line {
  stroke: rgba(22, 101, 52, 0.16);
  stroke-dasharray: 4 7;
  stroke-width: 1;
}

.bhgpxe__km-dot {
  fill: #ffffff;
  stroke: #16a34a;
  stroke-width: 2;
}

@media (max-width: 700px) {
  .bhgpxe {
    padding: 0.5rem;
  }

  .bhgpxe__stats {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

@media (max-width: 420px) {
  .bhgpxe__stats {
    grid-template-columns: 1fr;
  }
}
