/* Mall Harim - map redesign (warm, clean palette + commercial parking) */

#site-map .map-display,
#site-map .map-canvas,
#map-dialog .map-viewport {
  background: #F6F3EE;
}

.unit-plan g[data-index] {
  transition: opacity .2s ease;
}

/* Regular stores */
.unit-plan polygon {
  fill: #FFFFFF;
  stroke: #C9C3B8;
  stroke-width: 3;
  stroke-linejoin: round;
}

/* Anchor stores */
.unit-plan g.mh-anchor polygon {
  fill: #E1EAF1;
  stroke: #9FB4C6;
}

/* Kiosks in the parking area */
.unit-plan g.mh-kiosk polygon {
  stroke: #A89A82;
  stroke-dasharray: 10 7;
}

/* Number badges */
.unit-plan circle {
  fill: #264962;
  stroke: #FFFFFF;
  stroke-width: 2;
}
.unit-plan g[data-index] > text {
  font: 500 22px Arial, sans-serif;
  fill: #FFFFFF;
}

/* Logos stay in the side list; the map shows numbers + anchor names */
.unit-plan g[data-index] > image {
  display: none;
}

/* Anchor store names */
.unit-plan g[data-index] > text.mh-label {
  font: 500 30px Arial, sans-serif;
  fill: #264962;
  pointer-events: none;
}

/* Selected / hover / keyboard focus */
.unit-plan g:is(:hover, :focus-visible, [aria-pressed="true"]) polygon {
  fill: #FCE4E5;
  stroke: #D9343A;
  stroke-width: 6;
  stroke-dasharray: none;
}
.unit-plan g:is(:hover, :focus-visible, [aria-pressed="true"]) circle {
  fill: #D9343A;
}
.unit-plan g:focus-visible {
  outline: none;
}

/* Dim the other stores while one is selected */
.unit-plan:has(g[aria-pressed="true"]) g[data-index]:not([aria-pressed="true"]) {
  opacity: .35;
}

/* Commercial parking layer */
.unit-plan .mh-parking,
.unit-plan .mh-parking * {
  pointer-events: none;
}
.unit-plan .mh-parking text {
  font: 500 30px Arial, sans-serif;
  fill: #FFFFFF;
}
.unit-plan .mh-parking text.mh-p {
  font-size: 34px;
  fill: #264962;
}

/* Mobile */
@media (max-width: 760px) {
  .unit-plan g[data-index] > text {
    font-size: 28px;
  }
  .unit-plan g[data-index] > text.mh-label {
    font-size: 40px;
  }
  .unit-plan .mh-parking-badge {
    transform-box: fill-box;
    transform-origin: center;
    transform: scale(1.35);
  }
}

/* Touch screens: no sticky hover colors after a tap */
@media (hover: none) {
  .unit-plan g[data-index]:hover:not([aria-pressed="true"]):not(:focus-visible) polygon {
    fill: #FFFFFF;
    stroke: #C9C3B8;
    stroke-width: 3;
  }
  .unit-plan g.mh-anchor:hover:not([aria-pressed="true"]):not(:focus-visible) polygon {
    fill: #E1EAF1;
    stroke: #9FB4C6;
  }
  .unit-plan g.mh-kiosk:hover:not([aria-pressed="true"]):not(:focus-visible) polygon {
    stroke: #A89A82;
    stroke-dasharray: 10 7;
  }
  .unit-plan g[data-index]:hover:not([aria-pressed="true"]):not(:focus-visible) circle {
    fill: #264962;
  }
}

.mh-map-tip:not([hidden]) { position:fixed; z-index:1000; display:flex; align-items:center; gap:.5rem; padding:.45rem .75rem; background:white; color:#264962; border:1px solid #c9c3b8; border-radius:.65rem; box-shadow:0 3px 12px #0002; pointer-events:none; }
.mh-map-tip .unit-logo { width:3rem; height:2.5rem; object-fit:contain; }
@media (hover:none) { .mh-map-tip:not([hidden]) { display:none; } }

#site-map .map-selection:not(:empty),
#map-dialog .map-selection:not(:empty) {
  background-color: #fff;
}
