/* ============================================================================
   INTERFAZ ESPACIAL FOTORREALISTA 1:1
   - Aro luminoso en perspectiva pegado al suelo al mover el ratón
   - Pad de caminata libre WASD / Flechas / Rueda / Arrastrar 360°
   - Barra superior ultralimpia + ficha plegable para 92% de pantalla libre
   ============================================================================ */

.mp-vignette {
  position: fixed; inset: 0; pointer-events: none; z-index: 4;
  background:
    radial-gradient(ellipse at 50% 50%, transparent 60%, rgba(8, 10, 14, 0.42) 100%),
    linear-gradient(180deg, rgba(8, 10, 14, 0.40) 0%, transparent 16%, transparent 82%, rgba(8, 10, 14, 0.48) 100%);
}

/* Aro luminoso en el suelo estilo Matterport + etiqueta de destino real */
.mp-floor-ring {
  position: fixed; z-index: 10; pointer-events: none;
  width: 58px; height: 28px; margin-left: -29px; margin-top: -14px;
  border-radius: 50%;
  border: 2.5px solid rgba(255, 255, 255, 0.88);
  background: radial-gradient(circle, color-mix(in srgb, var(--mp-accent, #38b6b0) 42%, transparent) 0%, transparent 72%);
  box-shadow: 0 0 18px rgba(0, 0, 0, 0.45), inset 0 0 10px rgba(255, 255, 255, 0.35);
  transition: opacity .16s ease, transform .14s ease;
  opacity: 0;
}
.mp-floor-ring.show { opacity: 1; }
.mp-floor-ring.pulse { transform: scale(1.22); border-color: var(--mp-accent, #38b6b0); }
.mp-ring-lbl {
  position: absolute; left: 50%; bottom: calc(100% + 8px); transform: translateX(-50%);
  padding: 4px 10px; border-radius: 999px; white-space: nowrap;
  background: rgba(14, 17, 22, 0.88); border: 1px solid rgba(255,255,255,0.2);
  color: #f4f0e8; font-size: 11px; font-weight: 600;
  box-shadow: 0 8px 20px rgba(0,0,0,0.45);
}

.mp-poly-svg {
  position: fixed; inset: 0; width: 100vw; height: 100vh;
  z-index: 8; pointer-events: none; overflow: visible;
}
.mp-poly {
  pointer-events: auto; cursor: pointer;
  fill: rgba(255, 255, 255, 0.015);
  stroke: var(--mp-accent, #38b6b0);
  stroke-width: 1.5; stroke-dasharray: 5 5; opacity: 0.48;
  transition: fill .22s, opacity .22s, stroke-width .22s;
}
.mp-poly:hover, .mp-poly.active {
  opacity: 1; stroke-dasharray: none; stroke-width: 2.4;
  fill: color-mix(in srgb, var(--mp-accent, #38b6b0) 20%, transparent);
  filter: drop-shadow(0 0 12px color-mix(in srgb, var(--mp-accent, #38b6b0) 65%, transparent));
}

.mp-spatial { position: fixed; inset: 0; z-index: 12; pointer-events: none; }

/* Marcadores discretos y livianos para no tapar el diseño */
.mp-step-dot {
  position: absolute; transform: translate(-50%, -50%);
  pointer-events: auto; cursor: pointer;
  display: flex; align-items: center; gap: 6px;
  padding: 4px 10px 4px 4px; border-radius: 999px;
  background: rgba(14, 17, 22, 0.68);
  border: 1px solid rgba(255, 255, 255, 0.20);
  backdrop-filter: blur(10px); -webkit-backdrop-filter: blur(10px);
  box-shadow: 0 8px 20px rgba(0, 0, 0, 0.36);
  color: #f4f0e8; transition: transform .18s, border-color .18s, background .18s, opacity .2s;
}
.mp-step-dot:hover {
  transform: translate(-50%, -54%) scale(1.05);
  border-color: var(--mp-accent, #38b6b0);
  background: rgba(18, 22, 28, 0.92);
}
.mp-step-thumb {
  width: 26px; height: 26px; border-radius: 50%; overflow: hidden;
  border: 1.5px solid var(--mp-accent, #38b6b0); position: relative; flex-shrink: 0;
}
.mp-step-thumb img { width: 100%; height: 100%; object-fit: cover; display: block; }
.mp-step-copy small { display: block; font-size: 8px; font-weight: 700; letter-spacing: .11em; text-transform: uppercase; color: var(--mp-accent, #38b6b0); }
.mp-step-copy b { display: block; font-size: 11px; font-weight: 600; white-space: nowrap; }

.mp-pin {
  position: absolute; transform: translate(-50%, -50%);
  pointer-events: auto; cursor: pointer;
  width: 30px; height: 30px; border-radius: 50%;
  background: rgba(15, 18, 23, 0.85);
  border: 1.5px solid var(--mp-accent, #38b6b0);
  color: #f4f0e8; font: 700 15px/1 system-ui, sans-serif;
  display: grid; place-items: center;
  box-shadow: 0 8px 20px rgba(0,0,0,.48);
  transition: transform .18s, background .18s;
}
.mp-pin:hover, .mp-pin.on { transform: translate(-50%, -50%) scale(1.15); background: var(--mp-accent, #38b6b0); color: #101418; }

.mp-popover {
  position: fixed; z-index: 46; width: min(275px, calc(100vw - 32px));
  padding: 13px 15px; border-radius: 16px;
  background: rgba(15, 19, 24, 0.94);
  border: 1px solid color-mix(in srgb, var(--mp-accent, #38b6b0) 50%, rgba(255,255,255,.15));
  backdrop-filter: blur(20px); box-shadow: 0 18px 42px rgba(0,0,0,.58); color: #ede8df;
}
.mp-popover[hidden] { display: none; }
.mp-pop-head { display: flex; justify-content: space-between; align-items: center; }
.mp-pop-head strong { font-size: 13.5px; }
.mp-pop-close { border: 0; background: rgba(255,255,255,.08); color: #b5bcc6; width: 24px; height: 24px; border-radius: 50%; cursor: pointer; }
.mp-popover p { margin: 6px 0 0; font-size: 12.2px; line-height: 1.45; color: #b2b8c2; }

.mp-hover-card {
  position: fixed; z-index: 44; pointer-events: none;
  transform: translate(-50%, calc(-100% - 16px));
  padding: 9px 14px; border-radius: 13px;
  background: rgba(14, 17, 22, 0.94);
  border: 1px solid color-mix(in srgb, var(--mp-accent, #38b6b0) 55%, transparent);
  box-shadow: 0 14px 32px rgba(0,0,0,.55); white-space: nowrap; transition: opacity .14s;
}
.mp-hover-card.hidden { opacity: 0; }
.mp-hover-card .tag {
  display: inline-block; padding: 2px 7px; border-radius: 6px; margin-right: 6px;
  background: color-mix(in srgb, var(--mp-accent, #38b6b0) 22%, transparent);
  color: var(--mp-accent, #38b6b0); font-size: 10.5px; font-weight: 700;
}
.mp-hover-card b { font-size: 13px; color: #f3efe8; }
.mp-hover-card small { display: block; font-size: 11px; color: #adb4be; margin-top: 2px; }

/* Barra central minimalista de modos (Torre | Maqueta | Caminar) */
.mp-mode-dock {
  position: relative; z-index: 34; flex-shrink: 0; white-space: nowrap;
  display: inline-flex; align-items: center; gap: 4px; padding: 5px;
  border-radius: 999px; background: rgba(14, 18, 22, 0.84);
  border: 1px solid rgba(255, 255, 255, 0.13);
  backdrop-filter: blur(18px); box-shadow: 0 12px 30px rgba(0,0,0,.44);
}
.mp-mode-btn {
  border: 0; background: transparent; color: #aeb6c2;
  font: 600 12px/1 inherit; padding: 8px 13px; border-radius: 999px; cursor: pointer; transition: all .2s;
}
.mp-mode-btn:hover { color: #f4f0e8; }
.mp-mode-btn.on { background: var(--mp-accent, #38b6b0); color: #0e1316; font-weight: 700; }

/* Pad ultra-compacto pegado a la esquina inferior izquierda (nunca ocupa el centro) */
.mp-walk-bar {
  position: fixed; left: 16px; bottom: 14px; z-index: 32;
  display: flex; align-items: center; gap: 9px;
  padding: 6px 10px 6px 7px; border-radius: 14px;
  background: rgba(14, 18, 22, 0.78);
  border: 1px solid rgba(255, 255, 255, 0.12);
  backdrop-filter: blur(14px); box-shadow: 0 10px 24px rgba(0,0,0,.38);
  color: #dce1e8; font-size: 11px; line-height: 1.3;
  transition: opacity .25s, transform .25s;
}
.mp-walk-bar.hidden { opacity: 0; pointer-events: none; transform: translateY(12px); }
.mp-dpad {
  display: grid; grid-template-columns: repeat(3, 24px); grid-template-rows: repeat(2, 24px); gap: 3px;
}
.mp-dpad button {
  border: 1px solid rgba(255,255,255,0.16); background: rgba(255,255,255,0.07);
  color: #f0ece4; border-radius: 6px; cursor: pointer; font-size: 10px; font-weight: 700;
  display: grid; place-items: center; padding: 0; user-select: none; touch-action: none;
}
.mp-dpad button:hover:not(:disabled), .mp-dpad button.active { background: var(--mp-accent, #38b6b0); color: #0d1216; border-color: transparent; }
.mp-dpad button.dim, .mp-dpad button:disabled { opacity: 0.24; cursor: default; }
.mp-walk-copy { max-width: 148px; overflow: hidden; }
.mp-walk-copy > b { display: block; color: #f4f0e8; font-size: 11.2px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.mp-walk-copy > small { display: block; color: #9ea7b4; font-size: 10px; margin-top: 1px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.mp-walk-copy > small b { display: inline; color: #dce2ea; font-weight: 600; }

/* Botones discretos abajo a la derecha: ocultar etiquetas o limpiar 100 % la pantalla */
.mp-clean-dock {
  position: fixed; right: 16px; bottom: 14px; z-index: 96;
  display: flex; align-items: center; gap: 6px;
}
.mp-clean-btn {
  border: 1px solid rgba(255, 255, 255, 0.16);
  background: rgba(14, 18, 22, 0.78); color: #d6dce6;
  font: 600 11px/1 system-ui, -apple-system, sans-serif;
  padding: 8px 11px; border-radius: 999px; cursor: pointer;
  backdrop-filter: blur(14px); -webkit-backdrop-filter: blur(14px);
  box-shadow: 0 8px 22px rgba(0, 0, 0, 0.42);
  transition: background .2s, border-color .2s, color .2s, opacity .2s;
  white-space: nowrap;
}
.mp-clean-btn:hover { border-color: var(--mp-accent, #38b6b0); color: #f7f4ee; background: rgba(20, 25, 32, 0.94); }
.mp-clean-btn.off { opacity: 0.65; }
.mp-clean-btn.active {
  background: rgba(14, 18, 22, 0.65); border-color: rgba(255, 255, 255, 0.3); color: #f4f0e8;
}

/* MODO VISTA LIMPIA (100 % diseño arquitectónico despejado) */
body.ui-clean .topbar,
body.ui-clean .tt-topbar,
body.ui-clean .demo-badge,
body.ui-clean .demo-ref,
body.ui-clean .demo-note,
body.ui-clean .demo-tag,
body.ui-clean .tt-ref-note,
body.ui-clean .tt-tower-cue,
body.ui-clean .tt-float-pill,
body.ui-clean .tt-res-card,
body.ui-clean .exterior-hero,
body.ui-clean .facade-dock,
body.ui-clean .hostess-dock,
body.ui-clean .residence-sheet,
body.ui-clean .cabin-card,
body.ui-clean .leasing-drawer,
body.ui-clean .trail-rail,
body.ui-clean .elevator-stack,
body.ui-clean .mp-walk-bar,
body.ui-clean .mp-spatial,
body.ui-clean .mp-poly-svg,
body.ui-clean .mp-popover,
body.ui-clean .mp-hover-card,
body.ui-clean .mp-vignette,
body.ui-clean .rd-switcher,
body.ui-clean #mp-btn-markers {
  opacity: 0 !important;
  pointer-events: none !important;
  transition: opacity .24s ease;
}
body.ui-clean .mp-clean-dock { opacity: 0.72; }
body.ui-clean .mp-clean-dock:hover { opacity: 1; }

@media (max-width: 1120px) {
  .mp-walk-bar { bottom: 54px; }
  .mp-clean-dock { bottom: 54px; }
}

@media (max-width: 820px) {
  .mp-mode-dock { position: fixed; left: 50%; top: 72px; transform: translateX(-50%); }
  .mp-walk-copy { display: none; }
  .mp-walk-bar { padding: 6px; left: 10px; bottom: 50px; }
  .mp-clean-dock { right: 10px; bottom: 50px; }
  #mp-btn-markers { display: none; }
}
