/* Habita360 - estilos compartidos por visor y editor */
:root {
  --bg: #0f1412; --panel: rgba(15,20,18,.82); --panel-solido: #161d1a; --text: #f3f1ea;
  --muted: #a9b3ad; --accent: #e8a23a; --accent-ink: #1b1305; --line: rgba(255,255,255,.12);
  --peligro: #e5675a;
}
* { box-sizing: border-box; }
html, body { margin: 0; height: 100%; background: var(--bg); color: var(--text);
  font-family: Inter, system-ui, sans-serif; }
#pano { position: fixed; inset: 0; }

.barra { position: fixed; top: 16px; left: 16px; right: 16px; z-index: 10;
  display: flex; align-items: center; gap: 12px; pointer-events: none; }
.marca, .acciones { pointer-events: auto; background: var(--panel); backdrop-filter: blur(8px);
  border: 1px solid var(--line); border-radius: 12px; padding: 10px 14px; }
.marca { display: flex; flex-direction: column; min-width: 0; }
.marca .marca-sello { font-size: 11px; font-weight: 700; letter-spacing: .3px; color: var(--muted); }
.marca .marca-sello span { color: var(--accent); }
.marca b { font-size: 15px; font-weight: 700; letter-spacing: .1px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.marca small { color: var(--muted); font-size: 12px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.marca small[hidden] { display: none; }
.boton-mapa { font-size: 13px; color: var(--text); border: 1px solid var(--line); border-radius: 8px;
  padding: 7px 11px; text-decoration: none; display: inline-flex; align-items: center; white-space: nowrap; }
.boton-mapa:hover { border-color: var(--accent); }
.boton-mapa[hidden] { display: none; }
.acciones { margin-left: auto; display: flex; gap: 8px; padding: 6px; }
button { font: inherit; font-size: 13px; color: var(--text); background: transparent;
  border: 1px solid var(--line); border-radius: 8px; padding: 7px 11px; cursor: pointer; }
button:hover { border-color: var(--accent); }
.boton-wa { font-size: 13px; font-weight: 600; color: #fff; background: #1f9d55; border-radius: 8px;
  padding: 7px 11px; text-decoration: none; display: inline-flex; align-items: center; }
.boton-wa[hidden] { display: none; }
@media (max-width: 520px) { .acciones { gap: 4px; padding: 4px; } .acciones button, .boton-wa, .boton-mapa { padding: 6px 8px; font-size: 12px; }
  #btn-auto, .boton-mapa span { display: none; } }
button:disabled { opacity: .45; cursor: default; }
button.activo, button.primario { background: var(--accent); color: var(--accent-ink); border-color: var(--accent); font-weight: 600; }
button.peligro:hover { border-color: var(--peligro); color: var(--peligro); }

.escenas { position: fixed; bottom: 16px; left: 16px; right: 16px; z-index: 10;
  display: flex; gap: 8px; justify-content: center; flex-wrap: wrap; pointer-events: none; }
.escenas button { pointer-events: auto; background: var(--panel); backdrop-filter: blur(8px); }
.escenas button.activo { background: var(--accent); }

/* Puerta (hotspot). Sin transform/transition: Pannellum posiciona con transform. */
.puerta { width: 46px; height: 46px; border-radius: 50%; cursor: pointer;
  background: rgba(232,162,58,.92); border: 3px solid #fff; box-shadow: 0 4px 18px rgba(0,0,0,.45);
  display: grid; place-items: center; }
.puerta:hover { background: #f2b555; box-shadow: 0 0 0 6px rgba(232,162,58,.35), 0 4px 18px rgba(0,0,0,.45); }
.puerta::after { content: ""; width: 12px; height: 12px; border-top: 4px solid var(--accent-ink);
  border-right: 4px solid var(--accent-ink); transform: rotate(-45deg) translate(-2px, 2px); }
.puerta span { position: absolute; top: 54px; left: 50%; transform: translateX(-50%);
  white-space: nowrap; background: var(--panel); color: var(--text); font-size: 12px;
  padding: 4px 8px; border-radius: 6px; opacity: 0; transition: opacity .15s; pointer-events: none; }
.puerta:hover span { opacity: 1; }
.pnlm-about-msg, .pnlm-load-button p, .pnlm-panorama-info { display: none !important; }
.pnlm-controls-container { top: auto !important; bottom: 16px; left: 16px !important; z-index: 3; }

/* Lienzo de la transición 3D: cubre la foto (y sus flechas) solo mientras dura el paso */
.trans3d { position: absolute; inset: 0; width: 100%; height: 100%; z-index: 2; display: none;
  opacity: 1; transition: opacity .18s linear; touch-action: none; }

/* Puntero y marcadores de piso: van bajo el lienzo de la transición y no reciben clics */
/* Logo en el piso (logo_piso.js): debajo del puntero y de los aros, sin recibir clics */
.logo-piso { position: absolute; left: 0; top: 0; width: 256px; height: 256px; transform-origin: 0 0;
  z-index: 0; display: none; pointer-events: none; user-select: none; }
.puntero { position: absolute; inset: 0; width: 100%; height: 100%; z-index: 1;
  display: none; pointer-events: none; overflow: visible; }
.puntero path { fill: none; vector-effect: non-scaling-stroke; }
.puntero-borde { stroke: rgba(0, 0, 0, .45); stroke-width: 4.5; }
.puntero-aro { stroke: rgba(255, 255, 255, .95); stroke-width: 1.8; }
.puntero-centro { fill: rgba(255, 255, 255, .95); stroke: rgba(0, 0, 0, .45); stroke-width: 1.2; }

/* Marcadores sobre cada punto al que se puede ir */
.marca-borde { stroke: rgba(0, 0, 0, .40); stroke-width: 5; }
.marca-aro { stroke: rgba(255, 255, 255, .80); stroke-width: 2.2; }
.marca-aro.activo { stroke: #fff; stroke-width: 3.4; filter: drop-shadow(0 0 5px rgba(255, 255, 255, .75)); }
.marca-centro { fill: rgba(255, 255, 255, .85); stroke: rgba(0, 0, 0, .35); stroke-width: 1.2; }

/* Con marcadores en el piso, las flechas flotantes sobran */
#pano.con-marcas .pnlm-hotspot-base { display: none; }
#pano.sobre-marca, #pano.sobre-marca canvas { cursor: pointer; }

/* Minimapa / plano */
.plano { position: fixed; left: 16px; top: 84px; z-index: 10; width: 220px;
  background: var(--panel); backdrop-filter: blur(8px); border: 1px solid var(--line);
  border-radius: 12px; padding: 8px; transition: width .2s; display: none; }
.plano.visible { display: block; }
.plano.grande { width: min(520px, calc(100vw - 32px)); }
.plano-cab { display: flex; justify-content: space-between; align-items: center;
  font-size: 12px; color: var(--muted); padding: 0 2px 6px; }
.plano-cab button { padding: 3px 8px; font-size: 12px; }
.plano-lienzo { position: relative; border-radius: 8px; overflow: hidden; background: #fff; line-height: 0; }
.plano-lienzo img { width: 100%; display: block; }
.plano-lienzo svg { position: absolute; inset: 0; width: 100%; height: 100%; }
.plano-lienzo .punto { cursor: pointer; }
.plano-lienzo .zona { fill: transparent; cursor: pointer; transition: fill .15s; }
.plano-lienzo .zona:hover { fill: rgba(232, 162, 58, .22); }
.plano-lienzo .sin-clic { pointer-events: none; }

@media (max-width: 560px) {
  .marca { padding: 7px 11px; }
  .marca b { font-size: 14px; }
  .plano { width: 150px; }
}
