/* ==========================================================================
   SUSPW — Peta / Lokasi: brand refresh layer (dark glass + gold)
   Loaded after peta-diorama.css; restyles the route page to match the
   cinematic dark-and-gold look of the home page.
   ========================================================================== */
:root {
  --pt-bg: #0b0806;
  --pt-glass: rgba(20, 14, 10, 0.84);
  --pt-glass-strong: rgba(16, 11, 8, 0.94);
  --pt-line: rgba(211, 154, 82, 0.3);
  --pt-gold: #d39a52;
  --pt-gold-hi: #f5c26b;
  --pt-ink: #f7efe4;
  --pt-muted: #b9a99a;
  --pt-wa: #1f9d55;
  --pt-head: 68px;
  --pt-ease: cubic-bezier(0.2, 0.8, 0.2, 1);
}

body { background: var(--pt-bg); }
#viewMap3D { background: var(--pt-bg); }

/* soft cinematic vignette so floating UI stays legible over busy satellite */
.pt-vignette {
  position: absolute;
  inset: 0;
  z-index: 2;
  pointer-events: none;
  background:
    linear-gradient(180deg, rgba(11, 8, 6, 0.55) 0%, transparent 22%, transparent 72%, rgba(11, 8, 6, 0.6) 100%),
    radial-gradient(ellipse at 50% 50%, transparent 55%, rgba(11, 8, 6, 0.45) 100%);
}

/* ── Intro title card ─────────────────────────────────────────────────── */
.pt-intro {
  position: fixed;
  inset: 0;
  z-index: 1200;
  display: grid;
  place-items: center;
  padding: 24px;
  text-align: center;
  color: var(--pt-ink);
  background:
    radial-gradient(circle at 50% 42%, rgba(211, 154, 82, 0.18), transparent 32rem),
    var(--pt-bg);
  pointer-events: none;
  animation: ptIntroOut 0.9s ease 6s forwards; /* safety: never block the map */
}
.map-ready .pt-intro { animation: ptIntroOut 0.9s ease 1.5s forwards; }

@keyframes ptIntroOut { to { opacity: 0; visibility: hidden; } }

.pt-intro-inner > * { opacity: 0; transform: translateY(14px); animation: ptRise 0.9s var(--pt-ease) forwards; }
.pt-intro-inner > *:nth-child(2) { animation-delay: 0.12s; }
.pt-intro-inner > *:nth-child(3) { animation-delay: 0.26s; }
.pt-intro-inner > *:nth-child(4) { animation-delay: 0.4s; }

@keyframes ptRise { to { opacity: 1; transform: none; } }

.pt-eyebrow {
  display: inline-block;
  font-size: 0.72rem;
  font-weight: 700;
  letter-spacing: 0.24em;
  text-transform: uppercase;
  color: var(--pt-gold);
}
.pt-intro-title {
  margin: 14px 0 12px;
  font-family: var(--font-serif);
  font-size: clamp(2.3rem, 7vw, 4.2rem);
  line-height: 1.05;
  font-weight: 700;
}
.pt-intro-title em { color: var(--pt-gold-hi); font-style: italic; }
.pt-intro-meta { color: var(--pt-muted); font-size: 0.98rem; }
.pt-intro-meta b { color: var(--pt-ink); }
.pt-intro-meta span { margin: 0 8px; color: var(--pt-gold); }
.pt-intro-line {
  display: block;
  width: 120px;
  height: 2px;
  margin: 26px auto 0;
  border-radius: 2px;
  background: linear-gradient(90deg, transparent, var(--pt-gold-hi), transparent);
  transform-origin: center;
}
.pt-intro-inner > .pt-intro-line { animation: ptRise 0.9s var(--pt-ease) 0.4s forwards, ptLoad 1.4s ease-in-out 1.2s infinite; }
@keyframes ptLoad { 0%, 100% { transform: scaleX(0.35); opacity: 0.5; } 50% { transform: scaleX(1); opacity: 1; } }

/* ── Header: keep it to one row on phones ─────────────────────────────── */
@media (max-width: 768px) {
  .luxury-navbar .bgm-pill-btn { display: none !important; } /* music lives in the dock */
  .luxury-navbar .nav-actions { gap: 8px !important; }
}

