/* ============================================================
   MINIMAP CSS v4 — BellaVita Cabanatuan
   
   VISIBILITY ARCHITECTURE:
   The class  .mm-hidden  is the ONLY mechanism for hiding.
   It uses !important on transform + opacity to guarantee it
   wins over every other rule including base #minimap-container.
   The transition is defined on the BASE container rule so that
   adding/removing .mm-hidden triggers a smooth slide animation.
   ============================================================ */

.minimap-overlay {
  position: fixed;
  top: 0;
  left: 0;
  width: 100vw;
  height: 100vh;
  background: rgba(255, 255, 255, 0.45);
  backdrop-filter: blur(3px);
  z-index: 9998;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.55s cubic-bezier(0.22, 1, 0.36, 1);
}
.minimap-overlay.active {
  opacity: 1;
  pointer-events: all;
}

/* ─────────────────────────────────────────────────────────
   BASE CONTAINER  (visible, collapsed, right edge)
   The transition here handles BOTH the show AND hide animation.
   When .mm-hidden is added, transform/opacity animate to hidden.
   When .mm-hidden is removed, they animate back to visible.
───────────────────────────────────────────────────────── */
#minimap-container {
  position: fixed;
  top: 50%;
  right: 0;
  transform: translateY(-50%);
  opacity: 1;
  background: #ffffff;
  border-radius: 14px 0 0 14px;
  z-index: 9999;
  overflow: hidden;
  box-shadow: -4px 0 20px rgba(0, 0, 0, 0.16);
  border: 1px solid rgba(0, 0, 0, 0.07);
  border-right: none;
  touch-action: none; /* prevent browser scroll from stealing pointer events */
  user-select: none;
  /* Transition covers show/hide slide. Expand/collapse use JS inline transitions. */
  transition:
    transform 0.4s cubic-bezier(0.4, 0, 0.2, 1),
    opacity 0.35s ease;
}

/* ─────────────────────────────────────────────────────────
   HIDDEN STATE  — added/removed ONLY by JS hideMinimap / showMinimap
   The base container has the transition, so adding this class
   triggers a smooth slide-out to the right + fade out.
   Removing the class triggers a smooth slide-in + fade in.
───────────────────────────────────────────────────────── */
#minimap-container.mm-hidden {
  transform: translateY(-50%) translateX(110%) !important;
  opacity: 0 !important;
  pointer-events: none !important;
}

/* ─────────────────────────────────────────────────────────
   COLLAPSED  (small panel)
───────────────────────────────────────────────────────── */
#minimap-container.minimap-collapsed {
  width: 250px;
  height: 430px;
  cursor: default;
}

/* ─────────────────────────────────────────────────────────
   FULLSCREEN
   transform:none !important overrides base AND mm-hidden
   (safety net — in practice we never expand when hidden)
───────────────────────────────────────────────────────── */
#minimap-container.minimap-fullscreen {
  position: fixed !important;
  top: 0 !important;
  left: 0 !important;
  right: 0 !important;
  bottom: 0 !important;
  width: 100vw !important;
  height: 100vh !important;
  max-width: none;
  max-height: none;
  border-radius: 0 !important;
  border: none !important;
  box-shadow: none !important;
  background: #fff;
  transform: none !important;
  opacity: 1 !important;
  cursor: default;
}

/* ─────────────────────────────────────────────────────────
   DISMISSING STATE — applied by JS during the close-arrow
   slide-out animation only. Overrides the transform:none
   !important above so the panel can slide off to the right.
   Removed by JS once the animation completes (~460ms).
───────────────────────────────────────────────────────── */
#minimap-container.minimap-fullscreen.minimap-dismissing {
  transform: translateX(110vw) !important;
}

