/* ==========================================================================
   360 Panorama Tour - Stylesheet
   Designed for Three.js Virtual Tour
   ========================================================================== */

@import url('https://fonts.googleapis.com/css2?family=Montserrat:ital,wght@0,300;0,400;0,500;0,600;0,700;1,400&family=Cinzel:wght@500;700&display=swap');

:root {
  --primary-accent: #0ea5e9;
  --primary-blue: #0284c7;
  --gold-accent: #d4af37;
  --teal-progress: #00e5cc;
  --dark-bg: #07090d;
  --glass-bg: rgba(18, 26, 40, 0.65);
  --glass-border: rgba(255, 255, 255, 0.18);
  --glass-highlight: rgba(255, 255, 255, 0.25);
  --glass-hover: rgba(255, 255, 255, 0.22);
  --glass-shadow: 0 20px 48px rgba(0, 0, 0, 0.48), inset 0 1px 1px rgba(255, 255, 255, 0.25);
  --text-main: #f8fafc;
  --text-muted: #94a3b8;
  --transition-fast: 0.2s cubic-bezier(0.4, 0, 0.2, 1);
  --transition-normal: 0.35s cubic-bezier(0.4, 0, 0.2, 1);
}

* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
  -webkit-user-select: none;
  user-select: none;
}

html, body {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  overflow: hidden;
  background-color: var(--dark-bg);
  font-family: 'Montserrat', -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
  color: var(--text-main);
}

/* ==========================================================================
   WebGL 3D Container
   ========================================================================== */
#webgl-container {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  z-index: 1;
  cursor: grab;
  touch-action: none;
}

#webgl-container:active {
  cursor: grabbing;
}

/* Scene Transition Overlay removed to guarantee 100% full brightness */
#transition-overlay {
  display: none !important;
}

/* Centered Scene Loading Card (Matches User's Reference Screenshot) */
.scene-loader {
  position: fixed;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%) scale(0.92);
  z-index: 35;
  background: rgba(28, 28, 30, 0.88);
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
  border: 1px solid rgba(255, 255, 255, 0.12);
  width: 175px;
  height: 155px;
  border-radius: 8px;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 22px;
  box-shadow: 0 16px 36px rgba(0, 0, 0, 0.65);
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.3s cubic-bezier(0.16, 1, 0.3, 1), transform 0.3s cubic-bezier(0.16, 1, 0.3, 1);
}

.scene-loader.visible {
  opacity: 1;
  pointer-events: auto;
  transform: translate(-50%, -50%) scale(1);
}

#scene-loader-text {
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
  font-size: 19px;
  font-weight: 500;
  letter-spacing: 0.02em;
  color: #ffffff;
  margin: 0;
  padding: 0;
}

/* 3D Flipping Square Spinner (SpinKit rotateplane) */
.loader-spinner-square {
  width: 15px;
  height: 15px;
  background-color: #ffffff;
  animation: sk-rotateplane 1.2s infinite ease-in-out;
}

@keyframes sk-rotateplane {
  0% { 
    transform: perspective(120px) rotateX(0deg) rotateY(0deg);
  }
  50% { 
    transform: perspective(120px) rotateX(-180.1deg) rotateY(0deg);
  }
  100% { 
    transform: perspective(120px) rotateX(-180deg) rotateY(-179.9deg);
  }
}

/* ==========================================================================
   Loading Screen (Matches Screenshot 1 Exactly)
   ========================================================================== */
#loading-screen {
  position: fixed;
  inset: 0;
  z-index: 99999;
  background-color: #000000;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  transition: opacity 0.5s cubic-bezier(0.4, 0, 0.2, 1), visibility 0.5s;
}

#loading-screen.hidden {
  opacity: 0;
  visibility: hidden;
  pointer-events: none;
}

.loading-content {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  text-align: center;
  max-width: 500px;
  width: 90%;
}

.logo-wrapper {
  position: relative;
  display: flex;
  align-items: center;
  justify-content: center;
  margin-bottom: 35px;
  width: 100%;
}