/* ── Shared glass surface ─────────────────────────────────────────────── */
.pt-navcard,
.pt-layers,
.pt-dock,
.pt-store {
  background: var(--pt-glass);
  border: 1px solid var(--pt-line);
  -webkit-backdrop-filter: blur(16px) saturate(140%);
          backdrop-filter: blur(16px) saturate(140%);
  box-shadow: 0 18px 44px rgba(0, 0, 0, 0.45), inset 0 1px 0 rgba(255, 236, 200, 0.06);
  color: var(--pt-ink);
  font-family: var(--font-sans);
}

/* ── Turn-by-turn card ────────────────────────────────────────────────── */
.pt-navcard {
  position: fixed;
  z-index: 900;
  top: calc(var(--pt-head) + 16px);
  left: 50%;
  display: flex;
  align-items: center;
  gap: 14px;
  width: min(440px, calc(100% - 24px));
  padding: 12px 16px 12px 12px;
  border-radius: 18px;
  transform: translateX(-50%);
  transition: border-color 0.4s ease, box-shadow 0.4s ease;
}
.pt-navcard.is-arrived { border-color: var(--pt-gold-hi); box-shadow: 0 18px 44px rgba(0, 0, 0, 0.45), 0 0 0 4px rgba(245, 194, 107, 0.12); }

.pt-nav-icon {
  flex: none;
  display: grid;
  place-items: center;
  width: 44px;
  height: 44px;
  border-radius: 13px;
  background: linear-gradient(160deg, var(--pt-gold-hi), var(--pt-gold));
  color: #2a1a0c;
  font-size: 1.5rem;
  font-weight: 800;
  line-height: 1;
}
.pt-nav-text { flex: 1; min-width: 0; display: flex; flex-direction: column; }
.pt-nav-text strong { font-size: 0.98rem; font-weight: 800; line-height: 1.25; }
.pt-nav-text small { font-size: 0.78rem; color: var(--pt-muted); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }

.pt-nav-eta {
  flex: none;
  display: flex;
  flex-direction: column;
  align-items: flex-end;
  padding-left: 14px;
  border-left: 1px solid rgba(247, 239, 228, 0.12);
}
.pt-nav-eta b { font-family: var(--font-serif); font-size: 1.2rem; color: var(--pt-gold-hi); line-height: 1.1; }
.pt-nav-eta small { font-size: 0.72rem; color: var(--pt-muted); }

