/* Giao diện tour kiểu Jibunhouse: nút style/kirikae, minimap theo tầng, thanh điều khiển */
#jh-ui, #jh-ui * { box-sizing: border-box; font-family: "Helvetica Neue", Arial, "Hiragino Kaku Gothic ProN", Meiryo, sans-serif; }
#jh-ui { position: absolute; inset: 0; pointer-events: none; z-index: 900; overflow: hidden; }
#jh-ui .jh-hit { pointer-events: auto; }

/* Pills (style / pattern) */
.jh-pills { position: absolute; top: 8px; right: 0; display: flex; flex-direction: column; gap: 4px; z-index: 30; }
.jh-pill { display: flex; align-items: center; gap: 14px; width: 128px; height: 26px; padding: 0 10px 0 4px;
  border-radius: 13px 0 0 13px; background: rgba(205,205,205,.92); color: #fff; font-size: 13px; letter-spacing: .32em;
  cursor: pointer; user-select: none; border: 0; text-align: left; white-space: nowrap; transition: background .2s; }
.jh-pill:hover { background: rgba(150,150,150,.95); }
.jh-pill .jh-radio { flex: none; width: 19px; height: 19px; border-radius: 50%; border: 2px solid #fff; background: transparent; }
.jh-pill.on { background: rgba(70,70,70,.92); cursor: default; }
.jh-pill.on .jh-radio { background: #fff; }

/* Map panel */
.jh-map { position: absolute; top: 0; right: 0; bottom: 0; width: 300px; background: #fff; border-left: 1px solid #ddd;
  display: flex; flex-direction: column; justify-content: center; gap: 46px; padding: 60px 20px 90px; z-index: 20;
  transition: transform .35s ease; }
.jh-map.closed { transform: translateX(105%); }
.jh-map-close { position: absolute; top: 10px; left: 10px; width: 30px; height: 30px; border-radius: 50%; border: 1px solid #555;
  background: #fff; color: #555; font-size: 18px; line-height: 26px; text-align: center; cursor: pointer; }
.jh-floor { position: relative; width: 100%; }
.jh-floor-name { font-size: 12px; letter-spacing: .3em; color: #666; margin-bottom: 4px; }
.jh-floor-box { position: relative; width: 100%; border: 1px solid #bbb; line-height: 0; }
.jh-floor-box img { width: 100%; height: auto; display: block; }
.jh-tabs { display: none; justify-content: center; gap: 20px; }
.jh-tab { min-width: 100px; padding: 4px 12px; font-size: 16px; letter-spacing: .4em; border: 1px solid #666; background: #fff; color: #333; cursor: pointer; }
.jh-tab.on { background: #777; color: #fff; cursor: default; }

/* Pins + radar */
.jh-pin { position: absolute; width: 12px; height: 12px; margin: -6px 0 0 -6px; border-radius: 50%; background: var(--jh-pin, #2a9fb0);
  cursor: pointer; z-index: 2; box-shadow: 0 0 0 1px rgba(255,255,255,.6); }
.jh-pin:hover { transform: scale(1.35); }
.jh-pin .jh-tip { display: none; position: absolute; bottom: 16px; left: 50%; transform: translateX(-50%); background: rgba(0,0,0,.75);
  color: #fff; font-size: 11px; line-height: 1.3; padding: 3px 6px; border-radius: 3px; white-space: nowrap; letter-spacing: 0; }
.jh-pin:hover .jh-tip { display: none; }
.jh-radar { position: absolute; width: 80px; height: 80px; margin: -40px 0 0 -40px; pointer-events: none; z-index: 1; }
.jh-radar path { fill: var(--jh-pin, #2a9fb0); fill-opacity: .7; }

/* Open-map button */
.jh-open { position: absolute; right: 14px; top: 150px; width: 40px; height: 40px; border-radius: 50%; border: 0;
  background: rgba(150,150,150,.9); color: #fff; font-size: 22px; cursor: pointer; z-index: 15; display: none; }
.jh-open.show { display: block; }

/* Control bar */
.jh-bar { position: absolute; right: 10px; bottom: 10px; display: flex; gap: 6px; padding: 8px 12px; border-radius: 8px;
  background: rgba(160,160,160,.88); z-index: 40; }
.jh-bar button { width: 30px; height: 30px; padding: 3px; border: 0; background: none; cursor: pointer; opacity: .95; }
.jh-bar button:hover { opacity: 1; transform: scale(1.08); }
.jh-bar button.off { opacity: .45; }
.jh-bar svg { width: 100%; height: 100%; fill: none; stroke: #fff; stroke-width: 1.6; }

/* Thumbnails */
.jh-thumbs { position: absolute; left: 10px; right: 230px; bottom: 10px; display: none; gap: 8px; overflow-x: auto;
  padding: 8px; background: rgba(0,0,0,.55); border-radius: 8px; z-index: 35; }
.jh-thumbs.show { display: flex; }
.jh-thumb { flex: none; width: 120px; cursor: pointer; color: #fff; font-size: 11px; text-align: center; }
.jh-thumb .jh-thumb-img { width: 120px; height: 68px; border: 2px solid transparent; border-radius: 4px; background: #333 center/cover; }
.jh-thumb.on .jh-thumb-img, .jh-thumb:hover .jh-thumb-img { border-color: var(--jh-pin, #2a9fb0); }
.jh-thumb span { display: none; margin-top: 3px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }

/* Mobile / narrow: map becomes a bottom sheet with floor tabs */
#jh-ui.jh-mobile .jh-map { top: auto; left: 0; width: auto; height: 52%; border-left: 0; border-top: 1px solid #ddd;
  justify-content: flex-start; gap: 18px; padding: 26px 60px 70px; }
#jh-ui.jh-mobile .jh-map.closed { transform: translateY(105%); }
#jh-ui.jh-mobile .jh-map-close { left: auto; right: 12px; top: 30px; }
#jh-ui.jh-mobile .jh-tabs { display: flex; }
#jh-ui.jh-mobile .jh-floor { display: none; }
#jh-ui.jh-mobile .jh-floor.cur { display: block; }
#jh-ui.jh-mobile .jh-floor-name { display: none; }
#jh-ui.jh-mobile .jh-thumbs { right: 10px; bottom: 64px; }
#jh-ui.jh-nomap .jh-map, #jh-ui.jh-nomap .jh-open { display: none !important; }
#jh-ui.jh-mobile .jh-floor-box img { max-height: calc(52vh - 130px); width: auto; max-width: 100%; margin: 0 auto; }
#jh-ui.jh-mobile .jh-floor-box { width: fit-content; margin: 0 auto; }
/* Hotspot chuyển phòng (khi tour không có skin riêng) */
.jh-hs { position: absolute; width: 0; height: 0; pointer-events: auto; }
.jh-hs-dot { position: absolute; left: -16px; top: -16px; width: 32px; height: 32px; border-radius: 50%; background: rgba(190,190,190,.85);
  box-shadow: 0 0 0 2px rgba(255,255,255,.35); cursor: pointer; transition: transform .2s, background .2s; }
.jh-hs-dot:hover { transform: scale(1.15); background: rgba(230,230,230,.95); }
.jh-hs-tip { display: none; position: absolute; bottom: 38px; left: 50%; transform: translateX(-50%); background: rgba(0,0,0,.7); color: #fff;
  font: 12px Arial, sans-serif; padding: 3px 8px; border-radius: 3px; white-space: nowrap; }
.jh-hs-dot:hover .jh-hs-tip { display: block; }

/* Thanh điều khiển thu gọn: chỉ còn nút cuối */
.jh-bar.collapsed { background: transparent; }
.jh-bar.collapsed button:not(.jh-btn-hide) { display: none; }
.jh-bar.collapsed .jh-btn-hide { background: rgba(160,160,160,.88); border-radius: 6px; }
/* Ẩn hotspot */
.jh-hs-off .pnlm-hotspot-base, .jh-hs-off .jh-hs-wrap { display: none !important; }
/* Pannellum: hotspot tròn xám */
.pnlm-hotspot-base.jh-hs-wrap { width: 0; height: 0; }
.jh-hs-wrap .jh-hs-dot { position: absolute; left: -16px; top: -16px; }
.pnlm-container { background: #000 !important; font-family: Arial, sans-serif; }
#panorama { position: fixed; inset: 0; }
/* Kính VR */
.jh-vr { position: fixed; inset: 0; background: #000; z-index: 99999; display: flex; }
.jh-vr-eye { flex: 1; height: 100%; }
.jh-vr-line { position: absolute; left: 50%; top: 0; bottom: 0; width: 2px; margin-left: -1px; background: #222; pointer-events: none; }
.jh-vr-exit { position: absolute; top: 12px; left: 50%; transform: translateX(-50%); width: 36px; height: 36px; border-radius: 50%;
  border: 0; background: rgba(255,255,255,.75); font-size: 18px; cursor: pointer; z-index: 2; }
.pnlm-panorama-info, .pnlm-about-msg { display: none !important; }
#jh-ui.jh-nomap .jh-thumbs { right: 230px !important; }

/* ===== Theo yêu cầu: hotspot tròn trắng bán trong suốt nhấp nháy, minimap trượt ra/thu vào ===== */
@keyframes jh-pulse { 0%, 100% { transform: scale(.78); opacity: .75; } 50% { transform: scale(1.12); opacity: 1; } }
.jh-hs-dot, .jh-hs-wrap .jh-hs-dot { width: 46px; height: 46px; left: -23px; top: -23px; background: rgba(255,255,255,.55);
  box-shadow: 0 0 0 2px rgba(255,255,255,.25), 0 0 12px rgba(0,0,0,.15); animation: jh-pulse 1.6s ease-in-out infinite; }
.jh-hs-dot:hover { background: rgba(255,255,255,.8); animation-play-state: paused; transform: scale(1.15); }
.jh-pin { animation: jh-pulse 1.4s ease-in-out infinite; }
.jh-pin:hover { animation-play-state: paused; }

.jh-map { background: rgba(255,255,255,.72); backdrop-filter: blur(3px); -webkit-backdrop-filter: blur(3px); border-left: 0;
  width: 300px; overflow: visible; }
.jh-map.closed { transform: translateX(100%); }
.jh-floor-name { text-align: right; font-size: 22px; letter-spacing: .25em; color: #444; margin: 0 6px 10px 0; }
.jh-floor-box { border: 0; background: #fff; box-shadow: 0 1px 4px rgba(0,0,0,.12); }
.jh-map-close { left: auto; right: 14px; top: 76px; background: transparent; border-color: #555; }
.jh-handle { position: absolute; left: -20px; top: 50%; width: 20px; height: 56px; margin-top: -28px; border: 0; padding: 0 2px;
  border-radius: 10px 0 0 10px; background: rgba(255,255,255,.85); cursor: pointer; box-shadow: -2px 0 6px rgba(0,0,0,.15); }
.jh-handle svg { width: 16px; height: 16px; fill: none; stroke: #555; stroke-width: 1.6; }
.jh-open { display: none !important; }
#jh-ui.jh-mobile .jh-map { background: rgba(255,255,255,.8); }
#jh-ui.jh-mobile .jh-map.closed { transform: translateY(100%); }
#jh-ui.jh-mobile .jh-handle { left: 50%; top: -20px; width: 56px; height: 20px; margin: 0 0 0 -28px; border-radius: 10px 10px 0 0; }
#jh-ui.jh-mobile .jh-map-close { top: 26px; }

/* Hotspot thông tin (link / ảnh / video) */
.jh-hs-info .jh-hs-dot { display: flex; align-items: center; justify-content: center; background: rgba(20,20,20,.5);
  box-shadow: 0 0 0 2px rgba(255,255,255,.9), 0 0 14px rgba(0,0,0,.35); }
.jh-hs-info .jh-hs-dot:hover { background: rgba(20,20,20,.7); }
.jh-hs-dot svg { width: 24px; height: 24px; fill: none; stroke: #fff; stroke-width: 2; filter: drop-shadow(0 1px 2px rgba(0,0,0,.4)); }
.jh-hs-icon { position: absolute; height: auto; cursor: pointer; animation: jh-pulse 1.6s ease-in-out infinite; }
.jh-hs-icon:hover { animation-play-state: paused; }
.jh-hs .jh-hs-tip { bottom: 30px; }
.jh-hs:hover .jh-hs-tip { display: block; }
.jh-pop-bg { position: absolute; inset: 0; background: rgba(0,0,0,.6); z-index: 60; display: flex; align-items: center; justify-content: center; pointer-events: auto; }
.jh-pop { position: relative; background: #fff; border-radius: 6px; padding: 10px; max-width: 92vw; max-height: 88vh; display: flex; flex-direction: column; box-shadow: 0 8px 30px rgba(0,0,0,.4); }
.jh-pop-url, .jh-pop-video { width: min(1100px, 92vw); height: min(700px, 80vh); }
.jh-pop-body { flex: 1; min-height: 0; display: flex; align-items: center; justify-content: center; }
.jh-pop-body img { max-width: 88vw; max-height: 80vh; display: block; }
.jh-pop-body iframe, .jh-pop-body video { width: 100%; height: 100%; border: 0; background: #000; }
.jh-pop-title { font-size: 14px; color: #333; padding: 2px 34px 8px 2px; }
.jh-pop-close { position: absolute; top: -14px; right: -14px; width: 32px; height: 32px; border-radius: 50%; border: 0; background: #fff; color: #333;
  font-size: 16px; cursor: pointer; box-shadow: 0 2px 8px rgba(0,0,0,.35); }
.jh-pop-ext { position: absolute; bottom: -28px; right: 0; color: #fff; font-size: 13px; text-decoration: none; }

/* Trượt mượt hơn; điện thoại: nút minimap ở góc phải trên */
.jh-map { transition: transform .75s cubic-bezier(.22,.61,.36,1); }
.jh-thumbs { transition: right .75s cubic-bezier(.22,.61,.36,1), transform .4s, opacity .4s; }
.jh-mapbtn { display: none; }
#jh-ui.jh-mobile .jh-handle { display: none; }
#jh-ui.jh-mobile .jh-mapbtn { display: flex; align-items: center; justify-content: center; position: absolute; top: 10px; right: 10px;
  width: 40px; height: 40px; border-radius: 50%; border: 0; padding: 0; background: rgba(255,255,255,.85); cursor: pointer;
  box-shadow: 0 1px 6px rgba(0,0,0,.25); z-index: 31; pointer-events: auto; transition: background .3s; }
#jh-ui.jh-mobile .jh-mapbtn svg { width: 22px; height: 22px; fill: none; stroke: #444; stroke-width: 1.6; }
#jh-ui.jh-mobile.jh-map-on .jh-mapbtn { background: #444; }
#jh-ui.jh-mobile.jh-map-on .jh-mapbtn svg { stroke: #fff; }
#jh-ui.jh-mobile .jh-pills { top: 58px; }
#jh-ui.jh-nomap .jh-mapbtn { display: none !important; }
.jh-hs-dot svg { width: 52%; height: 52%; }
/* Không hiện hộp "Loading..." khi chuyển cảnh: cảnh cũ mờ dần sang cảnh mới */
.pnlm-load-box { display: none !important; }
