/* Shared list page (/l#<token>).

   Loads after styles.css and only here, so it inherits the site-wide dark
   asphalt palette and only adds what the list surface needs. Same token
   names as the Bangkok section uses, so the two read as one product. */

.sharedlist {
  padding: 40px 20px 72px;
  max-width: 900px;
}

/* styles.css gives every <section> 72px of vertical padding, which stacks on
   top of .sharedlist's own and pushes the title far down the fold. Both
   section-level blocks below set their own padding instead. */

.sl-list {
  padding: 0 0 24px;
}

/* ---------- States ---------- */

.sl-state {
  padding: 24px 0 64px;
  max-width: 60ch;
}

.sl-state h1 {
  font-size: clamp(1.7rem, 4vw, 2.4rem);
  line-height: 1.15;
  margin-bottom: 16px;
}

.sl-state p { color: var(--muted); margin-bottom: 14px; }

.sl-state-ctas {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  margin-top: 24px;
}

.sl-state-note { color: var(--muted); }

.sl-code-dim { color: var(--muted); }

code {
  background: var(--bg-card);
  border: 1px solid var(--line);
  border-radius: 6px;
  padding: 2px 6px;
  font-size: 0.92em;
}

.sl-spinner {
  width: 28px;
  height: 28px;
  border-radius: 50%;
  border: 3px solid var(--line);
  border-top-color: var(--accent);
  animation: sl-spin 0.8s linear infinite;
  margin-bottom: 18px;
}

@keyframes sl-spin { to { transform: rotate(360deg); } }

@media (prefers-reduced-motion: reduce) {
  .sl-spinner { animation: none; border-top-color: var(--line); }
}

/* ---------- Header block ---------- */

.sl-demo-flag {
  display: inline-block;
  background: var(--accent);
  color: var(--accent-ink);
  font-weight: 700;
  font-size: 0.78rem;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  border-radius: 999px;
  padding: 4px 12px;
  margin-bottom: 16px;
}

.sl-kicker {
  color: var(--accent);
  font-weight: 600;
  font-size: 0.82rem;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  margin-bottom: 8px;
}

.sl-list h1 {
  font-size: clamp(1.9rem, 5vw, 2.9rem);
  line-height: 1.1;
  margin-bottom: 12px;
}

.sl-desc {
  color: var(--text);
  font-size: 1.08rem;
  margin-bottom: 10px;
  max-width: 62ch;
}

.sl-meta {
  color: var(--muted);
  font-size: 0.95rem;
  margin-bottom: 24px;
}

/* ---------- CTAs ---------- */

.sl-ctas {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  margin-bottom: 10px;
}

.sl-cta-note {
  color: var(--muted);
  font-size: 0.9rem;
  margin-bottom: 28px;
}

/* ---------- Map ---------- */

.sl-mapshell {
  border: 1px solid var(--line);
  border-radius: var(--radius);
  overflow: hidden;
  background: var(--bg-card);
  margin-bottom: 32px;
}

.sl-map {
  width: 100%;
  height: clamp(260px, 46vw, 420px);
}

.sl-map.is-unavailable {
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--muted);
  font-size: 0.95rem;
}

.sl-map.is-unavailable::after {
  content: "Map unavailable. The places are listed below.";
  padding: 24px;
  text-align: center;
}

.sl-pin {
  width: 26px;
  height: 26px;
  border-radius: 50%;
  background: var(--accent);
  color: var(--accent-ink);
  border: 2px solid rgba(10, 8, 6, 0.85);
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.45);
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: 700;
  font-size: 0.78rem;
  cursor: pointer;
}

.maplibregl-popup-content {
  background: var(--bg-card);
  color: var(--text);
  border: 1px solid var(--line);
  border-radius: 12px;
  font-family: inherit;
  /* Extra room on the right so the close button never sits on the name. */
  padding: 12px 32px 12px 14px;
}

.maplibregl-popup-content strong { display: block; margin-bottom: 2px; }
.maplibregl-popup-content span { color: var(--muted); font-size: 0.88rem; }
.maplibregl-popup-tip { display: none; }
.maplibregl-popup-close-button { color: var(--muted); font-size: 1.1rem; }

/* ---------- Place rows ---------- */

.sl-places {
  list-style: none;
  display: grid;
  gap: 12px;
  margin-bottom: 28px;
}

.sl-place {
  display: grid;
  grid-template-columns: 44px 1fr;
  gap: 14px;
  align-items: start;
  background: var(--bg-card);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 16px;
}

.sl-place.has-photo { grid-template-columns: 44px 1fr 96px; }

.sl-icon {
  width: 44px;
  height: 44px;
  border-radius: 12px;
  background: var(--bg-raised);
  border: 1px solid var(--line);
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--accent);
}

.sl-icon svg { width: 22px; height: 22px; display: block; }

.sl-place h2 {
  font-size: 1.08rem;
  line-height: 1.3;
  margin-bottom: 4px;
}

.sl-place h2 a { color: var(--text); }
.sl-place h2 a:hover { color: var(--accent); }

.sl-place-sub {
  color: var(--muted);
  font-size: 0.9rem;
  display: flex;
  flex-wrap: wrap;
  gap: 6px 12px;
}

.sl-cat {
  color: var(--accent);
  text-transform: capitalize;
  font-weight: 600;
}

/* Same accent as .sl-cat, but never title-cased: it carries a count, not a
   category name. */
.sl-count {
  color: var(--accent);
  font-weight: 600;
}

.sl-thumb {
  width: 96px;
  height: 72px;
  border-radius: 10px;
  object-fit: cover;
  background: var(--bg-raised);
  border: 1px solid var(--line);
}

@media (max-width: 560px) {
  .sl-place, .sl-place.has-photo { grid-template-columns: 36px 1fr; }
  .sl-icon { width: 36px; height: 36px; border-radius: 10px; }
  .sl-icon svg { width: 18px; height: 18px; }
  .sl-thumb { display: none; }
}

.sl-hidden-note {
  color: var(--muted);
  font-size: 0.9rem;
  border-left: 2px solid var(--line);
  padding-left: 14px;
  margin-bottom: 32px;
}

/* ---------- Mission block ---------- */

.sl-mission {
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--bg-raised);
  padding: 28px;
}

.sl-mission h2 {
  font-size: 1.35rem;
  margin-bottom: 10px;
}

.sl-mission p { color: var(--muted); margin-bottom: 14px; max-width: 62ch; }
.sl-mission p:last-child { margin-bottom: 0; }
