/* ============================================================
   Canton Fair Hall Map — Standalone Stylesheet
   Phase 2 (English)
   ============================================================ */

/* ---------- Page Shell ---------- */
html, body {
  margin: 0;
  padding: 0;
  background: #f6f6f6;
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto,
    "Helvetica Neue", Arial, sans-serif;
  color: #333;
}

.hall-map-page {
  max-width: 956px;
  margin: 24px auto;
  background: #fff;
  border-radius: 12px;
  box-shadow: 0 4px 24px rgba(0, 0, 0, 0.06);
  overflow: hidden;
}

/* No cursor state anywhere on this page */
.hall-map-page,
.hall-map-page * {
  cursor: default;
}

.hall-map-page__header {
  padding: 18px 24px;
  border-bottom: 1px solid #eee;
  display: flex;
  align-items: baseline;
  justify-content: space-between;
}

.hall-map-page__title {
  margin: 0;
  font-size: 18px;
  font-weight: 700;
  color: #333;
}

.hall-map-page__phase {
  font-size: 13px;
  color: #999;
}

/* ---------- Hall Map Container ---------- */
/* Height fits the content: 20px padding + 600px map + 30px gap + legend */
.hall-map {
  padding: 20px;
  position: relative;
  background: #fff;
  height: 650px;
  box-sizing: border-box;
  display: flex;
  flex-direction: column;
}

/* SVG wrap with English floor-plan background */
.hall-map .svg-wrap.bg-en {
  background-image: url('bg-en.png');
  background-size: cover;
  background-position: 0 0;
  background-repeat: repeat;
}
.hall-map .svg-wrap.bg-zh {
  background-image: url('bg-zh.png');
}

.hall-map .title {
  font-size: 18px;
  text-align: center;
}
.hall-map .title .sup {
  vertical-align: super;
  font-size: 0.8em;
}

/* ---------- SVG Layer ---------- */
.hall-map .svg-wrap {
  width: 800px;
  height: 600px;
  margin: 0 auto;
}

.hall-map .svg-wrap .svg-box {
  display: block;
  width: 100%;
  height: 100%;
  margin: auto;
}

/* SVG paths / texts: hover transition */
.hall-map .svg-wrap .svg-box text,
.hall-map .svg-wrap .svg-box path {
  transition: opacity 0.2s linear;
}

/* Disable user-select on text labels */
.hall-map .svg-wrap .svg-box text,
.hall-map .svg-wrap .svg-box text tspan {
  cursor: default;
  touch-action: none;
  -webkit-user-select: none;
  user-select: none;
}

/* ---------- Diagram (Legend) ---------- */
.hall-map .diagram {
  position: relative;
  width: 800px;
  margin: 30px auto 0;
  color: #000;
}

.hall-map .diagram .group {
  transform: scale(0.9);
  position: absolute;
}

.hall-map .diagram .group .title {
  text-align: left;
  font-size: 18px;
  font-weight: 700;
  line-height: 24px;
  margin: 0;
  color: #000;
}

.hall-map .diagram .group .list {
  margin: 4px 0 0;
  padding: 0;
  list-style: none;
  width: 100%;
}

.hall-map .diagram .group .list .item {
  display: flex;
  margin-bottom: 2px;
  cursor: default;
  transition: opacity 0.2s linear;
}

.hall-map .diagram .group .list .item.is-dim {
  opacity: 0.24;
}

.hall-map .diagram .group .list .item .color {
  flex: none;
  margin: 6px 4px 0 0;
  height: 16px;
  width: 16px;
  border: 1px solid #000;
}

.hall-map .diagram .group .list .item .info {
  flex: auto;
  overflow: hidden;
  line-height: 14px;
  font-size: 12px;
}

.hall-map .diagram .group .list .item .info .name {
  white-space: pre-wrap;
  margin: 0;
}

.hall-map .diagram .group .list .item .info .areas {
  margin: 0;
}

/* ---------- Hover Effect ----------
   When .hall-map has data-hover-area set,
   - SVG paths with matching data-area stay at full opacity
   - Other SVG paths fade
   - Legend items with matching data-area-id stay at full opacity
   - Other legend items fade
   --------------------------------- */
.hall-map[data-hover-area] .svg-wrap .svg-box path[data-area] {
  opacity: 0.24;
}

.hall-map[data-hover-area] .svg-wrap .svg-box path[data-area][data-hover="true"] {
  opacity: 1;
}

.hall-map[data-hover-area] .diagram .group .list .item {
  opacity: 0.24;
}

.hall-map[data-hover-area] .diagram .group .list .item[data-hover="true"] {
  opacity: 1;
}

/* ---------- Highlighted Hall 15.1 (blinking) ---------- */
.hall-map .svg-wrap .svg-box path[data-hall="15.1"] {
  cursor: default;
  animation: hall-blink 1.1s ease-in-out infinite;
}

@keyframes hall-blink {
  0%, 100% {
    fill: #2AAA37;
    stroke: #ffffff;
    stroke-width: 0;
  }
  50% {
    fill: #FFD400;
    stroke: #E60012;
    stroke-width: 2.5;
  }
}

/* Keep blink visible even when other areas are hovered */
.hall-map[data-hover-area] .svg-wrap .svg-box path[data-hall="15.1"] {
  opacity: 1;
}

/* ---------- Ordinal Suffix (used inside .areas e.g. 1.1, 6.1) ---------- */
.ordinal-suffix {
  font-size: 12px;
  position: relative;
  top: -5px;
  margin-left: 2px;
}

@media (max-width: 768px) {
  .ordinal-suffix {
    font-size: 8px;
    position: relative;
    top: -5px;
  }
}

/* Responsive handling is done by fit.js (proportional scaling),
   so no width-based media queries here — the 956x650 design
   must stay intact inside iframes. */