/* Habita360 - etiquetas dentro del recorrido (visor/etiquetas.js). Usa las variables de visor.css. */
:root {
  --etq-destacado: #e0a43a;          /* ámbar: lo que distingue al inmueble */
  --etq-info: #0e6e6a;               /* turquesa de la marca */
  --etq-precio: #2f7d4f;             /* verde dinero */
  --etq-incluido: #3b6fb3;           /* azul */
  --etq-aviso: #c0603f;              /* chukum: avisos */
}
.etq-ico { width: 18px; height: 18px; flex: none; fill: none; stroke: currentColor; stroke-width: 2.2;
  stroke-linecap: round; stroke-linejoin: round; }
.etq-destacado { --etq-c: var(--etq-destacado); }
.etq-info { --etq-c: var(--etq-info); }
.etq-precio { --etq-c: var(--etq-precio); }
.etq-incluido { --etq-c: var(--etq-incluido); }
.etq-aviso { --etq-c: var(--etq-aviso); }
.etq-destacado .etq-ico path { fill: currentColor; stroke-width: 1.4; }

/* ---------- marcador sobre la foto (hotspot de Pannellum) ---------- */
/* con los aros en el piso (puntero.js) las flechas se esconden; las etiquetas no */
.pnlm-hotspot-base.etq-base, #pano.con-marcas .pnlm-hotspot-base.etq-base { display: block; width: 44px; height: 44px; z-index: 2; }
.etq-hs { opacity: var(--etq-o, 1); transition: opacity .2s; }
.etq-hs:hover, .etq-hs.activa { opacity: 1; z-index: 3; }
.etq-pin { position: absolute; inset: 0; margin: auto; width: 34px; height: 34px; padding: 0; border-radius: 50%;
  border: 2.5px solid #fff; background: var(--etq-c); color: #fff; display: grid; place-items: center; cursor: pointer;
  box-shadow: 0 2px 10px rgba(0,0,0,.45), 0 0 0 0 rgba(255,255,255,.5); transform: scale(var(--etq-s, 1));
  transition: transform .18s, box-shadow .18s; }
.etq-pin::after { content: ""; position: absolute; inset: -8px; border-radius: 50%; }   /* toque de 50 px */
.etq-hs:hover .etq-pin, .etq-hs.activa .etq-pin, .etq-pin:focus-visible {
  transform: scale(calc(var(--etq-s, 1) * 1.12)); box-shadow: 0 2px 12px rgba(0,0,0,.5), 0 0 0 6px rgba(255,255,255,.28); }
