/* ==========================================================
   Green Pine Real Estate — Professional 360° Virtual Tour
   Watermarks, positioned labels, draggable arrows, opacity
   ========================================================== */

/* --- Base modal & viewer overrides --- */
#tourModal .modal-content { overflow:hidden }
#pannellum-viewer canvas { display:block }

/* --- Master overlay opacity layer --- */
.tour-overlay-master {
  opacity:1;
  transition:opacity .4s;
}
.tour-overlay-master.hidden { opacity:0 }

/* --- Watermark (company name) --- */
.tour-watermark {
  position:absolute;
  z-index:200;
  pointer-events:none;
  font-size:.68rem;
  font-weight:700;
  letter-spacing:.08em;
  text-transform:uppercase;
  white-space:nowrap;
  text-shadow:0 1px 4px rgba(0,0,0,.6);
  transition:opacity .4s;
}
.tour-watermark.pos-tl  { top:12px; left:12px }
.tour-watermark.pos-tr  { top:12px; right:12px }
.tour-watermark.pos-bl  { bottom:76px; left:12px }
.tour-watermark.pos-br  { bottom:76px; right:12px }
.tour-watermark.pos-c   { top:50%; left:50%; transform:translate(-50%,-50%) }

/* --- Room label (positionable) --- */
.tour-room-label {
  position:absolute;
  z-index:200;
  pointer-events:none;
  background:rgba(0,0,0,.45);
  backdrop-filter:blur(4px);
  color:#fff;
  font-size:.72rem;
  font-weight:600;
  padding:3px 10px;
  border-radius:20px;
  text-transform:uppercase;
  letter-spacing:.03em;
  transition:opacity .4s;
  white-space:nowrap;
}
.tour-room-label.pos-tl  { top:12px; left:12px }
.tour-room-label.pos-tr  { top:12px; right:12px }
.tour-room-label.pos-bl  { bottom:76px; left:12px }
.tour-room-label.pos-br  { bottom:76px; right:12px }
.tour-room-label.pos-c   { top:50%; left:50%; transform:translate(-50%,-50%) }

