/* UK fallout shelter finder ---------------------------------------------- */

.shelter-finder {
  --shelter-green: #7affb8;
  --shelter-green-soft: #9de4c0;
  --shelter-amber: #ffab7f;
  --shelter-blue: #7fd4ff;
  --shelter-ink: #06100d;
  --shelter-panel: #0a1713;
  --shelter-line: rgba(122, 255, 184, 0.3);
  margin: 2.4rem 0 3rem;
  border: 1px solid var(--shelter-line);
  background:
    linear-gradient(rgba(122, 255, 184, 0.025) 1px, transparent 1px),
    linear-gradient(90deg, rgba(122, 255, 184, 0.025) 1px, transparent 1px),
    var(--shelter-ink);
  background-size: 24px 24px;
  color: #e2f6eb;
  font-family: "Courier New", Courier, monospace;
  box-shadow: 0 22px 55px rgba(0, 0, 0, 0.24);
}

.shelter-finder *,
.shelter-finder *::before,
.shelter-finder *::after {
  box-sizing: border-box;
}

.shelter-finder__header {
  padding: clamp(1.25rem, 3vw, 2rem);
  border-bottom: 1px solid var(--shelter-line);
  background: linear-gradient(90deg, rgba(122, 255, 184, 0.08), transparent 70%);
}

.shelter-finder__header h2 {
  margin: 0.18rem 0 0.65rem;
  color: var(--shelter-green);
  font-family: inherit;
  font-size: clamp(1.55rem, 3.5vw, 2.4rem);
  line-height: 1.05;
  letter-spacing: -0.035em;
  text-transform: none;
}

.shelter-finder__header p:last-child {
  max-width: 74ch;
  margin: 0;
  color: #bcd5c7;
  font-size: 0.94rem;
  line-height: 1.65;
}

.shelter-finder__eyebrow {
  margin: 0;
  color: var(--shelter-amber);
  font-size: 0.72rem;
  font-weight: 700;
  letter-spacing: 0.12em;
}

.shelter-finder__controls {
  display: grid;
  grid-template-columns: minmax(220px, 1.5fr) repeat(2, minmax(150px, 0.8fr));
  gap: 0.8rem;
  padding: 1rem clamp(1rem, 2.5vw, 1.5rem);
  border-bottom: 1px solid var(--shelter-line);
  background: rgba(4, 13, 10, 0.9);
}

.shelter-finder__field {
  display: grid;
  gap: 0.38rem;
  min-width: 0;
}