.etq-pin .etq-ico { width: 17px; height: 17px; }
/* latido suave para que se note que se puede tocar (no en quien pide menos movimiento) */
@media (prefers-reduced-motion: no-preference) {
  .etq-pin { animation: etq-latido 3.2s ease-out infinite; }
  @keyframes etq-latido { 0%, 70% { box-shadow: 0 2px 10px rgba(0,0,0,.45), 0 0 0 0 rgba(255,255,255,.45); }
    100% { box-shadow: 0 2px 10px rgba(0,0,0,.45), 0 0 0 12px rgba(255,255,255,0); } }
  .etq-hs:hover .etq-pin { animation: none; }
}
/* ficha al pasar el mouse: título y precio, sin abrir nada */
.etq-ficha { position: absolute; left: 50%; bottom: calc(100% + 2px); transform: translateX(-50%) translateY(4px);
  background: var(--panel-solido, #14201d); color: var(--text, #f2f4f0); border-radius: 10px; padding: 7px 11px;
  white-space: nowrap; max-width: 260px; overflow: hidden; text-overflow: ellipsis; pointer-events: none;
  opacity: 0; transition: opacity .15s, transform .15s; box-shadow: 0 6px 18px rgba(0,0,0,.35);
  font: 600 13px var(--f-ui); display: flex; flex-direction: column; gap: 1px; text-align: center; }
.etq-ficha b { font-weight: 700; overflow: hidden; text-overflow: ellipsis; }
.etq-ficha small { font-weight: 600; font-size: 12px; color: var(--muted, #a9b8b2); }
@media (hover: hover) { .etq-hs:hover .etq-ficha { opacity: 1; transform: translateX(-50%); } }
body.etq-ocultas #pano .pnlm-hotspot-base.etq-base { display: none; }

/* ---------- botón "Destacados" en la barra ---------- */
.etq-boton { position: relative; }
.etq-boton .ico path { fill: currentColor; stroke-width: 1.4; }
.etq-cuenta { position: absolute; top: -2px; right: -2px; min-width: 18px; height: 18px; border-radius: 9px; padding: 0 5px;
  background: var(--etq-destacado); color: #1b1206; font: 800 11px/18px var(--f-ui); font-style: normal; text-align: center; }
@media (min-width: 761px) { .etq-boton .etq-cuenta { position: static; margin-left: -2px; } }

/* interruptor para prender / apagar las etiquetas */
.etq-ver .tacha { opacity: 0; transition: opacity .15s; }
.etq-ver.apagado { color: rgba(242,244,240,.6); }
.etq-ver.apagado .tacha { opacity: 1; }
.etq-ver:not(.apagado) .ico circle { fill: currentColor; }
@media (max-width: 760px) {
  /* en celular la barra no cabe: el interruptor va solo, debajo, más chico */
  .etq-ver { position: fixed; z-index: 10; right: var(--borde, 12px); top: calc(76px + var(--arriba, 0px));
    width: 40px; height: 40px; }
  .etq-ver .ico { width: 19px; height: 19px; }
}

/* ---------- tarjeta y lista ---------- */
.etq-fondo { display: none; }
.etq-panel { position: fixed; z-index: 25; right: var(--borde, 16px); top: calc(84px + var(--arriba, 0px));
  width: min(380px, calc(100vw - 32px)); max-height: calc(100dvh - 84px - 110px - var(--arriba, 0px));
  display: flex; flex-direction: column; background: var(--panel-solido, #14201d); color: var(--text, #f2f4f0);
  border-radius: 16px; box-shadow: 0 12px 40px rgba(0,0,0,.45); overflow: hidden; font-family: var(--f-ui); }
.etq-panel[hidden] { display: none; }
.etq-cab { display: flex; align-items: center; justify-content: space-between; padding: 12px 12px 4px 16px; }
.etq-tipo { display: inline-flex; align-items: center; gap: 6px; font: 700 12px var(--f-ui); letter-spacing: .4px;
  text-transform: uppercase; color: var(--etq-c, var(--muted)); }
.etq-tipo .etq-ico { width: 16px; height: 16px; }
.etq-x { width: 40px; height: 40px; border: 0; border-radius: 50%; background: rgba(255,255,255,.08); color: inherit;
  display: grid; place-items: center; cursor: pointer; padding: 0; }
.etq-x:hover { background: rgba(255,255,255,.16); border: 0; }
.etq-cuerpo { overflow-y: auto; padding: 4px 16px 16px; overscroll-behavior: contain; }
.etq-tit { font: 700 21px/1.2 var(--f-titulo); margin: 2px 0 8px; letter-spacing: -.2px; }
.etq-datos { display: flex; align-items: center; flex-wrap: wrap; gap: 8px 12px; margin-bottom: 12px; }
.etq-estado { font: 700 12px var(--f-ui); padding: 4px 10px; border-radius: 99px; background: rgba(255,255,255,.1); }
.etq-precio { font: 700 19px var(--f-titulo); color: #fff; }
.etq-texto { margin: 0 0 14px; font-size: 15px; line-height: 1.5; color: rgba(242,244,240,.9); white-space: pre-line;
  overflow-wrap: anywhere; }
.etq-fotos { display: grid; grid-auto-flow: column; grid-auto-columns: 78%; gap: 8px; overflow-x: auto;
  margin: 0 -16px 14px; padding: 0 16px; scroll-snap-type: x mandatory; scrollbar-width: none; }
.etq-fotos.una { grid-auto-columns: 100%; }
.etq-foto { padding: 0; border: 0; border-radius: 12px; overflow: hidden; aspect-ratio: 4 / 3; cursor: zoom-in;
  scroll-snap-align: start; background: rgba(255,255,255,.06); }
.etq-foto img { width: 100%; height: 100%; object-fit: cover; display: block; }
.etq-video { position: relative; display: block; width: 100%; aspect-ratio: 16 / 9; padding: 0; border: 0; border-radius: 12px;
  overflow: hidden; margin-bottom: 14px; background: #000; cursor: pointer; }
.etq-video img { width: 100%; height: 100%; object-fit: cover; display: block; opacity: .85; }
.etq-play { position: absolute; inset: 0; margin: auto; width: 60px; height: 60px; border-radius: 50%; background: rgba(0,0,0,.6); }
.etq-play::after { content: ""; position: absolute; left: 24px; top: 18px; border-left: 18px solid #fff;
  border-top: 12px solid transparent; border-bottom: 12px solid transparent; }
.etq-acciones { display: flex; flex-wrap: wrap; gap: 8px; }
.etq-acciones a, .etq-acciones button { min-height: 46px; border-radius: 99px; display: inline-flex; align-items: center;
  justify-content: center; gap: 8px; padding: 0 16px; font: 700 14px var(--f-ui); text-decoration: none; cursor: pointer;
  border: 0; color: var(--text, #f2f4f0); background: rgba(255,255,255,.09); }
.etq-acciones a:hover, .etq-acciones button:hover { background: rgba(255,255,255,.16); border: 0; }
.etq-wa { flex: 1 1 100%; background: var(--acento, #0e6e6a) !important; color: #fff !important; }
.etq-wa:hover { background: var(--acento-hover, #12837e) !important; }
.etq-wa .etq-ico { fill: #fff; stroke: none; width: 20px; height: 20px; }
.etq-liga { flex: 1; flex-direction: column; gap: 0 !important; line-height: 1.15; }
.etq-liga small { font-weight: 500; font-size: 11px; color: var(--muted, #a9b8b2); }
.etq-ver-todas { margin-top: 12px; width: 100%; background: none; border: 0; color: var(--aqui, #4fc3b5);
  font: 700 14px var(--f-ui); padding: 10px; cursor: pointer; }
.etq-ver-todas:hover { border: 0; text-decoration: underline; }

.etq-lista { list-style: none; margin: 4px 0 12px; padding: 0; display: grid; gap: 6px; }
.etq-lista button { width: 100%; display: flex; align-items: center; gap: 12px; padding: 10px 12px; border: 0;
  border-radius: 12px; background: rgba(255,255,255,.06); color: inherit; text-align: left; cursor: pointer; min-height: 56px; }
.etq-lista button:hover { background: rgba(255,255,255,.12); border: 0; }
.etq-mini { width: 32px; height: 32px; border-radius: 50%; background: var(--etq-c); color: #fff; display: grid;
  place-items: center; flex: none; border: 2px solid #fff; }
.etq-mini .etq-ico { width: 15px; height: 15px; }
.etq-lista-tx { display: flex; flex-direction: column; gap: 2px; min-width: 0; }
.etq-lista-tx b { font-size: 15px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.etq-lista-tx small { font-size: 13px; color: var(--muted, #a9b8b2); }
.etq-switch { display: flex; align-items: center; gap: 10px; font-size: 14px; color: var(--muted, #a9b8b2); cursor: pointer; }
.etq-switch input { width: 18px; height: 18px; accent-color: var(--aqui, #4fc3b5); }

/* galería a pantalla completa */
.etq-galeria { position: fixed; inset: 0; z-index: 60; background: rgba(5,9,8,.94); display: grid; place-items: center; }
.etq-galeria[hidden] { display: none; }
.etq-galeria img { max-width: 94vw; max-height: 88dvh; object-fit: contain; border-radius: 8px; }
.etq-galeria button { position: absolute; width: 48px; height: 48px; border-radius: 50%; border: 0; padding: 0;
  background: rgba(255,255,255,.12); color: #fff; font: 700 26px/1 var(--f-ui); cursor: pointer; }
.etq-galeria button[hidden] { display: none; }
.etq-g-ant { left: 12px; top: 50%; } .etq-g-sig { right: 12px; top: 50%; }
.etq-g-x { right: 12px; top: calc(12px + var(--arriba, 0px)); font-size: 20px !important; }

/* ---------- celular: la tarjeta es una hoja que sube desde abajo ---------- */
@media (max-width: 760px) {
  .etq-fondo { display: block; position: fixed; inset: 0; z-index: 24; background: rgba(0,0,0,.4); opacity: 0;
    pointer-events: none; transition: opacity .25s; }
  .etq-fondo.visible { opacity: 1; pointer-events: auto; }
  .etq-panel { left: 0; right: 0; top: auto; bottom: 0; width: auto; max-height: 78dvh; border-radius: 18px 18px 0 0;
    padding-bottom: var(--abajo, 0px); animation: etq-sube .28s cubic-bezier(.2,.8,.2,1); }
  .etq-panel::before { content: ""; display: block; width: 40px; height: 4px; border-radius: 2px;
    background: rgba(255,255,255,.25); margin: 8px auto 0; }
  @keyframes etq-sube { from { transform: translateY(100%); } to { transform: none; } }
  .etq-fotos { grid-auto-columns: 84%; }
  body.etq-abierta .abajo { visibility: hidden; }
}
@media (prefers-reduced-motion: reduce) { .etq-panel { animation: none !important; } }
