/*
  itsdenys.com hall: the timeline map poster and its zoom viewer. As of Nov 23 2026.
  Every selector starts with #mapview or .hallmap so nothing leaks into the hall.
*/

/* ---------- the poster on the left wall ---------- */
.hallmap-poster {
  position: relative;
  width: 100%;
  height: 100%;
  overflow: hidden;
  background: #EAD2A6;
  pointer-events: none;
}
.hallmap-poster svg {
  display: block;
  width: 100%;
  height: 100%;
  max-width: none;
}
/* bolder trail so it reads from far down the hall */
.hallmap-poster .hallmap-road-case { stroke-width: 30px; }
.hallmap-poster .hallmap-road { stroke-width: 20px; }
.hallmap-poster .hallmap-road-mid { display: none; }
.hallmap-poster .hallmap-road-ahead { stroke-width: 9px; }
.hallmap-poster .hallmap-pulse,
.hallmap-poster .hallmap-ring { display: none; }

/* ---------- the viewer ---------- */
#mapview {
  position: absolute;
  top: 0; right: 0; bottom: 0; left: 0;
  z-index: 12;
  overflow: hidden;
  font-family: "Segoe UI", system-ui, -apple-system, Arial, sans-serif;
  color: #2A1A0E;
  outline: none;
  -webkit-user-select: none;
  user-select: none;
  -webkit-tap-highlight-color: transparent;
}
#mapview.hallmap-fixed {
  position: fixed;
  z-index: 1000;
}
#mapview .hallmap-shade {
  position: absolute;
  top: 0; right: 0; bottom: 0; left: 0;
  background: radial-gradient(ellipse at center, rgba(59, 38, 22, 0.55) 0%, rgba(42, 26, 14, 0.8) 100%);
}
#mapview .hallmap-port {
  position: absolute;
  top: 0; right: 0; bottom: 0; left: 0;
  overflow: hidden;
  overflow: clip;
  touch-action: none;
  cursor: grab;
  outline: none;
}
#mapview .hallmap-port.is-dragging { cursor: grabbing; }
#mapview .hallmap-port:focus-visible {
  box-shadow: inset 0 0 0 4px #E8A83A, inset 0 0 0 6px #2A1A0E;
}
#mapview .hallmap-svg {
  position: absolute;
  left: 0;
  top: 0;
  display: block;
  max-width: none;
  max-height: none;
  transform-origin: 0 0;
  will-change: transform;
  background: #F6E7C8;
  border-radius: 6px;
  box-shadow: 0 0 0 3px #3B2616, 0 18px 50px rgba(20, 10, 4, 0.55);
}

/* stops: hover and keyboard focus light up a honey ring */
#mapview .hallmap-stop { cursor: pointer; outline: none; }
#mapview .hallmap-ring { transition: opacity 0.15s ease; }
#mapview .hallmap-stop:hover .hallmap-ring,
#mapview .hallmap-stop:focus .hallmap-ring { opacity: 1; }
#mapview .hallmap-stop:hover .hallmap-plate,
#mapview .hallmap-stop:focus .hallmap-plate { fill: #FCE3A6; fill-opacity: 1; stroke: #C77F1A; stroke-width: 3px; }
#mapview .hallmap-stop:hover .hallmap-badge,
#mapview .hallmap-stop:focus .hallmap-badge { stroke: #C77F1A; }
#mapview .hallmap-stop:focus:not(:focus-visible) .hallmap-plate { stroke-width: 2px; }
#mapview .hallmap-stop:focus-visible .hallmap-plate { stroke: #2A1A0E; stroke-width: 4px; }

#mapview .hallmap-pulse {
  transform-box: fill-box;
  transform-origin: center;
  animation: hallmap-pulse 1.8s ease-out infinite;
}
@keyframes hallmap-pulse {
  0% { transform: scale(1); opacity: 0.9; }
  100% { transform: scale(2.3); opacity: 0; }
}

/* tools */
#mapview .hallmap-tools {
  position: absolute;
  top: 12px;
  right: 12px;
  z-index: 2;
  display: flex;
  flex-wrap: wrap;
  justify-content: flex-end;
  gap: 8px;
  max-width: calc(100% - 24px);
}
#mapview .hallmap-btn {
  min-width: 44px;
  min-height: 44px;
  margin: 0;
  padding: 0 14px;
  background: #FFF6E0;
  color: #2A1A0E;
  border: 2px solid #2A1A0E;
  border-radius: 4px;
  box-shadow: 3px 3px 0 #2A1A0E;
  font-family: Bahnschrift, "Arial Narrow", "Segoe UI", Arial, sans-serif;
  font-weight: 700;
  font-size: 16px;
  line-height: 1;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  cursor: pointer;
}
#mapview .hallmap-btn[data-act="in"],
#mapview .hallmap-btn[data-act="out"] { font-size: 22px; padding: 0 12px; }
#mapview .hallmap-btn:hover { background: #F6E7C8; }
#mapview .hallmap-btn:active { transform: translate(2px, 2px); box-shadow: 1px 1px 0 #2A1A0E; }
#mapview .hallmap-btn:focus { outline: none; }
#mapview .hallmap-btn:focus-visible {
  outline: 3px solid #E8A83A;
  outline-offset: 3px;
}
#mapview .hallmap-close { background: #E8A83A; }
#mapview .hallmap-close:hover { background: #F2BC5A; }

#mapview .hallmap-hint {
  position: absolute;
  left: 12px;
  bottom: 12px;
  z-index: 2;
  margin: 0;
  max-width: calc(100% - 24px);
  padding: 8px 12px;
  background: #FFF6E0;
  color: #3B2616;
  border: 2px solid #2A1A0E;
  border-radius: 4px;
  box-shadow: 3px 3px 0 #2A1A0E;
  font-family: Bahnschrift, "Arial Narrow", "Segoe UI", Arial, sans-serif;
  font-size: 13px;
  line-height: 1.35;
  pointer-events: none;
}

@media (max-width: 520px) {
  #mapview .hallmap-tools { top: 8px; right: 8px; gap: 6px; }
  #mapview .hallmap-hint { left: 8px; bottom: 8px; font-size: 12px; }
}

@media (prefers-reduced-motion: reduce) {
  #mapview .hallmap-pulse { animation: none; opacity: 0; }
  #mapview .hallmap-ring,
  #mapview .hallmap-btn { transition: none; }
}