/* ─────────────────────────────────────────────────────────
   MAP WRAPPER
───────────────────────────────────────────────────────── */
#minimap-map-wrapper {
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  transform-origin: center center;
  overflow: hidden;
}
#minimap-container.minimap-collapsed #minimap-map-wrapper {
  bottom: 58px;
}
#minimap-container.minimap-fullscreen #minimap-map-wrapper {
  bottom: 64px;
}

/* ─────────────────────────────────────────────────────────
   MAP IMAGE
───────────────────────────────────────────────────────── */
#minimap-image {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  object-fit: contain;
  object-position: center center;
  display: block;
  transform: none !important;
  cursor: default;
  user-select: none;
  -webkit-user-drag: none;
  pointer-events: none;
  filter: drop-shadow(0 0 25px rgba(0, 0, 0, 0.5));
}

/* ─────────────────────────────────────────────────────────
   DOTS
───────────────────────────────────────────────────────── */
#minimap-dots {
  position: absolute;
  pointer-events: none;
  transform: none !important;
}

.minimap-dot {
  position: absolute;
  width: 24px;
  height: 24px;
  transform: translate(-50%, -50%);
  cursor: pointer;
  pointer-events: all;
  z-index: 50;
  overflow: visible;
  background: transparent;
}

.minimap-fov-wrapper {
  position: absolute;
  width: 60px;
  height: 60px;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%) rotate(0deg);
  opacity: 0;
  pointer-events: none;
  will-change: transform;
  transition: opacity 0.25s ease;
}
.minimap-dot.current .minimap-fov-wrapper {
  opacity: 1;
}
#minimap-container.minimap-fullscreen .minimap-fov-wrapper {
  width: 60px;
  height: 60px;
}

.minimap-fov-fan {
  width: 100%;
  height: 100%;
  overflow: visible;
}
.minimap-fov-path {
  fill: #ff6b00;
  stroke: #e65100;
  stroke-width: 1.5;
  stroke-linejoin: round;
  opacity: 0.85;
}

.minimap-dot-core {
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  width: 14px !important;
  height: 14px !important;
  background: #ff6b00;
  border: 2px solid #fff;
  border-radius: 50%;
  pointer-events: none;
  z-index: 12;
  box-shadow: 0 1px 5px rgba(0, 0, 0, 0.4);
  transition: box-shadow 0.2s ease;
}
.minimap-dot.current .minimap-dot-core {
  box-shadow:
    0 0 0 3px rgba(255, 107, 0, 0.3),
    0 0 10px rgba(255, 107, 0, 0.55),
    0 1px 5px rgba(0, 0, 0, 0.4);
  animation: coreGlow 2s ease-in-out infinite;
}
@keyframes coreGlow {
  0%,
  100% {
    box-shadow:
      0 0 0 3px rgba(255, 107, 0, 0.3),
      0 0 10px rgba(255, 107, 0, 0.55),
      0 1px 5px rgba(0, 0, 0, 0.4);
  }
  50% {
    box-shadow:
      0 0 0 6px rgba(255, 107, 0, 0.15),
      0 0 18px rgba(255, 107, 0, 0.35),
      0 1px 5px rgba(0, 0, 0, 0.4);
  }
}

.minimap-tooltip {
  position: absolute;
  bottom: calc(100% + 4px);
  left: 50%;
  transform: translateX(-50%);
  background: rgba(18, 18, 18, 0.92);
  color: #fff;
  padding: 4px 10px;
  border-radius: 5px;
  font-size: 11px;
  font-weight: 600;
  white-space: nowrap;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.2s ease;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.2);
  z-index: 1000;
}
.minimap-tooltip::after {
  content: "";
  position: absolute;
  top: 100%;
  left: 50%;
  transform: translateX(-50%);
  border: 4px solid transparent;
  border-top-color: rgba(18, 18, 18, 0.92);
}
.minimap-dot:hover .minimap-tooltip {
  opacity: 1;
}
#minimap-container.minimap-fullscreen .minimap-tooltip {
  font-size: 13px;
  padding: 6px 13px;
}

