/* Property zones only. Load after the viewer's style.css. */
#property-facts,
#viewer-stage .property-hotspot {
  --zone-blue: #233dff;
  --zone-ink: #20353e;
  --zone-muted: #687881;
  --zone-paper: #f4f2ed;
  --zone-line: #d5dcd9;
  font-family: Manrope, Arial, Helvetica, sans-serif;
}

#property-facts { margin-top: 24px; color: var(--zone-ink); }
#property-facts .zone-summary { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 18px; }
#property-facts .zone-summary button {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr);
  align-content: start;
  gap: 5px 8px;
  min-width: 0;
  min-height: 68px;
  margin: 0;
  padding: 10px 4px 12px;
  border: 0;
  border-bottom: 2px solid var(--zone-line);
  border-radius: 0;
  background: transparent;
  color: var(--zone-ink);
  font: 600 clamp(14px, 1.35vw, 17px)/1.4 Manrope, Arial, Helvetica, sans-serif;
  text-align: left;
  cursor: pointer;
}
#property-facts .zone-summary-index { align-self: center; color: var(--zone-muted); font-size: 10px; font-weight: 500; }
#property-facts .zone-summary-measure { grid-column: 2; color: var(--zone-muted); font-size: clamp(12px, 1.15vw, 14px); font-weight: 400; line-height: 1.5; }
#property-facts .zone-summary button:is([aria-pressed="true"], .is-active) { border-bottom-color: var(--zone-blue); }
#property-facts .zone-summary button:is([aria-pressed="true"], .is-active) :is(.zone-summary-name, .zone-summary-index) { color: var(--zone-blue); }
#property-facts .zone-summary button:hover { border-bottom-color: var(--zone-blue); color: var(--zone-blue); }
#property-facts .zone-summary button:focus-visible { outline: 2px solid var(--zone-blue); outline-offset: 4px; }

#property-facts #zone-detail {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(160px, .6fr);
  grid-template-areas: "title measure" "description source" "slope slope" "boundary boundary";
  column-gap: 28px;
  row-gap: 6px;
  margin-top: 16px;
  padding: 18px 20px;
  border: 1px solid var(--zone-line);
  border-radius: 12px;
  background: #fafaf7;
}
#property-facts #zone-title { grid-area: title; margin: 0; font-size: 20px; line-height: 1.35; font-weight: 600; letter-spacing: -.02em; }
#property-facts #zone-description { grid-area: description; margin: 0; color: var(--zone-muted); font-size: 15px; line-height: 1.6; }
#property-facts #zone-measure { grid-area: measure; align-self: center; margin: 0; color: var(--zone-blue); font-size: 15px; line-height: 1.5; font-weight: 600; text-align: right; }
#property-facts #detail-source { grid-area: source; margin: 0; color: var(--zone-muted); font-size: 12px; line-height: 1.5; text-align: right; }

#property-facts .zone-boundary-disclosure { grid-area: boundary; margin-top: 10px; padding-top: 12px; border-top: 1px solid var(--zone-line); }
#property-facts .zone-boundary-disclosure > summary { width: fit-content; max-width: 100%; color: var(--zone-blue); font-size: 14px; line-height: 1.6; font-weight: 500; cursor: pointer; }
#property-facts .zone-boundary-disclosure > summary:focus-visible { outline: 2px solid var(--zone-blue); outline-offset: 4px; }
#property-facts .zone-reference { margin: 14px 0 0; }
#property-facts .zone-reference-map { position: relative; width: 100%; max-width: 420px; margin-inline: auto; aspect-ratio: 550 / 500; }
#property-facts .zone-reference-map img { display: block; width: 100%; height: auto; }
#property-facts #zone-boundary { position: absolute; inset: 0; display: block; width: 100%; height: 100%; overflow: hidden; pointer-events: none; }
#property-facts #zone-boundary :is(polygon, polyline, path, line) { fill: none; stroke: var(--zone-blue); stroke-width: 2.5px; stroke-linecap: round; stroke-linejoin: round; vector-effect: non-scaling-stroke; }
#property-facts #zone-boundary polygon { fill: rgb(35 61 255 / 12%); }
#property-facts #zone-boundary .zone-area { fill: rgb(35 61 255 / 14%); }
#property-facts #zone-boundary .zone-endpoint { fill: var(--zone-blue); stroke: #fff; stroke-width: 1.5px; vector-effect: non-scaling-stroke; }
#property-facts #zone-boundary .slope-map-line { stroke-width: 3px; stroke-dasharray: 7 4; }
#property-facts #zone-boundary .slope-map-label { fill: var(--zone-blue); stroke: white; stroke-width: 3px; paint-order: stroke; text-anchor: middle; font: 700 22px Manrope, sans-serif; }
#property-facts #zone-boundary-caption { margin-top: 8px; color: var(--zone-muted); font-size: 11px; line-height: 1.5; text-align: center; }

