/* ==========================================================================
   BTH Virtual Tour — 3D Mini Map Styles
   Low-Poly Isometric Campus Architectural Model (Mint & Clean White Theme)
   ========================================================================== */

/* Container */
#bthMiniMap3DContainer {
  font-family: 'Plus Jakarta Sans', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
  pointer-events: none;
  z-index: 9999;
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  overflow: hidden;
}

#bthMiniMap3DContainer * {
  box-sizing: border-box;
}

/* ============================================
   Toggle Action Button (Center Bottom, Safe Above 3DVista Navbar)
   ============================================ */
.bth-minimap-toggle {
  pointer-events: auto;
  position: absolute;
  bottom: 78px;
  left: 50%;
  transform: translateX(-50%);
  width: 56px;
  height: 56px;
  border-radius: 18px;
  background: linear-gradient(135deg, rgba(10, 17, 36, 0.94) 0%, rgba(18, 30, 58, 0.94) 100%);
  backdrop-filter: blur(18px);
  -webkit-backdrop-filter: blur(18px);
  border: 1.5px solid rgba(72, 201, 176, 0.4);
  color: #48c9b0;
  cursor: pointer;
  box-shadow:
    0 10px 32px rgba(0, 0, 0, 0.5),
    0 0 20px rgba(72, 201, 176, 0.18),
    inset 0 1px 0 rgba(255, 255, 255, 0.15);
  display: flex;
  align-items: center;
  justify-content: center;
  transition: all 0.35s cubic-bezier(0.34, 1.56, 0.64, 1);
  outline: none;
  z-index: 10001;
}

.bth-minimap-toggle:hover {
  transform: translateX(-50%) scale(1.08) translateY(-2px);
  background: linear-gradient(135deg, rgba(15, 26, 52, 0.98) 0%, rgba(28, 48, 88, 0.98) 100%);
  border-color: #48c9b0;
  color: #ffffff;
  box-shadow:
    0 16px 44px rgba(0, 0, 0, 0.6),
    0 0 28px rgba(72, 201, 176, 0.35),
    inset 0 1px 0 rgba(255, 255, 255, 0.25);
}

.bth-minimap-toggle.is-active {
  background: linear-gradient(135deg, #10b981 0%, #059669 100%);
  border-color: #6ee7b7;
  color: #ffffff;
  box-shadow:
    0 10px 32px rgba(16, 185, 129, 0.45),
    0 0 24px rgba(16, 185, 129, 0.3);
}

.bth-minimap-toggle svg {
  width: 26px;
  height: 26px;
  transition: transform 0.3s ease;
}

.bth-minimap-toggle:hover svg {
  transform: scale(1.08);
}

/* Tooltip */
.bth-minimap-tooltip {
  position: absolute;
  bottom: calc(100% + 12px);
  left: 50%;
  transform: translateX(-50%) translateY(6px);
  background: rgba(10, 17, 36, 0.95);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  color: #ffffff;
  padding: 6px 14px;
  border-radius: 20px;
  font-size: 0.78rem;
  font-weight: 600;
  white-space: nowrap;
  pointer-events: none;
  opacity: 0;
  transition: all 0.25s ease;
  border: 1px solid rgba(72, 201, 176, 0.3);
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.45);
}

.bth-minimap-toggle:hover .bth-minimap-tooltip {
  opacity: 1;
  transform: translateX(-50%) translateY(0);
}

.bth-minimap-toggle.is-active .bth-minimap-tooltip {
  display: none;
}

/* ============================================
   3D Mini Map Viewer Panel
   ============================================ */
.bth-minimap-viewer {
  pointer-events: auto;
  position: absolute;
  bottom: 150px;
  left: 50%;
  transform: translateX(-50%) translateY(20px) scale(0.92);
  width: 640px;
  max-width: calc(100vw - 24px);
  height: 460px;
  max-height: calc(100vh - 160px);
  background: rgba(10, 17, 36, 0.95);
  backdrop-filter: blur(24px);
  -webkit-backdrop-filter: blur(24px);
  border: 1.5px solid rgba(56, 189, 248, 0.35);
  border-radius: 22px;
  overflow: hidden;
  box-shadow:
    0 28px 70px rgba(0, 0, 0, 0.7),
    0 0 0 1px rgba(255, 255, 255, 0.05),
    inset 0 1px 0 rgba(255, 255, 255, 0.1);
  opacity: 0;
  visibility: hidden;
  transition: all 0.4s cubic-bezier(0.16, 1, 0.3, 1);
  display: flex;
  flex-direction: column;
  z-index: 10000;
}