.tour-logo {
  max-width: 90vw;
  max-height: min(340px, 48vh);
  width: auto;
  height: auto;
  object-fit: contain;
  display: block;
  user-select: none;
  -webkit-user-drag: none;
}

.progress-section {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 16px;
  width: 100%;
  max-width: 320px;
}

.progress-track {
  flex: 1;
  height: 5px;
  background: #4d4d4d;
  border-radius: 999px;
  overflow: hidden;
  position: relative;
}

.progress-fill {
  height: 100%;
  width: 0%;
  background: #10b981;
  border-radius: 999px;
  box-shadow: 0 0 8px rgba(16, 185, 129, 0.5);
  transition: width 0.2s ease-out;
}

.progress-text {
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
  font-size: 13.5px;
  font-weight: 700;
  color: #ffffff;
  font-variant-numeric: tabular-nums;
  min-width: 38px;
  text-align: right;
}

/* ==========================================================================
   Compass Widget (Matches Screenshot 2 top-left)
   ========================================================================== */
#compass-widget {
  position: absolute;
  top: 24px;
  left: 24px;
  width: 48px;
  height: 48px;
  z-index: 10;
  background: rgba(18, 26, 40, 0.65);
  backdrop-filter: blur(24px) saturate(180%);
  -webkit-backdrop-filter: blur(24px) saturate(180%);
  border: 1.5px solid rgba(255, 255, 255, 0.28);
  border-radius: 50%;
  box-shadow: 0 10px 28px rgba(0, 0, 0, 0.45), inset 0 1px 1px rgba(255, 255, 255, 0.35);
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition: transform var(--transition-fast), border-color var(--transition-fast), background var(--transition-fast), box-shadow var(--transition-fast);
}

#compass-widget:hover {
  transform: scale(1.08);
  border-color: rgba(255, 255, 255, 0.65);
  background: rgba(18, 26, 40, 0.82);
  box-shadow: 0 12px 32px rgba(0, 0, 0, 0.55), 0 0 16px rgba(14, 165, 233, 0.4), inset 0 1px 1px rgba(255, 255, 255, 0.45);
}

#compass-needle {
  width: 30px;
  height: 30px;
  position: relative;
  transition: transform 0.08s linear;
}

#compass-needle svg {
  width: 100%;
  height: 100%;
  display: block;
}

/* ==========================================================================
   Bottom Drawer / Thumbnail Dock (Matches Screenshot 2)
   ========================================================================== */
#bottom-dock {
  position: absolute;
  bottom: 24px;
  left: 50%;
  transform: translateX(-50%);
  width: calc(100% - 48px);
  max-width: 900px;
  z-index: 20;
  display: flex;
  flex-direction: column;
  transition: transform 0.45s cubic-bezier(0.16, 1, 0.3, 1), opacity 0.35s ease;
}

#bottom-dock.dock-closed {
  transform: translateX(-50%) translateY(calc(100% + 60px));
  opacity: 0;
  pointer-events: none;
  visibility: hidden;
}

.dock-card {
  background: var(--glass-bg);
  backdrop-filter: blur(24px) saturate(180%);
  -webkit-backdrop-filter: blur(24px) saturate(180%);
  border: 1px solid var(--glass-border);
  border-radius: 18px;
  box-shadow: var(--glass-shadow);
  overflow: hidden;
  transition: max-height 0.4s ease, padding 0.4s ease;
}

/* Drawer Header */
.dock-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 12px 18px;
  border-bottom: 1px solid rgba(255, 255, 255, 0.1);
}

.dock-header-left {
  display: flex;
  flex-direction: column;
  min-width: 140px;
}

.dock-subtitle {
  font-size: 9.5px;
  font-weight: 600;
  letter-spacing: 0.2em;
  color: var(--text-muted);
  text-transform: uppercase;
}

