/* tours feature styles (loaded after app.css). "Step inside": one large 360 stage with scene chips and a door toggle.
   PSV's own CSS is appended later at runtime, so overrides below are scoped under .tv-stage to win on specificity. */
/* minmax(0, 1fr) rather than a bare 1fr: the scene chips are wider than a phone,
   and a default auto-minimum lets them stretch the track and scroll the page. */
.tv { display: grid; grid-template-columns: minmax(0, 1fr); gap: 14px; }
.tv-controls { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 10px 16px; }
.tv-scenes { min-width: 0; }
.tv-doors[hidden] { display: none; }

.tv-stage { position: relative; width: 100%; aspect-ratio: 16 / 10; max-height: 72vh; max-height: 72svh; border-radius: var(--r-card); overflow: hidden; background: var(--ash); isolation: isolate; }
.tv-viewer { position: absolute; inset: 0; }
.tv-poster { position: absolute; inset: 0; z-index: 2; pointer-events: none; transition: opacity .6s ease; }
.tv-poster img { width: 100%; height: 100%; object-fit: cover; display: block; }
.tv-stage.live .tv-poster { opacity: 0; }
.tv-status { position: absolute; left: 50%; top: 50%; z-index: 3; transform: translate(-50%, -50%); max-width: calc(100% - 32px); padding: 8px 14px; border-radius: var(--r-btn); background: rgba(23, 26, 28, .6); color: #fff; font-size: 13px; font-weight: 500; text-align: center; pointer-events: none; }
.tv-status:empty { display: none; }
.tv-hint { position: absolute; left: 50%; bottom: 52px; z-index: 3; transform: translateX(-50%); display: inline-flex; align-items: center; gap: 8px; padding: 6px 12px; border-radius: var(--r-btn); background: rgba(23, 26, 28, .55); color: #fff; font-size: 12px; font-weight: 500; white-space: nowrap; pointer-events: none; opacity: 0; transition: opacity var(--t); }
.tv-hint i { font-size: 16px; }
.tv-stage.live:not(.moved) .tv-hint { opacity: 1; }

.tv-foot { display: flex; flex-wrap: wrap; align-items: baseline; justify-content: space-between; gap: 4px 24px; }
.tv-caption { margin: 0; max-width: 70ch; color: var(--graphite); font-size: 15px; line-height: 1.55; }
.tv-note { margin: 0; color: var(--fog); font-size: 12px; }

/* ---- Photo Sphere Viewer, toned to the site ---- */
.tv-stage .psv-container { background: var(--ash); font-family: var(--font-body); }
.tv-stage .psv-navbar { background: rgba(23, 26, 28, .45); font-family: var(--font-body); }
.tv-stage .psv-loader-container { display: none; }
.tv-stage .psv-overlay { background: rgba(23, 26, 28, .5); opacity: 1; }
.tv-stage .psv-overlay-image, .tv-stage .psv-overlay-text { color: #fff; font-family: var(--font-body); font-size: 15px; font-weight: 500; }
.tv-stage .psv-overlay-image svg { width: 72px; }

/* Tooltips are mounted inside the viewer container. */
.tv-stage .psv-tooltip.tv-tip { max-width: 240px; background: rgba(23, 26, 28, .88); border-radius: var(--r-btn); }
.tv-stage .psv-tooltip.tv-tip .psv-tooltip-content { display: grid; gap: 2px; padding: 8px 12px; font: 400 13px/1.4 var(--font-body); text-shadow: none; color: rgba(255, 255, 255, .82); }
.tv-stage .psv-tooltip.tv-tip b { color: #fff; font-weight: 500; font-size: 14px; }
.tv-stage .psv-tooltip.tv-tip.psv-tooltip--top-center .psv-tooltip-arrow { border-top-color: rgba(23, 26, 28, .88); }
.tv-stage .psv-tooltip.tv-tip.psv-tooltip--bottom-center .psv-tooltip-arrow { border-bottom-color: rgba(23, 26, 28, .88); }

/* ---- markers ---- */
.tv-spec { display: grid; place-items: center; width: 34px; height: 34px; border-radius: 50%; background: rgba(252, 252, 251, .92); color: var(--accent); font-size: 18px; cursor: pointer; transition: background-color var(--t), color var(--t), transform var(--t); }
.tv-spec:hover { background: var(--accent); color: var(--accent-ink); }
.tv-unit { display: inline-flex; align-items: center; gap: 6px; height: 26px; padding: 0 9px; border-radius: var(--r-btn); background: rgba(23, 26, 28, .72); color: #fff; font-size: 12px; font-weight: 500; font-variant-numeric: tabular-nums; white-space: nowrap; cursor: pointer; transition: background-color var(--t); }
.tv-unit:hover { background: var(--accent); }
.tv-unit .dot { width: 7px; height: 7px; border-radius: 50%; background: var(--available); }
.tv-unit.is-reserved .dot { background: var(--reserved); }
.tv-unit.is-sold .dot { background: var(--sold); }
.tv-poi { display: block; color: #fff; font-size: 26px; line-height: 1; filter: drop-shadow(0 1px 2px rgba(0, 0, 0, .55)); cursor: pointer; }
.tv-poi:hover { color: var(--ash-2); }
.tv-site { display: inline-flex; align-items: center; gap: 6px; height: 32px; padding: 0 12px 0 8px; border-radius: var(--r-btn); background: var(--accent); color: var(--accent-ink); font-size: 13px; font-weight: 500; white-space: nowrap; }
.tv-site i { font-size: 18px; }

@media (max-width: 640px) {
  .tv-stage { aspect-ratio: 4 / 5; }
  .tv-controls { align-items: stretch; }
  .tv-scenes { flex-wrap: nowrap; overflow-x: auto; scrollbar-width: none; max-width: 100%; }
  .tv-scenes::-webkit-scrollbar { display: none; }
  .tv-scenes .chip { flex: none; }
  .tv-hint { bottom: 52px; }
  .tv-spec { width: 30px; height: 30px; font-size: 16px; }
}
@media (prefers-reduced-motion: reduce) {
  .tv-poster, .tv-hint { transition: none; }
}
