/* The balloon ride: loaded only for moments with 'ride' => 'balloon'.
   Desktop: a tall sky column beside the card. Up to 1100px: a short sky strip on top. */

.ride-balloon {
  grid-template-columns: 300px minmax(0, 1fr);
  grid-template-rows: auto 1fr auto;
}
.ride-balloon .topbar,
.ride-balloon .footer { grid-column: 1 / -1; }
.ride-balloon .map {
  grid-column: 1;
  grid-row: 2;
  position: sticky;
  top: 0;
  align-self: start;
  height: calc(100vh - 62px);
  height: calc(100dvh - 62px);
  background: #0B1437;
  border-bottom: 0;
  border-right: 1px solid var(--line);
}
.ride-balloon .map-viewport { height: 100%; }
.ride-balloon .stage { grid-column: 2; grid-row: 2; }
.ride-balloon .footer { grid-row: 3; }

/* Sky scene: labels must read on dawn, day and night alike. */
.ride-balloon .milestone-dot { fill: #fff; stroke: #1D1D1F; stroke-width: 2.5px; }
.ride-balloon .milestone-num { fill: #1D1D1F; font-size: 12px; }
.ride-balloon .milestone-icon { font-size: 20px; }
.ride-balloon .milestone-label {
  font-size: 12.5px;
  fill: #1D1D1F;
  stroke: #fff;
  stroke-width: 4px;
}
.ride-balloon .milestone.is-done .milestone-dot { fill: var(--bni-red); stroke: #fff; }
.ride-balloon .milestone.is-done .milestone-num { fill: #fff; }
.ride-balloon .milestone.is-here .milestone-dot { fill: #fff; stroke: #CF2030; stroke-width: 3px; r: 14; }
.ride-balloon .milestone.is-here .milestone-label { fill: #CF2030; font-size: 14px; }

.flight-plan { fill: none; stroke: rgba(255, 255, 255, .75); stroke-width: 2.5; stroke-dasharray: 3 9; stroke-linecap: round; }
.flight-trail { fill: none; stroke-width: 4; stroke-linecap: round; }

.star { fill: #fff; animation: twinkle 3.5s ease-in-out infinite; }
@keyframes twinkle { 50% { opacity: .25; } }

.cloud { fill: #fff; opacity: .78; animation: drift 20s ease-in-out infinite alternate; }
@keyframes drift { from { transform: translateX(-26px); } to { transform: translateX(26px); } }

.land-far { fill: #9CC48A; }
.land-near { fill: #6FA565; }
.land-tree { fill: #3F7A49; }

.ship { pointer-events: none; }
.ship-body { transform-origin: 0 -60px; animation: float 4.5s ease-in-out infinite alternate; }
@keyframes float { from { transform: rotate(-2deg) translateY(2px); } to { transform: rotate(2deg) translateY(-3px); } }
.ship-rope { stroke: #5B4023; stroke-width: 1.4; }
.basket { fill: #8A5A2B; stroke: #5B4023; stroke-width: 1.2; }
.envelope { fill: #CF2030; stroke: #fff; stroke-width: 2; }
.envelope-gore { fill: #A3141F; }
.flame-outer { fill: #F59E2E; }
.flame-inner { fill: #FDE68A; }
.ship-flame { transform-origin: 0 0; animation: flicker .28s ease-in-out infinite alternate; }
@keyframes flicker { to { transform: scale(.85, 1.12); } }
.ship.is-moving .ship-flame { animation-duration: .14s; }

/* First and last stops: open sky rather than the deck's road art. */
.ride-balloon .card:has(.is-hero) { background: linear-gradient(170deg, #DDF1FB, var(--paper) 60%); }
.ride-balloon .card:has(.is-hero)::before { display: none; }

@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) .ride-balloon .card:has(.is-hero) { background: linear-gradient(170deg, #17294D, var(--paper) 60%); }
}

/* Short strip layout */
@media (max-width: 1100px) {
  .ride-balloon {
    grid-template-columns: minmax(0, 1fr);
    grid-template-rows: auto auto 1fr auto;
  }
  .ride-balloon .map {
    grid-column: 1;
    grid-row: 2;
    position: relative;
    height: auto;
    align-self: stretch;
    border-right: 0;
    border-bottom: 1px solid var(--line);
  }
  .ride-balloon .map-viewport { height: 230px; }
  .ride-balloon .stage { grid-column: 1; grid-row: 3; }
  .ride-balloon .footer { grid-row: 4; }
}

@media (max-width: 680px) {
  .ride-balloon .map-viewport { height: 210px; }
  .ride-balloon .milestone-label { font-size: 12.5px; stroke-width: 4px; }
  .ride-balloon .milestone.is-here .milestone-label { font-size: 14px; }
  .ride-balloon .milestone-icon { font-size: 20px; }
  .ride-balloon .milestone-dot { r: 13; }
}