.dock-current-title {
  font-size: 13.5px;
  font-weight: 700;
  letter-spacing: 0.08em;
  color: #ffffff;
  text-transform: uppercase;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  max-width: 220px;
}

/* Category Filter Tabs */
.dock-tabs {
  display: flex;
  align-items: center;
  gap: 4px;
  background: rgba(0, 0, 0, 0.32);
  padding: 3px 4px;
  border-radius: 999px;
  border: 1px solid rgba(255, 255, 255, 0.1);
  box-shadow: inset 0 1px 3px rgba(0, 0, 0, 0.35);
}

.tab-btn {
  background: transparent;
  border: none;
  outline: none;
  color: #cbd5e1;
  font-family: inherit;
  font-size: 11px;
  font-weight: 600;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  padding: 5px 14px;
  border-radius: 999px;
  cursor: pointer;
  transition: background var(--transition-fast), color var(--transition-fast), box-shadow var(--transition-fast);
}

.tab-btn:hover {
  color: #ffffff;
  background: rgba(255, 255, 255, 0.08);
}

.tab-btn.active {
  background: linear-gradient(135deg, #0ea5e9 0%, #0284c7 100%);
  color: #ffffff;
  box-shadow: 0 2px 10px rgba(14, 165, 233, 0.45), inset 0 1px 0 rgba(255, 255, 255, 0.3);
}

/* Close/Collapse Header Button */
.dock-header-right {
  display: flex;
  align-items: center;
}

.icon-btn-round {
  width: 28px;
  height: 28px;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.08);
  border: 1px solid rgba(255, 255, 255, 0.16);
  color: #cbd5e1;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  box-shadow: 0 2px 6px rgba(0, 0, 0, 0.2), inset 0 1px 0 rgba(255, 255, 255, 0.2);
  transition: background var(--transition-fast), color var(--transition-fast), border-color var(--transition-fast), transform var(--transition-fast);
}

.icon-btn-round:hover {
  background: rgba(255, 255, 255, 0.2);
  border-color: rgba(255, 255, 255, 0.35);
  color: #ffffff;
  transform: scale(1.08);
}

/* Thumbnail Carousel */
.dock-carousel-wrap {
  padding: 12px 16px 8px;
  overflow: hidden;
  transition: max-height 0.35s ease, opacity 0.3s ease;
}

.dock-carousel {
  display: flex;
  gap: 12px;
  overflow-x: auto;
  scroll-behavior: smooth;
  padding-bottom: 6px;
  scrollbar-width: thin;
  scrollbar-color: rgba(255, 255, 255, 0.2) transparent;
}

.dock-carousel::-webkit-scrollbar {
  height: 4px;
}

.dock-carousel::-webkit-scrollbar-track {
  background: transparent;
}

.dock-carousel::-webkit-scrollbar-thumb {
  background: rgba(255, 255, 255, 0.22);
  border-radius: 4px;
}

.thumb-item {
  flex: 0 0 135px;
  display: flex;
  flex-direction: column;
  border-radius: 10px;
  overflow: hidden;
  cursor: pointer;
  position: relative;
  background: rgba(15, 23, 42, 0.55);
  border: 1.5px solid rgba(255, 255, 255, 0.12);
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.35);
  transition: transform var(--transition-fast), border-color var(--transition-fast), box-shadow var(--transition-fast);
}

.thumb-item:hover {
  transform: translateY(-3px);
  border-color: rgba(14, 165, 233, 0.7);
  box-shadow: 0 8px 18px rgba(0, 0, 0, 0.45), 0 0 10px rgba(14, 165, 233, 0.3);
}

.thumb-item.active {
  border-color: #00a8ff;
  box-shadow: 0 0 16px rgba(0, 168, 255, 0.65), 0 6px 16px rgba(0, 0, 0, 0.4);
}

.thumb-img {
  width: 100%;
  height: 72px;
  object-fit: cover;
  display: block;
}