/* Each model-viewer button needs data-number="1|2|3" and aria-pressed. */
#viewer-stage .property-hotspot {
  position: relative;
  display: grid;
  place-items: center;
  width: 44px;
  height: 44px;
  min-width: 44px;
  min-height: 44px;
  padding: 0;
  border: 0;
  border-radius: 50%;
  background: transparent;
  color: #fff;
  box-shadow: none;
  cursor: pointer;
  -webkit-tap-highlight-color: transparent;
}
#viewer-stage .property-hotspot::before {
  content: attr(data-number);
  display: grid;
  place-items: center;
  width: 16px;
  height: 16px;
  border-radius: 50%;
  background: var(--zone-blue);
  color: #fff;
  font: 700 10px/1 Manrope, Arial, Helvetica, sans-serif;
  box-shadow: 0 0 0 3px var(--zone-paper);
}
#viewer-stage .property-hotspot:is([aria-pressed="true"], .is-active)::before { box-shadow: 0 0 0 3px var(--zone-paper), 0 0 0 5px var(--zone-blue); }
#viewer-stage .property-hotspot:hover::before { background: #182dcc; }
#viewer-stage .property-hotspot[aria-hidden="true"] { opacity: 0; pointer-events: none; }
#viewer-stage .property-hotspot:focus-visible { outline: 2px solid var(--zone-blue); outline-offset: -4px; }
#viewer-stage .property-hotspot .hotspot-label {
  position: absolute;
  left: calc(50% + 13px);
  top: 50%;
  transform: translateY(-50%);
  padding: 4px 7px;
  border: 1px solid var(--zone-line);
  border-radius: 4px;
  background: var(--zone-paper);
  color: var(--zone-ink);
  font-size: 11px;
  font-weight: 600;
  line-height: 1.3;
  white-space: nowrap;
  pointer-events: none;
}
#viewer-stage .property-hotspot:is([aria-pressed="true"], .is-active) .hotspot-label { color: var(--zone-blue); }

@media (max-width: 760px) {
  #viewer-stage .property-hotspot .hotspot-label { display: none; }
}
@media (max-width: 640px) {
  #property-facts { margin-top: 20px; }
  #property-facts .zone-summary { gap: 10px; }
  #property-facts .zone-summary button { column-gap: 5px; padding-inline: 1px; font-size: 14px; }
  #property-facts .zone-summary-measure { grid-column: 1 / -1; font-size: 12px; }
  #property-facts #zone-detail { grid-template-columns: minmax(0, 1fr); grid-template-areas: "title" "description" "measure" "source" "slope" "boundary"; gap: 5px; padding: 16px; }
  #property-facts #zone-title { font-size: 17px; }
  #property-facts #zone-measure { margin-top: 7px; text-align: left; }
  #property-facts #detail-source { text-align: left; }
}
@media (forced-colors: active) {
  #property-facts .zone-summary button:is([aria-pressed="true"], .is-active) { border-bottom-color: Highlight; }
  #property-facts .zone-summary button:focus-visible,
  #property-facts .zone-boundary-disclosure > summary:focus-visible,
  #viewer-stage .property-hotspot:focus-visible { outline-color: Highlight; }
  #viewer-stage .property-hotspot::before { border: 1px solid ButtonText; background: ButtonFace; color: ButtonText; box-shadow: none; }
  #viewer-stage .property-hotspot:is([aria-pressed="true"], .is-active)::before { outline: 2px solid Highlight; outline-offset: 2px; box-shadow: none; }
}
