/* ============================================================
   LiveLocalVibes — Shows page (rebuilt Oct 2026). Pairs with shows.js.
   Phones first: search → one filter row → chips → small map → paged list.
   Desktop (769px and up): the list on the left, the map beside it (sticky).
   Every class starts with "sx-" so nothing here touches other pages.
   ============================================================ */
.sx-page { padding-top: 32px; }
.sx-head { margin-bottom: 18px; }

/* ---------- Search ---------- */
.sx-search { position: relative; display: flex; align-items: center; max-width: 720px; }
.sx-search > llv-icon { position: absolute; left: 14px; width: 20px; height: 20px; pointer-events: none; }
.sx-search input[type=search] { width: 100%; min-height: 48px; padding: .7rem .9rem .7rem 44px; font-size: 16px; border-radius: 12px; }
/* Oct 12 2026: the search stands out: a solid, slightly lighter box, a visible border, a bright icon, a purple
   glow on focus, and placeholder text that passes WCAG AA (#B4B1C8 on #34344F = 5.75:1; the border is 3.8:1) */
.sx-search { color: #D9D5F0; }
.sx-search:focus-within { color: var(--purple); }
.sx-search input[type=search] { background: #34344F; border: 1px solid #6E6E94; box-shadow: 0 2px 10px rgba(0, 0, 0, .25); }
.sx-search input[type=search]::placeholder { color: #B4B1C8; opacity: 1; }
.sx-search input[type=search]:focus { background: #38385A; border-color: var(--purple); box-shadow: 0 0 0 3px rgba(162, 89, 255, .35), 0 0 18px rgba(162, 89, 255, .45); }
.sx-suggest { position: absolute; z-index: 40; top: calc(100% + 6px); left: 0; right: 0; max-height: 60vh; overflow-y: auto; padding: 6px;
  background: var(--surface); border: 1px solid var(--line); border-radius: 12px; box-shadow: 0 16px 40px rgba(0, 0, 0, .5); }
.sx-sg-title { margin: 8px 10px 4px; font-size: .7rem; font-weight: 700; letter-spacing: .08em; text-transform: uppercase; color: var(--muted); }
.sx-sg { display: flex; flex-direction: column; align-items: flex-start; width: 100%; min-height: 44px; padding: 8px 10px; border: 0; border-radius: 8px;
  background: none; color: var(--text); font: inherit; text-align: left; cursor: pointer; }
.sx-sg:hover, .sx-sg.is-active, .sx-sg:focus-visible { background: var(--surface-2); outline: none; }
.sx-sg-main { font-weight: 600; font-size: .95rem; }
.sx-sg-sub { font-size: .8rem; color: var(--muted); }
.sx-sg-none { margin: 8px 10px; color: var(--muted); font-size: .9rem; line-height: 1.45; }

/* ---------- One filter row (When · Where · Genre · Sort) ---------- */
.sx-filters { position: relative; display: flex; gap: 8px; margin: 12px 0 0; max-width: 720px; }
.sx-fbtn { flex: 0 1 auto; min-width: 0; display: inline-flex; align-items: center; gap: 6px; min-height: 44px; padding: 0 14px;
  background: var(--surface-2); color: var(--text); border: 1px solid var(--line); border-radius: 999px; font: 600 .9rem 'Inter', system-ui, sans-serif; cursor: pointer; }
.sx-fbtn llv-icon { flex-shrink: 0; width: 18px; height: 18px; }
.sx-fbtn-label { min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.sx-fbtn:hover, .sx-fbtn.is-open { border-color: var(--purple); }
.sx-fbtn:focus-visible { outline: 2px solid var(--purple); outline-offset: 2px; }
.sx-panel { position: absolute; z-index: 30; top: calc(100% + 8px); left: 0; width: min(340px, 100%); padding: 14px;
  background: var(--surface); border: 1px solid var(--line); border-radius: 14px; box-shadow: 0 16px 40px rgba(0, 0, 0, .5); }
.sx-panel[hidden] { display: none; }
.sx-panel select, .sx-panel input { width: 100%; min-height: 44px; font-size: 16px; }
.sx-panel select + select, .sx-panel select + input { margin-top: 8px; }
.sx-plabel { display: block; margin: 0 0 6px; font-size: .8rem; font-weight: 600; color: var(--muted); }
.sx-plabel:not(:first-child) { margin-top: 14px; }
.sx-nearme { width: 100%; min-height: 44px; }
/* Oct 13 2026: Where panel = what's showing now, Near me, the location picker, Show anywhere */
.sx-where-now { margin: 0 0 10px; font-size: .85rem; color: #B4B1C8; }
.sx-pickplace { width: 100%; min-height: 44px; margin-top: 8px; justify-content: center; }
.sx-anywhere { display: block; margin: 10px auto 0; min-height: 36px; background: none; border: 0; color: #B4B1C8; text-decoration: underline; cursor: pointer; font: inherit; font-size: .85rem; }
.sx-anywhere[hidden], .sx-dist[hidden], #sxDistLabel[hidden] { display: none; }
.sx-dist { display: flex; gap: 8px; }
.sx-chip { flex: 1; min-height: 44px; border: 1px solid var(--line); border-radius: 999px; background: var(--surface-2); color: var(--text); font: 600 .9rem 'Inter', system-ui, sans-serif; cursor: pointer; }
.sx-chip.is-on { background: var(--purple); border-color: var(--purple); color: #fff; }

/* ---------- Active filter chips ---------- */
.sx-chips { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 12px; }
.sx-chips[hidden] { display: none; }
.sx-achip, .sx-clearall { display: inline-flex; align-items: center; gap: 6px; min-height: 36px; padding: 0 8px 0 12px; border-radius: 999px; cursor: pointer;
  font: 600 .85rem 'Inter', system-ui, sans-serif; position: relative; }
.sx-achip { background: rgba(162, 89, 255, .16); border: 1px solid rgba(162, 89, 255, .5); color: var(--text); max-width: 100%; }
.sx-achip > span { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.sx-achip llv-icon { flex-shrink: 0; width: 16px; height: 16px; }
.sx-clearall { background: none; border: 0; color: var(--purple); padding: 0 8px; text-decoration: underline; text-underline-offset: 3px; }
/* 36px chips, but a 44px tap area */
.sx-achip::after, .sx-clearall::after { content: ""; position: absolute; left: 0; right: 0; top: -4px; bottom: -4px; }

/* ---------- Map + list ---------- */
.sx-layout { margin-top: 16px; }
.sx-mapwrap { position: relative; }
.sx-map.events-map { height: 200px; margin: 0; border-radius: 14px; }
.sx-expand { position: absolute; z-index: 2; right: 10px; bottom: 10px; display: inline-flex; align-items: center; gap: 6px; min-height: 44px; padding: 0 14px;
  border: 1px solid var(--line); border-radius: 999px; background: rgba(30, 30, 46, .92); color: var(--text); font: 600 .85rem 'Inter', system-ui, sans-serif; cursor: pointer; }
.sx-expand llv-icon { width: 18px; height: 18px; }
/* Full-screen map */
.sx-mapwrap.is-full { position: fixed; inset: 0; z-index: 1000; background: var(--bg); padding: env(safe-area-inset-top, 0px) 0 env(safe-area-inset-bottom, 0px); }
.sx-mapwrap.is-full .sx-map.events-map { height: 100%; border-radius: 0; border: 0; }
.sx-mapwrap.is-full .sx-expand { top: calc(12px + env(safe-area-inset-top, 0px)); bottom: auto; right: 12px; }
html.sx-map-open, html.sx-map-open body { overflow: hidden; }

.sx-count { margin: 16px 0 10px; color: var(--muted); font-size: .9rem; font-weight: 600; }
.sx-list { display: flex; flex-direction: column; gap: 10px; }

/* Show card: date · logo · band / venue / time · distance, then map pin + play on the side */
.sx-card { position: relative; display: flex; align-items: stretch; background: var(--surface); border: 1px solid var(--line); border-radius: 14px;
  transition: border-color .15s, box-shadow .15s; }
.sx-card:hover { border-color: rgba(162, 89, 255, .6); }
.sx-card.is-hl { border-color: #DAFF8C; box-shadow: 0 0 0 1px #DAFF8C inset; }
.sx-card-link { flex: 1; min-width: 0; display: flex; align-items: center; gap: 12px; padding: 12px; color: inherit; text-decoration: none; }
.sx-card-link:focus-visible { outline: 2px solid var(--purple); outline-offset: -2px; border-radius: 14px; }
.sx-date { flex-shrink: 0; width: 48px; display: flex; flex-direction: column; align-items: center; padding: 6px 0; border-radius: 10px; background: var(--surface-2);
  font-size: .68rem; font-weight: 700; text-transform: uppercase; letter-spacing: .04em; color: var(--muted); line-height: 1.2; }
.sx-date b { font: 400 1.5rem/1 'Bebas Neue', 'Inter', sans-serif; color: var(--text); letter-spacing: 0; }
.sx-card.is-today .sx-date { background: rgba(218, 255, 140, .14); color: #DAFF8C; }
.sx-logo { flex-shrink: 0; width: 48px; height: 48px; border-radius: 10px; object-fit: cover; background: var(--surface-2); }
.sx-logo--initials { display: flex; align-items: center; justify-content: center; font: 400 1.3rem 'Bebas Neue', 'Inter', sans-serif; color: var(--purple);
  background: linear-gradient(135deg, rgba(162, 89, 255, .3), var(--surface-2)); }
.sx-main { flex: 1; min-width: 0; display: flex; flex-direction: column; gap: 2px; }
.sx-band { font-weight: 700; font-size: 1rem; color: var(--text); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.sx-venue, .sx-meta { font-size: .84rem; color: var(--muted); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.sx-mi { font-weight: 600; color: var(--text); }
.sx-side { flex-shrink: 0; display: flex; flex-direction: column; justify-content: center; gap: 6px; padding: 8px 10px 8px 0; }
.sx-pin { width: 44px; height: 44px; display: flex; align-items: center; justify-content: center; padding: 0; border: 1px solid var(--line); border-radius: 50%;
  background: var(--surface-2); color: var(--purple); cursor: pointer; }
.sx-pin llv-icon { width: 20px; height: 20px; }
.sx-pin:hover, .sx-card.is-hl .sx-pin { border-color: #DAFF8C; color: #DAFF8C; }
.sx-side .lm-fab { position: static; width: 44px; height: 44px; box-shadow: none; }

/* Sponsored card (placement "shows-feed") */
.sx-ad { position: relative; background: var(--surface); border: 1px dashed var(--line); border-radius: 14px; }
.sx-ad .ad-tag { position: absolute; top: 8px; right: 12px; }
.sx-ad-link { display: flex; align-items: center; gap: 12px; padding: 12px; min-height: 64px; color: inherit; text-decoration: none; }
.sx-ad-img { flex-shrink: 0; width: 56px; height: 56px; border-radius: 8px; object-fit: cover; background: var(--surface-2); }
.sx-ad-text { min-width: 0; display: flex; flex-direction: column; gap: 2px; padding-right: 70px; }
.sx-ad-name { font-weight: 700; }
.sx-ad-line { font-size: .84rem; color: var(--muted); }

/* No results */
.sx-empty { padding: 22px 18px; text-align: center; background: var(--surface); border: 1px dashed var(--line); border-radius: 14px; color: var(--muted); }
.sx-empty b { color: var(--text); font-size: 1.05rem; }
.sx-empty p + p { margin-top: 4px; }
.sx-fixes { display: flex; flex-wrap: wrap; justify-content: center; gap: 8px; margin-top: 14px; }
.sx-fixes .btn { min-height: 44px; }

/* Pages: Previous · 1 2 3 · Next */
.sx-pager { display: flex; flex-wrap: wrap; align-items: center; justify-content: center; gap: 6px; margin: 20px 0 8px; }
.sx-pager:empty { display: none; }
.sx-pg { min-width: 44px; min-height: 44px; display: inline-flex; align-items: center; justify-content: center; gap: 4px; padding: 0 10px; border: 1px solid var(--line);
  border-radius: 10px; background: var(--surface-2); color: var(--text); font: 600 .9rem 'Inter', system-ui, sans-serif; cursor: pointer; }
.sx-pg llv-icon { width: 18px; height: 18px; }
.sx-pg.is-on { background: var(--purple); border-color: var(--purple); color: #fff; }
.sx-pg:disabled { opacity: .4; cursor: default; }
.sx-pg-gap { color: var(--muted); padding: 0 2px; }

/* ---------- Phones ---------- */
@media (max-width: 768px) {
  /* Oct 12 2026: a shorter, tighter header so the search and map sit higher */
  .sx-page { padding: 10px 16px 32px; }
  .sx-head { margin-bottom: 10px; }
  .sx-head .section-title { font-size: 1.8rem; line-height: 1; }
  .sx-head .section-lead { font-size: .9rem; margin-top: 2px; }
  .sx-filters { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 6px; }
  .sx-fbtn { justify-content: center; padding: 0 8px; font-size: .82rem; gap: 4px; }
  .sx-fbtn llv-icon { width: 16px; height: 16px; }
  .sx-panel { width: 100%; }
  .sx-pg-word { display: none; }
}
@media (max-width: 420px) {
  .sx-card-link { gap: 10px; padding: 10px; }
  .sx-date { width: 42px; }
  .sx-logo { width: 40px; height: 40px; }
  .sx-side { padding-right: 8px; }
  .sx-fbtn llv-icon { display: none; }
}

/* ---------- Desktop: list on the left, map beside it ---------- */
@media (min-width: 769px) {
  .sx-layout { display: grid; grid-template-columns: minmax(0, 1fr) minmax(320px, 42%); gap: 24px; align-items: start; }
  .sx-mapwrap { order: 2; position: sticky; top: 90px; }
  .sx-mapwrap .sx-map.events-map { height: calc(100vh - 130px); max-height: 640px; min-height: 360px; }
  .sx-mapwrap.is-full { position: fixed; }
  .sx-mapwrap.is-full .sx-map.events-map { height: 100%; max-height: none; }
  .sx-listwrap { order: 1; }
  .sx-count { margin-top: 0; }
}

/* ---------- Oct 17 2026: genre tags, sort chips, the home-style map and the pin card ---------- */
.sx-plabel-row { display: flex; align-items: center; justify-content: space-between; gap: 8px; }
.sx-plabel-row .sx-plabel { margin: 0; }
.sx-plabel-hint { font-weight: 400; color: var(--muted); opacity: .8; }
.sx-tags { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 10px; max-height: 50vh; overflow-y: auto; }
.sx-tag { min-height: 40px; padding: 0 14px; border: 1px solid var(--line); border-radius: 999px; background: var(--surface-2); color: var(--text);
  font: 600 .88rem 'Inter', system-ui, sans-serif; cursor: pointer; }
.sx-tag[data-none] { opacity: .55; }
.sx-tag.is-on { background: rgba(162, 89, 255, .22); border-color: var(--purple); color: #fff; box-shadow: inset 0 0 0 1px var(--purple); opacity: 1; }
.sx-tag.is-on::before { content: "✓ "; color: var(--lime, #DAFF8C); }
#sxPanelGenre { width: min(420px, 100%); }
.sx-chip:disabled { opacity: .45; cursor: not-allowed; }
.sx-fbtn--sort .sx-fbtn-chev { transform: rotate(90deg); width: 14px; height: 14px; opacity: .8; }

/* The map: same frame and pins as the home map */
.sx-mapwrap:not(.is-full) .sx-map.events-map { border: 2px solid transparent; border-radius: 14px;
  background: linear-gradient(var(--surface), var(--surface)) padding-box, linear-gradient(135deg, var(--purple), var(--pink)) border-box; }
#eventsMap { isolation: isolate; }
.sx-mapcard { position: absolute; z-index: 3; left: 10px; right: 10px; bottom: 64px; padding: 10px 12px; border-radius: 16px;
  background: rgba(20, 20, 34, .95); -webkit-backdrop-filter: blur(12px); backdrop-filter: blur(12px); border: 1px solid rgba(162, 89, 255, .6);
  box-shadow: 0 14px 34px rgba(0, 0, 0, .55), 0 0 24px rgba(162, 89, 255, .3); color: var(--text); }
.sx-mapcard[hidden] { display: none; }
.sx-mapcard-head { display: flex; align-items: center; justify-content: space-between; gap: 8px; margin-bottom: 4px; font-size: .95rem; }
.sx-mapcard-x { width: 36px; height: 36px; border: 0; border-radius: 10px; background: none; color: var(--text); display: flex; align-items: center; justify-content: center; cursor: pointer; }
.sx-mapcard-x llv-icon { width: 18px; height: 18px; }
.sx-mapcard-row { display: grid; grid-template-columns: auto minmax(0, 1fr) 18px; align-items: center; gap: 10px; min-height: 44px; padding: 4px 0;
  border-top: 1px solid var(--line); color: var(--text); text-decoration: none; }
.sx-mapcard-when { color: var(--lime, #DAFF8C); font-size: .82rem; font-weight: 700; white-space: nowrap; }
.sx-mapcard-band { font-family: 'Bebas Neue', sans-serif; font-size: 1.3rem; line-height: 1.1; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.sx-mapcard-row llv-icon { width: 18px; height: 18px; color: var(--muted); }
.sx-mapcard-more { margin: 6px 0 0; color: var(--muted); font-size: .82rem; }
.sx-mapwrap.is-full .sx-mapcard { bottom: calc(16px + env(safe-area-inset-bottom, 0px)); }
@media (min-width: 769px) { .sx-mapcard { left: auto; width: 340px; } }
@media (max-width: 768px) { .sx-map.events-map { height: 300px; } }
.sx-plabel-row .link-btn { min-height: 36px; padding: 0 4px; border: 0; background: none; color: var(--purple); font: 600 .85rem 'Inter', system-ui, sans-serif; text-decoration: underline; text-underline-offset: 3px; cursor: pointer; }
.sx-countrow { display: flex; align-items: center; justify-content: space-between; gap: 10px; flex-wrap: wrap; }
.sx-countrow .sx-count { margin-bottom: 0; }
.sx-sortline { display: inline-flex; align-items: center; gap: 8px; white-space: nowrap; color: var(--muted); font-size: .85rem; font-weight: 600; }
.sx-sortline select { min-height: 40px; padding: 0 30px 0 12px; border: 1px solid var(--line); border-radius: 999px; background-color: var(--surface-2); color: var(--text); font: 600 .88rem 'Inter', system-ui, sans-serif; }
@media (max-width: 768px) { .sx-filters.sx-filters--3 { grid-template-columns: repeat(3, minmax(0, 1fr)); } }