.thumb-title {
  padding: 5px 6px;
  font-size: 10px;
  font-weight: 600;
  text-align: center;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  background: rgba(10, 15, 25, 0.72);
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
  color: #e2e8f0;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  transition: background var(--transition-fast), color var(--transition-fast);
}

.thumb-item.active .thumb-title {
  background: #0284c7;
  color: #ffffff;
}

/* Dock Bottom Toolbar */
.dock-toolbar {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  padding: 8px 16px 10px;
  border-top: 1px solid rgba(255, 255, 255, 0.08);
}

.toolbar-btn {
  background: transparent;
  border: none;
  outline: none;
  color: #94a3b8;
  width: 32px;
  height: 32px;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 6px;
  cursor: pointer;
  transition: background var(--transition-fast), color var(--transition-fast);
}

.toolbar-btn:hover {
  background: rgba(255, 255, 255, 0.12);
  color: #ffffff;
}

.toolbar-btn.active {
  color: #0ea5e9;
}

.toolbar-btn svg {
  width: 18px;
  height: 18px;
  fill: currentColor;
}

/* Collapsed state for thumbnail tray (Hides header + carousel, keeps floating toolbar) */
#bottom-dock.carousel-collapsed .dock-header,
#bottom-dock.carousel-collapsed .dock-carousel-wrap {
  display: none !important;
}

#bottom-dock.carousel-collapsed {
  width: auto;
  max-width: 90vw;
}

#bottom-dock.carousel-collapsed .dock-card {
  border-radius: 999px;
  padding: 2px 4px;
  box-shadow: 0 14px 36px rgba(0, 0, 0, 0.5), inset 0 1px 1px rgba(255, 255, 255, 0.25);
  background: rgba(18, 26, 40, 0.68);
  backdrop-filter: blur(24px) saturate(180%);
  -webkit-backdrop-filter: blur(24px) saturate(180%);
  border: 1px solid rgba(255, 255, 255, 0.2);
}

#bottom-dock.carousel-collapsed .dock-toolbar {
  border-top: none;
  padding: 6px 14px;
}

/* Round Floating Arrow Button to Open Bottom Dock (Matches Screenshot 1 & 2) */
.dock-open-circle {
  position: absolute;
  bottom: 22px;
  left: 50%;
  transform: translateX(-50%);
  width: 46px;
  height: 46px;
  border-radius: 50%;
  background: rgba(18, 26, 40, 0.65);
  backdrop-filter: blur(24px) saturate(180%);
  -webkit-backdrop-filter: blur(24px) saturate(180%);
  border: 1.5px solid rgba(255, 255, 255, 0.28);
  color: #ffffff;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  z-index: 19;
  box-shadow: 0 10px 28px rgba(0, 0, 0, 0.45), inset 0 1px 1px rgba(255, 255, 255, 0.35);
  transition: transform 0.35s cubic-bezier(0.16, 1, 0.3, 1), opacity 0.3s ease, border-color 0.2s ease, background 0.2s ease, box-shadow 0.2s ease;
}

.dock-open-circle:hover {
  transform: translateX(-50%) scale(1.12);
  border-color: rgba(255, 255, 255, 0.65);
  background: rgba(18, 26, 40, 0.82);
  box-shadow: 0 12px 32px rgba(0, 0, 0, 0.55), 0 0 16px rgba(14, 165, 233, 0.4), inset 0 1px 1px rgba(255, 255, 255, 0.45);
}

.dock-open-circle svg {
  width: 24px;
  height: 24px;
  fill: #ffffff;
  display: block;
  transition: transform 0.2s ease;
}

.dock-open-circle:hover svg {
  transform: translateY(-2px);
}

.dock-open-circle.hidden {
  opacity: 0;
  pointer-events: none;
  transform: translateX(-50%) translateY(30px) scale(0.85);
}

/* ==========================================================================
   Animated Chevron Arrow Hotspot (Exact Match to Image 2)
   ========================================================================== */
#hotspots-layer {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  pointer-events: none;
  z-index: 10;
  transition: opacity 0.3s ease;
}