/* ─────────────────────────────────────────────────────────
   COLLAPSED BOTTOM CONTROLS
───────────────────────────────────────────────────────── */
.minimap-controls {
  position: absolute;
  bottom: 0;
  left: 0;
  right: 0;
  height: 58px;
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 6px;
  padding: 0 10px;
  background: transparent;
  border-top: none;
  z-index: 100;
  cursor: default;
}
#minimap-container.minimap-fullscreen .minimap-controls {
  display: none;
}

#minimap-expand-btn {
  background: linear-gradient(135deg, #ff6b00, #e65100);
  color: #fff;
  border: none;
  padding: 7px 14px;
  border-radius: 7px;
  cursor: pointer;
  font-size: 11px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.6px;
  transition: all 0.22s ease;
  box-shadow: 0 2px 8px rgba(255, 107, 0, 0.3);
  white-space: nowrap;
  flex-shrink: 0;
}
#minimap-expand-btn:hover {
  background: linear-gradient(135deg, #ff8533, #ff6b00);
  transform: translateY(-2px);
  box-shadow: 0 4px 14px rgba(255, 107, 0, 0.45);
}
#minimap-expand-btn:active {
  transform: translateY(0);
}

.minimap-zoom-controls {
  display: flex;
  gap: 5px;
  flex-shrink: 0;
}
.minimap-zoom-btn {
  width: 30px;
  height: 30px;
  background: #fff;
  border: 2px solid rgba(255, 107, 0, 0.4);
  border-radius: 7px;
  cursor: pointer;
  font-size: 16px;
  font-weight: 800;
  color: #ff6b00;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: all 0.2s ease;
  box-shadow: 0 2px 5px rgba(0, 0, 0, 0.07);
  line-height: 1;
}
.minimap-zoom-btn:hover {
  background: linear-gradient(135deg, #ff6b00, #e65100);
  color: #fff;
  border-color: transparent;
  transform: translateY(-2px);
}
.minimap-zoom-btn:active {
  transform: translateY(0);
}

/* ─────────────────────────────────────────────────────────
   FULLSCREEN BOTTOM BAR
───────────────────────────────────────────────────────── */
.minimap-fullscreen-bar {
  display: none;
  position: fixed;
  bottom: 0;
  left: 0;
  right: 0;
  height: 64px;
  background: rgba(255, 255, 255, 0.92);
  border-top: 1px solid rgba(0, 0, 0, 0.08);
  align-items: center;
  justify-content: flex-end;
  gap: 8px;
  padding: 0 20px;
  z-index: 10001;
  backdrop-filter: blur(6px);
  cursor: default;
}
#minimap-container.minimap-fullscreen .minimap-fullscreen-bar {
  display: flex;
}

.minimap-fs-scene-label {
  flex: 1;
  text-align: left;
  color: #333;
  font-size: 13px;
  font-weight: 600;
  pointer-events: none;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.minimap-fs-zoom-controls {
  display: flex;
  gap: 6px;
  flex-shrink: 0;
}
.minimap-fs-zoom-btn {
  width: 36px;
  height: 36px;
  background: #fff;
  border: 2px solid rgba(255, 107, 0, 0.4);
  border-radius: 8px;
  cursor: pointer;
  font-size: 18px;
  font-weight: 800;
  color: #ff6b00;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: all 0.2s ease;
  box-shadow: 0 2px 6px rgba(0, 0, 0, 0.07);
}
.minimap-fs-zoom-btn:hover {
  background: linear-gradient(135deg, #ff6b00, #e65100);
  color: #fff;
  border-color: transparent;
  transform: translateY(-2px);
}
.minimap-fs-zoom-btn:active {
  transform: translateY(0);
}

#minimap-reset-btn {
  background: #fff;
  color: #ff6b00;
  border: 2px solid rgba(255, 107, 0, 0.4);
  padding: 9px 16px;
  border-radius: 8px;
  cursor: pointer;
  font-size: 11px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.6px;
  transition: all 0.22s ease;
  box-shadow: 0 2px 6px rgba(0, 0, 0, 0.07);
  white-space: nowrap;
  flex-shrink: 0;
}
#minimap-reset-btn:hover {
  background: linear-gradient(135deg, #ff6b00, #e65100);
  color: #fff;
  border-color: transparent;
  transform: translateY(-2px);
}
#minimap-reset-btn:active {
  transform: translateY(0);
}

