/* SOOC Summer 2026 — public entries map.
   Rebuilt 2026-10-26 on the Editions hub map grammar (Raz: "this map sucks,
   go and look at the editions map"): photographs as markers, stacked when
   closer than a thumbnail, with a count and a place label; the countries in
   play washed; a stack fans into a grid once it can't split further; a card
   beside the marker; a strip of what's in view under the map.
   Source of the grammar: apps/shopify-theme/assets/aios-ehub-look.js + .css.
   Neutral palette (ink + Fujifilm green) because it sits inside Fujifilm's page.
   Square corners everywhere; stroke SVG icons only. */

:root {
  --ink: #191919;
  --soft: #6b675c;
  --faint: #9a958a;
  --acc: #00a840;       /* Fujifilm / SOOC green: frames, outlines, country wash */
  --acc-ink: #00812f;   /* deeper green wherever it carries text (white-on-green, green-on-white legible) */
  --paper: #ffffff;
  --sans: "Archivo", -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Arial, sans-serif;
  --bar: 46px;
  --strip: 158px;
}

.sooc-map-body {
  margin: 0; background: var(--paper); color: var(--ink);
  font-family: var(--sans); font-size: 15px; line-height: 1.4;
  -webkit-font-smoothing: antialiased;
}
.sooc-map-body button { font-family: var(--sans); color: var(--ink); background: none; border: 0; cursor: pointer; }
.sooc-map-body p { margin: 0; }
.ic { width: 18px; height: 18px; fill: none; stroke: currentColor; stroke-width: 1.6; flex: none; }

.sm { max-width: 1440px; margin: 0 auto; padding: 40px 32px; }
/* 100dvh = the VISIBLE height. Plain 100vh on a phone browser includes the area
   behind the address bar, so the embed ran taller than the screen. */
.is-embed .sm { max-width: none; padding: 0; height: 100vh; height: 100dvh; display: flex; flex-direction: column; overflow: hidden; }

/* ---------- head (standalone page only) ---------- */