.animated-hotspot {
  position: absolute;
  transform: translate(-50%, -50%);
  cursor: pointer;
  pointer-events: auto;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  z-index: 12;
  background: transparent;
  border: none;
  padding: 8px;
}

.chevron-arrow-icon {
  width: 44px;
  height: 22px;
  display: block;
  filter: drop-shadow(0 2px 6px rgba(0, 0, 0, 0.75));
  animation: chevronBob 2s ease-in-out infinite;
  transition: transform 0.2s ease, filter 0.2s ease;
}

@keyframes chevronBob {
  0%, 100% {
    transform: translateY(0);
    opacity: 0.95;
  }
  50% {
    transform: translateY(-4px);
    opacity: 1;
    filter: drop-shadow(0 4px 12px rgba(0, 0, 0, 0.85)) drop-shadow(0 0 8px rgba(255, 255, 255, 0.7));
  }
}

.animated-hotspot:hover .chevron-arrow-icon {
  transform: translateY(-3px) scale(1.15);
  filter: drop-shadow(0 6px 14px rgba(0, 0, 0, 0.95)) drop-shadow(0 0 12px rgba(255, 255, 255, 0.95));
}

/* ==========================================================================
   Custom Floor Hotspot (Oval Ring - Exact Match to User's Image)
   ========================================================================== */
.custom-floor-hotspot {
  position: absolute;
  transform: translate(-50%, -50%);
  cursor: pointer;
  pointer-events: auto;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  z-index: 12;
  background: transparent;
  border: none;
  padding: 8px;
}

.floor-hotspot-svg {
  width: 62px;
  height: 35px;
  display: block;
  filter: drop-shadow(0 2px 6px rgba(0, 0, 0, 0.65)) drop-shadow(0 0 6px rgba(255, 255, 255, 0.45));
  transition: transform 0.25s ease, filter 0.25s ease;
  animation: floorRingBreathe 2.4s ease-in-out infinite;
}

@keyframes floorRingBreathe {
  0%, 100% {
    transform: scale(1);
    opacity: 0.95;
  }
  50% {
    transform: scale(1.08);
    opacity: 1;
    filter: drop-shadow(0 3px 10px rgba(0, 0, 0, 0.8)) drop-shadow(0 0 10px rgba(255, 255, 255, 0.75));
  }
}

.floor-hotspot-pulse {
  position: absolute;
  width: 56px;
  height: 30px;
  border-radius: 50%;
  border: 2px solid rgba(255, 255, 255, 0.75);
  animation: floorRadarPulse 2.2s cubic-bezier(0.2, 0.8, 0.2, 1) infinite;
  pointer-events: none;
}

@keyframes floorRadarPulse {
  0% {
    transform: scale(0.9);
    opacity: 0.85;
  }
  100% {
    transform: scale(1.45);
    opacity: 0;
  }
}

.custom-floor-hotspot:hover .floor-hotspot-svg {
  transform: scale(1.2);
  filter: drop-shadow(0 4px 12px rgba(0, 0, 0, 0.85)) drop-shadow(0 0 14px rgba(255, 255, 255, 0.95));
}

.custom-floor-hotspot:hover .hotspot-tooltip {
  opacity: 1;
  transform: translateX(-50%) translateY(-10px);
}

/* Sleek Tooltip on hover */
.hotspot-tooltip {
  position: absolute;
  bottom: 100%;
  left: 50%;
  transform: translateX(-50%) translateY(-6px);
  background: rgba(15, 23, 42, 0.92);
  backdrop-filter: blur(10px);
  border: 1px solid rgba(255, 255, 255, 0.2);
  color: #ffffff;
  font-size: 11px;
  font-weight: 600;
  letter-spacing: 0.05em;
  padding: 5px 12px;
  border-radius: 999px;
  white-space: nowrap;
  pointer-events: none;
  opacity: 0;
  box-shadow: 0 8px 20px rgba(0, 0, 0, 0.4);
  transition: opacity 0.2s ease, transform 0.2s ease;
}

