/* ==========================================================================
 *  panel.css - the frosted-glass side panel and its point list.
 * ========================================================================== */

.side {
  position: absolute;
  top: 14px;
  left: 14px;
  bottom: 14px;
  z-index: 1000;
  width: 282px;
  display: flex;
  flex-direction: column;
  overflow: hidden;

  border-radius: 20px;
  border: 1px solid rgba(255, 255, 255, .55);
  background: linear-gradient(158deg,
                rgba(255, 255, 255, .66) 0%,
                rgba(253, 238, 245, .52) 48%,
                rgba(240, 236, 255, .50) 100%);
  box-shadow: var(--glow), inset 0 1px 0 rgba(255, 255, 255, .85);

  -webkit-backdrop-filter: blur(22px) saturate(175%);
  backdrop-filter: blur(22px) saturate(175%);
}

/* Without backdrop-filter support, fall back to a more opaque fill so the
   text stays readable over the map. */
@supports not ((backdrop-filter: blur(1px)) or (-webkit-backdrop-filter: blur(1px))) {
  .side {
    background: linear-gradient(158deg,
                  rgba(255, 255, 255, .95) 0%,
                  rgba(253, 238, 245, .93) 100%);
  }
}

/* thin neon thread along the top edge */
.side::before {
  content: "";
  position: absolute;
  top: 0; left: 0; right: 0;
  height: 2px;
  background: linear-gradient(90deg, var(--pink), var(--violet), var(--cyan), var(--pink));
  background-size: 260% 100%;
  animation: sheen 9s linear infinite;
  opacity: .95;
  pointer-events: none;
}

@keyframes sheen { to { background-position: 260% 0; } }

.side__head {
  display: flex;
  align-items: center;
  gap: 11px;
  padding: 14px 15px 13px;
  border-bottom: 1px solid rgba(255, 255, 255, .5);
  background: linear-gradient(135deg,
                rgba(255, 255, 255, .42),
                rgba(255, 255, 255, .12));
}

.side__head img {
  width: 36px;
  height: 31px;
  flex: none;
  filter: drop-shadow(0 2px 5px rgba(120, 60, 150, .45));
}

.side__title {
  font-size: 17px;
  font-weight: 800;
  letter-spacing: .3px;
  background: linear-gradient(96deg, #6a3f8f, #c05f89 55%, #3f8fa8);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}

.side__sub {
  font-size: 11px;
  font-weight: 600;
  letter-spacing: .5px;
  text-transform: uppercase;
  color: var(--muted);
  margin-top: 2px;
}

/* ---- list ---- */

.side__list {
  margin: 0;
  padding: 8px;
  list-style: none;
  overflow-y: auto;
  flex: 1;
  scrollbar-width: thin;
  scrollbar-color: rgba(185, 140, 240, .5) transparent;
}

.side__list::-webkit-scrollbar { width: 7px; }
.side__list::-webkit-scrollbar-thumb {
  background: rgba(185, 140, 240, .45);
  border-radius: 4px;
}

.item {
  position: relative;
  display: flex;
  align-items: center;
  gap: 11px;
  width: 100%;
  padding: 9px 10px;
  margin-bottom: 4px;
  font: inherit;
  color: inherit;
  text-align: left;
  cursor: pointer;

  border: 1px solid rgba(255, 255, 255, .38);
  border-radius: 13px;
  background: rgba(255, 255, 255, .3);
  transition: background .16s, border-color .16s, box-shadow .16s, transform .16s;
}

.item:hover {
  background: rgba(255, 255, 255, .58);
  border-color: rgba(255, 255, 255, .8);
  box-shadow: 0 4px 14px rgba(120, 60, 150, .16);
  transform: translateX(2px);
}

.item:focus-visible {
  outline: 2px solid var(--violet);
  outline-offset: 1px;
}

.item.is-active {
  background: linear-gradient(120deg,
                rgba(255, 214, 229, .78),
                rgba(226, 214, 255, .70));
  border-color: rgba(255, 255, 255, .9);
  box-shadow: 0 5px 18px rgba(150, 80, 190, .28),
              inset 0 1px 0 rgba(255, 255, 255, .9);
}

/* glowing rail on the selected row */
.item.is-active::after {
  content: "";
  position: absolute;
  left: -1px; top: 22%; bottom: 22%;
  width: 3px;
  border-radius: 3px;
  background: linear-gradient(180deg, var(--pink), var(--violet));
  box-shadow: 0 0 8px rgba(185, 140, 240, .9);
}

/* the point currently being guided to */
.item.is-target {
  border-color: var(--pink-deep);
  box-shadow: 0 0 0 1px rgba(226, 113, 140, .5),
              0 5px 16px rgba(226, 113, 140, .3);
}

.item__num {
  flex: none;
  display: grid;
  place-items: center;
  width: 26px;
  height: 26px;
  border-radius: 50%;
  font-size: 12px;
  font-weight: 800;
  color: #fff;
  background: linear-gradient(140deg, var(--pink), var(--violet));
  border: 1.5px solid rgba(255, 255, 255, .85);
  box-shadow: 0 2px 8px rgba(170, 110, 220, .5);
}

.item.is-active .item__num {
  background: linear-gradient(140deg, var(--pink-deep), #8f6ae0);
  box-shadow: 0 2px 12px rgba(150, 90, 220, .75);
}

.item__name { font-size: 13px; line-height: 1.32; font-weight: 500; }

/* ---- footer that hosts the location row ---- */

.side__foot {
  padding: 11px 14px 13px;
  border-top: 1px solid rgba(255, 255, 255, .5);
  background: linear-gradient(0deg,
                rgba(255, 255, 255, .40),
                rgba(255, 255, 255, .10));
}

/* ---- small screens ---- */

@media (max-width: 640px) {
  .side {
    top: auto;
    left: 8px;
    right: 8px;
    bottom: 8px;
    width: auto;
    max-height: 47vh;
    border-radius: 18px;
  }
  .side__list { max-height: 24vh; }
}