#minimap-minimize-btn {
  background: linear-gradient(135deg, #ff6b00, #e65100);
  color: #fff;
  border: none;
  padding: 9px 22px;
  border-radius: 8px;
  cursor: pointer;
  font-size: 12px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.7px;
  transition: all 0.22s ease;
  box-shadow: 0 2px 10px rgba(255, 107, 0, 0.3);
  white-space: nowrap;
  flex-shrink: 0;
}
#minimap-minimize-btn:hover {
  background: linear-gradient(135deg, #ff8533, #ff6b00);
  transform: translateY(-2px);
}
#minimap-minimize-btn:active {
  transform: translateY(0);
}

.minimap-close-arrow {
  position: fixed;
  top: 6px;
  right: 6px;
  width: 42px;
  height: 42px;
  background: linear-gradient(135deg, #ff6b00, #e65100);
  border: none;
  border-radius: 50%;
  cursor: pointer;
  display: none;
  align-items: center;
  justify-content: center;
  z-index: 10002;
  box-shadow: 0 3px 10px rgba(255, 107, 0, 0.3);
  transition: all 0.28s cubic-bezier(0.4, 0, 0.2, 1);
  color: #fff;
  font-size: 18px;
}
#minimap-container.minimap-fullscreen .minimap-close-arrow {
  display: flex;
}
.minimap-close-arrow:hover {
  transform: scale(1.1);
}
.minimap-close-arrow:active {
  transform: scale(0.96);
}

.minimap-hide-btn {
  position: absolute;
  top: 6px;
  right: 6px;
  width: 42px;
  height: 42px;
  background: linear-gradient(135deg, #ff6b00, #e65100);
  border: none;
  border-radius: 50%;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 200;
  box-shadow: 0 3px 10px rgba(255, 107, 0, 0.3);
  transition: all 0.28s cubic-bezier(0.4, 0, 0.2, 1);
  color: #fff;
  font-size: 18px;
}
.minimap-hide-btn:hover {
  transform: scale(1.1);
}
.minimap-hide-btn:active {
  transform: scale(0.96);
}
#minimap-container.minimap-fullscreen .minimap-hide-btn {
  display: none;
}

/* ─────────────────────────────────────────────────────────
   SHOW TOGGLE (floating map icon — visible only when hidden)
───────────────────────────────────────────────────────── */
.minimap-show-toggle {
  position: fixed;
  right: 15px;
  top: 50%;
  transform: translateY(-50%);
  width: 55px;
  height: 55px;
  background: linear-gradient(
    135deg,
    rgba(255, 107, 0, 1) 0%,
    rgba(230, 81, 0, 1) 100%
  );
  border: none;
  border-radius: 50%;
  cursor: pointer;
  z-index: 9999;
  display: none;
  align-items: center;
  justify-content: center;
  box-shadow: 0 4px 12px rgba(255, 107, 0, 0.3);
  transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
  opacity: 0;
  pointer-events: none;
}
.minimap-show-toggle.active {
  display: flex;
  opacity: 1;
  pointer-events: all;
  animation: slideInRight 0.4s cubic-bezier(0.4, 0, 0.2, 1);
}
@keyframes slideInRight {
  from {
    transform: translateY(-50%) translateX(80px);
    opacity: 0;
  }
  to {
    transform: translateY(-50%) translateX(0);
    opacity: 1;
  }
}
.minimap-show-toggle img {
  width: 28px;
  height: 28px;
  filter: brightness(0) invert(1) drop-shadow(0 1px 2px rgba(0, 0, 0, 0.18));
}
.minimap-show-toggle:hover {
  background: linear-gradient(
    135deg,
    rgba(255, 133, 51, 0.85) 0%,
    rgba(255, 107, 0, 0.85) 100%
  );
  transform: translateY(-50%) scale(1.05);
  box-shadow: 0 6px 16px rgba(255, 107, 0, 0.4);
}

