/*********************************************************/
/******************** Elevation Panel ********************/
/*********************************************************/

#elevation-panel {
  position: absolute;

  left: 50%;
  bottom: 10px;

  transform: translateX(-50%);

  width: min(980px, calc(100% - 120px));
  height: 260px;

  z-index: 25;

  display: none;

  padding: 18px 22px 22px;
  padding-bottom: 5px;
  box-sizing: border-box;

  border-radius: 24px;

  background:
    linear-gradient(
      rgba(255,255,255,0.03) 1px,
      transparent 1px
    ),
    linear-gradient(
      90deg,
      rgba(255,255,255,0.03) 1px,
      transparent 1px
    ),
    rgba(7, 10, 14, 0.68);

  background-size:
    72px 72px,
    72px 72px,
    auto;

  border: 1px solid rgba(255,255,255,0.09);

  backdrop-filter: blur(18px);
  -webkit-backdrop-filter: blur(18px);

  box-shadow:
    0 22px 70px rgba(0,0,0,0.42),
    inset 0 1px 0 rgba(255,255,255,0.04);

  overflow: hidden;

  transition:
    opacity 0.2s,
    transform 0.2s,
    bottom 0.2s;
}

#elevation-panel.is-open {
  display: block;
}

#elevation-title {
  position: relative;
  z-index: 3;

  margin: 0 48px 10px 0;

  color: rgba(255,255,255,0.94);

  font-size: 15px;
  font-weight: 700;
  letter-spacing: 0.01em;
}

#elevation-chart {
  position: relative;
  z-index: 2;

  width: 100%;
  height: calc(100% - 50px);
}

.elevation-close {
  position: absolute;
  top: 14px;
  right: 14px;

  z-index: 30;

  width: 34px;
  height: 34px;

  display: flex;
  align-items: center;
  justify-content: center;

  border: 1px solid rgba(255,255,255,0.08);
  border-radius: 999px;

  background: rgba(255,255,255,0.08);

  color: white;

  font-size: 22px;
  line-height: 1;

  cursor: pointer;

  transition:
    background 0.18s,
    border-color 0.18s,
    transform 0.18s;
}

.elevation-close:hover {
  background: rgba(255,255,255,0.15);
  border-color: rgba(255,255,255,0.14);

  transform: scale(1.06);
}


#elevation-mode-toggle {
  position: absolute;
  top: 14px;
  right: 58px;
  z-index: 30;

  display: flex;
  gap: 6px;
}

#elevation-mode-toggle button {
  border: 1px solid rgba(255,255,255,0.1);
  border-radius: 999px;

  padding: 7px 13px;

  background: rgba(255,255,255,0.07);
  color: rgba(255,255,255,0.72);

  font-size: 12px;
  font-weight: 700;

  cursor: pointer;
}

#elevation-mode-toggle button.active {
  background: #ffcc33;
  color: #101418;
  border-color: transparent;
}

#elevation-resize {
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 12px;
  cursor: ns-resize;
  z-index: 35;
}

#elevation-resize::before {
  content: "";

  position: absolute;
  top: 5px;
  left: 50%;

  transform: translateX(-50%);

  width: 46px;
  height: 4px;

  border-radius: 999px;

  background: rgba(255,255,255,0.28);
}

#elevation-resize:hover::before {
  background: rgba(255,255,255,0.48);
}


@media (max-width: 768px) {
  #right-panel {
    overflow: visible;
  }

  #elevation-panel {
    position: relative;

    left: auto;
    right: auto;
    bottom: auto;

    transform: none;

    width: calc(100% - 24px);
    height: 220px;

    margin: 16px auto 0;

    padding: 16px 14px 12px;

    border-radius: 22px;

    z-index: 5;
  }

  #elevation-panel.is-open {
    display: block;
  }

  #elevation-title {
    max-width: 140px;

    margin: 0 120px 8px 0;

    font-size: 13px;

    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
  }

  #elevation-chart {
    height: calc(100% - 42px);
  }

  #elevation-mode-toggle {
    top: 14px;
    right: 52px;
    gap: 4px;
  }

  #elevation-mode-toggle button {
    padding: 6px 10px;
    font-size: 11px;
  }

  .elevation-close {
    top: 13px;
    right: 13px;

    width: 30px;
    height: 30px;

    font-size: 19px;
  }

  #elevation-resize {
    display: none;
  }
}

@media (max-width: 420px) {
  #elevation-panel {
    width: calc(100% - 20px);
    height: 200px;

    margin-top: 12px;

    padding: 14px 12px 10px;
  }

  #elevation-title {
    max-width: 110px;
    font-size: 12px;
  }

  #elevation-mode-toggle button {
    padding: 5px 9px;
    font-size: 10px;
  }

  .elevation-close {
    width: 28px;
    height: 28px;
  }
}