.minimap-container {
  position: absolute;
  z-index: 9999;
  transition:
    width 0.4s cubic-bezier(0.2, 0.8, 0.2, 1),
    height 0.4s cubic-bezier(0.2, 0.8, 0.2, 1),
    opacity 0.3s ease,
    transform 0.3s ease,
    box-shadow 0.3s ease;
  width: 250px;
  height: 250px;
}

.minimap-bottom-left {
  bottom: 80px;
  left: 20px;
}
.minimap-bottom-right {
  bottom: 80px;
  right: 20px;
}
.minimap-top-left {
  top: 70px;
  left: 20px;
}
.minimap-top-right {
  top: 70px;
  right: 20px;
}
/* No title bar on the page and no round buttons in its place (a tour whose top bar is only a phone's, under the Multi Menu): nothing
   to keep 70px clear for, so the floor plan sits 20px under the top, or under the Multi Menu (--menu-bar-h, 0 without it). It hung
   50px lower than the corner's other things (Ben, 2026-10-30) */
body:not(:has(#topBar)):not(:has(#standaloneControls)) .minimap-top-left,
body:not(:has(#topBar)):not(:has(#standaloneControls)) .minimap-top-right {
  top: calc(20px + var(--menu-bar-h, 0px));
}

.minimap-image-wrapper {
  position: relative;
  width: 100%;
  height: 100%;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 12px;
  overflow: hidden;
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.25);
  background: rgba(255, 255, 255, 0.95);
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
}

.minimap-container.has-multiple-floorplans.minimap-top-left .minimap-image-wrapper,
.minimap-container.has-multiple-floorplans.minimap-top-right .minimap-image-wrapper {
  box-sizing: border-box;
  padding-top: 52px;
}

.minimap-container.has-multiple-floorplans.minimap-bottom-left .minimap-image-wrapper,
.minimap-container.has-multiple-floorplans.minimap-bottom-right .minimap-image-wrapper {
  box-sizing: border-box;
  padding-bottom: 52px;
}

.minimap-resizable {
  min-width: 150px;
  min-height: 150px;
  max-width: 85vw;
  max-height: 85vh;
}

.minimap-collapsed {
  width: auto !important;
  height: auto !important;
  min-width: 0 !important;
  min-height: 0 !important;
}

.minimap-resizer {
  position: absolute;
  width: 36px;
  height: 36px;
  z-index: 1000;
  display: flex;
  justify-content: center;
  align-items: center;
  color: rgba(0, 0, 0, 0.4);
  transition: all 0.2s ease;
}
.minimap-collapsed .minimap-resizer {
  display: none;
}
.minimap-resizer:hover {
  color: rgba(0, 0, 0, 0.8);
}

.minimap-resize-icon {
  width: 100%;
  height: 100%;
}

.minimap-top-left .minimap-resizer {
  bottom: 2px;
  right: 2px;
  cursor: nwse-resize;
}
.minimap-bottom-left .minimap-resizer {
  top: 2px;
  right: 2px;
  cursor: nesw-resize;
}
.minimap-top-right .minimap-resizer {
  bottom: 2px;
  left: 2px;
  cursor: nesw-resize;
}
.minimap-bottom-right .minimap-resizer {
  top: 2px;
  left: 2px;
  cursor: nwse-resize;
}

.minimap-image-wrapper img {
  width: 100%;
  height: 100%;
  object-fit: contain;
  pointer-events: none;
  display: block;
}

.minimap-pin {
  overflow: visible !important;
  position: absolute;
  /* bigger, with a dark ring round the white one, so a pin stands out on a busy plan or a street map (Ben, 2026-10-30: "they aren't very visible") */
  width: 18px;
  height: 18px;
  /* the tour's highlight colour (the palette, docs/colour-palette-plan.md); indigo on a page made before it */
  background: var(--pal-accent, #6366f1);
  border: 3px solid #ffffff;
  box-sizing: border-box;
  border-radius: 50%;
  transform: translate(-50%, -50%);
  cursor: pointer;
  box-shadow:
    0 0 0 1.5px rgba(15, 23, 42, 0.55),
    0 2px 8px rgba(0, 0, 0, 0.45);
  transition: all 0.3s cubic-bezier(0.175, 0.885, 0.32, 1.275);
}

.minimap-fullscreen-mode .minimap-pin {
  width: 24px;
  height: 24px;
}

.minimap-pin:hover {
  transform: translate(-50%, -50%) scale(1.3);
  background: color-mix(in srgb, var(--pal-accent, #6366f1) 85%, #000);
  z-index: 10;
}

.minimap-pin.active {
  background: #ef4444; /* Red 500 */
  border-color: #ffffff;
  transform: translate(-50%, -50%) scale(1.4);
  box-shadow: 0 0 0 3px rgba(239, 68, 68, 0.3);
  z-index: 20;
}

/* Animated Pulse for Active Hotspot */
.minimap-pin-inner {
  position: absolute;
  top: 50%;
  left: 50%;
  width: 40%;
  height: 40%;
  background: rgba(255, 255, 255, 0.85);
  border-radius: 50%;
  transform: translate(-50%, -50%);
}

.minimap-pin.active .minimap-pin-inner {
  animation: minimap-pulse 1.5s infinite alternate;
}

@keyframes minimap-pulse {
  0% {
    transform: translate(-50%, -50%) scale(0.8);
    opacity: 0.8;
  }
  100% {
    transform: translate(-50%, -50%) scale(1.5);
    opacity: 0.2;
  }
}

.minimap-toggle {
  position: absolute;
  top: 8px;
  right: 8px;
  background: rgba(0, 0, 0, 0.6);
  backdrop-filter: blur(4px);
  color: white;
  border: none;
  border-radius: 6px;
  padding: 6px;
  cursor: pointer;
  z-index: 10;
  transition: all 0.2s;
  display: flex;
  align-items: center;
  justify-content: center;
}

.minimap-toggle:hover {
  background: rgba(0, 0, 0, 0.8);
}

.minimap-collapsed .minimap-image-wrapper {
  display: none;
}

.minimap-collapsed .minimap-toggle {
  position: relative;
  top: 0;
  right: 0;
  padding: 10px 14px;
  /* the tour's own panel colour, words and blur, like the open plan and every other bar (it was white on every tour, whatever its colours:
     Ben, 2026-10-11); white stays the fallback for a page that sets no colours */
  background: var(--primary-bg, rgba(255, 255, 255, 0.95));
  color: var(--text-main, #1f2937);
  border: 1px solid var(--glass-border, transparent);
  backdrop-filter: var(--glass-blur, blur(4px));
  -webkit-backdrop-filter: var(--glass-blur, blur(4px));
  font-weight: 600;
  border-radius: 12px;
  box-shadow: 0 4px 15px rgba(0, 0, 0, 0.1);
  font-family: inherit;
  font-size: 13px;
  display: flex;
  align-items: center;
  gap: 6px;
}

.minimap-collapsed .minimap-toggle:hover {
  /* no page sets --primary-bg-hover, so a hover turned the button white under the tour's own (often white) words: keep the tour's panel colour, a little brighter */
  background: var(--primary-bg-hover, var(--primary-bg, rgba(255, 255, 255, 1)));
  filter: brightness(1.12);
}

.minimap-fullscreen-btn {
  position: absolute;
  top: 8px;
  left: 8px;
  background: rgba(0, 0, 0, 0.6);
  backdrop-filter: blur(4px);
  -webkit-backdrop-filter: blur(4px);
  color: white;
  border: none;
  border-radius: 6px;
  padding: 6px;
  cursor: pointer;
  z-index: 50;
  transition: all 0.2s ease;
  display: flex;
  align-items: center;
  justify-content: center;
}

.minimap-fullscreen-btn:hover {
  background: rgba(0, 0, 0, 0.8);
  transform: scale(1.05);
}

.minimap-collapsed .minimap-fullscreen-btn {
  display: none;
}

.minimap-selector-wrapper {
  position: absolute;
  left: 50%;
  transform: translateX(-50%);
  z-index: 50;
  max-width: calc(100% - 30px);
}

.minimap-selector-wrapper.pos-top {
  top: 12px;
}

.minimap-selector-wrapper.pos-bottom {
  bottom: 12px;
}

.minimap-selector {
  background: var(--primary-bg, rgba(20, 20, 20, 0.75));
  border: 1px solid var(--glass-border, rgba(255, 255, 255, 0.15));
  border-radius: 12px;
  padding: 10px 32px 10px 16px;
  font-size: 15px;
  font-weight: 500;
  font-family: inherit;
  color: white;
  cursor: pointer;
  backdrop-filter: var(--glass-blur, blur(16px));
  -webkit-backdrop-filter: var(--glass-blur, blur(16px));
  box-shadow: 0 8px 32px 0 rgba(0, 0, 0, 0.3);
  outline: none;
  -webkit-appearance: none;
  -moz-appearance: none;
  appearance: none;
  background-image: url('data:image/svg+xml;charset=US-ASCII,%3Csvg%20xmlns%3D%22http%3A%2F%2Fwww.w3.org%2F2000%2Fsvg%22%20width%3D%22292.4%22%20height%3D%22292.4%22%3E%3Cpath%20fill%3D%22%23FFFFFF%22%20d%3D%22M287%2069.4a17.6%2017.6%200%200%200-13-5.4H18.4c-5%200-9.3%201.8-12.9%205.4A17.6%2017.6%200%200%200%200%2082.2c0%205%201.8%209.3%205.4%2012.9l128%20127.9c3.6%203.6%207.8%205.4%2012.8%205.4s9.2-1.8%2012.8-5.4L287%2095c3.5-3.5%205.4-7.8%205.4-12.8%200-5-1.9-9.2-5.5-12.8z%22%2F%3E%3C%2Fsvg%3E');
  background-repeat: no-repeat;
  background-position: right 14px top 50%;
  background-size: 10px auto;
  width: 100%;
  transition: all 0.2s ease;
}

.minimap-selector:hover {
  background: var(--primary-bg-hover, rgba(50, 50, 50, 0.85));
}

.minimap-selector option {
  background: #1f2937;
  color: white;
}

.minimap-collapsed .minimap-selector-wrapper {
  display: none;
}

/* Dynamic Interactive Radar Overlay */
.minimap-radar {
  position: absolute;
  top: 50%;
  left: 50%;
  width: 100px;
  height: 100px;
  margin-top: -50px;
  margin-left: -50px;
  pointer-events: none;
  z-index: 10;
  transition: opacity 0.3s ease;
  /* Transform rotation driven by JS via style attribute */
}

.minimap-radar .radar-cone {
  pointer-events: none;
}

.minimap-radar .radar-cone {
  pointer-events: auto;
  cursor: grab;
}
.minimap-radar .radar-cone:active {
  cursor: grabbing;
}
@media (max-width: 768px) { .minimap-container { display: none !important; } }

/* the street map (Design > Floorplan minimap > Show: Map or Both), drawn in the same box as the plan */
.minimap-geo {
  position: absolute;
  inset: 0;
  display: none;
  border-radius: inherit;
  overflow: hidden;
}
.minimap-view-map .minimap-geo {
  display: block;
}
.minimap-view-map .minimap-map-scaler,
.minimap-view-map .minimap-selector-wrapper {
  display: none;
}
.minimap-container.has-multiple-floorplans.minimap-view-map .minimap-image-wrapper {
  padding: 0;
}
.minimap-geo .leaflet-control-attribution {
  font-size: 9px;
  line-height: 1.3;
}
.minimap-geo-marker {
  background: none;
  border: 0;
}
.minimap-geo-pin {
  left: 0;
  top: 0;
}

/* the Plan / Map switch, top middle, between the corner buttons */
.minimap-views {
  position: absolute;
  top: 8px;
  left: 50%;
  transform: translateX(-50%);
  z-index: 1001;
  display: flex;
  gap: 2px;
  padding: 2px;
  border-radius: 999px;
  background: rgba(0, 0, 0, 0.6);
  backdrop-filter: blur(4px);
  -webkit-backdrop-filter: blur(4px);
}
.minimap-views button {
  border: 0;
  border-radius: 999px;
  padding: 4px 12px;
  background: transparent;
  color: #fff;
  font: 600 12px/1.2 inherit;
  cursor: pointer;
}
.minimap-views button[aria-pressed='true'] {
  background: #fff;
  color: #0b1220;
}
.minimap-views button:focus-visible {
  outline: 2px solid #fff;
  outline-offset: 2px;
}
.minimap-collapsed .minimap-views {
  display: none;
}
/* with the switch at the top, the plans' list (a tour with several) is at the bottom */
.minimap-container.minimap-has-views.has-multiple-floorplans.minimap-top-left .minimap-image-wrapper,
.minimap-container.minimap-has-views.has-multiple-floorplans.minimap-top-right .minimap-image-wrapper {
  padding-top: 0;
  padding-bottom: 52px;
}
.minimap-container.minimap-has-views.has-multiple-floorplans.minimap-view-map .minimap-image-wrapper {
  padding: 0;
}
