/* TSA Stockist Map (0.7 look: the map fills the widget, the search and list float over it).
   Selectors are doubled / prefixed with #top so theme form, button and list styles (Enfold)
   don't win. No rounded corners anywhere (Jerry 2026-11-13). Colours come from the shortcode's
   inline variables (tsa_sm_theme). .is-narrow is set by the script from the widget's own
   width, not the viewport. Map chrome is MapLibre's (.maplibregl-*), restyled at the end. */
.tsa-sm {
  --tsa-sm-accent: #005ec4;
  --tsa-sm-on-accent: #fff;
  --tsa-sm-bg: #fff;
  --tsa-sm-text: #12151a;
  --tsa-sm-muted: #626a76;
  --tsa-sm-line: #e7e9ed;
  --tsa-sm-soft: #f3f4f6;
  --tsa-sm-field: #cdd2d9;
  --tsa-sm-ink: #12151a;
  --tsa-sm-on-ink: #fff;
  --tsa-sm-shadow: 0 12px 32px rgba(16, 22, 32, .16), 0 1px 3px rgba(16, 22, 32, .14);
  --tsa-sm-lift: 0 2px 8px rgba(16, 22, 32, .22), 0 0 0 1px rgba(16, 22, 32, .06);
  color: var(--tsa-sm-text);
  font-family: system-ui, -apple-system, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
  font-size: 15px;
  line-height: 1.45;
  letter-spacing: 0;
  text-align: left;
  -webkit-font-smoothing: antialiased;
}
.tsa-sm.tsa-sm--dark {
  --tsa-sm-bg: #16181c;
  --tsa-sm-text: #f1f2f4;
  --tsa-sm-muted: #a2a8b2;
  --tsa-sm-line: #2b2f36;
  --tsa-sm-soft: #1f2227;
  --tsa-sm-field: #3b4049;
  --tsa-sm-ink: #f1f2f4;
  --tsa-sm-on-ink: #12151a;
  --tsa-sm-shadow: 0 12px 32px rgba(0, 0, 0, .5), 0 0 0 1px rgba(255, 255, 255, .06);
  --tsa-sm-lift: 0 2px 8px rgba(0, 0, 0, .5), 0 0 0 1px rgba(255, 255, 255, .08);
}
.tsa-sm *, .tsa-sm *::before, .tsa-sm *::after { box-sizing: border-box; border-radius: 0 !important; }
.tsa-sm [hidden] { display: none !important; }
.tsa-sm .tsa-sm-title { margin: 0 0 16px; }

/* ---------- stage: map underneath, panel and category chips on top ---------- */
.tsa-sm .tsa-sm-stage { position: relative; height: var(--tsa-sm-h, 640px); overflow: hidden; background: var(--tsa-sm-soft); }
/* isolate: the map's own layers (popup, gesture hint) stay under the panel and the chips */
.tsa-sm .tsa-sm-mapwrap { position: absolute; inset: 0; z-index: 0; isolation: isolate; }
.tsa-sm .tsa-sm-map { position: absolute; inset: 0; background: var(--tsa-sm-soft); transition: opacity .2s; }
.tsa-sm.is-busy .tsa-sm-map { opacity: .65; }
.tsa-sm .tsa-sm-panel {
  position: absolute; z-index: 3; top: 16px; left: 16px; width: 384px; max-width: calc(100% - 32px); max-height: calc(100% - 32px);
  display: flex; flex-direction: column; background: var(--tsa-sm-bg); box-shadow: var(--tsa-sm-shadow);
}
.tsa-sm .tsa-sm-cats { position: absolute; z-index: 2; top: 16px; left: 416px; right: 16px; pointer-events: none; }
.tsa-sm .tsa-sm-cats > * { pointer-events: auto; }
.tsa-sm.tsa-sm--nomap .tsa-sm-stage { display: flex; flex-direction: column; height: auto; overflow: visible; background: none; }
.tsa-sm.tsa-sm--nomap .tsa-sm-mapwrap { display: none; }
.tsa-sm.tsa-sm--nomap .tsa-sm-panel { position: relative; top: 0; left: 0; width: 100%; max-width: none; max-height: var(--tsa-sm-h, 640px); box-shadow: 0 0 0 1px var(--tsa-sm-line); }
.tsa-sm.tsa-sm--nomap .tsa-sm-cats { order: -1; position: static; margin-bottom: 12px; }
.tsa-sm.tsa-sm.tsa-sm--nomap .tsa-sm-cats .tsa-sm-chip { box-shadow: inset 0 0 0 1px var(--tsa-sm-field); }