.animated-hotspot:hover .hotspot-tooltip {
  opacity: 1;
  transform: translateX(-50%) translateY(-10px);
}

/* ==========================================================================
   Toast Notification (Snapshot, Info)
   ========================================================================== */
#toast-notification {
  position: fixed;
  top: 24px;
  right: 24px;
  z-index: 1000;
  background: var(--glass-bg);
  backdrop-filter: blur(16px);
  border: 1px solid var(--glass-border);
  color: #fff;
  padding: 10px 18px;
  border-radius: 8px;
  font-size: 12px;
  font-weight: 500;
  display: flex;
  align-items: center;
  gap: 8px;
  box-shadow: 0 8px 24px rgba(0,0,0,0.5);
  transform: translateY(-50px);
  opacity: 0;
  pointer-events: none;
  transition: transform 0.3s cubic-bezier(0.16, 1, 0.3, 1), opacity 0.3s;
}

#toast-notification.show {
  transform: translateY(0);
  opacity: 1;
}

/* ==========================================================================
   Responsive adjustments
   ========================================================================== */
@media (max-width: 768px) {
  #bottom-dock {
    width: calc(100% - 20px);
    bottom: 12px;
  }
  .dock-header {
    padding: 10px 12px;
  }
  .dock-current-title {
    max-width: 140px;
    font-size: 12px;
  }
  .tab-btn {
    padding: 4px 10px;
    font-size: 10px;
  }
  .thumb-item {
    flex: 0 0 110px;
  }
  .thumb-img {
    height: 60px;
  }
  .dock-toolbar {
    gap: 6px;
    padding: 6px 10px 8px;
  }
  .toolbar-btn {
    width: 28px;
    height: 28px;
  }
  .toolbar-btn svg {
    width: 16px;
    height: 16px;
  }
  #compass-widget {
    top: 14px;
    left: 14px;
    width: 42px;
    height: 42px;
  }
}

/* ==========================================================================
   Floor Plan Mini-Map (Matches Screenshot 1 Bottom-Left)
   ========================================================================== */
.minimap-widget {
  position: absolute;
  bottom: 22px;
  left: 22px;
  width: 275px;
  max-width: calc(100vw - 44px);
  background: var(--glass-bg);
  backdrop-filter: blur(24px) saturate(180%);
  -webkit-backdrop-filter: blur(24px) saturate(180%);
  border: 1px solid var(--glass-border);
  border-radius: 16px;
  box-shadow: var(--glass-shadow);
  padding: 12px;
  z-index: 21;
  transition: transform 0.35s cubic-bezier(0.16, 1, 0.3, 1), opacity 0.3s ease, visibility 0.3s;
}

.minimap-widget.hidden {
  opacity: 0;
  visibility: hidden;
  pointer-events: none;
  transform: translateY(20px) scale(0.95);
}

.minimap-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 2px 2px 10px;
  gap: 8px;
  position: relative;
  user-select: none;
}

.minimap-title-wrap {
  display: flex;
  align-items: center;
  gap: 6px;
  min-width: 0;
  flex: 1;
}

.minimap-header-icon {
  width: 14px;
  height: 14px;
  fill: #00a8ff;
  flex-shrink: 0;
}

.minimap-title {
  font-size: 11px;
  font-weight: 700;
  color: #ffffff;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

/* Plan Switcher Dropdown (Floor Plan / 3D Floor Plan) */
.minimap-plan-select-wrap {
  position: relative;
  flex-shrink: 0;
}

.minimap-dropdown-btn {
  background: rgba(255, 255, 255, 0.08);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  border: 1px solid rgba(255, 255, 255, 0.18);
  outline: none;
  color: #ffffff;
  font-size: 10.5px;
  font-weight: 600;
  letter-spacing: 0.04em;
  padding: 4px 8px 4px 10px;
  border-radius: 8px;
  cursor: pointer;
  display: flex;
  align-items: center;
  gap: 6px;
  box-shadow: 0 2px 6px rgba(0, 0, 0, 0.2), inset 0 1px 0 rgba(255, 255, 255, 0.18);
  transition: background var(--transition-fast), border-color var(--transition-fast), box-shadow var(--transition-fast);
}

.minimap-dropdown-btn:hover {
  background: rgba(255, 255, 255, 0.18);
  border-color: rgba(255, 255, 255, 0.35);
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.3), inset 0 1px 0 rgba(255, 255, 255, 0.25);
}

