/* Styles for this project only. Accent matches the site's plum (#792e5f). */

* { box-sizing: border-box; margin: 0; padding: 0; }

:root {
  --accent: #792e5f;
  --accent-soft: #f6e9f1;
  --bg: #ffffff;
  --panel: #faf7f9;
  --ink: #1c1a24;
  --muted: #6b6880;
  --line: #ece5ea;
  --danger: #dc2626;
}

html, body { height: 100%; }

body {
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
  color: var(--ink);
  background: var(--bg);
  display: flex;
  flex-direction: column;
}

.back {
  display: block;
  background: #111;
  color: #fff;
  font-size: .72rem;
  padding: 7px 26px;
  text-decoration: none;
  letter-spacing: .3px;
  flex: none;
}
.back:hover { text-decoration: underline; }

#app { display: flex; flex: 1; min-height: 0; }

/* ---------- Sidebar ---------- */
#sidebar {
  width: 400px;
  min-width: 320px;
  display: flex;
  flex-direction: column;
  border-right: 1px solid var(--line);
  background: var(--bg);
}

#sidebar header { padding: 14px 18px 8px; }
#sidebar h1 { font-size: 22px; letter-spacing: -0.02em; }
#sidebar h1 .sub { color: var(--accent); font-weight: 600; font-size: 15px; }
.tagline { color: var(--muted); font-size: 12.5px; margin-top: 2px; }
.tagline a { color: var(--muted); }

.controls { padding: 8px 18px 10px; border-bottom: 1px solid var(--line); }
.row { display: flex; gap: 8px; align-items: center; flex-wrap: wrap; margin-bottom: 8px; }
.row:last-child { margin-bottom: 0; }

.datebtn {
  padding: 6px 12px;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: var(--bg);
  font-size: 13px;
  cursor: pointer;
  color: var(--ink);
}
.datebtn.active { background: var(--accent); border-color: var(--accent); color: #fff; }
#customDate {
  padding: 5px 8px;
  border: 1px solid var(--line);
  border-radius: 999px;
  font-size: 12.5px;
  color: var(--muted);
  background: var(--bg);
}
#customDate.active { border-color: var(--accent); color: var(--accent); }

/* Musicals toggle */
.toggle { display: inline-flex; align-items: center; gap: 8px; cursor: pointer; user-select: none; }
.toggle input { display: none; }
.toggle .knob {
  width: 38px; height: 22px; border-radius: 999px;
  background: #d5c7d0; position: relative; transition: background .15s;
  flex: none;
}
.toggle .knob::after {
  content: ""; position: absolute; top: 2px; left: 2px;
  width: 18px; height: 18px; border-radius: 50%;
  background: #fff; transition: left .15s;
  box-shadow: 0 1px 2px rgba(0,0,0,.25);
}
.toggle input:checked + .knob { background: var(--accent); }
.toggle input:checked + .knob::after { left: 18px; }
.toggle-label { font-size: 13px; font-weight: 600; }

#radius {
  margin-left: auto;
  padding: 6px 8px;
  border: 1px solid var(--line);
  border-radius: 8px;
  font-size: 13px;
  background: var(--bg);
  color: var(--ink);
}

/* Genre chips */
#genreChips { gap: 6px; }
.chip {
  padding: 4px 10px;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: var(--panel);
  font-size: 12px;
  cursor: pointer;
  color: var(--muted);
}
.chip .n { opacity: .6; font-size: 11px; }
.chip.active { background: var(--accent-soft); border-color: var(--accent); color: var(--accent); font-weight: 600; }

#status {
  padding: 8px 18px;
  font-size: 12.5px;
  color: var(--muted);
  border-bottom: 1px solid var(--line);
  background: var(--panel);
}
#status b { color: var(--ink); }
#status .hiddennote { color: var(--accent); }

/* ---------- List ---------- */
#list { flex: 1; overflow-y: auto; }

.day-head {
  position: sticky; top: 0; z-index: 5;
  padding: 6px 18px;
  background: var(--panel);
  border-bottom: 1px solid var(--line);
  font-size: 12px; font-weight: 700; text-transform: uppercase;
  letter-spacing: .06em; color: var(--muted);
}

