/* ==========================================================================
   Tremblant Black Cars — Interactive Illustrated 2D <-> 3D Village Cartography
   Zero Third-Party Resort Logos • Daylight/Night Toggle • HiDPI 3D Canvas
   ========================================================================== */

.vm-section {
  position: relative;
  overflow: hidden;
}

.vm-shell {
  --vm-amber: #d4b475;
  --vm-amber-bright: #f2d59b;
  --vm-border: rgba(226, 232, 240, 0.16);
  background: linear-gradient(165deg, #0d1119 0%, #07090d 100%);
  border: 1px solid var(--vm-border);
  border-radius: 12px;
  box-shadow: 0 28px 64px rgba(0, 0, 0, 0.65);
  overflow: hidden;
  color: #f8fafc;
}

/* Top Controls Bar */
.vm-toolbar {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 0.85rem 1.25rem;
  padding: 1rem 1.35rem;
  background: rgba(15, 20, 29, 0.98);
  border-bottom: 1px solid rgba(226, 232, 240, 0.12);
}

.vm-sliders-group {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.9rem;
  flex: 1 1 420px;
}

.vm-control-block {
  display: flex;
  align-items: center;
  gap: 0.55rem;
  background: rgba(255, 255, 255, 0.04);
  border: 1px solid rgba(226, 232, 240, 0.12);
  border-radius: 8px;
  padding: 0.42rem 0.72rem;
  min-width: 215px;
  flex: 1 1 215px;
}

.vm-control-label {
  font-size: 0.71rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--vm-amber-bright);
  white-space: nowrap;
}

.vm-slider-end {
  font-size: 0.72rem;
  font-weight: 700;
  color: #cbd5e1;
  background: transparent;
  border: 1px solid rgba(226, 232, 240, 0.2);
  border-radius: 4px;
  padding: 0.14rem 0.42rem;
  cursor: pointer;
  transition: all 0.16s ease;
}

.vm-slider-end:hover,
.vm-slider-end.is-active {
  background: var(--vm-amber);
  color: #090b10;
  border-color: var(--vm-amber);
}

.vm-range {
  -webkit-appearance: none;
  appearance: none;
  flex: 1 1 auto;
  min-width: 75px;
  height: 5px;
  background: linear-gradient(90deg, rgba(148, 163, 184, 0.4), rgba(212, 180, 117, 0.85));
  border-radius: 999px;
  outline: none;
  cursor: pointer;
}

.vm-range::-webkit-slider-thumb {
  -webkit-appearance: none;
  appearance: none;
  width: 17px;
  height: 17px;
  border-radius: 50%;
  background: #ffffff;
  border: 2.5px solid var(--vm-amber);
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.65);
  cursor: grab;
}

.vm-range::-moz-range-thumb {
  width: 17px;
  height: 17px;
  border-radius: 50%;
  background: #ffffff;
  border: 2.5px solid var(--vm-amber);
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.65);
  cursor: grab;
}

.vm-readout {
  font-size: 0.74rem;
  font-weight: 700;
  color: #e2e8f0;
  min-width: 34px;
  text-align: right;
  font-variant-numeric: tabular-nums;
}

.vm-presets-group {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.42rem;
}

.vm-preset-btn {
  font-family: inherit;
  font-size: 0.74rem;
  font-weight: 600;
  color: #cbd5e1;
  background: rgba(255, 255, 255, 0.05);
  border: 1px solid rgba(226, 232, 240, 0.15);
  border-radius: 6px;
  padding: 0.4rem 0.68rem;
  cursor: pointer;
  transition: all 0.16s ease;
  white-space: nowrap;
}

.vm-preset-btn:hover {
  background: rgba(212, 180, 117, 0.16);
  border-color: rgba(212, 180, 117, 0.5);
  color: #ffffff;
}