.shelter-finder__field > span {
  color: var(--shelter-green-soft);
  font-size: 0.7rem;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.shelter-finder input,
.shelter-finder select {
  width: 100%;
  min-height: 44px;
  margin: 0;
  border: 1px solid rgba(122, 255, 184, 0.36);
  border-radius: 0;
  background: #0c1d17;
  color: #effff5;
  font: inherit;
  font-size: 0.84rem;
  box-shadow: none;
}

.shelter-finder input {
  padding: 0.68rem 0.76rem;
}

.shelter-finder select {
  padding: 0.68rem 2rem 0.68rem 0.76rem;
}

.shelter-finder input::placeholder {
  color: #789487;
}

.shelter-finder input:focus,
.shelter-finder select:focus,
.shelter-finder button:focus-visible,
.shelter-finder__marker:focus-visible {
  outline: 2px solid var(--shelter-amber);
  outline-offset: 2px;
}

.shelter-finder__actions {
  display: flex;
  grid-column: 1 / -1;
  gap: 0.6rem;
  align-items: center;
}

.shelter-finder button {
  min-height: 42px;
  border: 1px solid var(--shelter-green);
  border-radius: 0;
  background: transparent;
  color: var(--shelter-green);
  font: inherit;
  font-size: 0.78rem;
  font-weight: 700;
  letter-spacing: 0.04em;
  cursor: pointer;
}

.shelter-finder button:hover {
  background: rgba(122, 255, 184, 0.1);
}

.shelter-finder button:disabled {
  cursor: wait;
  opacity: 0.6;
}

.shelter-finder__locate,
.shelter-finder__reset {
  padding: 0.62rem 0.85rem;
}

.shelter-finder__locate {
  background: var(--shelter-green) !important;
  color: #06100d !important;
}

.shelter-finder__locate.is-active {
  border-color: var(--shelter-blue);
  background: var(--shelter-blue) !important;
}

.shelter-finder__reset {
  border-color: rgba(188, 213, 199, 0.45) !important;
  color: #bcd5c7 !important;
}

.shelter-finder__status {
  min-height: 2.8rem;
  margin: 0;
  padding: 0.8rem clamp(1rem, 2.5vw, 1.5rem);
  border-bottom: 1px solid var(--shelter-line);
  color: #bcd5c7;
  font-size: 0.78rem;
  line-height: 1.5;
}

.shelter-finder__workspace {
  display: grid;
  grid-template-columns: minmax(0, 1.35fr) minmax(280px, 0.85fr);
  min-height: 620px;
}

.shelter-finder__map-panel {
  position: relative;
  display: grid;
  place-items: center;
  min-width: 0;
  padding: 3.4rem 0.8rem 0.8rem;
  border-right: 1px solid var(--shelter-line);
  overflow: hidden;
}

.shelter-finder__map-panel::before {
  position: absolute;
  top: 1rem;
  left: 1rem;
  color: rgba(122, 255, 184, 0.44);
  font-size: 0.65rem;
  letter-spacing: 0.08em;
  content: "MAP_GRID / UNITED_KINGDOM";
}

.shelter-finder__legend {
  position: absolute;
  top: 0.72rem;
  right: 0.85rem;
  display: flex;
  z-index: 2;
  flex-wrap: wrap;
  justify-content: flex-end;
  gap: 0.32rem 0.7rem;
  max-width: 72%;
  color: #9bb4a7;
  font-size: 0.62rem;
}

.shelter-finder__legend span {
  display: inline-flex;
  gap: 0.28rem;
  align-items: center;
}

.shelter-finder__legend i {
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: var(--shelter-green);
}

.shelter-finder__legend .is-government { background: var(--shelter-amber); }
.shelter-finder__legend .is-military { background: var(--shelter-blue); }
.shelter-finder__legend .is-other { background: #c2a8ff; }

.shelter-finder__map-controls {
  position: absolute;
  bottom: 1rem;
  left: 1rem;
  display: flex;
  z-index: 3;
  align-items: center;
  gap: 0.3rem;
  padding: 0.32rem;
  border: 1px solid rgba(122, 255, 184, 0.28);
  background: rgba(5, 16, 12, 0.9);
}

.shelter-finder__map-controls button {
  min-width: 34px;
  min-height: 34px;
  margin: 0;
  padding: 0.35rem 0.48rem;
  border-color: rgba(122, 255, 184, 0.45);
  font-size: 0.72rem;
  line-height: 1;
}

.shelter-finder__map-controls span {
  min-width: 5.4rem;
  padding: 0 0.35rem;
  color: #9bb4a7;
  font-size: 0.62rem;
  text-align: center;
}

.shelter-finder__map {
  display: block;
  width: min(100%, 590px);
  height: auto;
  max-height: 700px;
}

.shelter-finder__land {
  fill: #10271f;
  stroke: rgba(122, 255, 184, 0.5);
  stroke-width: 1.35;
  vector-effect: non-scaling-stroke;
}

.shelter-finder__marker {
  color: var(--shelter-green);
  cursor: pointer;
  transition: opacity 140ms ease;
}

.shelter-finder__marker.is-government { color: var(--shelter-amber); }
.shelter-finder__marker.is-military,
.shelter-finder__marker.is-radar { color: var(--shelter-blue); }
.shelter-finder__marker.is-communications,
.shelter-finder__marker.is-other { color: #c2a8ff; }

.shelter-finder__marker-halo {
  fill: currentColor;
  opacity: 0.1;
}

.shelter-finder__marker-dot {
  fill: currentColor;
  stroke: #06100d;
  stroke-width: 1.2;
  vector-effect: non-scaling-stroke;
}

.shelter-finder__marker-hit {
  fill: transparent;
}

.shelter-finder__marker:hover .shelter-finder__marker-halo,
.shelter-finder__marker:focus .shelter-finder__marker-halo,
.shelter-finder__marker.is-selected .shelter-finder__marker-halo {
  opacity: 0.48;
}

.shelter-finder__marker.is-selected .shelter-finder__marker-dot {
  stroke: #fff;
  stroke-width: 2.5;
}

.shelter-finder__marker.is-filtered-out {
  pointer-events: none;
  opacity: 0.035;
}

.shelter-finder__you-are-here {
  pointer-events: none;
}

.shelter-finder__you-halo {
  fill: none;
  stroke: #fff;
  stroke-width: 2;
  opacity: 0.7;
}

.shelter-finder__you-dot {
  fill: #fff;
  stroke: #06100d;
  stroke-width: 2;
}

.shelter-finder__results-panel {
  min-width: 0;
  background: rgba(5, 16, 12, 0.84);
}

.shelter-finder__results-heading {
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  gap: 1rem;
  padding: 1rem;
  border-bottom: 1px solid var(--shelter-line);
}

.shelter-finder__results-heading h3 {
  margin: 0;
  color: var(--shelter-green-soft);
  font-family: inherit;
  font-size: 0.88rem;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.shelter-finder__results-heading span {
  color: #89a397;
  font-size: 0.7rem;
}

.shelter-finder__results {
  max-height: 620px;
  margin: 0;
  padding: 0;
  overflow-y: auto;
  list-style: none;
  scrollbar-color: rgba(122, 255, 184, 0.45) #07120e;
}

.shelter-finder__results li {
  margin: 0;
  padding: 0;
  border-bottom: 1px solid rgba(122, 255, 184, 0.12);
}

.shelter-finder__result {
  display: grid;
  grid-template-columns: 2.1rem minmax(0, 1fr) auto;
  gap: 0.7rem;
  align-items: center;
  width: 100%;
  min-height: 0 !important;
  padding: 0.78rem 0.85rem;
  border: 0 !important;
  background: transparent !important;
  color: #e2f6eb !important;
  text-align: left;
}

.shelter-finder__result:hover,
.shelter-finder__result[aria-pressed="true"] {
  background: rgba(122, 255, 184, 0.08) !important;
}

.shelter-finder__result[aria-pressed="true"] {
  box-shadow: inset 3px 0 0 var(--shelter-green);
}

.shelter-finder__result-rank {
  color: rgba(122, 255, 184, 0.52);
  font-size: 0.68rem;
}

.shelter-finder__result strong,
.shelter-finder__result small {
  display: block;
}

.shelter-finder__result strong {
  overflow: hidden;
  color: #effff5;
  font-size: 0.76rem;
  line-height: 1.38;
  text-overflow: ellipsis;
}

.shelter-finder__result small {
  margin-top: 0.18rem;
  color: #7f9b8d;
  font-size: 0.63rem;
  line-height: 1.35;
}

.shelter-finder__result-distance {
  color: var(--shelter-amber);
  font-size: 0.62rem;
  white-space: nowrap;
}

.shelter-finder__empty {
  padding: 1.25rem !important;
  color: #8ea99b;
  font-size: 0.78rem;
}

.shelter-finder__detail {
  display: grid;
  grid-template-columns: minmax(180px, 1fr) minmax(260px, 1.8fr) minmax(200px, 1fr);
  gap: 1rem 1.5rem;
  align-items: start;
  padding: 1.15rem clamp(1rem, 2.5vw, 1.5rem);
  border-top: 1px solid var(--shelter-line);
  background: rgba(122, 255, 184, 0.055);
}

.shelter-finder__detail h3 {
  margin: 0;
  color: var(--shelter-green);
  font-family: inherit;
  font-size: 0.94rem;
  line-height: 1.4;
}

.shelter-finder__detail dl {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 0.65rem 1rem;
  margin: 0;
}

.shelter-finder__detail dl div:last-child:nth-child(odd) {
  grid-column: 1 / -1;
}

.shelter-finder__detail dt {
  color: #708d7e;
  font-size: 0.61rem;
  font-weight: 700;
  letter-spacing: 0.06em;
  text-transform: uppercase;
}

.shelter-finder__detail dd {
  margin: 0.2rem 0 0;
  color: #dff5e8;
  font-size: 0.72rem;
  line-height: 1.45;
}

.shelter-finder__detail p {
  margin: 0;
  color: #8da89a;
  font-size: 0.68rem;
  line-height: 1.55;
}

.shelter-finder__warning,
.shelter-finder noscript p {
  margin: 0;
  padding: 0.9rem clamp(1rem, 2.5vw, 1.5rem);
  border-top: 1px solid rgba(255, 171, 127, 0.34);
  background: rgba(255, 171, 127, 0.065);
  color: #d7b49f;
  font-size: 0.72rem;
  line-height: 1.55;
}

.shelter-finder__warning strong {
  color: var(--shelter-amber);
}

@media (max-width: 860px) {
  .shelter-finder__controls {
    grid-template-columns: 1fr 1fr;
  }

  .shelter-finder__field--search {
    grid-column: 1 / -1;
  }

  .shelter-finder__workspace {
    grid-template-columns: 1fr;
  }

  .shelter-finder__map-panel {
    min-height: 560px;
    border-right: 0;
    border-bottom: 1px solid var(--shelter-line);
  }

  .shelter-finder__map {
    max-height: 540px;
  }

  .shelter-finder__results {
    max-height: 480px;
  }

  .shelter-finder__detail {
    grid-template-columns: 1fr 1.5fr;
  }

  .shelter-finder__detail p {
    grid-column: 1 / -1;
  }
}

@media (max-width: 560px) {
  .shelter-finder {
    margin-right: -0.65rem;
    margin-left: -0.65rem;
  }

  .shelter-finder__controls {
    grid-template-columns: 1fr;
  }

  .shelter-finder__field--search {
    grid-column: auto;
  }

  .shelter-finder__actions {
    display: grid;
    grid-template-columns: 1fr 1fr;
  }

  .shelter-finder__legend {
    position: static;
    justify-content: flex-start;
    max-width: none;
    padding: 0 0.2rem 0.8rem;
  }

  .shelter-finder__map-controls {
    position: static;
    width: max-content;
    max-width: 100%;
    margin: 0 0.2rem 0.7rem;
  }

  .shelter-finder__map-panel {
    display: block;
    min-height: 0;
    padding: 1rem 0.45rem 0.5rem;
  }

  .shelter-finder__map-panel::before {
    display: none;
  }

  .shelter-finder__result {
    grid-template-columns: 1.7rem minmax(0, 1fr);
  }

  .shelter-finder__result-distance {
    grid-column: 2;
  }

  .shelter-finder__detail,
  .shelter-finder__detail dl {
    grid-template-columns: 1fr;
  }

  .shelter-finder__detail p,
  .shelter-finder__detail dl div:last-child:nth-child(odd) {
    grid-column: auto;
  }
}

@media (prefers-reduced-motion: reduce) {
  .shelter-finder__marker {
    transition: none;
  }
}

.county-shelter-map {
  display: grid;
  grid-template-columns: minmax(180px, 0.72fr) minmax(0, 1.28fr);
  min-height: 240px;
  margin: 1rem 0 1.4rem;
  border: 1px solid rgba(122, 255, 184, 0.24);
  background:
    linear-gradient(rgba(122, 255, 184, 0.025) 1px, transparent 1px),
    linear-gradient(90deg, rgba(122, 255, 184, 0.025) 1px, transparent 1px),
    #06100d;
  background-size: 20px 20px;
  color: #dff5e8;
  font-family: "Courier New", Courier, monospace;
  overflow: hidden;
}

.county-shelter-map *,
.county-shelter-map *::before,
.county-shelter-map *::after {
  box-sizing: border-box;
}

.county-shelter-map__graphic {
  display: grid;
  place-items: center;
  min-height: 240px;
  padding: 0.65rem;
  border-right: 1px solid rgba(122, 255, 184, 0.2);
  background: rgba(122, 255, 184, 0.02);
}

.county-shelter-map__graphic svg {
  display: block;
  width: auto;
  height: 218px;
  max-width: 100%;
}

.county-shelter-map__land {
  fill: #10271f;
  stroke: rgba(122, 255, 184, 0.56);
  stroke-width: 1.4;
  vector-effect: non-scaling-stroke;
}

.county-shelter-map__marker {
  color: #ffab7f;
  cursor: pointer;
}

.county-shelter-map__marker.is-roc { color: #7affb8; }
.county-shelter-map__marker.is-military,
.county-shelter-map__marker.is-radar { color: #7fd4ff; }
.county-shelter-map__marker.is-communications,
.county-shelter-map__marker.is-other { color: #c2a8ff; }

.county-shelter-map__marker-halo {
  fill: currentColor;
  opacity: 0.16;
}

.county-shelter-map__marker-dot {
  fill: currentColor;
  stroke: #06100d;
  stroke-width: 1.4;
  vector-effect: non-scaling-stroke;
}

.county-shelter-map__marker-hit {
  fill: transparent;
}

.county-shelter-map__marker:hover .county-shelter-map__marker-halo,
.county-shelter-map__marker:focus .county-shelter-map__marker-halo,
.county-shelter-map__marker.is-selected .county-shelter-map__marker-halo {
  opacity: 0.62;
}

.county-shelter-map__marker:focus-visible {
  outline: 2px solid #ffab7f;
  outline-offset: 2px;
}

.county-shelter-map__marker.is-selected .county-shelter-map__marker-dot {
  stroke: #fff;
  stroke-width: 2.6;
}

.county-shelter-map__copy {
  display: flex;
  flex-direction: column;
  justify-content: center;
  min-width: 0;
  padding: clamp(1rem, 3vw, 1.5rem);
}

.county-shelter-map__copy p {
  margin: 0 0 0.8rem;
  color: #a9c0b4;
  font-size: 0.78rem;
  line-height: 1.58;
}

.county-shelter-map__copy .county-shelter-map__eyebrow {
  color: #7affb8;
  font-size: 0.67rem;
  font-weight: 700;
  letter-spacing: 0.09em;
}

.county-shelter-map__copy .county-shelter-map__selection {
  min-height: 2.7em;
  color: #ffab7f;
  font-size: 0.72rem;
  font-weight: 700;
}

.county-shelter-map__focus {
  align-self: flex-start;
  min-height: 40px;
  margin: 0;
  padding: 0.58rem 0.75rem;
  border: 1px solid #7affb8;
  border-radius: 0;
  background: transparent;
  color: #7affb8;
  font: inherit;
  font-size: 0.7rem;
  font-weight: 700;
  cursor: pointer;
}

.county-shelter-map__focus:hover {
  background: rgba(122, 255, 184, 0.1);
}

.county-shelter-map__focus:focus-visible {
  outline: 2px solid #ffab7f;
  outline-offset: 2px;
}

@media (max-width: 560px) {
  .county-shelter-map {
    grid-template-columns: 1fr;
    min-height: 0;
  }

  .county-shelter-map__graphic {
    min-height: 230px;
    padding: 0.45rem;
    border-right: 0;
    border-bottom: 1px solid rgba(122, 255, 184, 0.2);
  }

  .county-shelter-map__graphic svg {
    height: 218px;
  }

  .county-shelter-map__copy {
    padding: 1rem;
  }

  .county-shelter-map__copy p {
    font-size: 0.7rem;
  }

  .county-shelter-map__copy .county-shelter-map__eyebrow,
  .county-shelter-map__copy .county-shelter-map__selection,
  .county-shelter-map__focus {
    font-size: 0.67rem;
  }

  .county-shelter-map__focus {
    width: 100%;
  }
}