.sm__head { margin-bottom: 24px; }
.sm__eyebrow { font-size: 11px; font-weight: 600; letter-spacing: .12em; text-transform: uppercase; color: var(--soft); margin-bottom: 10px !important; }
.sm__title { font-size: clamp(30px, 4vw, 46px); font-weight: 500; line-height: 1.08; margin: 0 0 12px; }
.sm__lede { font-size: 17px; color: #333; text-wrap: pretty; }
.sm__foot { margin-top: 12px !important; font-size: 13px; color: var(--soft); }

/* ---------- toolbar ---------- */

.sm__bar {
  display: flex; align-items: stretch; flex: none;
  min-height: var(--bar); border: 1.5px solid var(--ink); background: #fff;
}
.is-embed .sm__bar { border-width: 0 0 1.5px; }
.sm__views { display: flex; flex: 1 1 auto; }
.sm__view {
  flex: 1 1 0; display: flex; align-items: center; justify-content: center; gap: 10px;
  padding: 0 16px; border-right: 1.5px solid var(--ink) !important;
  font-size: 13px; font-weight: 600; letter-spacing: .06em; text-transform: uppercase;
}
.sm__view[aria-selected=true] { background: var(--ink); color: #fff; }
.sm__view:hover:not([aria-selected=true]) { background: #f4f4f1; }
.sm__short { display: none; }
.sm__filters { display: flex; border-right: 1.5px solid var(--ink); }
.sm__filter {
  padding: 0 18px; font-size: 13px; font-weight: 600; letter-spacing: .06em; text-transform: uppercase;
}
.sm__filter + .sm__filter { border-left: 1.5px solid var(--ink) !important; }
.sm__filter[aria-pressed=true] { background: var(--ink); color: #fff; }
.sm__filter[data-filter=winners][aria-pressed=true] { background: var(--acc-ink); }
.sm__count {
  display: flex; align-items: center; padding: 0 18px; white-space: nowrap;
  font-size: 13px; color: var(--soft); font-variant-numeric: tabular-nums;
}
.sooc-map-body :focus-visible { outline: 2px solid var(--acc); outline-offset: -2px; }

/* ---------- map stage ---------- */

.mp {
  position: relative; height: clamp(460px, 64vh, 720px); background: #e9e9e4; overflow: hidden;
  border: 1.5px solid var(--ink); border-top: 0;
}
.is-embed .mp { flex: 1 1 auto; height: auto; min-height: 240px; border: 0; }
.mp__map, .mp__map.maplibregl-map { position: absolute; inset: 0; width: 100%; height: 100%; }
.mp .maplibregl-ctrl-attrib, .mp .maplibregl-ctrl-bottom-right, .mp .maplibregl-ctrl-bottom-left { display: none !important; }
.mp .maplibregl-ctrl-group, .mp .maplibregl-ctrl-group button { border-radius: 0; }
.mp .maplibregl-ctrl-group { box-shadow: none; border: 1.5px solid var(--ink); }

.mp__base { position: absolute; top: 14px; right: 14px; z-index: 5; display: flex; background: #fff; border: 1.5px solid var(--ink); }
.mp__base button { padding: 8px 14px; font-size: 11px; font-weight: 600; letter-spacing: .1em; text-transform: uppercase; }
.mp__base button + button { border-left: 1.5px solid var(--ink) !important; }
.mp__base button[aria-pressed=true] { background: var(--ink); color: #fff; }

.mp__attr {
  position: absolute; right: 14px; bottom: 10px; z-index: 5;
  font-size: 9px; letter-spacing: .12em; text-transform: uppercase; color: rgba(25, 25, 25, .45);
}
.mp__loading {
  position: absolute; inset: 0; z-index: 8; display: flex; align-items: center; justify-content: center;
  background: #e9e9e4; font-size: 14px; color: var(--soft);
}

/* ---------- photo markers (Editions .hm) ---------- */
/* The root .hm is MapLibre's marker node: MapLibre owns its position and
   transform. Never set position:relative / transform / a transform
   transition on it (that is what made the old version jump). */

.hm { width: 56px; padding: 0; display: block; }
.hm__f {
  display: block; width: 56px; border: 2px solid #fff; background: #fff; box-sizing: border-box;
  box-shadow: 0 1px 5px rgba(0, 0, 0, .22);
  transition: transform .18s ease, border-color .18s ease;
}
.hm__f img { width: 100%; height: auto; display: block; }
.hm--stack .hm__f { position: absolute; left: 0; bottom: 0; transform: translate(calc(var(--i) * 5px), calc(var(--i) * -5px)); }
.hm--stack .hm__f.is-front { position: relative; transform: none; }
.hm.is-win .is-front { border-color: var(--acc); }
.hm:hover, .hm.is-hl { z-index: 30; }
.hm:hover .is-front, .hm.is-hl .is-front { transform: scale(1.16); border-color: var(--ink); }
.hm__n {
  position: absolute; top: -10px; right: -14px; z-index: 2;
  min-width: 20px; height: 20px; padding: 0 5px; box-sizing: border-box;
  background: var(--ink); color: #fff; font-size: 11px; font-weight: 600;
  display: flex; align-items: center; justify-content: center; font-variant-numeric: tabular-nums;
}
.hm__l {
  position: absolute; left: 50%; top: 100%; transform: translate(-50%, 6px); white-space: nowrap;
  font-size: 10px; font-weight: 600; letter-spacing: .1em; text-transform: uppercase;
  color: var(--ink); background: rgba(255, 255, 255, .94); padding: 2px 5px;
}
.hm:not(.has-l) .hm__l { display: none; }
/* a stack fanned out into a grid */
.hm--sp { width: var(--s); }
.hm--sp .hm__f { width: var(--s); height: var(--s); animation: hmIn .22s ease both; animation-delay: var(--d); }
.hm--sp .hm__f img { width: 100%; height: 100%; object-fit: cover; }
.hm--sp:hover .hm__f { transform: scale(1.12); border-color: var(--ink); }
@keyframes hmIn { from { opacity: 0; transform: scale(.6); } to { opacity: 1; transform: none; } }
@media (prefers-reduced-motion: reduce) { .hm--sp .hm__f { animation: none; } }

/* ---------- card beside the marker (Editions .mc) ---------- */

.mc {
  position: absolute; z-index: 20; width: 230px; background: #fff; color: var(--ink);
  box-shadow: 0 16px 40px rgba(18, 18, 18, .16), 0 0 0 1px rgba(18, 18, 18, .06);
}
.mc[hidden] { display: none; }
.mc img { width: 100%; height: auto; max-height: 220px; object-fit: contain; background: #f2f2f0; display: block; }
.mc__d { display: grid; gap: 3px; padding: 12px 14px 14px; font-size: 13px; line-height: 1.35; }
.mc__l { font-size: 10px; font-weight: 600; letter-spacing: .14em; text-transform: uppercase; color: var(--soft); }
.mc__d b { font-weight: 500; font-size: 15px; }
.mc__d a { color: var(--ink); text-decoration: none; }
.mc__d a:hover { text-decoration: underline; }
.mc__s { color: var(--soft); }
.mc__w {
  justify-self: start; margin-bottom: 4px; background: var(--acc-ink); color: #fff;
  font-size: 10px; font-weight: 600; letter-spacing: .12em; text-transform: uppercase; padding: 3px 7px;
}

/* ---------- strip of what's in view (Editions .ms) ---------- */

.ms {
  display: flex; gap: 14px; overflow-x: auto; overflow-y: hidden; flex: none;
  height: var(--strip); box-sizing: border-box; padding: 14px 16px 10px;
  border: 1.5px solid var(--ink); border-top: 0; background: #fff;
  scroll-snap-type: x proximity; scroll-padding-left: 16px; scrollbar-width: thin;
}
.is-embed .ms { border: 0; border-top: 1.5px solid var(--ink); }
.ms__c { flex: none; display: flex; flex-direction: column; align-items: flex-start; text-align: left; padding: 0; scroll-snap-align: start; }
.ms__c[hidden] { display: none !important; }
.ms__c img { height: 92px; width: auto; max-width: 180px; object-fit: cover; display: block; background: #f2f2f0; }
.ms__c:hover img, .ms__c.is-on img { outline: 2px solid var(--ink); outline-offset: -2px; }
.ms__t { width: 0; min-width: 100%; display: grid; gap: 2px; padding-top: 7px; }
.ms__t b { font-weight: 500; font-size: 12.5px; line-height: 1.3; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.ms__t span { font-size: 10px; font-weight: 600; letter-spacing: .12em; text-transform: uppercase; color: var(--faint); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.ms__t span.is-win { color: var(--acc-ink); }
.ms__empty { align-self: center; font-size: 14px; color: var(--soft); }

/* ---------- lightbox ---------- */

.lb {
  position: fixed; inset: 0; z-index: 100; display: flex;
  background: #111; color: var(--ink);
}
.lb[hidden] { display: none; }
.lb__stage { position: relative; flex: 1 1 auto; min-width: 0; display: flex; align-items: center; justify-content: center; padding: 28px 64px; }
.lb__img { max-width: 100%; max-height: 100%; object-fit: contain; display: block; }
.lb__img.is-loading { opacity: .35; }
/* sits over the photo so "Save image as" / long-press never reaches the <img> */
.lb__shield { position: absolute; inset: 0; }
.lb__nav {
  position: absolute; top: 50%; z-index: 2; transform: translateY(-50%);
  width: 44px; height: 44px; display: flex; align-items: center; justify-content: center;
  background: rgba(255, 255, 255, .92) !important; border: 1.5px solid var(--ink) !important;
}
.lb__nav:hover { background: #fff !important; }
.lb__nav[disabled] { opacity: .3; cursor: default; }
.lb__prev { left: 12px; } .lb__next { right: 12px; }
.lb__close {
  position: absolute; top: 12px; right: 12px; z-index: 3;
  width: 40px; height: 40px; display: flex; align-items: center; justify-content: center;
  background: #fff !important; border: 1.5px solid var(--ink) !important;
}
.lb__meta {
  flex: none; width: 340px; box-sizing: border-box; overflow-y: auto;
  background: #fff; padding: 64px 26px 26px; display: flex; flex-direction: column; gap: 14px;
}
.lb__w { align-self: flex-start; background: var(--acc-ink); color: #fff; font-size: 11px; font-weight: 600; letter-spacing: .12em; text-transform: uppercase; padding: 4px 8px; }
.lb__l { font-size: 11px; font-weight: 600; letter-spacing: .14em; text-transform: uppercase; color: var(--soft); }
.lb__t { font-size: 22px; font-weight: 500; line-height: 1.2; margin: 0; }
.lb__c { font-size: 15px; line-height: 1.55; color: #333; white-space: pre-line; text-wrap: pretty; }
.lb__by { font-size: 15px; font-weight: 500; }
.lb__by a { color: var(--ink); font-weight: 400; }
.lb__dl { display: grid; grid-template-columns: auto 1fr; gap: 8px 16px; margin: 4px 0 0; padding-top: 14px; border-top: 1.5px solid var(--ink); font-size: 13px; }
.lb__dl dt { font-size: 10.5px; font-weight: 600; letter-spacing: .12em; text-transform: uppercase; color: var(--soft); padding-top: 2px; }
.lb__dl dd { margin: 0; text-align: start; }
.lb__t[dir], .lb__c[dir] { text-align: start; }
.lb__n { margin-top: auto !important; padding-top: 10px; font-size: 12px; color: var(--soft); font-variant-numeric: tabular-nums; }

/* no right-click save, drag-out or long-press save on any photograph */
.sm img, .lb img { -webkit-user-drag: none; user-select: none; -webkit-user-select: none; -webkit-touch-callout: none; }

/* ---------- small screens ---------- */

@media (max-width: 699px) {
  :root { --strip: 132px; }
  .sm { padding: 24px 16px; }
  .sm__bar { flex-wrap: wrap; }
  .sm__views { flex: 1 1 100%; border-bottom: 1.5px solid var(--ink); }
  .sm__view { padding: 0 8px; min-height: 44px; font-size: 12px; gap: 8px; }
  .sm__view:last-child { border-right: 0 !important; }
  .sm__filters { min-height: 40px; }
  .sm__count { flex: 1; justify-content: flex-end; padding: 0 12px; font-size: 12px; }
  .mp { height: 58vh; }
  .mp .maplibregl-ctrl-top-left { display: none; }
  .hm, .hm__f { width: 46px; }
  .ms__c img { height: 72px; max-width: 140px; }
  .mc { width: 200px; }
  .lb { flex-direction: column; }
  .lb__stage { flex: 0 0 auto; height: 52vh; padding: 52px 8px 10px; }
  .lb__nav { width: 38px; height: 38px; top: auto; bottom: 14px; transform: none; }
  .lb__meta { width: auto; flex: 1 1 auto; padding: 18px 18px 22px; gap: 10px; }
  .lb__t { font-size: 19px; }
}
@media (max-width: 420px) {
  .sm__long { display: none; }
  .sm__short { display: inline; }
}
