/* Wild Texas History — sightings map styling (matches the theme) */
.map-intro{text-align:center;max-width:68ch;margin:1rem auto 1.4rem}
.map-intro h1.entry-title{margin-bottom:.3rem}
.map-intro .map-sub{font-family:var(--body);font-style:italic;color:var(--graphite);margin:0}

/* Full-bleed: break the map out of the centered content column to full width */
body.wth-map-page{overflow-x:hidden}
/* Sit the map flush against the footer (no gap) */
body.wth-map-page .site-main{padding-bottom:0}
body.wth-map-page .site-footer{margin-top:0}
.wth-map{
  position:relative;
  width:100vw;max-width:100vw;
  margin-left:calc(50% - 50vw);margin-right:calc(50% - 50vw);
  margin-bottom:0;
  height:80vh;min-height:520px;
  border:0;border-top:1px solid var(--rule-strong);
  background:var(--paper-raised);
  overflow:hidden;
}
.wth-map .mapboxgl-canvas{outline:none}

/* keep the base map muted / newsprint-leaning */
.wth-map .mapboxgl-map{font-family:var(--body)}

/* ---- Legend ---- */
.wth-legend{
  position:absolute;top:14px;right:14px;z-index:5;
  width:216px;max-height:calc(100% - 28px);display:flex;flex-direction:column;
  background:var(--paper);border:1px solid var(--rule-strong);border-radius:3px;
  box-shadow:0 2px 10px rgba(23,21,15,.14);
}
.wth-legend-head{
  display:flex;align-items:center;justify-content:space-between;gap:.5rem;
  font-family:var(--label);text-transform:uppercase;letter-spacing:.14em;font-size:.68rem;font-weight:600;
  color:var(--ink);padding:.6rem .7rem;border-bottom:2px solid var(--rule-strong);
}
.wth-legend-actions button{
  font-family:var(--label);text-transform:uppercase;letter-spacing:.08em;font-size:.56rem;
  background:none;border:1px solid var(--rule);color:var(--graphite);padding:.15rem .4rem;margin-left:.25rem;cursor:pointer;border-radius:2px;
}
.wth-legend-actions button:hover{border-color:var(--accent);color:var(--accent)}
.wth-legend-list{overflow-y:auto;padding:.35rem .25rem}
.wth-legend-row{
  display:flex;align-items:center;gap:.5rem;padding:.3rem .45rem;cursor:pointer;font-family:var(--body);font-size:.9rem;color:var(--ink);
}
.wth-legend-row:hover{background:var(--paper-raised)}
.wth-legend-row input{accent-color:var(--accent);margin:0}
.wth-swatch{width:12px;height:12px;border-radius:50%;border:1px solid rgba(23,21,15,.25);flex:0 0 auto}
.wth-legend-name{flex:1}
.wth-legend-count{color:var(--mute);font-size:.78rem;font-variant-numeric:tabular-nums}

/* ---- Popups ---- */
.wth-popup .mapboxgl-popup-content{
  padding:0;background:var(--paper);border:1px solid var(--rule-strong);border-radius:3px;
  box-shadow:0 4px 16px rgba(23,21,15,.2);overflow:hidden;font-family:var(--body);
}
.wth-popup .mapboxgl-popup-close-button{font-size:1.1rem;color:var(--mute);padding:0 .35rem}
.wth-popup .mapboxgl-popup-close-button:hover{color:var(--accent);background:none}
.wth-popup.mapboxgl-popup-anchor-top .mapboxgl-popup-tip{border-bottom-color:var(--rule-strong)}
.wth-popup.mapboxgl-popup-anchor-bottom .mapboxgl-popup-tip{border-top-color:var(--rule-strong)}
.wth-popup.mapboxgl-popup-anchor-left .mapboxgl-popup-tip{border-right-color:var(--rule-strong)}
.wth-popup.mapboxgl-popup-anchor-right .mapboxgl-popup-tip{border-left-color:var(--rule-strong)}

.wth-pop-img{height:120px;background:#e9e3d6;overflow:hidden}
.wth-pop-img img{width:100%;height:100%;object-fit:cover;display:block}
.wth-pop-body{padding:.75rem .85rem .9rem}
.wth-pop-eyebrow{font-family:var(--label);text-transform:uppercase;letter-spacing:.14em;font-size:.6rem;font-weight:600;color:var(--accent)}
.wth-pop-title{font-family:var(--display);font-size:1.15rem;line-height:1.15;margin:.2rem 0 .2rem;color:var(--ink)}
.wth-pop-loc{font-size:.85rem;color:var(--graphite);margin:0 0 .4rem}
.wth-pop-note{font-size:.82rem;color:var(--graphite);margin:0 0 .6rem;line-height:1.4}
.wth-pop-link{font-family:var(--label);text-transform:uppercase;letter-spacing:.1em;font-size:.64rem;font-weight:600;color:var(--accent)}
.wth-pop-link:focus-visible{outline:2px solid var(--accent);outline-offset:2px;border-radius:2px}

@media (max-width:640px){
  .wth-map{height:66vh}
  .wth-legend{position:static;width:auto;max-height:none;margin:0;border-top:0}
  .wth-map{display:flex;flex-direction:column}
}