.vm-preset-btn.is-active {
  background: linear-gradient(135deg, #f0d090 0%, #c49b4e 100%);
  color: #090b10;
  border-color: transparent;
}

/* Main Workspace Layout */
.vm-workspace {
  display: grid;
  grid-template-columns: minmax(0, 1.62fr) minmax(310px, 0.88fr);
  align-items: stretch;
}

.vm-stage-col {
  position: relative;
  display: flex;
  flex-direction: column;
  border-right: 1px solid rgba(226, 232, 240, 0.12);
  background: #0c121b;
}

.vm-stage-hud {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 0.5rem 0.85rem;
  padding: 0.65rem 1.15rem;
  background: rgba(11, 15, 23, 0.96);
  border-bottom: 1px solid rgba(255, 255, 255, 0.08);
  z-index: 4;
}

.vm-legend-row {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.85rem;
  font-size: 0.73rem;
  color: #cbd5e1;
}

.vm-legend-item {
  display: inline-flex;
  align-items: center;
  gap: 0.38rem;
}

.vm-swatch {
  width: 11px;
  height: 11px;
  border-radius: 3px;
  display: inline-block;
  border: 1px solid rgba(255, 255, 255, 0.3);
}

.vm-swatch--chauffeur { background: #d97706; }
.vm-swatch--pedestrian { background: #e39382; }
.vm-swatch--water { background: #7fc0df; }
.vm-swatch--shuttle { background: #64748b; }

.vm-hud-tools {
  display: flex;
  align-items: center;
  gap: 0.4rem;
}

.vm-hud-btn {
  font-family: inherit;
  font-size: 0.72rem;
  font-weight: 600;
  color: #e2e8f0;
  background: rgba(255, 255, 255, 0.07);
  border: 1px solid rgba(226, 232, 240, 0.2);
  border-radius: 6px;
  padding: 0.26rem 0.62rem;
  cursor: pointer;
  transition: all 0.16s ease;
}

.vm-hud-btn:hover {
  border-color: var(--vm-amber);
  color: #ffffff;
}

.vm-hud-btn[aria-pressed="true"] {
  background: rgba(212, 180, 117, 0.22);
  border-color: rgba(212, 180, 117, 0.55);
  color: var(--vm-amber-bright);
}

/* Interactive HiDPI Canvas Stage — stretches seamlessly to match right panel height */
.vm-viewport {
  position: relative;
  width: 100%;
  flex: 1 1 auto;
  min-height: 600px;
  overflow: hidden;
  cursor: grab;
  user-select: none;
  touch-action: none;
  background: #dce8db;
}

.vm-viewport.is-dragging {
  cursor: grabbing;
}

.vm-canvas {
  display: block;
  width: 100%;
  height: 100%;
}

/* Floating Canvas Overlay Controls (Zoom & Reset) */
.vm-float-controls {
  position: absolute;
  top: 0.75rem;
  right: 0.75rem;
  display: flex;
  flex-direction: column;
  gap: 0.3rem;
  z-index: 5;
}

.vm-zoom-btn {
  width: 32px;
  height: 32px;
  border-radius: 7px;
  border: 1px solid rgba(15, 23, 42, 0.24);
  background: rgba(255, 255, 255, 0.92);
  color: #0f172a;
  font-family: inherit;
  font-size: 1rem;
  font-weight: 700;
  line-height: 1;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  box-shadow: 0 3px 10px rgba(0, 0, 0, 0.2);
  transition: transform 0.14s ease, background 0.14s ease;
}

.vm-zoom-btn:hover {
  background: #ffffff;
  transform: scale(1.06);
}

.vm-drag-pill {
  position: absolute;
  bottom: 0.7rem;
  left: 0.75rem;
  z-index: 5;
  padding: 0.28rem 0.68rem;
  border-radius: 999px;
  background: rgba(15, 23, 42, 0.78);
  color: #f8fafc;
  font-size: 0.71rem;
  font-weight: 500;
  backdrop-filter: blur(6px);
  pointer-events: none;
}

/* Right Column: Insider Card + Pressable Directory */
.vm-sidebar-col {
  display: flex;
  flex-direction: column;
  background: #0b0e15;
  min-width: 0;
}

.vm-insider-card {
  padding: 1.15rem 1.25rem;
  border-bottom: 1px solid rgba(226, 232, 240, 0.1);
  background: linear-gradient(180deg, rgba(212, 180, 117, 0.08) 0%, rgba(14, 17, 24, 0.98) 100%);
}

.vm-insider-top {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.65rem;
  margin-bottom: 0.5rem;
}

.vm-insider-badge {
  display: inline-flex;
  align-items: center;
  font-size: 0.69rem;
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: 0.09em;
  color: #090b10;
  background: linear-gradient(135deg, #f2d59b 0%, #d4b475 100%);
  border-radius: 4px;
  padding: 0.2rem 0.52rem;
}

.vm-insider-cat {
  font-size: 0.69rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.07em;
  color: #94a3b8;
}

.vm-insider-title {
  font-size: 1.18rem;
  font-weight: 700;
  color: #ffffff;
  margin: 0 0 0.2rem;
  line-height: 1.25;
}

.vm-insider-sub {
  font-size: 0.82rem;
  color: var(--vm-amber-bright);
  margin: 0 0 0.6rem;
  font-weight: 500;
}

.vm-insider-desc {
  font-size: 0.84rem;
  line-height: 1.52;
  color: #cbd5e1;
  margin: 0 0 0.8rem;
}

.vm-facts-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 0.5rem;
  margin-bottom: 0.78rem;
}

.vm-fact-pill {
  background: rgba(255, 255, 255, 0.04);
  border: 1px solid rgba(226, 232, 240, 0.1);
  border-radius: 6px;
  padding: 0.45rem 0.6rem;
}

.vm-fact-k {
  display: block;
  font-size: 0.64rem;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: #94a3b8;
  margin-bottom: 0.12rem;
}

.vm-fact-v {
  display: block;
  font-size: 0.78rem;
  font-weight: 600;
  color: #ffffff;
  line-height: 1.3;
}

.vm-rate-strip {
  font-size: 0.74rem;
  color: #cbd5e1;
  background: rgba(15, 23, 42, 0.8);
  border: 1px solid rgba(212, 180, 117, 0.24);
  border-radius: 6px;
  padding: 0.45rem 0.65rem;
  margin-bottom: 0.8rem;
}

.vm-insider-actions {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 0.5rem;
}

.vm-insider-actions .btn {
  padding: 0.58rem 0.7rem;
  font-size: 0.76rem;
  text-align: center;
  justify-content: center;
}

/* Filter Bar & Pressable Directory */
.vm-directory-wrap {
  display: flex;
  flex-direction: column;
  padding: 0.9rem 1.15rem 1rem;
  flex: 1 1 auto;
  min-height: 0;
}

.vm-directory-heading {
  font-size: 0.7rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.09em;
  color: #94a3b8;
  margin-bottom: 0.5rem;
}

.vm-filter-bar {
  display: flex;
  flex-wrap: wrap;
  gap: 0.32rem;
  margin-bottom: 0.65rem;
}

.vm-filter-btn {
  font-family: inherit;
  font-size: 0.7rem;
  font-weight: 600;
  color: #cbd5e1;
  background: rgba(255, 255, 255, 0.04);
  border: 1px solid rgba(226, 232, 240, 0.12);
  border-radius: 999px;
  padding: 0.25rem 0.6rem;
  cursor: pointer;
  transition: all 0.15s ease;
}

.vm-filter-btn:hover {
  border-color: rgba(212, 180, 117, 0.45);
  color: #ffffff;
}

.vm-filter-btn.is-active {
  background: rgba(212, 180, 117, 0.2);
  border-color: var(--vm-amber);
  color: var(--vm-amber-bright);
}

.vm-directory-list {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  align-content: start;
  gap: 0.38rem;
  flex: 1 1 0;
  min-height: 290px;
  max-height: none;
  overflow-y: auto;
  padding-right: 0.2rem;
}

.vm-directory-list::-webkit-scrollbar {
  width: 5px;
}
.vm-directory-list::-webkit-scrollbar-thumb {
  background: rgba(148, 163, 184, 0.3);
  border-radius: 999px;
}

.vm-dir-item {
  display: flex;
  align-items: center;
  gap: 0.44rem;
  width: 100%;
  text-align: left;
  font-family: inherit;
  padding: 0.42rem 0.52rem;
  background: rgba(255, 255, 255, 0.03);
  border: 1px solid rgba(226, 232, 240, 0.09);
  border-radius: 6px;
  color: #e2e8f0;
  cursor: pointer;
  transition: all 0.14s ease;
}

.vm-dir-item:hover {
  background: rgba(255, 255, 255, 0.08);
  border-color: rgba(212, 180, 117, 0.5);
  color: #ffffff;
}

.vm-dir-item.is-active {
  background: rgba(212, 180, 117, 0.18);
  border-color: var(--vm-amber);
  color: #ffffff;
}

.vm-dir-code {
  flex: 0 0 auto;
  min-width: 24px;
  height: 20px;
  padding: 0 4px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border-radius: 4px;
  background: rgba(212, 180, 117, 0.16);
  color: var(--vm-amber-bright);
  font-size: 0.67rem;
  font-weight: 800;
}

.vm-dir-item[data-cat="worldcup"] .vm-dir-code {
  background: rgba(225, 29, 72, 0.24);
  color: #fda4af;
}

.vm-dir-item.is-active .vm-dir-code {
  background: var(--vm-amber);
  color: #080a0f;
}

.vm-dir-text {
  font-size: 0.74rem;
  font-weight: 600;
  line-height: 1.25;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.vm-disclaimer-footer {
  padding: 0.7rem 1.25rem;
  background: #07090e;
  border-top: 1px solid rgba(226, 232, 240, 0.08);
  font-size: 0.75rem;
  color: #94a3b8;
}

@keyframes vmFieldPulse {
  0% { box-shadow: 0 0 0 0 rgba(212, 180, 117, 0.85); border-color: #d4b475; }
  70% { box-shadow: 0 0 0 10px rgba(212, 180, 117, 0); border-color: #d4b475; }
  100% { box-shadow: none; }
}

.vm-field-flash {
  animation: vmFieldPulse 1.3s ease-out;
}

@media (max-width: 1080px) {
  .vm-workspace {
    grid-template-columns: 1fr;
  }
  .vm-stage-col {
    border-right: none;
    border-bottom: 1px solid rgba(226, 232, 240, 0.1);
  }
  .vm-viewport {
    flex: none;
    min-height: 0;
    height: 460px;
  }
  .vm-directory-list {
    flex: none;
    min-height: 0;
    max-height: 240px;
  }
}

@media (max-width: 640px) {
  .vm-toolbar {
    padding: 0.82rem;
    gap: 0.65rem;
  }
  .vm-sliders-group {
    flex: 1 1 100%;
    gap: 0.5rem;
  }
  .vm-control-block {
    min-width: 0;
    width: 100%;
    flex: 1 1 100%;
    padding: 0.4rem 0.55rem;
    gap: 0.4rem;
  }
  .vm-range {
    min-width: 56px;
  }
  .vm-viewport {
    height: 360px;
  }
  .vm-drag-pill {
    display: none;
  }
  .vm-facts-grid,
  .vm-insider-actions,
  .vm-directory-list {
    grid-template-columns: 1fr;
  }
}

/* Visitor Utility Layer Bar & Directory Instant Search */
.vm-layers-bar {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.42rem;
  padding: 0.52rem 1.15rem;
  background: rgba(13, 18, 28, 0.96);
  border-bottom: 1px solid rgba(255, 255, 255, 0.08);
  z-index: 4;
}

.vm-layers-label {
  font-size: 0.67rem;
  font-weight: 700;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: #94a3b8;
  margin-right: 0.2rem;
  white-space: nowrap;
}

.vm-layer-chip {
  font-family: inherit;
  font-size: 0.72rem;
  font-weight: 600;
  color: #cbd5e1;
  background: rgba(255, 255, 255, 0.05);
  border: 1px solid rgba(226, 232, 240, 0.16);
  border-radius: 999px;
  padding: 0.24rem 0.65rem;
  cursor: pointer;
  transition: all 0.16s ease;
  white-space: nowrap;
}

.vm-layer-chip:hover {
  border-color: rgba(212, 180, 117, 0.55);
  color: #ffffff;
}

.vm-layer-chip.is-active {
  background: rgba(212, 180, 117, 0.22);
  border-color: #d4b475;
  color: #fae0a4;
}

.vm-layer-chip--wc.is-active {
  background: rgba(14, 165, 233, 0.24);
  border-color: #38bdf8;
  color: #e0f2fe;
}

.vm-layer-chip--pickup.is-active {
  background: rgba(245, 158, 11, 0.26);
  border-color: #f59e0b;
  color: #fef3c7;
}

.vm-layer-chip--aed.is-active {
  background: rgba(225, 29, 72, 0.25);
  border-color: #fb7185;
  color: #ffe4e6;
}

.vm-search-wrap {
  margin-bottom: 0.65rem;
}

.vm-search-input {
  width: 100%;
  background: rgba(9, 13, 21, 0.92);
  border: 1px solid rgba(226, 232, 240, 0.18);
  border-radius: 6px;
  color: #f8fafc;
  font-family: inherit;
  font-size: 0.79rem;
  padding: 0.45rem 0.7rem;
  transition: border-color 0.16s ease;
}

.vm-search-input:focus {
  outline: none;
  border-color: #d4b475;
  box-shadow: 0 0 0 2px rgba(212, 180, 117, 0.18);
}

.vm-search-input::placeholder {
  color: #94a3b8;
}

@media (max-width: 640px) {
  .vm-layers-bar {
    padding: 0.45rem 0.7rem;
    gap: 0.32rem;
  }
  .vm-layer-chip {
    font-size: 0.67rem;
    padding: 0.2rem 0.52rem;
  }
}

.vm-layer-chip--walk.is-active {
  background: rgba(16, 185, 129, 0.25);
  border-color: #10b981;
  color: #d1fae5;
}

.vm-walk-banner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.75rem;
  padding: 0.5rem 1.15rem;
  background: linear-gradient(90deg, rgba(6, 78, 59, 0.72) 0%, rgba(15, 23, 42, 0.96) 100%);
  border-bottom: 1px solid rgba(16, 185, 129, 0.4);
  font-size: 0.78rem;
  font-weight: 600;
  color: #ecfdf5;
}

.vm-walk-clear {
  font-family: inherit;
  font-size: 0.72rem;
  font-weight: 700;
  color: #fef3c7;
  background: rgba(255, 255, 255, 0.1);
  border: 1px solid rgba(255, 255, 255, 0.24);
  border-radius: 5px;
  padding: 0.2rem 0.6rem;
  cursor: pointer;
}

.vm-walk-clear:hover {
  background: rgba(255, 255, 255, 0.2);
}

/* SEO / GEO / AEO Semantic Crawlable Resort Reference Index below Canvas */
.vm-seo-index {
  margin-top: 1.5rem;
  border-radius: 10px;
  background: rgba(15, 20, 29, 0.88);
  border: 1px solid rgba(226, 232, 240, 0.14);
  padding: 0.95rem 1.25rem;
  color: #cbd5e1;
}

.vm-seo-index summary {
  cursor: pointer;
  font-size: 0.88rem;
  font-weight: 700;
  color: #f2d59b;
  letter-spacing: 0.03em;
  list-style: none;
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.vm-seo-index summary::after {
  content: "+";
  font-size: 1.15rem;
  color: #d4b475;
}

.vm-seo-index[open] summary::after {
  content: "\2212";
}

.vm-seo-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 1.25rem;
  margin-top: 1rem;
  padding-top: 1rem;
  border-top: 1px solid rgba(226, 232, 240, 0.1);
  font-size: 0.84rem;
  line-height: 1.6;
}

.vm-seo-grid h3 {
  font-size: 0.9rem;
  color: #ffffff;
  margin: 0 0 0.5rem;
}

.vm-seo-grid ul {
  margin: 0;
  padding-left: 1.1rem;
}

.vm-seo-grid li {
  margin-bottom: 0.35rem;
}

@media (max-width: 900px) {
  .vm-seo-grid {
    grid-template-columns: 1fr;
  }
}
