.spmap-shell{max-width:1240px;margin:22px auto 60px;padding:0 20px;font-family:Arial,Helvetica,sans-serif;color:#172c23}.spmap-heading{display:flex;align-items:center;justify-content:space-between;gap:20px;margin-bottom:18px}.spmap-heading h1{font-size:clamp(28px,3vw,40px);margin:6px 0}.spmap-heading p{margin:0;color:#51645a}.spmap-heading a{color:#15543b;font-weight:700}.spmap-eyebrow{letter-spacing:2px;font-size:11px;font-weight:800;color:#40634c}.spmap-layout{display:grid;grid-template-columns:310px minmax(0,1fr);gap:16px}.spmap-controls{background:#f4f7f4;border:1px solid #d5ded6;border-radius:10px;padding:20px}.spmap-controls h2{font-size:21px;margin:0 0 18px}.spmap-controls label{display:block;font-weight:700;font-size:13px;margin:15px 0 7px}.spmap-controls input,.spmap-controls select{width:100%;font:inherit;padding:12px;border:1px solid #a8b6aa;border-radius:5px;background:#fff;color:#15271c}.spmap-controls button{width:100%;margin-top:12px;padding:12px;border:0;border-radius:5px;background:#205e42;color:white;font-weight:700;cursor:pointer}.spmap-controls button.spmap-secondary{background:#e0e8e0;color:#234631}.spmap-help,.spmap-attribution{font-size:12px;line-height:1.55;color:#52685b}.spmap-mapwrap{min-width:0}.spmap-mapwrap #spmap-map{height:610px;width:100%;border-radius:10px;border:1px solid #cdd9d0;z-index:1}.spmap-attribution{margin-top:9px}#spmap-status{font-size:13px;margin:18px 0 12px;font-weight:600}#spmap-detail{font-size:13px;line-height:1.6}#spmap-detail a{font-weight:700;color:#15543b}#spmap-detail strong{overflow-wrap:anywhere}@media(max-width:760px){.spmap-layout{grid-template-columns:1fr}.spmap-mapwrap #spmap-map{height:470px}.spmap-heading{display:block}}
/* v1.0.4: clear, readable parcel identification without claiming zoning approval */
.spmap-record-title{font-size:16px;font-weight:800;margin:14px 0 8px;color:#183f31}
.spmap-record-row{display:flex;justify-content:space-between;align-items:flex-start;gap:12px;border-bottom:1px solid #d5dfd8;padding:9px 0;font-size:13px;line-height:1.4}
.spmap-record-row span{color:#52635a;min-width:95px}
.spmap-record-row strong{text-align:right;overflow-wrap:anywhere;max-width:60%}
.spmap-verification{margin-top:14px;padding:12px;background:#fff8e8;border:1px solid #e4d4ad;border-radius:7px;color:#483e2a;font-size:13px;line-height:1.5}
.spmap-verification p{margin:6px 0 0}
.spmap-explore-link{display:inline-block;margin-top:14px;font-weight:700}

/* v1.0.5: consistent desktop map/inspector heights; avoid entire page scrolling to read results */
.spmap-layout{align-items:stretch;grid-template-columns:minmax(265px,310px) minmax(0,1fr)}
.spmap-controls{height:clamp(500px,68vh,700px);overflow-y:auto;overscroll-behavior:contain;scrollbar-width:thin;box-sizing:border-box}
.spmap-mapwrap #spmap-map{height:clamp(500px,68vh,700px);box-sizing:border-box}
.spmap-controls h2{margin-bottom:10px}.spmap-controls label{margin-top:12px}.spmap-controls button{margin-top:9px}
.spmap-record-row{gap:8px}.spmap-record-row strong{max-width:62%}
.spmap-official-links{border-top:1px solid #d5dfd8;margin-top:18px;padding-top:12px;display:flex;flex-wrap:wrap;gap:10px;font-size:12px}
.spmap-official-links a{color:#205e42;font-weight:700}
.spmap-controls:focus-within{scroll-behavior:smooth}
@media(max-width:760px){.spmap-controls{height:auto;max-height:none;overflow:visible}.spmap-mapwrap #spmap-map{height:470px}.spmap-layout{grid-template-columns:minmax(0,1fr)}}

/* v1.0.7: recover v1.0.5 width, no nested theme wrappers. */
body.page .spmap-shell#spmap-app {width:calc(100vw - 48px);max-width:1240px;box-sizing:border-box;position:relative;left:50%;transform:translateX(-50%);margin:22px 0 60px;padding:0 16px;}
#spmap-app .spmap-layout {display:grid;grid-template-columns:minmax(265px,310px) minmax(0,1fr);gap:16px;min-width:0;}
#spmap-app .spmap-mapwrap {min-width:0;width:100%;}
#spmap-app #spmap-map {width:100%;min-width:0;}
#spmap-app .spmap-site-nav{display:flex;align-items:center;justify-content:space-between;gap:12px 24px;flex-wrap:wrap;padding:12px 0 16px;margin-bottom:18px;border-bottom:1px solid #d6e2d9;font-family:Arial,Helvetica,sans-serif;}
#spmap-app .spmap-site-brand{font-size:20px;font-weight:800;color:#173d2d;text-decoration:none;white-space:nowrap;}
#spmap-app .spmap-site-links{display:flex;align-items:center;flex-wrap:wrap;gap:8px 18px;}
#spmap-app .spmap-site-links a{font-size:14px;font-weight:700;color:#244c39;text-decoration:none;white-space:nowrap;padding:6px 0;}
#spmap-app .spmap-site-links a.is-current{border-bottom:3px solid #205e42;}
@media(max-width:760px){body.page .spmap-shell#spmap-app{width:calc(100vw - 24px);padding:0 8px;}#spmap-app .spmap-layout{grid-template-columns:minmax(0,1fr);}#spmap-app .spmap-site-links{gap:5px 12px;}#spmap-app .spmap-site-links a{font-size:12px;}}

/* v1.0.8 — scoped page alignment and header clean-up; GIS code untouched. */
/* The theme title banner is redundant with the map heading. Scope removal to this page. */
body.page:has(#spmap-app) .entry-header,
body.page:has(#spmap-app) .page-header,
body.page:has(#spmap-app) .wp-block-post-title,
body.page:has(#spmap-app) .entry-title,
body.page:has(#spmap-app) .page-title {
  display:none !important;
}
/* Center against the viewport rather than the theme's narrow/right-offset content column. */
body.page .spmap-shell#spmap-app {
  width:min(1240px, calc(100vw - 40px));
  max-width:none;
  margin:24px 0 50px;
  padding:0 12px;
  position:relative;
  left:50%;
  transform:translateX(-50%);
  box-sizing:border-box;
}
#spmap-app .spmap-site-brand {display:inline-flex;align-items:center;min-height:40px;line-height:1.1;}
#spmap-app .spmap-brand-logo {display:block;max-width:220px;max-height:58px;width:auto;height:auto;object-fit:contain;}
#spmap-app .spmap-brand-wordmark {font-weight:800;letter-spacing:-.5px;font-size:23px;}
#spmap-app .spmap-brand-dot {color:#225e43;}
#spmap-app .spmap-site-nav {width:100%;box-sizing:border-box;}
#spmap-app .spmap-layout {grid-template-columns:minmax(255px,310px) minmax(0,1fr);}
@media(max-width:760px){
  body.page .spmap-shell#spmap-app {width:calc(100vw - 20px);padding:0 6px;margin-top:14px;}
  #spmap-app .spmap-layout {grid-template-columns:minmax(0,1fr);}
  #spmap-app .spmap-brand-logo {max-width:180px;}
}

/* v1.0.9: official supplied logo, robust viewport alignment and toolbar clearance */
body.page #spmap-app.spmap-shell {
  width:min(1240px, calc(100vw - 36px)) !important;
  max-width:none !important;
  left:auto !important;
  transform:none !important;
  margin:56px 0 45px !important;
  padding:0 12px !important;
  box-sizing:border-box !important;
  position:relative !important;
  clear:both;
}
body.admin-bar.page #spmap-app.spmap-shell {margin-top:64px !important;}
#spmap-app .spmap-site-nav {min-height:66px;gap:16px 24px;align-items:center;}
#spmap-app .spmap-site-brand {flex:0 0 auto;display:flex;align-items:center;min-height:48px;overflow:visible;}
#spmap-app .spmap-brand-logo {display:block;width:200px;height:auto;max-height:85px;max-width:100%;object-fit:contain;}
#spmap-app .spmap-site-links {margin-left:auto;}
@media(max-width:760px) {
 body.page #spmap-app.spmap-shell {width:calc(100vw - 20px) !important;margin-top:42px !important;padding:0 6px !important;}
 body.admin-bar.page #spmap-app.spmap-shell {margin-top:52px !important;}
 #spmap-app .spmap-brand-logo {width:170px;}
 #spmap-app .spmap-site-links {margin-left:0;}
}

/* v1.0.11 header-only repair.
   The map shell is centered by layout-fix.js; do not alter horizontal layout or GIS.
   Avoid any transform on the nav/header (which can create a stacking context
   below WordPress's fixed admin toolbar). Reserve visible header space. */
body.page #spmap-app.spmap-shell {
  padding-top: 0 !important;
  scroll-margin-top: 56px;
}
body.page #spmap-app .spmap-site-nav {
  position:relative;
  top:auto;
  transform:none;
  margin-top:0;
  padding-top:16px;
  padding-bottom:14px;
  min-height:88px;
  box-sizing:border-box;
  overflow:visible;
  z-index:2;
}
body.page #spmap-app .spmap-site-brand,
body.page #spmap-app .spmap-site-links {
  position:relative;
  z-index:3;
}
body.page #spmap-app .spmap-brand-logo {
  max-height:76px;
}
body.admin-bar.page #spmap-app.spmap-shell {
  margin-top: 84px !important;
}
@media(max-width:760px) {
  body.admin-bar.page #spmap-app.spmap-shell {margin-top:72px !important;}
  body.page #spmap-app .spmap-site-nav {min-height:76px;}
}

/* v1.0.13: preserve the functional GIS/map and normalize the header's own box.
   Do not offset the whole application with negative top/transform values. */
html:has(#spmap-app) { overflow-anchor: none; scroll-padding-top: 36px; }
body.page:has(#spmap-app) #spmap-app.spmap-shell { margin-top: 24px !important; }
body.admin-bar.page:has(#spmap-app) #spmap-app.spmap-shell { margin-top: 24px !important; }
body.page:has(#spmap-app) #spmap-app .spmap-site-nav {
  display:flex !important; align-items:center !important; position:static !important;
  margin:0 0 18px !important; padding:12px 0 14px !important;
  min-height:90px !important; overflow:visible !important;
}
body.page:has(#spmap-app) #spmap-app .spmap-site-brand { align-self:center; flex-shrink:0; }
body.page:has(#spmap-app) #spmap-app .spmap-brand-logo { width:200px; height:auto; max-height:80px; }
@media(max-width:760px){body.page:has(#spmap-app) #spmap-app .spmap-site-nav {min-height:76px !important;}}

/* v1.0.14: informational zoning reference; no change to map/header geometry */
.spmap-zoning-reference{border:1px solid #d6dfd7;border-radius:6px;padding:11px;margin:12px 0;background:#f7faf7;font-size:12px;line-height:1.5;color:#18392d}
.spmap-zoning-reference>strong{display:block;margin-bottom:7px}
.spmap-zoning-reference p{margin:7px 0 0}

/* v1.0.20: desktop viewport-first map layout. Preserve GIS and zoning logic. */
@media (min-width: 1024px) {
  body.page:has(#spmap-app) #spmap-app.spmap-shell,
  body.admin-bar.page:has(#spmap-app) #spmap-app.spmap-shell {
    box-sizing:border-box !important;
    width:calc(100vw - 40px) !important;
    max-width:1660px !important;
    margin-top:8px !important;
    margin-bottom:12px !important;
    padding:0 10px !important;
  }
  body.page:has(#spmap-app) #spmap-app .spmap-site-nav {
    min-height:64px !important;
    margin-bottom:8px !important;
    padding:4px 0 7px !important;
  }
  body.page:has(#spmap-app) #spmap-app .spmap-brand-logo {
    width:160px !important;
    max-height:62px !important;
    object-fit:contain;
  }
  #spmap-app .spmap-heading {margin-bottom:10px !important;}
  #spmap-app .spmap-heading h1 {font-size:clamp(25px,2.3vw,34px) !important;margin:3px 0 !important;}
  #spmap-app .spmap-layout {grid-template-columns:minmax(255px,290px) minmax(0,1fr) !important;gap:12px !important;}
  #spmap-app .spmap-controls {padding:14px !important;}
  #spmap-app .spmap-controls,
  #spmap-app .spmap-mapwrap #spmap-map {
    height:clamp(470px,calc(100dvh - 230px),950px) !important;
    box-sizing:border-box !important;
  }
}
@media (min-width: 1024px) and (max-height: 720px) {
  #spmap-app .spmap-controls,
  #spmap-app .spmap-mapwrap #spmap-map {height:clamp(390px,calc(100dvh - 190px),650px) !important;}
}
/* Keep the narrow/mobile layout stacked and legible. */
@media (max-width: 760px) {
  #spmap-app .spmap-layout {grid-template-columns:minmax(0,1fr) !important;}
  #spmap-app .spmap-controls {height:auto !important;max-height:none !important;overflow:visible !important;}
  #spmap-app .spmap-mapwrap #spmap-map {height:460px !important;}
}

/* v1.0.21: desktop-only viewport map and independent property results scroller.
   Existing GIS/ArcGIS JavaScript and Leaflet element IDs are unchanged. */
@media (min-width: 1024px) {
  body.page:has(#spmap-app) #spmap-app.spmap-shell,
  body.admin-bar.page:has(#spmap-app) #spmap-app.spmap-shell {
    margin-top:0 !important; margin-bottom:4px !important;
  }
  body.page:has(#spmap-app) #spmap-app .spmap-site-nav {
    min-height:58px !important; padding:2px 0 4px !important; margin-bottom:5px !important;
  }
  body.page:has(#spmap-app) #spmap-app .spmap-brand-logo {width:145px !important;max-height:54px !important;}
  #spmap-app .spmap-heading {margin-bottom:6px !important;}
  #spmap-app .spmap-heading h1 {font-size:clamp(24px,2vw,31px) !important;margin:2px 0 !important;line-height:1.1;}
  #spmap-app .spmap-heading p {font-size:14px !important;}
  #spmap-app .spmap-layout {grid-template-columns:minmax(255px,275px) minmax(0,1fr) !important;gap:10px !important;align-items:start;}
  #spmap-app .spmap-controls {
    display:flex !important;flex-direction:column !important;
    padding:10px !important;overflow:hidden !important;
    height:max(360px,calc(100dvh - 205px)) !important;
    min-height:0 !important;
  }
  #spmap-app .spmap-search-fixed {flex:0 0 auto;min-height:0;}
  #spmap-app .spmap-search-fixed h2 {font-size:17px;margin:0 0 4px !important;}
  #spmap-app .spmap-search-fixed label {font-size:12px;margin:7px 0 4px !important;}
  #spmap-app .spmap-search-fixed input,
  #spmap-app .spmap-search-fixed select {padding:8px !important;font-size:14px !important;}
  #spmap-app .spmap-search-fixed button {padding:8px !important;margin-top:6px !important;}
  #spmap-app .spmap-results-scroll {
    flex:1 1 auto;min-height:0;overflow-y:auto;overscroll-behavior:contain;
    scrollbar-width:thin;padding:0 3px 8px 0;
    border-top:1px solid #d5dfd8;margin-top:9px;
  }
  #spmap-app #spmap-status {margin:8px 0 !important;}
  #spmap-app .spmap-help {margin:8px 0 !important;}
  #spmap-app .spmap-mapwrap #spmap-map {
    height:max(360px,calc(100dvh - 205px)) !important;
    min-height:0 !important;
  }
  #spmap-app .spmap-attribution {margin-top:3px;font-size:11px;}
}
/* Smaller screens retain a readable stacked layout and a naturally scrolling panel. */
@media (max-width: 1023px) {
  #spmap-app .spmap-search-fixed,
  #spmap-app .spmap-results-scroll {display:block;}
}

/* v1.0.22: measured desktop viewport fit; only the property results scroll.
   The actual map top is measured by viewport-fit.js after WordPress renders. */
@media (min-width: 1024px) {
 #spmap-app .spmap-layout {align-items:stretch !important;}
 #spmap-app .spmap-controls,
 #spmap-app .spmap-mapwrap #spmap-map {
   height:var(--spmap-viewport-height, 520px) !important;
   max-height:var(--spmap-viewport-height, 520px) !important;
   min-height:0 !important;
 }
 #spmap-app .spmap-controls {display:flex !important;flex-direction:column !important;overflow:hidden !important;}
 #spmap-app .spmap-search-fixed {flex:0 0 auto !important;}
 #spmap-app .spmap-results-scroll {
   display:block !important; flex:1 1 0 !important; min-height:0 !important;
   overflow-y:auto !important; overflow-x:hidden !important;
   overscroll-behavior-y:contain; scrollbar-width:thin;
 }
 #spmap-app .spmap-mapwrap {min-width:0;}
 #spmap-app .spmap-attribution {line-height:1.2 !important;margin-top:3px !important;}
}