/* --- Branding overlay --- */
.tour-branding {
  position:absolute;
  top:12px;
  left:50%;
  transform:translateX(-50%);
  z-index:200;
  pointer-events:none;
  display:flex;
  align-items:center;
  gap:8px;
  background:rgba(0,0,0,.55);
  backdrop-filter:blur(6px);
  border-radius:30px;
  padding:4px 14px;
  transition:opacity .4s;
}
.tour-branding .logo-wrap {
  width:26px;height:26px;border-radius:50%;
  background:var(--gp-primary,#1a5c3a);
  display:flex;align-items:center;justify-content:center;
  flex-shrink:0;
}
.tour-branding .logo-wrap i { color:#fff;font-size:.7rem }
.tour-branding .brand-text {
  color:#fff;font-size:.75rem;font-weight:600;white-space:nowrap;
}
.tour-branding .agent-pill {
  color:rgba(255,255,255,.7);font-size:.65rem;white-space:nowrap;
  border-left:1px solid rgba(255,255,255,.25);padding-left:10px;margin-left:2px;
}

/* --- Floating control bar --- */
.tour-control-bar {
  position:absolute;
  bottom:80px;
  left:50%;
  transform:translateX(-50%);
  z-index:200;
  display:flex;
  align-items:center;
  gap:6px;
  background:rgba(0,0,0,.55);
  backdrop-filter:blur(6px);
  border-radius:30px;
  padding:5px 8px;
  transition:opacity .4s;
}
.tour-control-bar .ctrl-btn {
  background:rgba(255,255,255,.12);
  border:none;
  color:#fff;
  width:32px;height:32px;
  border-radius:50%;
  display:flex;align-items:center;justify-content:center;
  cursor:pointer;
  font-size:.8rem;
  transition:background .2s;
}
.tour-control-bar .ctrl-btn:hover { background:rgba(255,255,255,.25) }
.tour-control-bar .ctrl-btn.active { background:var(--gp-primary,#1a5c3a) }
.tour-control-bar .ctrl-btn .bi { pointer-events:none }
.tour-control-bar .ctrl-divider {
  width:1px;height:18px;background:rgba(255,255,255,.2);margin:0 2px;
}

/* --- Navigation arrows (positionable inside Pannellum via hotSpots) --- */
.pnlm-hotspot.tour-hs-arrow {
  cursor:pointer;
  pointer-events:auto;
  width:48px !important;
  height:48px !important;
  border-radius:50%;
  background:rgba(0,0,0,.45);
  backdrop-filter:blur(4px);
  border:2px solid rgba(255,255,255,.5);
  display:flex !important;
  align-items:center;
  justify-content:center;
  box-shadow:0 2px 12px rgba(0,0,0,.4);
  transition:transform .2s,opacity .2s;
}
.pnlm-hotspot.tour-hs-arrow:hover { transform:scale(1.12) }
.pnlm-hotspot.tour-hs-arrow span {
  display:flex !important;
  align-items:center;
  justify-content:center;
  width:100%;
  height:100%;
}
.pnlm-hotspot.tour-hs-arrow span svg {
  width:18px;height:18px;
  filter:drop-shadow(0 1px 2px rgba(0,0,0,.5));
}
.pnlm-hotspot.tour-hs-arrow.minimal {
  width:40px !important;
  height:64px !important;
  border-radius:8px;
  background:rgba(0,0,0,.3);
  border-width:1px;
}
.pnlm-hotspot.tour-hs-arrow.minimal span svg { width:14px;height:22px }
.pnlm-hotspot.tour-hs-arrow.depth {
  width:54px !important;
  height:54px !important;
  border-radius:14px;
  box-shadow:0 6px 20px rgba(0,0,0,.5), inset 0 1px 0 rgba(255,255,255,.1);
}
.pnlm-hotspot.tour-hs-arrow.depth span svg { width:20px;height:20px }
.pnlm-hotspot.tour-hs-arrow.glow {
  width:48px !important;
  height:48px !important;
  animation:glowPulse 2.2s ease-in-out infinite;
}
.pnlm-hotspot.tour-hs-arrow.glow span svg { width:18px;height:18px }

@keyframes glowPulse {
  0%,100%   { box-shadow:0 0 6px currentColor, 0 0 12px currentColor; }
  50%        { box-shadow:0 0 14px currentColor, 0 0 28px currentColor; }
}

/* fallback overlay arrows (outside Pannellum) for when hotSpots unavailable */
.tour-arrow-overlay {
  position:absolute;
  z-index:150;
  cursor:pointer;
  display:flex;align-items:center;justify-content:center;
  transition:transform .2s, opacity .2s;
  user-select:none;
}
.tour-arrow-overlay:hover { transform:scale(1.08) }
.tour-arrow-overlay:active { transform:scale(.95) }

/* ── Overlay arrow styles ── */
.tour-arrow-overlay {
  position:absolute;
  z-index:200;
  cursor:pointer;
  display:flex;
  flex-direction:column;
  align-items:center;
  justify-content:center;
  gap:2px;
  transition:transform .2s, opacity .2s;
  user-select:none;
}
.tour-arrow-overlay:hover { transform:scale(1.08) }
.tour-arrow-overlay:active { transform:scale(.95) }

/* Room name label on arrow */
.tour-arrow-overlay .arrow-name {
  font-size:.62rem;
  font-weight:600;
  color:#fff;
  text-shadow:0 1px 4px rgba(0,0,0,.7);
  white-space:nowrap;
  letter-spacing:.02em;
  max-width:90px;
  overflow:hidden;
  text-overflow:ellipsis;
}

.tour-arrow-overlay.classic {
  width:56px;
  min-height:56px;
  padding:4px;
  background:rgba(0,0,0,.45);
  backdrop-filter:blur(4px);
  border-radius:50%;
  border:2px solid rgba(255,255,255,.4);
  box-shadow:0 2px 12px rgba(0,0,0,.35);
}
.tour-arrow-overlay.classic svg { width:18px;height:18px }
.tour-arrow-overlay.minimal {
  width:44px;
  min-height:64px;
  padding:4px;
  background:rgba(0,0,0,.25);
  backdrop-filter:blur(2px);
  border-radius:8px;
}
.tour-arrow-overlay.minimal svg { width:14px;height:22px }
.tour-arrow-overlay.depth {
  width:60px;
  min-height:60px;
  padding:4px;
  background:rgba(0,0,0,.5);
  backdrop-filter:blur(6px);
  border-radius:16px;
  border:1px solid rgba(255,255,255,.15);
  box-shadow:0 6px 20px rgba(0,0,0,.5), inset 0 1px 0 rgba(255,255,255,.1);
}
.tour-arrow-overlay.depth svg { width:20px;height:20px }
.tour-arrow-overlay.glow {
  width:56px;
  min-height:56px;
  padding:4px;
  background:rgba(0,0,0,.4);
  backdrop-filter:blur(4px);
  border-radius:50%;
  border:2px solid;
  animation:glowPulse 2.2s ease-in-out infinite;
}
.tour-arrow-overlay.glow svg { width:18px;height:18px }

/* --- Room preview strip (bottom) --- */
.tour-strip {
  position:absolute;
  bottom:18px;
  left:50%;
  transform:translateX(-50%);
  z-index:200;
  display:flex;
  gap:6px;
  background:rgba(0,0,0,.45);
  backdrop-filter:blur(6px);
  border-radius:12px;
  padding:6px;
  max-width:92vw;
  overflow-x:auto;
  scrollbar-width:none;
  -ms-overflow-style:none;
  transition:opacity .4s;
}
.tour-strip::-webkit-scrollbar { display:none }
.tour-strip .strip-thumb {
  width:48px;height:34px;border-radius:6px;object-fit:cover;
  cursor:pointer;opacity:.5;transition:opacity .2s,border .2s,transform .2s;
  border:2px solid transparent;flex-shrink:0;
}
.tour-strip .strip-thumb.active { opacity:1;border-color:#fff;transform:scale(1.06) }
.tour-strip .strip-thumb:hover  { opacity:.85 }

/* --- Image gallery overlays --- */
.img-watermark {
  position:absolute;
  z-index:10;
  pointer-events:none;
  font-size:.62rem;
  font-weight:700;
  letter-spacing:.06em;
  text-transform:uppercase;
  white-space:nowrap;
  color:rgba(255,255,255,.85);
  text-shadow:0 1px 4px rgba(0,0,0,.6);
}
.img-watermark.pos-tl { top:10px; left:10px }
.img-watermark.pos-tr { top:10px; right:10px }
.img-watermark.pos-bl { bottom:10px; left:10px }
.img-watermark.pos-br { bottom:10px; right:10px }
.img-watermark.pos-c  { top:50%; left:50%; transform:translate(-50%,-50%) }

.img-label {
  position:absolute;
  z-index:10;
  pointer-events:none;
  background:rgba(0,0,0,.5);
  backdrop-filter:blur(4px);
  color:#fff;
  font-size:.72rem;
  font-weight:600;
  padding:3px 10px;
  border-radius:20px;
  text-transform:uppercase;
  letter-spacing:.03em;
  white-space:nowrap;
}
.img-label.pos-tl { top:36px; left:10px }
.img-label.pos-tr { top:36px; right:10px }
.img-label.pos-bl { bottom:36px; left:10px }
.img-label.pos-br { bottom:36px; right:10px }
.img-label.pos-c  { top:50%; left:50%; transform:translate(-50%,-50%) }

/* --- Drag handle for admin positioning --- */
.tour-drag-handle {
  position:absolute;
  z-index:300;
  width:20px;height:20px;
  border-radius:50%;
  background:var(--gp-primary,#1a5c3a);
  border:2px solid #fff;
  cursor:grab;
  display:none;
  box-shadow:0 2px 8px rgba(0,0,0,.4);
}
.tour-drag-handle:active { cursor:grabbing }
.tour-drag-handle::after {
  content:'';
  position:absolute;
  top:50%;left:50%;
  transform:translate(-50%,-50%);
  width:6px;height:6px;
  border-radius:50%;
  background:#fff;
}

/* --- Desktop: hover to hide overlays (clean view) --- */
@media (hover:hover) and (pointer:fine) {
  #tourModal .modal-body:hover .tour-overlay-master,
  #tourModal .modal-body:hover .tour-control-bar,
  #tourModal .modal-body:hover .tour-strip,
  #tourModal .modal-body:hover .tour-branding,
  #tourModal .modal-body:hover .tour-room-label,
  #tourModal .modal-body:hover .tour-watermark {
    opacity:var(--tour-fade-opacity, 0);
  }
  #tourModal .modal-body:hover .tour-control-bar:hover,
  #tourModal .modal-body:hover .tour-strip:hover,
  #tourModal .modal-body:hover .tour-branding:hover,
  #tourModal .modal-body:hover .tour-room-label:hover,
  #tourModal .modal-body:hover .tour-watermark:hover {
    opacity:1;
  }
}

/* --- Mobile portrait --- */
@media (max-width:576px) {
  .tour-branding { top:8px; padding:3px 10px }
  .tour-branding .logo-wrap { width:22px;height:22px }
  .tour-branding .brand-text { font-size:.65rem }
  .tour-branding .agent-pill { display:none }
  .tour-room-label { font-size:.65rem }
  .tour-watermark { font-size:.58rem }
  .tour-control-bar { bottom:76px;gap:4px;padding:4px 6px;border-radius:24px }
  .tour-control-bar .ctrl-btn { width:28px;height:28px;font-size:.72rem }
  .tour-strip { bottom:12px;padding:4px;border-radius:10px;gap:4px }
  .tour-strip .strip-thumb { width:40px;height:28px;border-radius:4px }
}
