/* Gallery (gallery.html): a map of where the pictures were taken, a panel with a place's pictures, and the viewer. */
.gl-head { display: flex; flex-wrap: wrap; justify-content: space-between; align-items: end; gap: 8px 24px; padding: 36px 0 18px; }
.gl-head h1 { margin: 0; font: 500 clamp(2rem, 4vw, 2.8rem)/1.05 var(--head); letter-spacing: -.02em; }
.gl-head .intro { margin: 0; max-width: 46ch; }
.gl-stage { position: relative; }
.gl-map { height: min(68vh, 600px); min-height: 380px; border: 1px solid var(--line); border-radius: 12px; overflow: hidden; background: #E9EEF0; z-index: 0; }
.gl-map.is-off { display: grid; place-items: center; color: var(--ink-2); }
.leaflet-container { font: inherit; }
.leaflet-control-attribution { font-size: 11px; }
.leaflet-tooltip { font-size: .8rem; line-height: 1.35; }
/* Pins: a round badge with the number of pictures; field work in green, talks and conferences in blue. */
.gl-pin { position: relative; display: grid; place-items: center; width: 34px; height: 34px; border-radius: 50%; background: #3F8F48; color: #fff; box-shadow: 0 0 0 3px rgba(255,255,255,.9), 0 4px 12px rgba(23,32,38,.35); font: 600 .82rem/1 var(--sans); transition: transform .2s, box-shadow .2s; cursor: pointer; }
.gl-pin.k-talk { background: var(--q-where); }
.gl-pin::after { content: ""; position: absolute; inset: -7px; border-radius: 50%; border: 2px solid currentColor; color: #3F8F48; opacity: 0; animation: gl-ping 2.6s ease-out infinite; }
.gl-pin.k-talk::after { color: var(--q-where); }
@keyframes gl-ping { 0% { transform: scale(.7); opacity: .7; } 80%, 100% { transform: scale(1.35); opacity: 0; } }
.leaflet-marker-icon:hover .gl-pin, .gl-pin.is-on { transform: scale(1.18); box-shadow: 0 0 0 3px #fff, 0 0 0 6px var(--ink), 0 6px 16px rgba(23,32,38,.4); }
.gl-pin.is-on::after { animation: none; }
.leaflet-marker-icon:focus-visible { outline: none; }
.leaflet-marker-icon:focus-visible .gl-pin { box-shadow: 0 0 0 3px #fff, 0 0 0 6px var(--link); }

/* The panel sits over the right of the map. */
.gl-panel { position: absolute; z-index: 1000; top: 12px; right: 12px; bottom: 28px; width: min(380px, 42%); overflow: auto; padding: 18px 18px 16px; border-radius: 10px; background: var(--surface); box-shadow: 0 14px 36px var(--shadow); }
.gl-panel[hidden] { display: none; }
.gl-close { position: absolute; top: 10px; right: 10px; width: 32px; height: 32px; border: 0; border-radius: 50%; background: var(--tag-bg); color: var(--ink); font: 400 1.3rem/1 var(--sans); cursor: pointer; }
.gl-kick { margin: 0 40px 4px 0; font: 500 .86rem/1.5 var(--sans); color: var(--ink-2); }
.gl-panel h2 { margin: 0 30px 6px 0; font: 500 1.25rem/1.25 var(--head); }
.gl-text { margin: 0 0 12px; font-size: .88rem; line-height: 1.5; color: var(--ink-2); }
.gl-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 8px; margin: 0; padding: 0; list-style: none; }
.gl-grid.is-one { grid-template-columns: 1fr; }
.gl-thumb { display: block; width: 100%; padding: 0; border: 0; border-radius: 6px; overflow: hidden; background: var(--tag-bg); cursor: zoom-in; }
.gl-thumb img { display: block; width: 100%; aspect-ratio: 4 / 3; object-fit: cover; transition: transform .3s; }
.gl-grid.is-one .gl-thumb img { aspect-ratio: auto; }
.gl-thumb:hover img { transform: scale(1.04); }

/* The places, under the map */
.gl-places { display: flex; flex-wrap: wrap; gap: 8px; margin: 14px 0 0; padding: 0; list-style: none; }
.gl-place { display: grid; grid-template-columns: auto 1fr; column-gap: 8px; align-items: center; padding: 8px 14px 8px 12px; border: 1px solid var(--line); border-radius: 10px; background: var(--surface); color: var(--ink); font: inherit; text-align: left; cursor: pointer; }
.gl-place:hover, .gl-place[aria-expanded="true"] { border-color: var(--ink-2); background: var(--hover); }
.gl-place-dot { grid-row: span 2; width: 10px; height: 10px; border-radius: 50%; background: #3F8F48; }
.gl-place.k-talk .gl-place-dot { background: var(--q-where); }
.gl-place-t { font-size: .92rem; font-weight: 500; }
.gl-place-m { font-size: .78rem; color: var(--ink-2); }
.gl-err { color: var(--ink-2); }

/* The viewer */
.gl-viewer { width: min(1000px, calc(100% - 32px)); max-height: calc(100dvh - 32px); padding: 0; border: 0; background: transparent; color: #fff; overflow: visible; }
.gl-viewer::backdrop { background: rgba(12,18,22,.9); }
.gl-viewer figure { margin: 0; }
.gl-viewer img { display: block; width: 100%; max-height: calc(100dvh - 150px); object-fit: contain; border-radius: 6px; }
.gl-viewer figcaption { padding: 10px 2px 0; }
.gl-viewer figcaption p { margin: 0; font-size: 1.02rem; line-height: 1.45; }
.gl-viewer .gl-viewer-meta { margin-top: 4px; font-size: .84rem; color: #C9D3D6; }
.gl-viewer-btn { position: absolute; width: 44px; height: 44px; border: 0; border-radius: 50%; background: rgba(255,255,255,.16); color: #fff; font: 400 1.5rem/1 var(--sans); cursor: pointer; }
.gl-viewer-btn:hover { background: rgba(255,255,255,.28); }
.gl-close-v { top: -52px; right: 0; }
.gl-prev { top: 40%; left: -60px; }
.gl-next { top: 40%; right: -60px; }
.gl-viewer.is-single .gl-prev, .gl-viewer.is-single .gl-next { display: none; }

@media (prefers-color-scheme: dark) { :root:not([data-theme="light"]) .gl-map { background: #1B262B; } }
@media (max-width: 760px) {
  .gl-head { padding-top: 24px; }
  .gl-map { height: 56vh; min-height: 320px; }
  .gl-panel { position: relative; inset: auto; width: auto; margin-top: 12px; box-shadow: none; border: 1px solid var(--line); }
  .gl-prev { left: 4px; top: auto; bottom: -56px; } .gl-next { right: 4px; top: auto; bottom: -56px; }
}
@media (prefers-reduced-motion: reduce) { .gl-pin::after { animation: none; } .gl-pin, .gl-thumb img { transition: none; } }

/* Basemaps (assets/gallery.js). Only the Streets map is toned down, and darkened in dark mode; the colourful ones stay as they are.
   The layers button under the zoom buttons switches between them. */
.gl-map[data-base="streets"] .leaflet-tile-pane { filter: saturate(.7) brightness(1.03); }
@media (prefers-color-scheme: dark) { :root:not([data-theme="light"]) .gl-map[data-base="streets"] .leaflet-tile-pane { filter: invert(1) hue-rotate(180deg) brightness(.9) contrast(.85) saturate(.6); } }
:root[data-theme="dark"] .gl-map[data-base="streets"] .leaflet-tile-pane { filter: invert(1) hue-rotate(180deg) brightness(.9) contrast(.85) saturate(.6); }
.gl-map .leaflet-control-layers { border: 1px solid var(--line); border-radius: 8px; box-shadow: 0 6px 18px rgba(15,26,31,.16); font: .85rem/1.5 var(--sans); }
.gl-map .leaflet-control-layers-expanded { padding: 8px 12px 8px 8px; background: var(--surface); color: var(--ink); }
.gl-map .leaflet-control-layers label { margin: 2px 0; cursor: pointer; }
.gl-map .leaflet-control-layers-list { padding-top: 0; } /* Leaflet's list is a <section>; the site pads sections at the top */
