/* Blackwood public independent bookshop finder: no admin or outreach UI. */
body.public-bookshops-page {
  min-height: 100vh;
  color: #efe7dc;
  background:
    linear-gradient(180deg, rgba(0,0,0,.88), rgba(0,0,0,.95)),
    url("/assets/ArchiveFilesBG.png") center top / cover fixed no-repeat,
    #080a09;
}
.public-bookshops-wrap {
  width: min(100%, 1180px);
  margin: 0 auto;
  padding: 116px clamp(18px, 4vw, 40px) 72px;
}
.pb-intro {
  max-width: 790px;
  margin: 0 auto 38px;
  text-align: center;
}
.pb-kicker {
  color: #d4b88b;
  font: 700 11px/1.5 Arial, sans-serif;
  letter-spacing: .19em;
  text-transform: uppercase;
}
.pb-intro h1 {
  font: 400 clamp(31px, 4vw, 52px)/1.13 Georgia, serif;
  margin: 10px 0 18px;
}
.pb-intro > p:not(.pb-kicker) {
  color: #d8d0c3;
  line-height: 1.75;
  font-size: 15px;
}
.pb-intro .pb-disclaimer {
  padding: 15px 18px;
  margin-top: 20px;
  border: 1px solid rgba(212,184,139,.24);
  border-radius: 6px;
  color: #cfc4b7;
  background: rgba(255,255,255,.025);
  font-size: 13px !important;
}
.pb-panel {
  min-width: 0;
  margin-bottom: 24px;
  border: 1px solid rgba(184,115,51,.26);
  border-radius: 5px;
  padding: clamp(20px, 2.6vw, 30px);
  background: linear-gradient(135deg, rgba(23,26,22,.96), rgba(9,12,10,.97));
}
.pb-panel h2 {
  color: #efe7dc;
  font: 400 clamp(24px, 2.4vw, 31px)/1.25 Georgia, serif;
  margin: 0 0 18px;
}
.pb-search-form {
  display: grid;
  grid-template-columns: minmax(200px, 1fr) minmax(125px, 150px) auto auto;
  align-items: end;
  gap: 12px;
}
.pb-search-form label {
  display: flex;
  flex-direction: column;
  gap: 9px;
  color: #d3c3ad;
  font: 12px/1.45 Arial, sans-serif;
}
.pb-search-form input,
.pb-search-form select {
  min-width: 0;
  width: 100%;
  min-height: 46px;
  padding: 10px 13px;
  border: 1px solid #8d7656;
  border-radius: 5px;
  color: #f5ead5;
  background: #111b17;
  font: 16px/1.4 Arial, sans-serif;
}
.pb-button,
.pb-card-map {
  min-height: 46px;
  padding: 10px 16px;
  border: 1px solid #d1a971;
  border-radius: 5px;
  background: #b8874a;
  color: #160f09;
  cursor: pointer;
  font: 700 12px/1.45 Arial, sans-serif;
}
.pb-button:hover,
.pb-card-map:hover { background: #e2b77b; }
.pb-button:disabled { opacity: .6; cursor: progress; }
.pb-button-secondary {
  background: transparent;
  color: #ead6b9;
}
.pb-button-secondary:hover {
  background: rgba(212,184,139,.15);
}

/* Filter is a full-width row without altering the desktop input layout. */
.pb-website-filter {
  grid-column: 1 / -1;
  display: inline-flex !important;
  flex-direction: row !important;
  align-items: center;
  gap: 10px;
  width: fit-content;
  min-height: 38px;
  cursor: pointer;
  color: #e3d3bc !important;
  font: 13px/1.5 Arial, sans-serif !important;
}
.pb-website-filter input[type="checkbox"] {
  width: 18px;
  height: 18px;
  min-height: 18px;
  flex: 0 0 18px;
  margin: 0;
  accent-color: #c29b68;
}
.pb-map-actions {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 12px 16px;
  margin-top: 16px;
}
.pb-map-actions p {
  flex: 1 1 190px;
  margin: 0;
  color: #d3c8b7;
  font: 13px/1.6 Arial, sans-serif;
}
.pb-map-actions .pb-button {
  min-height: 42px;
}
#pb-status,
.pb-count,
.pb-map-note,
.pb-credits p {
  color: #d3c8b7;
  font: 13px/1.75 Arial, sans-serif;
}
#pb-status { margin: 16px 0 0; }
.pb-layout {
  display: grid;
  grid-template-columns: minmax(0, 1.3fr) minmax(300px, .9fr);
  gap: 24px;
  align-items: start;
}
#pb-map {
  height: 590px;
  width: 100%;
  z-index: 0;
  border-radius: 5px;
  background: #25352c;
  isolation: isolate;
}
/*
  Leaflet tile isolation: shared Blackwood image styles must not stretch
  or reposition map tiles. Explicit map-pane sizing also prevents oversized
  image fragments and blank map space on narrow mobile viewports.
*/
#pb-map.leaflet-container {
  position: relative !important;
  overflow: hidden !important;
  isolation: isolate;
}
#pb-map .leaflet-pane,
#pb-map .leaflet-map-pane,
#pb-map .leaflet-tile-container,
#pb-map .leaflet-overlay-pane,
#pb-map .leaflet-tile-pane,
#pb-map .leaflet-marker-pane,
#pb-map .leaflet-shadow-pane,
#pb-map .leaflet-popup-pane {
  position: absolute !important;
  top: 0;
  left: 0;
}
#pb-map .leaflet-tile,
#pb-map .leaflet-pane img {
  position: absolute !important;
  display: block !important;
  width: 256px !important;
  height: 256px !important;
  max-width: none !important;
  max-height: none !important;
  min-width: 0 !important;
  min-height: 0 !important;
  margin: 0 !important;
  padding: 0 !important;
  border: 0 !important;
  border-radius: 0 !important;
  box-shadow: none !important;
  filter: none !important;
  object-fit: fill !important;
}
/* Fallback positioning for browsers where the Leaflet CDN stylesheet
   fails to apply. Keep map layers contained inside the map panel. */