/* ─────────────────────────────────────────────────────────
   HIDE DURING INTRO
───────────────────────────────────────────────────────── */
body.intro-active #minimap-container,
body.intro-active .minimap-show-toggle {
  display: none !important;
}

/* ═══════════════════════════════════════════════════════════
   TABLET  769px – 1024px
   Slightly smaller than desktop but same right-edge layout.
═══════════════════════════════════════════════════════════ */
@media (min-width: 769px) and (max-width: 1024px) {
  #minimap-container.minimap-collapsed {
    width: 220px;
    height: 400px;
  }
  #minimap-container.minimap-collapsed #minimap-map-wrapper {
    bottom: 54px;
  }
  .minimap-controls {
    height: 54px;
  }
  .minimap-dot-core {
    width: 13px !important;
    height: 13px !important;
  }
  .minimap-fov-wrapper {
    width: 54px;
    height: 54px;
  }
  .minimap-hide-btn {
    width: 38px;
    height: 38px;
  }
  .minimap-show-toggle {
    width: 48px;
    height: 48px;
    right: 12px;
  }
}

/* ═══════════════════════════════════════════════════════════
   MOBILE PORTRAIT  ≤ 768px
   ─────────────────────────────────────────────────────────
   KEY CHANGE: Panel moves from right-edge strip to a WIDE
   bottom-anchored card.  This gives the map image much more
   horizontal space so dots are correctly positioned and easy
   to see and tap.

   Layout:
     • Anchored to bottom-center of screen
     • Width: 92vw  (almost full width)
     • Height: 46vw (keeps a landscape-ish aspect ratio so the
       map image fills it without wasted letterbox space)
     • Border-radius on top corners only (card feel)
     • Slides up from bottom instead of in from right
═══════════════════════════════════════════════════════════ */
@media (max-width: 768px) {
  /* ── Container: right-center (same as desktop) ── */
  #minimap-container {
    top: 50% !important;
    right: 0 !important;
    bottom: auto !important;
    left: auto !important;
    transform: translateY(-50%) !important;
    border-radius: 14px 0 0 14px !important;
    border-right: none !important;
    box-shadow: -4px 0 20px rgba(0, 0, 0, 0.16) !important;
  }

  #minimap-container.minimap-collapsed {
    width: 250px;
    height: 430px;
    min-height: 200px;
    max-height: 80vh;
  }
  #minimap-container.mm-hidden {
    transform: translateY(-50%) translateX(110%) !important;
    opacity: 0 !important;
    pointer-events: none !important;
  }

  /* Map wrapper fills panel minus bottom controls */
  #minimap-container.minimap-collapsed #minimap-map-wrapper {
    bottom: 58px;
  }

  /* Bottom controls bar */
  .minimap-controls {
    height: 58px;
    padding: 0 10px;
    gap: 6px;
    justify-content: flex-end;
  }

  /* Dots — bigger touch targets on mobile, ALL same size */
  .minimap-dot {
    width: 28px;
    height: 28px;
  }
  /* ALL dots same size on mobile — current and non-current identical */
  .minimap-dot-core {
    width: 14px !important;
    height: 14px !important;
    border: 2px solid #fff !important;
  }
  .minimap-dot:not(.current) .minimap-dot-core {
    width: 14px !important;
    height: 14px !important;
    border: 2px solid #fff !important;
  }
  /* No grow/pulse on current dot on mobile — keeps it clean & readable */
  .minimap-dot.current .minimap-dot-core {
    animation: none !important;
    box-shadow: 0 1px 5px rgba(0, 0, 0, 0.4) !important;
    transform: translate(-50%, -50%) !important;
  }
  .minimap-fov-wrapper {
    width: 52px;
    height: 52px;
  }

  /* Tooltip above dot */
  .minimap-tooltip {
    font-size: 11px;
    padding: 4px 10px;
  }

  /* Buttons */
  #minimap-expand-btn {
    font-size: 11px;
    padding: 7px 14px;
  }
  .minimap-zoom-btn {
    width: 30px;
    height: 30px;
    font-size: 16px;
  }
  .minimap-hide-btn {
    width: 36px;
    height: 36px;
    font-size: 16px;
    /* Reposition to top-right of the card */
    top: 8px;
    right: 8px;
  }
  .minimap-close-arrow {
    width: 36px;
    height: 36px;
    font-size: 15px;
  }

  /* Show toggle: right-center matching sidebar burger style */
  .minimap-show-toggle {
    width: 52px;
    height: 52px;
    right: 12px !important;
    left: auto !important;
    top: 50% !important;
    bottom: auto !important;
    transform: translateY(-50%) !important;
    border-radius: 50% !important;
  }
  .minimap-show-toggle.active {
    animation: slideInRight 0.4s cubic-bezier(0.4, 0, 0.2, 1);
  }
  .minimap-show-toggle:hover {
    transform: translateY(-50%) scale(1.05) !important;
  }

  /* Fullscreen bar */
  .minimap-fullscreen-bar {
    height: 56px;
    padding: 0 14px;
    gap: 6px;
  }
  #minimap-container.minimap-fullscreen #minimap-map-wrapper {
    bottom: 56px;
  }
  .minimap-fs-zoom-btn {
    width: 32px;
    height: 32px;
    font-size: 16px;
  }
  #minimap-minimize-btn {
    padding: 8px 16px;
    font-size: 11px;
  }
  #minimap-reset-btn {
    padding: 8px 10px;
    font-size: 10px;
  }
}