.card {
  display: flex; gap: 12px;
  padding: 12px 18px;
  border-bottom: 1px solid var(--line);
  cursor: pointer;
}
.card:hover { background: var(--accent-soft); }
.card img.thumb {
  width: 56px; height: 56px; border-radius: 8px;
  object-fit: cover; flex: none; background: var(--panel);
}
.card .body { min-width: 0; flex: 1; }
.card .name { font-size: 14px; font-weight: 650; line-height: 1.25; }
.card .meta { font-size: 12.5px; color: var(--muted); margin-top: 2px; }
.card .meta .dist { color: var(--accent); font-weight: 650; }
.card .tags { margin-top: 4px; display: flex; gap: 4px; flex-wrap: wrap; }
.card .tag {
  font-size: 10.5px; padding: 1px 7px; border-radius: 999px;
  background: var(--panel); border: 1px solid var(--line); color: var(--muted);
}
.card .warn { color: var(--danger); font-weight: 600; font-size: 11.5px; }

.empty { padding: 32px 18px; color: var(--muted); font-size: 14px; text-align: center; }

/* ---------- Map ---------- */
#mapwrap { flex: 1; position: relative; }
#map { position: absolute; inset: 0; }

#locateBtn {
  position: absolute; top: 12px; right: 12px; z-index: 1000;
  padding: 9px 14px;
  border: none; border-radius: 10px;
  background: var(--accent); color: #fff;
  font-size: 13.5px; font-weight: 650;
  cursor: pointer;
  box-shadow: 0 2px 10px rgba(121, 46, 95, .45);
}
#locateBtn:hover { filter: brightness(1.12); }

/* Venue marker */
.venue-pin {
  background: var(--accent);
  color: #fff;
  border: 2px solid #fff;
  border-radius: 50%;
  display: flex; align-items: center; justify-content: center;
  font-size: 11px; font-weight: 700;
  box-shadow: 0 2px 6px rgba(0,0,0,.35);
}

.you-pin {
  width: 18px; height: 18px; border-radius: 50%;
  background: #2563eb; border: 3px solid #fff;
  box-shadow: 0 0 0 3px rgba(37, 99, 235, .35), 0 2px 6px rgba(0,0,0,.3);
}

.leaflet-popup-content { margin: 10px 14px; font-family: inherit; }
.pop-venue { font-weight: 700; font-size: 13.5px; margin-bottom: 6px; }
.pop-gig { font-size: 12.5px; margin: 4px 0; }
.pop-gig a { color: var(--accent); font-weight: 600; text-decoration: none; }
.pop-gig a:hover { text-decoration: underline; }
.pop-gig .t { color: var(--muted); }
.pop-more { font-size: 11.5px; color: var(--muted); margin-top: 4px; }

/* ---------- "?" info button (matches the feedback pill, bottom-left) ---------- */
#info {
  position: fixed;
  left: 16px;
  bottom: 16px;
  z-index: 1100;
  font: 500 13px/1.4 "Space Grotesk", system-ui, -apple-system, "Segoe UI", sans-serif;
  color: #fff;
}
#infoBtn {
  display: grid;
  place-items: center;
  width: 38px;
  height: 38px;
  padding: 0;
  font: inherit;
  font-size: 16px;
  color: inherit;
  cursor: pointer;
  background: #5e2249;
  border: 1px solid rgba(255, 255, 255, .25);
  border-radius: 999px;
  box-shadow: 0 4px 18px rgba(0, 0, 0, .28);
}
#infoBtn:hover { background: #6d2955; }
#infoCard {
  position: absolute;
  left: 0;
  bottom: calc(100% + 8px);
  width: min(300px, calc(100vw - 32px));
  box-sizing: border-box;
  padding: 14px;
  background: #5e2249;
  border: 1px solid rgba(255, 255, 255, .25);
  border-radius: 14px;
  box-shadow: 0 8px 28px rgba(0, 0, 0, .32);
}
#infoCard p { margin: 0 0 8px; }
#infoCard p:last-child { margin-bottom: 0; }
#infoCard a { color: #8fe0db; font-weight: 600; }

/* ---------- Mobile ---------- */
@media (max-width: 760px) {
  #app { flex-direction: column-reverse; }
  #sidebar { width: 100%; min-width: 0; height: 55%; border-right: none; border-top: 1px solid var(--line); }
  #mapwrap { height: 45%; }
}