/* ── Satelit / Peta toggle ────────────────────────────────────────────── */
.pt-layers {
  position: fixed;
  z-index: 900;
  top: calc(var(--pt-head) + 16px);
  right: 62px;
  display: flex;
  gap: 2px;
  padding: 4px;
  border-radius: 999px;
}
.pt-layer-btn {
  padding: 7px 14px;
  border: 0;
  border-radius: 999px;
  background: transparent;
  color: var(--pt-muted);
  font: inherit;
  font-size: 0.8rem;
  font-weight: 700;
  cursor: pointer;
  transition: background 0.25s ease, color 0.25s ease;
}
.pt-layer-btn:hover { color: var(--pt-ink); }
.pt-layer-btn.active { background: var(--pt-gold); color: #241509; }
.pt-layer-btn:focus-visible { outline: 2px solid var(--pt-gold-hi); outline-offset: 2px; }

/* MapLibre zoom/compass: dark glass to match */
.maplibregl-ctrl-top-right { top: calc(var(--pt-head) + 16px) !important; right: 14px !important; }
.maplibregl-ctrl-group {
  background: var(--pt-glass) !important;
  border: 1px solid var(--pt-line) !important;
  border-radius: 14px !important;
  box-shadow: 0 12px 30px rgba(0, 0, 0, 0.4) !important;
  overflow: hidden;
}
.maplibregl-ctrl-group button + button { border-top: 1px solid rgba(247, 239, 228, 0.1) !important; }
.maplibregl-ctrl-group button .maplibregl-ctrl-icon { filter: invert(0.92) sepia(0.3); }

/* ── Dock: play + journey timeline + music ────────────────────────────── */
.pt-dock {
  position: fixed;
  z-index: 950;
  left: 50%;
  bottom: 18px;
  display: flex;
  align-items: center;
  gap: 18px;
  width: min(640px, calc(100% - 24px));
  padding: 10px 12px 10px 10px;
  border-radius: 999px;
  transform: translateX(-50%);
}

.pt-play {
  flex: none;
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 12px 20px;
  border: 0;
  border-radius: 999px;
  background: linear-gradient(160deg, var(--pt-gold-hi), var(--pt-gold));
  color: #241509;
  font: inherit;
  font-size: 0.9rem;
  font-weight: 800;
  cursor: pointer;
  box-shadow: 0 6px 18px rgba(211, 154, 82, 0.35);
  transition: transform 0.15s ease, box-shadow 0.2s ease;
}
.pt-play:hover { box-shadow: 0 8px 24px rgba(211, 154, 82, 0.5); }
.pt-play:active { transform: scale(0.97); }
.pt-play:focus-visible { outline: 2px solid var(--pt-ink); outline-offset: 3px; }
.pt-play span:first-child { font-size: 0.8rem; letter-spacing: -0.1em; }

.pt-timeline {
  position: relative;
  flex: 1;
  min-width: 0;
  height: 42px;
  margin: 0 22px;
}
.pt-track {
  position: absolute;
  left: 0;
  right: 0;
  top: 12px;
  height: 3px;
  border-radius: 3px;
  background: rgba(247, 239, 228, 0.16);
  overflow: hidden;
}
.pt-track-fill {
  position: absolute;
  inset: 0;
  background: linear-gradient(90deg, var(--pt-gold), var(--pt-gold-hi));
  transform: scaleX(0);
  transform-origin: left;
}

.pt-stop {
  position: absolute;
  top: 0;
  left: var(--at);
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 4px;
  padding: 0;
  border: 0;
  background: none;
  color: var(--pt-muted);
  font: inherit;
  font-size: 0.7rem;
  font-weight: 700;
  white-space: nowrap;
  cursor: pointer;
  transform: translateX(-50%);
  transition: color 0.25s ease;
}
.pt-stop i {
  width: 14px;
  height: 14px;
  margin-top: 6.5px;
  border-radius: 50%;
  background: #2a1d14;
  border: 2px solid rgba(247, 239, 228, 0.35);
  transition: background 0.3s ease, border-color 0.3s ease, box-shadow 0.3s ease, transform 0.3s var(--pt-ease);
}
.pt-stop:hover { color: var(--pt-ink); }
.pt-stop.active { color: var(--pt-ink); }
.pt-stop.active i {
  background: var(--pt-gold-hi);
  border-color: #fff4dc;
  transform: scale(1.15);
  box-shadow: 0 0 0 5px rgba(245, 194, 107, 0.2);
  animation: ptPulse 2s ease-in-out infinite;
}
.pt-stop-end span { color: var(--pt-gold-hi); }
.pt-stop:focus-visible { outline: 2px solid var(--pt-gold-hi); outline-offset: 4px; border-radius: 6px; }

@keyframes ptPulse {
  0%, 100% { box-shadow: 0 0 0 4px rgba(245, 194, 107, 0.22); }
  50%      { box-shadow: 0 0 0 9px rgba(245, 194, 107, 0); }
}

.pt-music {
  flex: none;
  display: grid;
  place-items: center;
  width: 42px;
  height: 42px;
  border-radius: 50%;
  border: 1px solid var(--pt-line);
  background: rgba(211, 154, 82, 0.1);
  cursor: pointer;
}
.pt-music:focus-visible { outline: 2px solid var(--pt-gold-hi); outline-offset: 2px; }
.pt-eq { display: flex; align-items: flex-end; gap: 3px; height: 14px; }
.pt-eq i { width: 3px; height: 4px; border-radius: 2px; background: var(--pt-muted); }
.pt-music.playing .pt-eq i { background: var(--pt-gold-hi); animation: ptEq 0.9s ease-in-out infinite; }
.pt-music.playing .pt-eq i:nth-child(2) { animation-delay: 0.2s; }
.pt-music.playing .pt-eq i:nth-child(3) { animation-delay: 0.4s; }
@keyframes ptEq { 0%, 100% { height: 4px; } 50% { height: 14px; } }

/* neutralise legacy dock button skins from peta-diorama.css */
.pt-dock .dock-step-btn,
.pt-dock .dock-step-btn.active,
.pt-dock .dock-step-btn:hover {
  background: none !important;
  box-shadow: none !important;
  border: 0 !important;
}
.pt-dock .btn-dock-music,
.pt-dock .btn-dock-music.active,
.pt-dock .btn-dock-music.playing {
  background: rgba(211, 154, 82, 0.1) !important;
  border: 1px solid var(--pt-line) !important;
  box-shadow: none !important;
}

/* ── Store card ───────────────────────────────────────────────────────── */
.pt-store {
  position: fixed;
  z-index: 940;
  left: 16px;
  top: calc(var(--pt-head) + 16px);
  width: 340px;
  border-radius: 20px;
  overflow: hidden;
}

.pt-store-head {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 12px 14px;
  cursor: pointer;
}
.pt-store-head:focus-visible { outline: 2px solid var(--pt-gold-hi); outline-offset: -2px; }
.pt-store-logo {
  width: 40px;
  height: 40px;
  flex: none;
  border-radius: 12px;
  border: 1px solid var(--pt-line);
  background: #1d140e;
  object-fit: cover;
}
.pt-store-title { flex: 1; min-width: 0; display: flex; flex-direction: column; }
.pt-store-title strong { font-family: var(--font-serif); font-size: 1.05rem; }
.pt-store-title small { font-size: 0.76rem; color: var(--pt-muted); }
.pt-store-chev {
  width: 10px;
  height: 10px;
  margin-right: 4px;
  border-right: 2px solid var(--pt-muted);
  border-bottom: 2px solid var(--pt-muted);
  transform: rotate(-135deg) translate(-2px, -2px);
  transition: transform 0.35s var(--pt-ease);
}
.pt-store.minimized .pt-store-chev { transform: rotate(45deg); }

.pt-store-body {
  max-height: 420px;
  padding: 0 14px;
  overflow: hidden;
  transition: max-height 0.45s var(--pt-ease), opacity 0.35s ease;
}
.pt-store.minimized .pt-store-body { max-height: 0; opacity: 0; }

.pt-store-photo {
  position: relative;
  margin: 0;
  border-radius: 14px;
  overflow: hidden;
  aspect-ratio: 820 / 400;
}
.pt-store-photo img { display: block; width: 100%; height: 100%; object-fit: cover; }
.pt-store-photo figcaption {
  position: absolute;
  left: 0;
  right: 0;
  bottom: 0;
  padding: 18px 12px 8px;
  font-size: 0.74rem;
  color: #fff;
  background: linear-gradient(180deg, transparent, rgba(0, 0, 0, 0.72));
}
.pt-store-landmark { margin: 12px 0 2px; font-size: 0.82rem; line-height: 1.55; color: var(--pt-muted); }
.pt-store-landmark b { color: var(--pt-ink); }

.pt-store-actions {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 8px;
  padding: 12px 14px 14px;
}
.pt-btn {
  display: flex;
  align-items: center;
  justify-content: center;
  min-height: 42px;
  border-radius: 12px;
  font-size: 0.86rem;
  font-weight: 800;
  text-decoration: none;
  transition: transform 0.15s ease, filter 0.2s ease;
}
.pt-btn:hover { filter: brightness(1.08); }
.pt-btn:active { transform: scale(0.98); }
.pt-btn-gold { background: linear-gradient(160deg, var(--pt-gold-hi), var(--pt-gold)); color: #241509; }
.pt-btn-wa { background: var(--pt-wa); color: #fff; }

/* ── Map markers in brand colours ─────────────────────────────────────── */
.pin-bubble {
  background: var(--pt-glass-strong) !important;
  color: var(--pt-ink) !important;
  border: 1px solid var(--pt-line) !important;
  font-family: var(--font-sans);
  letter-spacing: 0.01em;
}
.pin-stem { background: var(--pt-gold) !important; }
.pin-dot { background: var(--pt-gold-hi) !important; border-color: #fff4dc !important; }

.suspw-pin-bubble {
  background: var(--pt-glass-strong) !important;
  border: 1.5px solid var(--pt-gold-hi) !important;
  box-shadow: 0 10px 28px rgba(0, 0, 0, 0.5), 0 0 22px rgba(245, 194, 107, 0.45) !important;
}
.suspw-pin-title { color: var(--pt-gold-hi) !important; font-family: var(--font-serif); font-size: 14px !important; }
.suspw-pin-sub { color: var(--pt-muted) !important; }
.suspw-pin-stem { background: var(--pt-gold-hi) !important; }
.suspw-pin-dot { background: var(--pt-gold-hi) !important; box-shadow: 0 0 0 6px rgba(245, 194, 107, 0.25), 0 0 16px var(--pt-gold-hi) !important; }

.delivery-marker { font-size: 0 !important; }
.pt-rider {
  position: relative;
  display: grid;
  place-items: center;
  width: 40px;
  height: 40px;
  border-radius: 50%;
  background: var(--pt-glass-strong);
  border: 2px solid var(--pt-gold-hi);
  box-shadow: 0 8px 20px rgba(0, 0, 0, 0.5);
}
.pt-rider span { font-size: 20px; line-height: 1; }
.pt-rider::before {
  content: "";
  position: absolute;
  inset: -2px;
  border-radius: 50%;
  border: 2px solid var(--pt-gold-hi);
  animation: ptRipple 1.8s ease-out infinite;
}
@keyframes ptRipple { from { transform: scale(1); opacity: 0.7; } to { transform: scale(1.9); opacity: 0; } }

/* tablet / small laptop: store card drops to bottom-left so it never hits the nav card */
@media (min-width: 769px) and (max-width: 1180px) {
  .pt-store { top: auto; bottom: 88px; }
}

/* ── Phone layout ─────────────────────────────────────────────────────── */
@media (max-width: 768px) {
  :root { --pt-head: 62px; }

  .pt-navcard { top: calc(var(--pt-head) + 10px); padding: 10px 12px 10px 10px; gap: 10px; }
  .pt-nav-icon { width: 38px; height: 38px; font-size: 1.25rem; border-radius: 11px; }
  .pt-nav-text strong { font-size: 0.9rem; }

  .pt-layers { top: calc(var(--pt-head) + 84px); right: 12px; }
  .pt-layer-btn { padding: 6px 12px; font-size: 0.74rem; }
  .maplibregl-ctrl-top-right { display: none !important; } /* pinch to zoom on phones */

  .pt-dock {
    bottom: 12px;
    gap: 10px;
    padding: 8px 10px 8px 8px;
  }
  .pt-play { padding: 11px 15px; font-size: 0.84rem; }
  .pt-timeline { margin: 0 20px; }
  .pt-stop { font-size: 0.64rem; }
  .pt-music { width: 38px; height: 38px; }

  /* bottom sheet sitting above the dock */
  .pt-store {
    top: auto;
    left: 12px;
    right: 12px;
    bottom: 84px;
    width: auto;
    max-height: calc(100vh - var(--pt-head) - 190px);
    overflow-y: auto;
  }
  .pt-store-head { padding: 10px 12px; }
  .pt-store-actions { padding: 0 12px 12px; }
  .pt-store:not(.minimized) .pt-store-actions { padding-top: 12px; }
}

@media (max-width: 380px) {
  .pt-play span:last-child { display: none; }
  .pt-play { padding: 12px 14px; }
}

@media (prefers-reduced-motion: reduce) {
  .pt-intro, .map-ready .pt-intro { animation: ptIntroOut 0.01s linear 0.8s forwards; }
  .pt-intro-inner > *, .pt-intro-inner > .pt-intro-line { animation: none; opacity: 1; transform: none; }
  .pt-stop.active i, .pt-rider::before, .pt-music.playing .pt-eq i { animation: none; }
  .pt-store-body, .pt-store-chev { transition: none; }
}