.bth-minimap-viewer.is-visible {
  opacity: 1;
  visibility: visible;
  transform: translateX(-50%) translateY(0) scale(1);
}

/* Header */
.bth-minimap-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 12px 18px;
  border-bottom: 1px solid rgba(255, 255, 255, 0.08);
  background: rgba(15, 23, 42, 0.65);
  flex-shrink: 0;
}

.bth-minimap-title {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 0.85rem;
  font-weight: 700;
  color: #ffffff;
  letter-spacing: -0.01em;
}

.bth-minimap-title svg {
  color: #48c9b0;
  flex-shrink: 0;
}

.bth-minimap-count {
  font-size: 0.7rem;
  font-weight: 600;
  background: rgba(72, 201, 176, 0.18);
  color: #6ee7b7;
  border: 1px solid rgba(72, 201, 176, 0.35);
  padding: 2px 10px;
  border-radius: 12px;
}

/* Controls (Zoom In/Out, Reset) */
.bth-minimap-controls {
  display: flex;
  align-items: center;
  gap: 6px;
}

.bth-minimap-ctrl-btn {
  background: rgba(255, 255, 255, 0.08);
  border: 1px solid rgba(255, 255, 255, 0.14);
  color: #94a3b8;
  width: 32px;
  height: 32px;
  border-radius: 9px;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: all 0.2s cubic-bezier(0.16, 1, 0.3, 1);
}

.bth-minimap-ctrl-btn:hover {
  background: rgba(72, 201, 176, 0.25);
  border-color: rgba(72, 201, 176, 0.5);
  color: #ffffff;
  transform: translateY(-1px);
}

/* 3D Canvas Area */
.bth-minimap-canvas {
  flex: 1;
  position: relative;
  overflow: hidden;
  cursor: grab;
  background: #0a1124;
  min-height: 320px;
  width: 100%;
}

.bth-minimap-canvas:active {
  cursor: grabbing;
}

.bth-minimap-canvas canvas {
  display: block;
  width: 100% !important;
  height: 100% !important;
  outline: none;
}

/* Floating Tooltip Label */
.bth-minimap-label {
  position: absolute;
  display: none;
  background: rgba(10, 17, 36, 0.94);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  color: #ffffff;
  padding: 8px 14px;
  border-radius: 10px;
  font-size: 0.78rem;
  font-weight: 600;
  white-space: nowrap;
  pointer-events: none;
  z-index: 100;
  border: 1.5px solid rgba(72, 201, 176, 0.4);
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.5);
  transition: opacity 0.15s ease;
}

/* Footer Instructions */
.bth-minimap-footer {
  padding: 8px 18px;
  border-top: 1px solid rgba(255, 255, 255, 0.06);
  background: rgba(10, 17, 36, 0.75);
  text-align: center;
  flex-shrink: 0;
}

.bth-minimap-footer span {
  font-size: 0.7rem;
  color: #94a3b8;
  font-weight: 500;
}

/* ============================================
   Responsive (Mobile & Tablet)
   ============================================ */
@media (max-width: 600px) {
  .bth-minimap-viewer {
    width: calc(100vw - 20px);
    height: 320px;
    bottom: 86px;
    border-radius: 18px;
  }

  .bth-minimap-toggle {
    width: 52px;
    height: 52px;
    bottom: 20px;
    border-radius: 16px;
  }

  .bth-minimap-toggle svg {
    width: 22px;
    height: 22px;
  }

  .bth-minimap-footer {
    display: none;
  }
}

@media (max-width: 400px) {
  .bth-minimap-viewer {
    height: 280px;
  }
}

/* ============================================
   Pulse Animation for Toggle Button
   ============================================ */
@keyframes bth-minimap-pulse {
  0%, 100% {
    box-shadow:
      0 10px 32px rgba(0, 0, 0, 0.5),
      0 0 16px rgba(72, 201, 176, 0.15);
  }
  50% {
    box-shadow:
      0 10px 32px rgba(0, 0, 0, 0.5),
      0 0 26px rgba(72, 201, 176, 0.35);
  }
}

.bth-minimap-toggle:not(.is-active) {
  animation: bth-minimap-pulse 3s ease-in-out infinite;
}