/* ── Small phones ≤ 480px ── */
@media (max-width: 480px) {
  #minimap-container.minimap-collapsed {
    width: 220px;
    height: 380px;
    min-height: 190px;
    max-height: 80vh;
  }
  #minimap-container.minimap-collapsed #minimap-map-wrapper {
    bottom: 50px;
  }
  .minimap-controls {
    height: 46px;
    padding: 0 10px;
  }
  /* ALL dots same size on ≤480px */
  .minimap-dot-core {
    width: 14px !important;
    height: 14px !important;
    border: 2px solid #fff !important;
  }
  .minimap-dot:not(.current) .minimap-dot-core {
    width: 14px !important;
    height: 14px !important;
    border: 2px solid #fff !important;
  }
  .minimap-dot.current .minimap-dot-core {
    animation: none !important;
    box-shadow: 0 1px 5px rgba(0, 0, 0, 0.4) !important;
    transform: translate(-50%, -50%) !important;
  }
  .minimap-fov-wrapper {
    width: 46px;
    height: 46px;
  }
  #minimap-expand-btn {
    font-size: 10px;
    padding: 6px 11px;
  }
  .minimap-zoom-btn {
    width: 28px;
    height: 28px;
    font-size: 15px;
  }
  .minimap-hide-btn {
    width: 32px;
    height: 32px;
    font-size: 14px;
  }
  .minimap-show-toggle {
    width: 48px;
    height: 48px;
    right: 10px !important;
  }
}