/* ---------- search ---------- */
.tsa-sm .tsa-sm-bar { flex: none; padding: 16px 16px 12px; }
#top .tsa-sm .tsa-sm-search,
.tsa-sm.tsa-sm .tsa-sm-search {
  position: relative; display: flex; height: 48px; margin: 0; padding: 0; background: var(--tsa-sm-bg);
  border: 1px solid var(--tsa-sm-field); transition: border-color .12s, box-shadow .12s;
}
.tsa-sm .tsa-sm-search:focus-within { border-color: var(--tsa-sm-ink); box-shadow: 0 0 0 1px var(--tsa-sm-ink); }
.tsa-sm .tsa-sm-search::before {
  content: ""; position: absolute; left: 14px; top: 50%; width: 18px; height: 18px; margin-top: -9px; pointer-events: none; background: var(--tsa-sm-muted);
  -webkit-mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 18 18' fill='none' stroke='%23000' stroke-width='1.8'%3E%3Ccircle cx='7.6' cy='7.6' r='5.4'/%3E%3Cpath d='M11.7 11.7 16.4 16.4'/%3E%3C/svg%3E") center / contain no-repeat;
  mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 18 18' fill='none' stroke='%23000' stroke-width='1.8'%3E%3Ccircle cx='7.6' cy='7.6' r='5.4'/%3E%3Cpath d='M11.7 11.7 16.4 16.4'/%3E%3C/svg%3E") center / contain no-repeat;
}
#top .tsa-sm .tsa-sm-search input,
.tsa-sm.tsa-sm .tsa-sm-search input {
  flex: 1 1 auto; min-width: 0; width: auto; height: 100%; margin: 0; padding: 0 8px 0 40px; font: inherit; font-size: 15px;
  color: var(--tsa-sm-text); background: none; border: 0; border-radius: 0; box-shadow: none; outline: 0; -webkit-appearance: none; appearance: none;
}
.tsa-sm .tsa-sm-search input::placeholder { color: var(--tsa-sm-muted); opacity: 1; }
.tsa-sm .tsa-sm-search input:placeholder-shown { text-overflow: ellipsis; }
.tsa-sm .tsa-sm-search input::-webkit-search-cancel-button { -webkit-appearance: none; }
#top .tsa-sm .tsa-sm-go, #top .tsa-sm .tsa-sm-locate, #top .tsa-sm .tsa-sm-chip, #top .tsa-sm .tsa-sm-clear,
#top .tsa-sm .tsa-sm-more button, #top .tsa-sm .tsa-sm-x, #top .tsa-sm .tsa-sm-pickbtn,
.tsa-sm.tsa-sm .tsa-sm-go, .tsa-sm.tsa-sm .tsa-sm-locate, .tsa-sm.tsa-sm .tsa-sm-chip, .tsa-sm.tsa-sm .tsa-sm-clear,
.tsa-sm.tsa-sm .tsa-sm-more button, .tsa-sm.tsa-sm .tsa-sm-x, .tsa-sm.tsa-sm .tsa-sm-pickbtn {
  font: inherit; line-height: 1; letter-spacing: 0; text-transform: none; min-height: 0; min-width: 0; width: auto; margin: 0;
  cursor: pointer; border-radius: 0; box-shadow: none; text-shadow: none; -webkit-appearance: none; appearance: none;
}
#top .tsa-sm .tsa-sm-go,
.tsa-sm.tsa-sm .tsa-sm-go {
  flex: none; height: auto; margin: -1px -1px -1px 0; padding: 0 18px; font-size: 14px; font-weight: 600;
  color: var(--tsa-sm-on-accent); background: var(--tsa-sm-accent); border: 0; transition: filter .12s;
}
.tsa-sm .tsa-sm-go:hover { filter: brightness(1.12); }
.tsa-sm .tsa-sm-go:disabled { opacity: .6; cursor: progress; }
#top .tsa-sm .tsa-sm-locate,
.tsa-sm.tsa-sm .tsa-sm-locate {
  display: inline-flex; align-items: center; gap: 8px; height: 30px; margin-top: 8px; padding: 0; font-size: 13.5px; font-weight: 600;
  color: var(--tsa-sm-text); background: none; border: 0;
}
.tsa-sm .tsa-sm-locate::before {
  content: ""; flex: none; width: 16px; height: 16px; background: currentColor;
  -webkit-mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 16 16' fill='none' stroke='%23000' stroke-width='1.6'%3E%3Ccircle cx='8' cy='8' r='4.4'/%3E%3Cpath d='M8 .8v3M8 12.2v3M.8 8h3M12.2 8h3'/%3E%3Ccircle cx='8' cy='8' r='1.3' fill='%23000' stroke='none'/%3E%3C/svg%3E") center / contain no-repeat;
  mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 16 16' fill='none' stroke='%23000' stroke-width='1.6'%3E%3Ccircle cx='8' cy='8' r='4.4'/%3E%3Cpath d='M8 .8v3M8 12.2v3M.8 8h3M12.2 8h3'/%3E%3Ccircle cx='8' cy='8' r='1.3' fill='%23000' stroke='none'/%3E%3C/svg%3E") center / contain no-repeat;
}
.tsa-sm .tsa-sm-locate:hover span { text-decoration: underline; text-underline-offset: 3px; }

