/* Location controls and modal gallery. Large page surfaces stay black in Blackmode. */
.location-filter {
  grid-column: 1/-1;
  min-width: 0;
}
.location-scope,
.location-chips {
  display: flex;
  gap: 7px;
  flex-wrap: wrap;
  margin: 8px 0 12px;
}
.location-columns {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 1.4fr);
  gap: 16px;
}
.location-columns fieldset {
  min-width: 0;
  border: 0;
  margin: 0;
  padding: 0;
}
.location-columns .filterchoices {
  max-height: 205px;
}
.location-columns .filterchoices label {
  display: flex;
  gap: 8px;
}
.location-columns .filterchoices span {
  flex: 1;
}
.location-columns .filterchoices small {
  font-size: 11px;
  color: var(--muted);
}
.location-search {
  width: 100%;
  min-height: 44px;
  padding: 9px;
  border: 1px solid #73859a;
  border-radius: 5px;
  margin: 0 0 8px;
  font: inherit;
}
.location-radius {
  display: flex;
  gap: 8px;
  align-items: center;
  flex-wrap: wrap;
  font-size: 12px;
  margin-top: 10px;
}
.location-radius select {
  min-height: 40px;
  max-width: 100%;
  padding: 8px;
  border: 1px solid #73859a;
  border-radius: 4px;
  font: inherit;
}
.location-help {
  font-size: 12px;
  color: var(--muted);
  margin: 8px 0;
}
.location-chip {
  font: inherit;
  font-size: 12px;
  border: 1px solid #1565a7;
  background: #eaf3fb;
  color: #174f7e;
  border-radius: 18px;
  padding: 7px 11px;
  min-height: 36px;
}
.location-attribution {
  font-size: 10px;
  color: var(--muted);
}
.gallerygrid button {
  display: block;
  width: 100%;
  padding: 0;
  border: 0;
  border-radius: 4px;
  overflow: hidden;
  cursor: zoom-in;
}
.image-gallery {
  width: min(1120px, calc(100% - 16px));
  max-height: 96dvh;
  overflow: auto;
  padding: 0;
}
.image-gallery .gallery-header {
  display: flex;
  gap: 12px;
  align-items: center;
  justify-content: space-between;
  padding: 12px 16px;
  border-bottom: 1px solid var(--line);
  position: sticky;
  top: 0;
  background: var(--paper);
  z-index: 1;
}
.image-gallery h2 {
  font-size: 18px;
  margin: 0;
  overflow-wrap: anywhere;
}
.image-gallery .gallery-header .button {
  flex-shrink: 0;
}
.image-gallery figure {
  margin: 0;
  padding: 12px;
  text-align: center;
  touch-action: pan-y pinch-zoom;
  background: #000;
}
.image-gallery figure img {
  display: block;
  width: 100%;
  height: min(64dvh, 700px);
  object-fit: contain;
  background: #000;
}
.image-gallery figcaption {
  color: #dae5f0;
  font-size: 11px;
  margin-top: 8px;
}
.gallery-controls {
  display: flex;
  justify-content: center;
  align-items: center;
  gap: 18px;
  padding: 12px;
}
.gallery-controls .button {
  font-size: 22px;
  min-width: 48px;
}
.gallery-counter {
  font-size: 13px;
  min-width: 60px;
  text-align: center;
}
.gallery-bottom {
  padding: 0 16px 14px;
  text-align: center;
}
.gallery-bottom p {
  font-size: 12px;
  margin: 0 0 8px;
  color: var(--muted);
}
@media (max-width: 550px) {
  .location-columns {
    grid-template-columns: 1fr;
  }
  .image-gallery .gallery-header {
    padding: 10px;
  }
  .image-gallery h2 {
    font-size: 16px;
  }
  .image-gallery figure {
    padding: 6px;
  }
  .image-gallery figure img {
    height: 57dvh;
  }
}
@media screen and (forced-colors: none) {
  html[data-theme="black"] .location-chip {
    background: #0b2943;
    color: #d6ecff;
    border-color: #3478aa;
  }
  html[data-theme="black"] .image-gallery .gallery-header {
    background: #000;
    border-color: #3478aa;
  }
}
@media print {
  .image-gallery {
    display: none !important;
  }
}
/* Give native checkboxes a full minimum target, including near the sticky navigation. */
.filterchoices input[type="checkbox"] {
  width: 24px;
  height: 24px;
  min-width: 24px;
  min-height: 24px;
}
.image-gallery {
  background: var(--paper);
  color: var(--ink);
}