.dropdown-chevron {
  width: 12px;
  height: 12px;
  fill: #94a3b8;
  transition: transform 0.2s ease;
}

.minimap-plan-select-wrap.open .dropdown-chevron {
  transform: rotate(180deg);
}

.minimap-dropdown-menu {
  position: absolute;
  top: calc(100% + 6px);
  right: 0;
  background: rgba(18, 26, 40, 0.88);
  backdrop-filter: blur(24px) saturate(180%);
  -webkit-backdrop-filter: blur(24px) saturate(180%);
  border: 1px solid rgba(255, 255, 255, 0.2);
  border-radius: 10px;
  padding: 5px;
  display: flex;
  flex-direction: column;
  gap: 3px;
  box-shadow: 0 14px 34px rgba(0, 0, 0, 0.55), inset 0 1px 0 rgba(255, 255, 255, 0.2);
  z-index: 50;
  min-width: 140px;
  opacity: 0;
  visibility: hidden;
  transform: translateY(-6px);
  transition: opacity 0.2s ease, transform 0.2s ease, visibility 0.2s;
}

.minimap-plan-select-wrap.open .minimap-dropdown-menu {
  opacity: 1;
  visibility: visible;
  transform: translateY(0);
}

.minimap-dropdown-item {
  background: transparent;
  border: none;
  outline: none;
  color: #cbd5e1;
  font-size: 11px;
  font-weight: 500;
  text-align: left;
  padding: 6px 10px;
  border-radius: 5px;
  cursor: pointer;
  display: flex;
  align-items: center;
  gap: 8px;
  transition: background 0.15s ease, color 0.15s ease;
  white-space: nowrap;
}

.minimap-dropdown-item:hover {
  background: rgba(255, 255, 255, 0.12);
  color: #ffffff;
}

.minimap-dropdown-item.active {
  background: rgba(0, 168, 255, 0.2);
  color: #00a8ff;
  font-weight: 600;
}

.plan-icon {
  width: 14px;
  height: 14px;
  fill: currentColor;
  flex-shrink: 0;
}

.minimap-body {
  transition: max-height 0.3s ease, opacity 0.3s ease;
}

.minimap-map-wrapper {
  position: relative;
  border-radius: 10px;
  overflow: hidden;
  background: rgba(10, 15, 25, 0.45);
  box-shadow: inset 0 2px 8px rgba(0, 0, 0, 0.45), 0 1px 0 rgba(255, 255, 255, 0.08);
  border: 1px solid rgba(255, 255, 255, 0.08);
}

.plan-view {
  display: none;
  position: relative;
  width: 100%;
}

.plan-view.active {
  display: block;
}

/* 3D Floor Plan Placeholder */
.minimap-placeholder-3d {
  width: 100%;
  aspect-ratio: 1024 / 846;
  min-height: 180px;
  background: linear-gradient(135deg, rgba(20, 24, 32, 0.95), rgba(15, 23, 42, 0.98));
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 20px;
  box-sizing: border-box;
  text-align: center;
}

.placeholder-icon {
  width: 38px;
  height: 38px;
  fill: #00a8ff;
  opacity: 0.85;
  filter: drop-shadow(0 0 10px rgba(0, 168, 255, 0.4));
  animation: floatPlaceholder 3s ease-in-out infinite;
}

@keyframes floatPlaceholder {
  0%, 100% { transform: translateY(0); }
  50% { transform: translateY(-4px); }
}