#pb-map .leaflet-pane > svg,
#pb-map .leaflet-pane > canvas {
  position: absolute !important;
  top: 0;
  left: 0;
}
#pb-map .leaflet-tile-pane { z-index: 200; }
#pb-map .leaflet-overlay-pane { z-index: 400; }
#pb-map .leaflet-shadow-pane { z-index: 500; }
#pb-map .leaflet-marker-pane { z-index: 600; }
#pb-map .leaflet-tooltip-pane { z-index: 650; }
#pb-map .leaflet-popup-pane { z-index: 700; }
#pb-map .leaflet-control { position: relative; z-index: 800; }

#pb-map .leaflet-marker-icon,
#pb-map .leaflet-marker-shadow {
  width: auto;
  height: auto;
  max-width: none !important;
  max-height: none !important;
}
#pb-map .leaflet-control-container .leaflet-top,
#pb-map .leaflet-control-container .leaflet-bottom {
  position: absolute;
  z-index: 1000;
}
#pb-map .leaflet-control-container .leaflet-top { top: 0; }
#pb-map .leaflet-control-container .leaflet-bottom { bottom: 0; }
#pb-map .leaflet-control-container .leaflet-left { left: 0; }
#pb-map .leaflet-control-container .leaflet-right { right: 0; }

/* Counted map clusters. Styled independently of global site buttons/images. */
#pb-map .pb-cluster-icon {
  display: flex !important;
  justify-content: center;
  align-items: center;
  width: 46px !important;
  height: 46px !important;
  /* Keep Leaflet anchor margins to centre the cluster icon. */
  background: transparent;
  border: 0;
  box-shadow: none;
}
#pb-map .pb-cluster-count {
  display: inline-flex;
  justify-content: center;
  align-items: center;
  box-sizing: border-box;
  width: 46px;
  height: 46px;
  border: 3px solid #f6e8cf;
  border-radius: 50%;
  background: #a65c25;
  box-shadow: 0 2px 10px rgba(0, 0, 0, .4);
  color: #fff7e9;
  font: 700 15px/1 Arial, sans-serif;
  font-variant-numeric: tabular-nums;
  white-space: nowrap;
}
#pb-map .pb-cluster-icon:hover .pb-cluster-count,
#pb-map .pb-cluster-icon:focus-visible .pb-cluster-count {
  background: #7d3e13;
  box-shadow: 0 0 0 3px #f0d1a4, 0 2px 10px rgba(0,0,0,.4);
}
#pb-map .leaflet-control-zoom a {
  box-sizing: border-box;
  width: 44px !important;
  height: 44px !important;
  line-height: 42px !important;
  font: 700 26px/42px Arial, sans-serif !important;
  text-align: center;
  background: #13221b !important;
  color: #f8e9d1 !important;
  border-color: #d1a971 !important;
}
#pb-map .leaflet-control-zoom a:hover,
#pb-map .leaflet-control-zoom a:focus-visible {
  background: #284032 !important;
}
#pb-map .leaflet-control-zoom a.leaflet-disabled {
  opacity: .55;
}
.pb-map-note { margin: 15px 0 0; }
.pb-results {
  max-height: 610px;
  overflow-y: auto;
  padding-right: 4px;
  display: grid;
  gap: 12px;
}
.pb-count { margin: -5px 0 18px; }
.pb-card {
  padding: 16px;
  border: 1px solid rgba(212,184,139,.2);
  border-radius: 4px;
  background: rgba(255,255,255,.025);
}
.pb-card h3 {
  font: 400 21px/1.25 Georgia, serif;
  color: #f4e7d1;
  margin: 0 0 7px;
}
.pb-card p {
  color: #d4c9bc;
  font: 13px/1.65 Arial, sans-serif;
  margin: 0 0 12px;
}
.pb-card-actions {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 12px;
}
.pb-card-actions a,
.pb-credits a {
  color: #e0bc87;
  font: 13px/1.6 Arial, sans-serif;
  text-underline-offset: 4px;
}
.pb-card-map {
  min-height: 38px;
  padding: 8px 12px;
  background: transparent;
  color: #ecd1ad;
  font-size: 12px;
}
.pb-card-map:hover { color: #17100a; }
.pb-popup {
  color: #202820;
  font: 13px/1.5 Arial, sans-serif;
  max-width: 220px;
}
.pb-popup strong { font-size: 15px; }
.pb-popup p { margin: 8px 0; }
.pb-popup a { color: #195b69; }
.pb-credits { margin-top: 0; }
.pb-noscript { padding: 20px; text-align: center; }
@media (max-width: 920px) {
  .pb-layout { grid-template-columns: 1fr; }
  #pb-map { height: 450px; }
  .pb-results { max-height: none; overflow: visible; }
}
@media (max-width: 760px) {
  .pb-search-form { grid-template-columns: 1fr 1fr; }
  .pb-search-form label:first-child { grid-column: 1 / -1; }
}
@media (max-width: 510px) {
  .public-bookshops-wrap { padding-top: 98px; }
  .pb-search-form { grid-template-columns: 1fr; }
  .pb-search-form label:first-child { grid-column: auto; }
  #pb-map { height: 360px; }
}
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
}
