/* Interactive property map — lodging.html
 *
 * Replaces a dashed placeholder that promised "Interactive map showing
 * locations of: Artist's Cottage | Hermitage | Lodge | Chapel | Trails |
 * Parking" and delivered a grey box. The markers below are placed only where
 * the hand-drawn map itself carries a written label; the map also has numbered
 * circles 1-14 whose key does not exist anywhere in this project, and those are
 * deliberately NOT guessed at.
 *
 * NO JAVASCRIPT. Hotspots are real <a>/<button> elements and the label is
 * revealed with :hover and :focus-visible, so the map works with the keyboard,
 * with a screen reader, and if a script fails to load. A JS tooltip would have
 * been the obvious build and the wrong one.
 *
 * Own file rather than styles.css: a second agent edits this repository, and an
 * isolated file cannot produce a merge conflict in the shared stylesheet.
 */

.property-map {
  position: relative;
  max-width: 1000px;
  margin: 0 auto;
  background: #fff;
  border-radius: 12px;
  box-shadow: 0 4px 18px rgba(0, 0, 0, .10);
  overflow: hidden;
}

.property-map img {
  display: block;
  width: 100%;
  height: auto;
}

/* Percentage positioning, so a marker stays on its landmark at every width.
   Pixel offsets would drift the moment the image is scaled. */
.property-map-hotspot {
  position: absolute;
  transform: translate(-50%, -50%);
  width: 28px;
  height: 28px;
  border-radius: 50%;
  border: 2px solid #fff;
  background: rgba(45, 90, 61, .88);
  box-shadow: 0 1px 5px rgba(0, 0, 0, .35);
  cursor: pointer;
  padding: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  text-decoration: none;
  transition: background .15s ease, transform .15s ease;
}

/* The marker carries its NUMBER, so the map and the key below it read as one
   thing. Before this they were a plain dot and a visitor had to guess which
   entry a marker belonged to. */
.pm-num {
  color: #fff;
  font-size: 12px;
  font-weight: 700;
  line-height: 1;
  pointer-events: none;
}

/* The Pond and Parking are lettered on the drawing in words rather than
   numbered. They get a dot instead of an empty circle, which would otherwise
   read as a number that failed to render. */
.property-map-hotspot.pm-unnumbered .pm-num::after {
  content: "";
  display: block;
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: #fff;
}

.property-map-hotspot:hover,
.property-map-hotspot:focus,
.property-map-hotspot:focus-visible {
  background: #b8860b;
  transform: translate(-50%, -50%) scale(1.18);
  z-index: 4;
}

/* A visible focus ring matters more here than usual: without it a keyboard user
   tabbing the map has no idea which landmark is selected. */
.property-map-hotspot:focus-visible {
  outline: 3px solid #b8860b;
  outline-offset: 3px;
}

.property-map-label {
  position: absolute;
  bottom: calc(100% + 9px);
  left: 50%;
  transform: translateX(-50%);
  background: rgba(28, 46, 33, .96);
  color: #fff;
  padding: 5px 10px;
  border-radius: 5px;
  font-size: .82rem;
  line-height: 1.35;
  white-space: nowrap;
  opacity: 0;
  pointer-events: none;
  transition: opacity .15s ease;
  z-index: 5;
}

.property-map-label::after {
  content: "";
  position: absolute;
  top: 100%;
  left: 50%;
  transform: translateX(-50%);
  border: 6px solid transparent;
  border-top-color: rgba(28, 46, 33, .96);
}

/* Both :focus and :focus-visible. :focus-visible alone is the tidier rule and
   the wrong one here — it does not match programmatically-moved focus, so a
   "skip to the map" style jump, or a browser without full support, would land
   on a marker showing nothing. Revealing the label on click-focus too is no
   loss. */
.property-map-hotspot:hover .property-map-label,
.property-map-hotspot:focus .property-map-label,
.property-map-hotspot:focus-visible .property-map-label {
  opacity: 1;
}

/* Markers near the top would have their tooltip clipped by the container, so
   those flip below the marker instead. */
.property-map-hotspot.flip .property-map-label {
  bottom: auto;
  top: calc(100% + 9px);
}

.property-map-hotspot.flip .property-map-label::after {
  top: auto;
  bottom: 100%;
  border-top-color: transparent;
  border-bottom-color: rgba(28, 46, 33, .96);
}

/* Key to the numbered circles on the hand-drawn map.
 *
 * The drawing has circles 1-14 and no printed key, so a visitor could see "7"
 * and had no way to learn it is the Ravine. Supplied by the office; where the
 * drawing letters a name itself the two agree, which is what makes the rest
 * trustworthy.
 *
 * Two-column on wide screens so a 13-entry list does not become a long scroll
 * under the map it explains. */
.property-map-key {
  max-width: 1000px;
  margin: 18px auto 0;
}

.property-map-key h3 {
  font-size: 1.05rem;
  margin: 0 0 10px;
}

.pm-key-list {
  list-style: none;
  margin: 0;
  padding: 0;
  columns: 2;
  column-gap: 32px;
}

.pm-key-list li {
  break-inside: avoid;
  display: flex;
  align-items: baseline;
  gap: 9px;
  margin: 0 0 7px;
  font-size: 0.95rem;
  line-height: 1.45;
}

.pm-key-num {
  flex: 0 0 auto;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 22px;
  height: 22px;
  border-radius: 50%;
  background: rgba(45, 90, 61, .9);
  color: #fff;
  font-size: .78rem;
  font-weight: 700;
}

/* The Event Patio and The Barn carry no printed number, so they get a bullet.
   Showing an invented number would send someone looking for a circle that is
   not on the sheet. */
.pm-key-num-none {
  background: #b8860b;
}

.pm-key-note {
  font-size: .85rem;
  color: #595959;
  margin: 12px 0 0;
}

@media (max-width: 640px) {
  .pm-key-list { columns: 1; }
}

.property-map-legend {
  display: flex;
  flex-wrap: wrap;
  gap: 8px 18px;
  justify-content: center;
  margin: 16px auto 0;
  max-width: 1000px;
  font-size: .9rem;
  color: #4a4a4a;
}

.property-map-legend span::before {
  content: "";
  display: inline-block;
  width: 10px;
  height: 10px;
  border-radius: 50%;
  background: rgba(45, 90, 61, .88);
  margin-right: 7px;
  vertical-align: baseline;
}

/* Touch has no hover, and a 28px target is below the 44px recommendation.
   Enlarging the target without enlarging the dot keeps the map readable. */
@media (hover: none) {
  .property-map-hotspot {
    width: 34px;
    height: 34px;
  }
  .property-map-label {
    opacity: 1;
    font-size: .72rem;
    padding: 3px 7px;
  }
}

/* Below this width the labels collide with each other and the map detail is too
   small to be worth pointing at. The caption tells the visitor where to get a
   readable copy instead of leaving them pinching at it. */
@media (max-width: 600px) {
  .property-map-hotspot { width: 24px; height: 24px; }
  .property-map-label { display: none; }
}