.placeholder-title {
  font-size: 13px;
  font-weight: 700;
  color: #ffffff;
  letter-spacing: 0.04em;
}

.placeholder-sub {
  font-size: 10px;
  color: #94a3b8;
  letter-spacing: 0.02em;
}

.minimap-img {
  width: 100%;
  height: auto;
  display: block;
  user-select: none;
  pointer-events: none;
}

.minimap-markers {
  position: absolute;
  inset: 0;
  pointer-events: auto;
}

/* Individual Marker Pin */
.minimap-marker {
  position: absolute;
  transform: translate(-50%, -100%);
  cursor: pointer;
  z-index: 2;
  transition: transform 0.2s cubic-bezier(0.16, 1, 0.3, 1), filter 0.2s ease;
  line-height: 0;
}

.marker-pin-svg {
  width: 15px;
  height: 15px;
  fill: #ffffff;
  display: block;
  filter: drop-shadow(0 2px 4px rgba(0, 0, 0, 0.85));
  opacity: 0.92;
  transition: fill 0.2s ease, transform 0.2s ease, filter 0.2s ease;
}

.minimap-marker:hover {
  transform: translate(-50%, -100%) scale(1.35);
  z-index: 10;
}

.minimap-marker:hover .marker-pin-svg {
  opacity: 1;
  fill: #ffffff;
  filter: drop-shadow(0 3px 8px rgba(0, 0, 0, 0.95)) drop-shadow(0 0 6px #ffffff);
}

/* Tooltip on Hover */
.marker-tooltip {
  position: absolute;
  bottom: 100%;
  left: 50%;
  transform: translateX(-50%) translateY(-6px);
  background: rgba(15, 23, 42, 0.94);
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
  color: #ffffff;
  font-size: 10px;
  font-weight: 600;
  padding: 3px 8px;
  border-radius: 4px;
  white-space: nowrap;
  pointer-events: none;
  opacity: 0;
  border: 1px solid rgba(255, 255, 255, 0.15);
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.5);
  transition: opacity 0.15s ease, transform 0.15s ease;
  z-index: 20;
}

.minimap-marker:hover .marker-tooltip {
  opacity: 1;
  transform: translateX(-50%) translateY(-9px);
}

/* Active Marker Pin (Current Scene Location) */
.minimap-marker.active {
  z-index: 5;
  transform: translate(-50%, -100%) scale(1.22);
}

.minimap-marker.active .marker-pin-svg {
  fill: #00a8ff;
  filter: drop-shadow(0 0 8px #00a8ff) drop-shadow(0 3px 6px rgba(0, 0, 0, 0.9));
  opacity: 1;
}

/* Radar Pulse Wave for Active Marker */
.marker-pulse-ring {
  position: absolute;
  top: 100%;
  left: 50%;
  width: 14px;
  height: 14px;
  border-radius: 50%;
  border: 2px solid #00a8ff;
  transform: translate(-50%, -50%);
  animation: markerPulse 2s cubic-bezier(0.2, 0.8, 0.2, 1) infinite;
  pointer-events: none;
}

@keyframes markerPulse {
  0% {
    transform: translate(-50%, -50%) scale(0.6);
    opacity: 1;
  }
  100% {
    transform: translate(-50%, -50%) scale(2.4);
    opacity: 0;
  }
}

/* Radar FOV / Directional Heading Wedge */
.marker-radar-cone {
  position: absolute;
  top: 100%;
  left: 50%;
  width: 38px;
  height: 38px;
  pointer-events: none;
  transform: translate(-50%, -50%) rotate(var(--cam-heading, 0deg));
  border-radius: 50%;
  background: conic-gradient(from -30deg at 50% 50%, rgba(0, 168, 255, 0.45) 0deg, rgba(0, 168, 255, 0) 60deg);
  transition: transform 0.08s linear;
}

@media (max-width: 768px) {
  .minimap-widget {
    bottom: 74px;
    left: 12px;
    width: 210px;
  }
}