/* ── Very small phones ≤ 360px ── */
@media (max-width: 360px) {
  #minimap-container.minimap-collapsed {
    width: 190px;
    height: 340px;
    min-height: 170px;
  }
  #minimap-container.minimap-collapsed #minimap-map-wrapper {
    bottom: 42px;
  }
  .minimap-controls {
    height: 42px;
    padding: 0 8px;
    gap: 5px;
  }
  #minimap-expand-btn {
    font-size: 9px;
    padding: 5px 9px;
  }
  .minimap-zoom-btn {
    width: 26px;
    height: 26px;
    font-size: 14px;
  }
  .minimap-hide-btn {
    width: 30px;
    height: 30px;
    font-size: 13px;
  }
}

/* ═══════════════════════════════════════════════════════════
   LANDSCAPE PHONE  max-height ≤ 500px
   Keep as right-edge strip but use vh so it stays compact.
═══════════════════════════════════════════════════════════ */
@media (max-height: 500px) and (orientation: landscape) {
  /* Revert to right-edge strip in landscape */
  #minimap-container {
    top: 50% !important;
    right: 0 !important;
    bottom: auto !important;
    left: auto !important;
    transform: translateY(-50%) !important;
    border-radius: 14px 0 0 14px !important;
    border-right: none !important;
    box-shadow: -4px 0 20px rgba(0, 0, 0, 0.16) !important;
  }
  #minimap-container.mm-hidden {
    transform: translateY(-50%) translateX(110%) !important;
  }
  #minimap-container.minimap-collapsed {
    width: 160px;
    height: 84vh;
    min-height: unset;
    max-height: unset;
  }
  #minimap-container.minimap-collapsed #minimap-map-wrapper {
    bottom: 44px;
  }
  .minimap-controls {
    height: 44px;
  }
  /* Show toggle back to right side */
  .minimap-show-toggle {
    right: 10px !important;
    left: auto !important;
    bottom: auto !important;
    top: 50% !important;
    transform: translateY(-50%) !important;
    width: 44px;
    height: 44px;
  }
  .minimap-show-toggle.active {
    animation: slideInRight 0.4s cubic-bezier(0.4, 0, 0.2, 1);
  }
  .minimap-show-toggle:hover {
    transform: translateY(-50%) scale(1.07) !important;
  }
  #minimap-expand-btn {
    font-size: 9px;
    padding: 5px 8px;
  }
  .minimap-zoom-btn {
    width: 24px;
    height: 24px;
    font-size: 13px;
  }
  .minimap-dot-core {
    width: 12px !important;
    height: 12px !important;
  }
  .minimap-fov-wrapper {
    width: 40px;
    height: 40px;
  }
}

/* ─────────────────────────────────────────────────────────
   USER-HIDDEN BODY LOCK — the unbreakable visibility guard

   display:none !important cannot be overridden by ANY child
   rule — not by opacity:1 !important, transform:none !important,
   or any other property set on #minimap-container itself.

   This lock is:
   - ADDED by hideMinimap() after the slide-out animation (~450ms)
   - ADDED at init time (map starts hidden)
   - REMOVED ONLY by showMinimap() when user taps the floating toggle

   Result: map stays closed across ALL scene changes, floorplan.js
   showMinimap(true) bypass calls, CSS race conditions, and rAF timing.
   The .minimap-show-toggle is intentionally NOT hidden here —
   it's the only way for the user to get the map back.
───────────────────────────────────────────────────────── */
body.minimap-user-hidden #minimap-container {
  display: none !important;
  pointer-events: none !important;
}

/* ─────────────────────────────────────────────────────────
   FLOOR PLAN SCENE SUPPRESSION
   Added by floorplan.js suppressMinimap() when entering any
   house scene. Completely hides the minimap show-toggle so
   it cannot be opened and overlap the floor plan panel.
   Removed by restoreMinimap() when leaving the house scene.
   Uses display:none !important so it beats .active and any
   other state minimap.js may have set on the toggle.
───────────────────────────────────────────────────────── */
.minimap-show-toggle.minimap-fp-hidden {
  display: none !important;
  pointer-events: none !important;
}
