/* =========================================================
   EXPLORE POP-UP (Drones page)
   Builds on the liquid glass pop-up in /popup.css (the dialog
   also has the .spec-dialog classes, so it shares the glass,
   the dimmed backdrop and the pop-in animation). Inside, a tall
   scroll track with a pinned stage: scrolling the pop-up plays
   the drone animation (drones/explore.js).
   ========================================================= */

/* READ MORE and EXPLORE side by side */
.event-actions {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 14px 32px;
}


.explore-dialog {
  --ex-h: min(92svh, 900px);

  width: min(1100px, calc(100vw - 32px));
  height: var(--ex-h);
  max-height: none;

  overflow: hidden;
}

.explore-dialog .explore-inner {
  position: relative;

  height: 100%;
  padding: 0;

  overflow: hidden;
}

/* The scrolling layer. Wheel and touch scrolling stay inside the
   pop-up instead of moving the page behind it. */
.explore-scroller {
  position: absolute;
  inset: 0;

  overflow-y: auto;
  overscroll-behavior: contain;

  border-radius: 28px;

  scrollbar-width: none;
}

.explore-scroller::-webkit-scrollbar {
  display: none;
}

/* How much scrolling the whole animation takes */
.explore-track {
  height: calc(var(--ex-h) * 5);
}

.explore-stage {
  position: sticky;
  top: 0;

  height: var(--ex-h);
  padding: 26px 32px 24px;

  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 14px;
}

.explore-head {
  align-self: stretch;
  padding-right: 56px;  /* clear of the × button */
}

.explore-dialog .explore-head h3 {
  margin: 0;
  padding: 0;

  font-size: 26px;
}

/* Frame and progress line share one width: as wide as the
   pop-up allows while the 16:9 frame still fits its height */
.explore-media {
  width: min(100%, calc((var(--ex-h) - 160px) * 16 / 9));

  display: flex;
  flex-direction: column;
  gap: 14px;
}

.frame-wrap {
  position: relative;

  width: 100%;
  aspect-ratio: 16 / 9;
}

.explore-canvas {
  display: block;

  width: 100%;
  height: 100%;

  border: 1px solid rgba(255, 255, 255, 0.14);
  border-radius: 20px;

  background: #020307;

  box-shadow:
    0 20px 50px rgba(0, 0, 0, 0.22),
    inset 0 1px 0 rgba(255, 255, 255, 0.1);
}

.progress-track {
  width: 100%;
  height: 2px;
  border-radius: 2px;
  overflow: hidden;

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

.progress-bar {
  width: 0%;
  height: 100%;

  background: #b7c2ff;
}

.explore-hint {
  display: flex;
  align-items: center;
  gap: 14px;

  color: rgba(225, 232, 255, 0.75);

  font-size: 12px;
  font-weight: 700;
  letter-spacing: 1.8px;

  transition: opacity 0.3s ease;
}

.explore-hint::before,
.explore-hint::after {
  content: "";
  width: 34px;
  height: 1px;
  background: #77809a;
}

.explore-hint.hidden {
  opacity: 0;
}

/* × stays above the scrolling layer */
.explore-dialog .spec-close {
  z-index: 5;
}


/* Spec card: liquid glass like the navbar, moved by explore.js
   along the right side of the frame as the animation plays */

.explore-dialog .spec-card {
  position: absolute;
  top: 0;
  left: 0;
  z-index: 2;

  width: 270px;
  padding: 20px 22px;

  border-radius: 22px;

  color: #ffffff;

  background:
    linear-gradient(
      180deg,
      rgba(255, 255, 255, 0.12),
      rgba(255, 255, 255, 0.03) 48%,
      rgba(255, 255, 255, 0.06)
    ),
    rgba(8, 12, 30, 0.22);

  backdrop-filter: blur(10px) saturate(185%) brightness(1.08);
  -webkit-backdrop-filter: blur(10px) saturate(185%) brightness(1.08);

  box-shadow:
    0 14px 40px rgba(0, 0, 0, 0.3),
    0 2px 8px rgba(0, 0, 0, 0.18),
    inset 0 1.5px 1px rgba(255, 255, 255, 0.55),
    inset 0 -1.5px 1px rgba(255, 255, 255, 0.2),
    inset 0 10px 18px -8px rgba(255, 255, 255, 0.18),
    inset 0 -12px 20px -10px rgba(170, 190, 255, 0.16);

  text-shadow: 0 1px 6px rgba(0, 0, 0, 0.35);

  opacity: 0;
  visibility: hidden;
  pointer-events: none;
  will-change: transform, opacity;
}

.explore-dialog .spec-kicker {
  display: block;
  margin-bottom: 6px;

  color: rgba(225, 232, 255, 0.85);

  font-size: 11px;
  font-weight: 700;
  letter-spacing: 1.8px;
}

.explore-dialog .spec-card h3 {
  margin: 0 0 14px;
  padding: 0;

  font-size: 20px;
  font-weight: 700;
  letter-spacing: -0.3px;
}

.explore-dialog .spec-card dl {
  display: grid;
  gap: 8px;
  margin: 0;
}

.explore-dialog .spec-card dl div {
  display: flex;
  justify-content: space-between;
  gap: 12px;

  padding-top: 8px;
  border-top: 1px solid rgba(255, 255, 255, 0.16);

  font-size: 14px;
}

.explore-dialog .spec-card dt {
  flex-shrink: 0;
  white-space: nowrap;

  color: rgba(230, 236, 255, 0.82);
}

.explore-dialog .spec-card dd {
  margin: 0;
  font-weight: 700;
  text-align: right;
}

.explore-dialog .spec-note {
  margin: 12px 0 0;
  padding-top: 10px;
  border-top: 1px solid rgba(255, 255, 255, 0.16);

  color: rgba(230, 236, 255, 0.88);

  font-size: 13px;
  line-height: 1.5;
}


/* Phones: the frame fills the pop-up's width and the spec card
   rides underneath it instead of over it */
@media (max-width: 700px) {
  .explore-dialog {
    --ex-h: min(88svh, 760px);
  }

  .explore-stage {
    padding: 20px 14px 18px;
    gap: 12px;
  }

  .explore-dialog .explore-head h3 {
    font-size: 22px;
  }

  .explore-media {
    width: 100%;
  }

  /* Room below the frame for the spec card */
  .frame-wrap {
    margin-bottom: auto;
  }

  .explore-canvas {
    border-radius: 16px;
  }

  .explore-dialog .spec-card {
    width: min(320px, calc(100vw - 72px));
    padding: 13px 15px;
  }

  .explore-dialog .spec-kicker {
    margin-bottom: 3px;
    font-size: 10px;
    letter-spacing: 1.5px;
  }

  .explore-dialog .spec-card h3 {
    margin-bottom: 9px;
    font-size: 15.5px;
  }

  .explore-dialog .spec-card dl {
    gap: 5px;
  }

  .explore-dialog .spec-card dl div {
    padding-top: 5px;
    font-size: 12.5px;
  }

  .explore-dialog .spec-note {
    margin-top: 9px;
    padding-top: 7px;
    font-size: 11.5px;
    line-height: 1.45;
  }

  /* The progress line and hint sit at the bottom, below the card */
  .explore-media {
    flex: 1;
  }

  .progress-track {
    margin-top: auto;
  }
}
