/* Interactive photo walkthrough overlay. Reuses site.css tokens (--paper --surface --ink
   --ink-2 --line --brick --gold --shadow-2 --radius --ease) and existing components
   (.icon-btn, .btn, .sr-only) so it themes in light and dark automatically. The stage chrome
   itself stays dark in both themes on purpose, matching the site's existing full-bleed
   .lightbox photo viewer in site.css — a deliberate exception for photo-viewing surfaces,
   not a missed token. See docs/walkthrough.md. */

.jhr-wt {
  position: fixed;
  inset: 0;
  z-index: 500;
  display: flex;
  flex-direction: column;
  background: rgb(8 14 18 / .97);
  color: #fdf8ec;
}
.jhr-wt[hidden] { display: none; }

.jhr-wt .icon-btn { background: rgb(255 255 255 / .12); border-color: transparent; color: #fff; }
.jhr-wt .icon-btn:hover { border-color: transparent; }

.jhr-wt__bar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 12px 14px;
  flex: none;
}
.jhr-wt__title { display: flex; flex-direction: column; gap: 2px; min-width: 0; }
.jhr-wt__step { font: 600 .85rem var(--font-body); color: var(--gold); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; max-width: 46vw; }
.jhr-wt__counter { font-size: .78rem; color: #cfd8da; font-variant-numeric: tabular-nums; }
.jhr-wt__controls { display: flex; gap: 8px; flex: none; }
.jhr-wt__controls .icon-btn { width: 40px; height: 40px; }
.jhr-wt__play[hidden] { display: none; }

.jhr-wt__stage {
  position: relative;
  flex: 1 1 auto;
  min-height: 0;
  display: flex;
  align-items: stretch;
  overflow: hidden;
  touch-action: none;
}
.jhr-wt__imgwrap {
  position: relative;
  flex: 1 1 auto;
  min-width: 0;
  display: grid;
  place-items: center;
  overflow: hidden;
}
.jhr-wt__skeleton {
  position: absolute;
  inset: 8%;
  border-radius: var(--radius-sm, 9px);
  background: linear-gradient(100deg, rgb(255 255 255 / .04) 30%, rgb(255 255 255 / .12) 50%, rgb(255 255 255 / .04) 70%);
  background-size: 200% 100%;
  animation: jhrWtShimmer 1.5s infinite;
}
@keyframes jhrWtShimmer { to { background-position: -200% 0; } }
.jhr-wt__img {
  max-width: 100%;
  max-height: 100%;
  object-fit: contain;
  user-select: none;
  -webkit-user-drag: none;
  transform-origin: center center;
  will-change: transform;
  cursor: zoom-in;
}
.jhr-wt.is-zoomed .jhr-wt__img { cursor: grab; }
.jhr-wt__img.is-illustration { max-width: 70%; max-height: 70%; }

.jhr-wt__hit {
  position: absolute;
  top: 0;
  bottom: 0;
  width: 22%;
  min-width: 44px;
  max-width: 96px;
  border: 0;
  background: transparent;
  color: rgb(255 255 255 / .55);
  display: grid;
  place-items: center;
  cursor: pointer;
  z-index: 2;
  transition: background .2s, color .2s;
}
.jhr-wt__hit svg { width: 30px; height: 30px; }
.jhr-wt__hit:hover, .jhr-wt__hit:focus-visible { background: linear-gradient(90deg, rgb(0 0 0 / .18), transparent); color: #fff; }
.jhr-wt__hit--prev { left: 0; }
.jhr-wt__hit--next { right: 0; background-image: none; }
.jhr-wt__hit--next:hover, .jhr-wt__hit--next:focus-visible { background: linear-gradient(270deg, rgb(0 0 0 / .18), transparent); }
.jhr-wt.is-zoomed .jhr-wt__hit { pointer-events: none; opacity: 0; }

.jhr-wt__progress { height: 3px; background: rgb(255 255 255 / .12); flex: none; }
.jhr-wt__progress-bar { height: 100%; background: linear-gradient(90deg, var(--brick), var(--gold)); transition: width .3s var(--ease); }

.jhr-wt__filmstrip {
  flex: none;
  display: flex;
  gap: 6px;
  padding: 10px 12px calc(10px + env(safe-area-inset-bottom));
  overflow-x: auto;
  scrollbar-width: thin;
  background: rgb(0 0 0 / .35);
}
.jhr-wt__thumb {
  flex: none;
  width: 64px;
  height: 46px;
  padding: 0;
  border-radius: 6px;
  overflow: hidden;
  border: 2px solid transparent;
  opacity: .55;
  cursor: pointer;
  transition: opacity .2s, border-color .2s;
}
.jhr-wt__thumb img { width: 100%; height: 100%; object-fit: cover; }
.jhr-wt__thumb:hover { opacity: .85; }
.jhr-wt__thumb.is-active { opacity: 1; border-color: var(--gold); }

.jhr-wt__rail {
  position: fixed;
  right: 0;
  top: 0;
  bottom: 0;
  width: min(320px, 88vw);
  background: var(--surface);
  color: var(--ink);
  box-shadow: var(--shadow-2);
  padding: 56px 20px 20px;
  overflow-y: auto;
  transform: translateX(100%);
  transition: transform .3s var(--ease);
  z-index: 3;
}
.jhr-wt__rail.is-open { transform: translateX(0); }
.jhr-wt__rail-close { position: absolute; top: 10px; right: 10px; }
.jhr-wt__rail .icon-btn { background: var(--paper-2); color: var(--ink); }
.jhr-wt__rail-price { font: 600 1.6rem/1.1 var(--font-display); margin: 0 0 4px; }
.jhr-wt__rail-addr { color: var(--ink-2); margin: 0 0 16px; }
.jhr-wt__rail-facts { display: grid; grid-template-columns: repeat(3, 1fr); gap: 8px; margin: 0 0 20px; padding: 0; }
.jhr-wt__rail-facts div { background: var(--paper-2); border-radius: var(--radius-sm, 9px); padding: 8px 10px; }
.jhr-wt__rail-facts dt { font-size: .68rem; text-transform: uppercase; letter-spacing: .06em; color: var(--ink-2); }
.jhr-wt__rail-facts dd { margin: 2px 0 0; font: 600 1rem var(--font-display); }
.jhr-wt__rail-actions { display: grid; gap: 10px; }
.jhr-wt__rail-actions .btn { width: 100%; }

@media (max-width: 640px) {
  .jhr-wt__rail { top: auto; width: auto; left: 0; right: 0; bottom: 0; max-height: 78vh; border-radius: 16px 16px 0 0; transform: translateY(100%); padding-top: 44px; }
  .jhr-wt__rail.is-open { transform: translateY(0); }
  .jhr-wt__step { max-width: 40vw; }
  .jhr-wt__hit { width: 30%; }
}

@media (prefers-reduced-motion: reduce) {
  .jhr-wt__skeleton { animation: none; }
}