/* ---------- filters ---------- */
.tsa-sm .tsa-sm-filters { flex: none; padding: 0 16px 14px; }
.tsa-sm .tsa-sm-chips { display: flex; flex-wrap: wrap; gap: 6px; }
#top .tsa-sm .tsa-sm-chip,
.tsa-sm.tsa-sm .tsa-sm-chip {
  display: inline-flex; align-items: center; gap: 7px; height: 30px; padding: 0 10px; font-size: 12.5px; font-weight: 600; white-space: nowrap;
  color: var(--tsa-sm-text); background: var(--tsa-sm-soft); border: 0; transition: background .12s, color .12s;
}
#top .tsa-sm .tsa-sm-chip:hover,
.tsa-sm.tsa-sm .tsa-sm-chip:hover { background: var(--tsa-sm-line); }
#top .tsa-sm .tsa-sm-chip[aria-pressed="true"],
.tsa-sm.tsa-sm .tsa-sm-chip[aria-pressed="true"] { color: var(--tsa-sm-on-ink); background: var(--tsa-sm-ink); }
.tsa-sm .tsa-sm-dot { flex: none; width: 10px; height: 10px; }
/* categories sit on the map: the key to the pin colours, and a filter */
#top .tsa-sm .tsa-sm-cats .tsa-sm-chip,
.tsa-sm.tsa-sm .tsa-sm-cats .tsa-sm-chip { height: 36px; padding: 0 13px; font-size: 13.5px; background: var(--tsa-sm-bg); box-shadow: var(--tsa-sm-lift); }
#top .tsa-sm .tsa-sm-cats .tsa-sm-chip:hover,
.tsa-sm.tsa-sm .tsa-sm-cats .tsa-sm-chip:hover { background: var(--tsa-sm-soft); }
#top .tsa-sm .tsa-sm-cats .tsa-sm-chip[aria-pressed="true"],
.tsa-sm.tsa-sm .tsa-sm-cats .tsa-sm-chip[aria-pressed="true"] { color: var(--tsa-sm-on-ink); background: var(--tsa-sm-ink); }
.tsa-sm .tsa-sm-cats .tsa-sm-chips { gap: 8px; }
#top .tsa-sm select.tsa-sm-select,
.tsa-sm.tsa-sm select.tsa-sm-select {
  display: block; width: 100%; max-width: none; height: 40px; margin: 0; padding: 0 34px 0 12px; font: inherit; font-size: 15px; line-height: 1.2;
  color: var(--tsa-sm-text); text-overflow: ellipsis; border: 1px solid var(--tsa-sm-field); border-radius: 0; box-shadow: none; cursor: pointer;
  -webkit-appearance: none; appearance: none;
  background: var(--tsa-sm-bg) url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 12 8' fill='none' stroke='%237a828e' stroke-width='1.8'%3E%3Cpath d='M1 1.5 6 6.5l5-5'/%3E%3C/svg%3E") right 13px center / 12px 8px no-repeat;
}
/* a filter that is on */
#top .tsa-sm select.tsa-sm-select.is-set,
.tsa-sm.tsa-sm select.tsa-sm-select.is-set { font-weight: 600; border-color: var(--tsa-sm-ink); box-shadow: inset 0 0 0 1px var(--tsa-sm-ink); }
/* wide: chips where there are chips, the dropdown only for a long list */
#top .tsa-sm:not(.is-narrow) .has-chips select.tsa-sm-select,
.tsa-sm.tsa-sm:not(.is-narrow) .has-chips select.tsa-sm-select { display: none; }
.tsa-sm:not(.is-narrow) .tsa-sm-cats select.tsa-sm-select { width: auto; min-width: 200px; box-shadow: var(--tsa-sm-lift); border-color: transparent; }

/* ---------- count ---------- */
.tsa-sm .tsa-sm-meta {
  flex: none; display: flex; align-items: center; justify-content: space-between; gap: 12px; min-height: 40px; padding: 8px 16px;
  font-size: 13px; color: var(--tsa-sm-muted); border-top: 1px solid var(--tsa-sm-line); border-bottom: 1px solid var(--tsa-sm-line);
}
.tsa-sm .tsa-sm-status.is-empty { color: var(--tsa-sm-text); font-weight: 600; }
#top .tsa-sm .tsa-sm-clear,
.tsa-sm.tsa-sm .tsa-sm-clear { flex: none; height: auto; padding: 4px 0; font-size: 13px; font-weight: 600; color: var(--tsa-sm-text); background: none; border: 0; text-decoration: underline; text-underline-offset: 3px; }

/* ---------- list ---------- */
#top .tsa-sm .tsa-sm-list,
.tsa-sm.tsa-sm .tsa-sm-list {
  flex: 1 1 auto; min-height: 0; position: relative; list-style: none; margin: 0; padding: 0; overflow-y: auto; overscroll-behavior: contain;
  background: var(--tsa-sm-bg); scrollbar-width: thin; scrollbar-color: var(--tsa-sm-field) transparent;
}
#top .tsa-sm .tsa-sm-list li,
.tsa-sm.tsa-sm .tsa-sm-list li { margin: 0; padding: 0; list-style: none; background: none; }
.tsa-sm .tsa-sm-list li::before, .tsa-sm .tsa-sm-list li::marker { content: none; }
#top .tsa-sm .tsa-sm-list .tsa-sm-group,
.tsa-sm.tsa-sm .tsa-sm-list .tsa-sm-group {
  position: sticky; top: 0; z-index: 1; padding: 6px 16px; font-size: 12px; font-weight: 700; color: var(--tsa-sm-muted);
  background: var(--tsa-sm-soft); border-bottom: 1px solid var(--tsa-sm-line);
}
#top .tsa-sm .tsa-sm-list .tsa-sm-item,
.tsa-sm.tsa-sm .tsa-sm-list .tsa-sm-item { padding: 13px 16px 14px; border-bottom: 1px solid var(--tsa-sm-line); cursor: pointer; outline: none; transition: background .12s; }
.tsa-sm .tsa-sm-item:hover { background: var(--tsa-sm-soft); }
.tsa-sm .tsa-sm-item:focus-visible { box-shadow: inset 0 0 0 2px var(--tsa-sm-ink); }
#top .tsa-sm .tsa-sm-list .tsa-sm-item.is-active,
.tsa-sm.tsa-sm .tsa-sm-list .tsa-sm-item.is-active { background: var(--tsa-sm-soft); cursor: default; }
#top .tsa-sm .tsa-sm-list .tsa-sm-none,
.tsa-sm.tsa-sm .tsa-sm-list .tsa-sm-none { padding: 20px 16px 24px; font-size: 14px; color: var(--tsa-sm-muted); }
.tsa-sm .tsa-sm-head { display: flex; justify-content: space-between; gap: 12px; align-items: baseline; }
.tsa-sm .tsa-sm-name { font-size: 15px; font-weight: 650; line-height: 1.3; color: var(--tsa-sm-text); }
.tsa-sm .tsa-sm-dist { flex: none; font-size: 13px; font-weight: 600; color: var(--tsa-sm-muted); font-variant-numeric: tabular-nums; white-space: nowrap; }
.tsa-sm .tsa-sm-where, .tsa-sm .tsa-sm-addr { margin-top: 3px; font-size: 13.5px; line-height: 1.4; color: var(--tsa-sm-muted); }
.tsa-sm .tsa-sm-tags { display: flex; flex-wrap: wrap; gap: 2px 12px; margin-top: 7px; }
.tsa-sm .tsa-sm-tag { display: inline-flex; align-items: center; gap: 6px; font-size: 12px; color: var(--tsa-sm-muted); }
.tsa-sm .tsa-sm-tag::before { content: ""; flex: none; width: 8px; height: 8px; background: var(--c); }
/* closed: name, distance, address, categories. Open: notes and the actions. */
.tsa-sm .tsa-sm-item:not(.is-active) .tsa-sm-det { display: none; }
.tsa-sm .tsa-sm-notes { margin-top: 8px; font-size: 13px; color: var(--tsa-sm-muted); white-space: pre-line; overflow-wrap: anywhere; }
.tsa-sm .tsa-sm-notes a { color: var(--tsa-sm-link); text-decoration: underline; }
.tsa-sm img.tsa-sm-logo { display: block; width: auto; height: auto; max-width: 150px; max-height: 44px; margin: 10px 0 0; padding: 4px 6px; background: #fff; border: 1px solid rgba(0, 0, 0, .12); box-shadow: none; }
.tsa-sm .tsa-sm-links { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 12px; }
#top .tsa-sm a.tsa-sm-link,
.tsa-sm.tsa-sm a.tsa-sm-link {
  display: inline-flex; align-items: center; justify-content: center; height: 34px; padding: 0 12px; font-size: 13px; font-weight: 600; line-height: 1;
  color: var(--tsa-sm-text); background: var(--tsa-sm-bg); border: 1px solid var(--tsa-sm-field); text-decoration: none; white-space: nowrap; transition: border-color .12s, filter .12s;
}
#top .tsa-sm a.tsa-sm-link:hover,
.tsa-sm.tsa-sm a.tsa-sm-link:hover { border-color: var(--tsa-sm-ink); text-decoration: none; }
#top .tsa-sm a.tsa-sm-link.tsa-sm-dir,
.tsa-sm.tsa-sm a.tsa-sm-link.tsa-sm-dir { color: var(--tsa-sm-on-accent); background: var(--tsa-sm-accent); border-color: var(--tsa-sm-accent); }
.tsa-sm a.tsa-sm-link.tsa-sm-dir:hover { filter: brightness(1.12); }
#top .tsa-sm a.tsa-sm-onmap,
.tsa-sm.tsa-sm a.tsa-sm-onmap, .tsa-sm .tsa-sm-card, .tsa-sm .tsa-sm-more { display: none; }

/* ---------- markers ---------- */
.tsa-sm .tsa-sm-pin { line-height: 0; cursor: pointer; }
.tsa-sm .tsa-sm-pin svg { display: block; overflow: visible; filter: drop-shadow(0 2px 2px rgba(16, 22, 32, .35)); transform-origin: 50% 100%; transition: transform .14s ease-out; }
.tsa-sm .tsa-sm-pin:hover { z-index: 2; }
.tsa-sm .tsa-sm-pin:hover svg { transform: scale(1.15); }
.tsa-sm .tsa-sm-pin.is-active { z-index: 3; }
.tsa-sm .tsa-sm-pin.is-active svg { transform: scale(1.35); }
.tsa-sm .tsa-sm-cl {
  display: flex; align-items: center; justify-content: center; min-width: 34px; height: 34px; padding: 0 9px; cursor: pointer;
  font-size: 13px; font-weight: 700; line-height: 1; font-variant-numeric: tabular-nums; color: var(--tsa-sm-on-ink); background: var(--tsa-sm-ink);
  box-shadow: 0 0 0 2px var(--tsa-sm-bg), 0 3px 10px rgba(16, 22, 32, .35); transition: background .12s, color .12s;
}
.tsa-sm .tsa-sm-cl:hover { z-index: 2; color: var(--tsa-sm-on-accent); background: var(--tsa-sm-accent); }
.tsa-sm .tsa-sm-origin { line-height: 0; color: #1a73e8; pointer-events: none; }

/* ---------- popup ---------- */
.tsa-sm .maplibregl-popup { z-index: 4; }
.tsa-sm .maplibregl-popup-content { padding: 14px 16px 16px; font: inherit; color: var(--tsa-sm-text); background: var(--tsa-sm-bg); box-shadow: var(--tsa-sm-shadow); }
.tsa-sm .maplibregl-popup-anchor-bottom .maplibregl-popup-tip, .tsa-sm .maplibregl-popup-anchor-bottom-left .maplibregl-popup-tip, .tsa-sm .maplibregl-popup-anchor-bottom-right .maplibregl-popup-tip { border-top-color: var(--tsa-sm-bg); }
.tsa-sm .maplibregl-popup-anchor-top .maplibregl-popup-tip, .tsa-sm .maplibregl-popup-anchor-top-left .maplibregl-popup-tip, .tsa-sm .maplibregl-popup-anchor-top-right .maplibregl-popup-tip { border-bottom-color: var(--tsa-sm-bg); }
.tsa-sm .maplibregl-popup-anchor-left .maplibregl-popup-tip { border-right-color: var(--tsa-sm-bg); }
.tsa-sm .maplibregl-popup-anchor-right .maplibregl-popup-tip { border-left-color: var(--tsa-sm-bg); }
#top .tsa-sm .maplibregl-popup-close-button,
.tsa-sm.tsa-sm .maplibregl-popup-close-button {
  top: 0; right: 0; width: 32px; height: 32px; min-width: 0; min-height: 0; margin: 0; padding: 0; font: 400 20px/32px system-ui, sans-serif;
  color: var(--tsa-sm-muted); background: none; border: 0; box-shadow: none; cursor: pointer;
}
.tsa-sm .maplibregl-popup-close-button:hover { color: var(--tsa-sm-text); background: var(--tsa-sm-soft); }
.tsa-sm .tsa-sm-pop strong { display: block; padding-right: 20px; font-size: 15px; font-weight: 650; line-height: 1.3; }
.tsa-sm .tsa-sm-pop .tsa-sm-notes { margin-top: 6px; }
#top .tsa-sm .tsa-sm-pickbtn,
.tsa-sm.tsa-sm .tsa-sm-pickbtn {
  display: block; width: 100%; height: auto; margin-top: 6px; padding: 9px 10px; font-size: 13.5px; font-weight: 600; line-height: 1.3; text-align: left;
  color: var(--tsa-sm-text); background: var(--tsa-sm-soft); border: 0;
}
.tsa-sm .tsa-sm-pickbtn:hover { background: var(--tsa-sm-line); }
.tsa-sm .tsa-sm-pick strong { margin-bottom: 4px; }

/* ---------- map chrome ---------- */
.tsa-sm .maplibregl-map { font: inherit; }
.tsa-sm .maplibregl-ctrl-bottom-right { z-index: 2; }
.tsa-sm .maplibregl-ctrl-group { background: var(--tsa-sm-bg); box-shadow: var(--tsa-sm-lift); }
#top .tsa-sm .maplibregl-ctrl-group button,
.tsa-sm.tsa-sm .maplibregl-ctrl-group button {
  display: block; width: 34px; height: 34px; min-width: 0; min-height: 0; margin: 0; padding: 0; background-color: transparent; border: 0;
  border-radius: 0; box-shadow: none; cursor: pointer;
}
#top .tsa-sm .maplibregl-ctrl-group button + button,
.tsa-sm.tsa-sm .maplibregl-ctrl-group button + button { border-top: 1px solid var(--tsa-sm-line); }
.tsa-sm .maplibregl-ctrl-group button:hover { background-color: var(--tsa-sm-soft); }
#top .tsa-sm .maplibregl-ctrl-group button.tsa-sm-locate-map,
.tsa-sm.tsa-sm .maplibregl-ctrl-group button.tsa-sm-locate-map { display: flex; align-items: center; justify-content: center; color: var(--tsa-sm-text); }
.tsa-sm.tsa-sm.is-located .maplibregl-ctrl-group button.tsa-sm-locate-map { color: #1a73e8; }
.tsa-sm.is-busy .tsa-sm-locate-map { cursor: progress; }
.tsa-sm.tsa-sm--dark .maplibregl-ctrl-group button .maplibregl-ctrl-icon { filter: invert(1); }
.tsa-sm .maplibregl-ctrl-bottom-right .maplibregl-ctrl { margin: 0 12px 10px 0; }
.tsa-sm .maplibregl-ctrl-attrib a { color: inherit; text-decoration: none; }
.tsa-sm.tsa-sm .maplibregl-ctrl-attrib.maplibregl-compact {
  min-height: 22px; padding: 0 22px 0 0; font-size: 10.5px; line-height: 22px; white-space: nowrap;
  color: var(--tsa-sm-muted); background: var(--tsa-sm-bg); box-shadow: var(--tsa-sm-lift);
}
.tsa-sm.tsa-sm .maplibregl-ctrl-attrib.maplibregl-compact-show { padding: 0 26px 0 8px; }
.tsa-sm .maplibregl-ctrl-attrib-inner { overflow: hidden; text-overflow: ellipsis; max-width: 60vw; }
#top .tsa-sm .maplibregl-ctrl-attrib-button,
.tsa-sm.tsa-sm .maplibregl-ctrl-attrib-button { width: 22px; height: 22px; min-width: 0; min-height: 0; margin: 0; padding: 0; border: 0; box-shadow: none; background-size: 18px; background-position: center; }
.tsa-sm.tsa-sm--dark .maplibregl-ctrl-attrib-button { filter: invert(1); background-color: #e9e7e3; }
.tsa-sm .maplibregl-cooperative-gesture-screen { z-index: 5; padding: 1rem; font-size: 16px; font-weight: 600; line-height: 1.3; background: rgba(16, 22, 32, .55); }
.tsa-sm:not(.is-narrow) .maplibregl-cooperative-gesture-screen { padding-left: 416px; }

/* ---------- narrow (phones, or a narrow column) ---------- */
.tsa-sm.is-narrow .tsa-sm-stage { display: flex; flex-flow: row wrap; gap: 0 8px; height: auto; overflow: visible; background: none; }
.tsa-sm.is-narrow .tsa-sm-panel { display: contents; }
.tsa-sm.is-narrow .tsa-sm-stage > *, .tsa-sm.is-narrow .tsa-sm-panel > * { flex: 0 0 100%; min-width: 0; }
.tsa-sm.is-narrow .tsa-sm-bar { order: 1; padding: 0 0 10px; }
/* state and category: two dropdowns on one row (one alone takes the row) */
.tsa-sm.is-narrow .tsa-sm-filters, .tsa-sm.is-narrow .tsa-sm-cats { order: 2; flex: 1 1 0; position: static; padding: 0 0 12px; }
.tsa-sm.is-narrow .tsa-sm-chips { display: none; }
#top .tsa-sm.is-narrow select.tsa-sm-select,
.tsa-sm.tsa-sm.is-narrow select.tsa-sm-select { height: 48px; padding-left: 14px; font-size: 16px; }
.tsa-sm.is-narrow .tsa-sm-meta { order: 4; min-height: 0; padding: 0 0 10px; border: 0; }
.tsa-sm.is-narrow .tsa-sm-mapwrap { order: 5; position: relative; inset: auto; height: clamp(280px, 50vh, 420px); }
.tsa-sm.is-narrow .tsa-sm-card { order: 6; }
#top .tsa-sm.is-narrow .tsa-sm-list,
.tsa-sm.tsa-sm.is-narrow .tsa-sm-list { order: 7; flex: 0 0 100%; overflow: visible; border: 1px solid var(--tsa-sm-line); border-top: 0; }
#top .tsa-sm.is-narrow .tsa-sm-search,
.tsa-sm.tsa-sm.is-narrow .tsa-sm-search { height: 50px; }
/* 16px: iOS zooms the page into any smaller field */
#top .tsa-sm.is-narrow .tsa-sm-search input,
.tsa-sm.tsa-sm.is-narrow .tsa-sm-search input { font-size: 16px; }
#top .tsa-sm.is-narrow .tsa-sm-locate,
.tsa-sm.tsa-sm.is-narrow .tsa-sm-locate { height: 40px; margin-top: 6px; font-size: 14px; }

/* the tapped pin's store, under the map */
.tsa-sm.is-narrow .tsa-sm-card.is-open {
  display: block; position: relative; padding: 14px 52px 16px 16px; background: var(--tsa-sm-bg);
  border: 1px solid var(--tsa-sm-line); border-top: 3px solid var(--tsa-sm-ink);
}
#top .tsa-sm .tsa-sm-x,
.tsa-sm.tsa-sm .tsa-sm-x { position: absolute; top: 0; right: 0; width: 48px; height: 48px; padding: 0; font-size: 24px; font-weight: 400; color: var(--tsa-sm-muted); background: none; border: 0; }
.tsa-sm.is-narrow .tsa-sm-card .tsa-sm-name, .tsa-sm.is-narrow .tsa-sm-name { font-size: 16px; }
.tsa-sm.is-narrow .tsa-sm-card .tsa-sm-links { margin-right: -36px; }

#top .tsa-sm.is-narrow .tsa-sm-list .tsa-sm-group,
.tsa-sm.tsa-sm.is-narrow .tsa-sm-list .tsa-sm-group { position: static; padding: 8px 16px; border-top: 1px solid var(--tsa-sm-line); }
#top .tsa-sm.is-narrow .tsa-sm-list .tsa-sm-item,
.tsa-sm.tsa-sm.is-narrow .tsa-sm-list .tsa-sm-item { position: relative; padding: 14px 44px 15px 16px; -webkit-tap-highlight-color: transparent; }
.tsa-sm.is-narrow .tsa-sm-item:hover { background: none; }
.tsa-sm.is-narrow .tsa-sm-item.is-active { cursor: pointer; }
/* chevron */
.tsa-sm.is-narrow .tsa-sm-item::after {
  content: ""; position: absolute; right: 18px; top: 20px; width: 9px; height: 9px;
  border-right: 2px solid var(--tsa-sm-muted); border-bottom: 2px solid var(--tsa-sm-muted); transform: rotate(45deg); transition: transform .15s;
}
.tsa-sm.is-narrow .tsa-sm-item.is-active::after { transform: translateY(4px) rotate(-135deg); }
.tsa-sm.is-narrow .tsa-sm-head { flex-wrap: wrap; gap: 0 10px; }
.tsa-sm.is-narrow .tsa-sm-links { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; }
.tsa-sm.is-narrow .tsa-sm-item .tsa-sm-links { margin-right: -28px; }
#top .tsa-sm.is-narrow a.tsa-sm-link,
.tsa-sm.tsa-sm.is-narrow a.tsa-sm-link { height: auto; min-height: 46px; padding: 6px 10px; font-size: 15px; text-align: center; white-space: normal; }
#top .tsa-sm.is-narrow .tsa-sm-item a.tsa-sm-onmap,
.tsa-sm.tsa-sm.is-narrow .tsa-sm-item a.tsa-sm-onmap { display: inline-flex; }
.tsa-sm.is-narrow .tsa-sm-links > :last-child:nth-child(odd) { grid-column: 1 / -1; }
#top .tsa-sm.is-narrow .tsa-sm-list .tsa-sm-more,
.tsa-sm.tsa-sm.is-narrow .tsa-sm-list .tsa-sm-more { display: flex; align-items: center; gap: 10px; padding: 14px 16px; }
#top .tsa-sm.is-narrow .tsa-sm-more button,
.tsa-sm.tsa-sm.is-narrow .tsa-sm-more button { flex: 0 0 104px; height: 48px; padding: 0; font-size: 15px; font-weight: 600; color: var(--tsa-sm-text); background: var(--tsa-sm-bg); border: 1px solid var(--tsa-sm-ink); }
.tsa-sm.tsa-sm.is-narrow .tsa-sm-more button:disabled { color: var(--tsa-sm-muted); border-color: var(--tsa-sm-line); cursor: default; }
.tsa-sm.is-narrow .tsa-sm-pageinfo { flex: 1 1 auto; font-size: 14px; text-align: center; color: var(--tsa-sm-muted); white-space: nowrap; }
/* a page turn brings the list's top back into view, clear of a fixed site header */
.tsa-sm.is-narrow .tsa-sm-list { scroll-margin-top: 96px; }
