/* Sponty public site — dark theme matching the brainstorm mockups. */

:root {
  --bg: #0f1115;
  --bg-elev: #1a1d26;
  --bg-card: #ffffff;
  --text: #f3f3f6;
  --text-muted: #a4a8b3;
  --text-dark: #111;
  --accent: #ff4b5c;
  --accent-2: #6a5af9;
  --border: #2a2e3a;
  --radius: 14px;
  --radius-sm: 10px;
  --shadow: 0 6px 24px rgba(0,0,0,.28);
}

* { box-sizing: border-box; }

html, body {
  margin: 0;
  padding: 0;
  background: var(--bg);
  color: var(--text);
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", sans-serif;
  -webkit-font-smoothing: antialiased;
}

a { color: inherit; }

.container { max-width: 1120px; margin: 0 auto; padding: 0 20px; }

.site-header {
  padding: 14px 20px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  border-bottom: 1px solid var(--border);
}

.logo {
  font-size: 20px;
  font-weight: 800;
  letter-spacing: -0.5px;
  text-decoration: none;
}
.logo .dot { color: var(--accent); }

.site-footer {
  padding: 32px 20px 24px;
  color: var(--text-muted);
  font-size: 12px;
  text-align: center;
  border-top: 1px solid var(--border);
  margin-top: 40px;
}

/* Buttons + inputs */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 10px 16px;
  border-radius: var(--radius-sm);
  background: var(--accent);
  color: #fff;
  text-decoration: none;
  font-weight: 600;
  border: 0;
  cursor: pointer;
}
.btn:hover { filter: brightness(1.1); }

.search-input {
  width: 100%;
  height: 52px;
  padding: 0 20px;
  border-radius: 999px;
  border: 1px solid var(--border);
  background: #fff;
  color: var(--text-dark);
  font-size: 16px;
  outline: none;
  transition: border-color .15s, box-shadow .15s;
}
.search-input:focus { border-color: var(--accent); box-shadow: 0 0 0 3px rgba(255,75,92,.2); }

.select {
  height: 42px;
  padding: 0 12px;
  background: var(--bg-elev);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  color: var(--text);
  font-size: 14px;
}

/* Event card */
.event-card {
  background: var(--bg-card);
  color: var(--text-dark);
  border-radius: var(--radius-sm);
  padding: 12px 16px;
  display: flex;
  gap: 12px;
  text-decoration: none;
  margin-bottom: 10px;
  border: 1px solid transparent;
  transition: transform .12s, border-color .12s;
}
.event-card:hover { transform: translateY(-1px); border-color: var(--accent); }
.event-card .thumb {
  width: 54px; height: 54px;
  border-radius: 10px;
  flex-shrink: 0;
  background: linear-gradient(135deg, var(--accent), var(--accent-2));
}
.event-card .ct { flex: 1; min-width: 0; }
.event-card .title { font-weight: 700; font-size: 14px; }
.event-card .meta { font-size: 12px; color: #666; margin-top: 3px; }
.event-card .src { font-size: 11px; color: #999; margin-top: 4px; }

.event-card .chip {
  display: inline-block;
  background: #ffeff1;
  color: var(--accent);
  font-size: 10px;
  font-weight: 700;
  padding: 2px 6px;
  border-radius: 4px;
  margin-top: 4px;
  margin-right: 4px;
}

/* Layouts */
.landing-hero {
  min-height: 62vh;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: 20px;
}
.landing-hero .logo { font-size: 44px; margin-bottom: 26px; }
.landing-hero form { width: min(620px, 100%); }
.landing-hero .dropdown-row {
  display: flex;
  gap: 10px;
  margin-top: 10px;
}
.landing-hero .dropdown-row .select { flex: 1; }

.results-grid {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(340px, 45%);
  gap: 24px;
  padding: 0 24px 40px;
  max-width: 1400px;
  margin: 0 auto;
  align-items: start;
}
.results-list-wrap { min-width: 0; }
.results-map-wrap {
  position: sticky;
  top: 80px;
  height: 72vh;
  max-height: 780px;
}
.results-map-wrap #map {
  width: 100%;
  height: 100%;
  min-height: 400px;
  border-radius: 14px;
}
#map { width: 100%; height: 100%; min-height: 400px; border-radius: 14px; }

@media (max-width: 768px) {
  .results-grid { grid-template-columns: 1fr; padding: 0 12px 24px; }
  .results-map-wrap { order: -1; height: 280px; max-height: 280px; position: static; }
  .results-map-wrap #map { min-height: 280px; }
  .landing-hero { min-height: 58vh; }
  .landing-hero .dropdown-row { flex-direction: column; }
  form[role="search"] .select,
  section.container form .select { flex: 1 1 calc(50% - 10px); min-width: 0; }
  section.container form .search-input { flex: 1 1 100%; }
  .landing-strip { padding: 0 12px; margin: 24px auto; }
}

.section-heading {
  font-size: 20px;
  font-weight: 700;
  margin: 0 0 12px;
}

.filter-bar {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
  margin-bottom: 14px;
}
.chip {
  background: var(--bg-elev);
  color: var(--text);
  padding: 6px 12px;
  border-radius: 999px;
  font-size: 12px;
  font-weight: 600;
  border: 1px solid var(--border);
  cursor: pointer;
  text-decoration: none;
  display: inline-block;
}
.chip.on { background: var(--accent); border-color: var(--accent); }

/* Loading indicator for HTMX */
.htmx-indicator {
  opacity: 0;
  transition: opacity .2s;
}
.htmx-request .htmx-indicator { opacity: 1; }
.htmx-request.htmx-indicator { opacity: 1; }

/* Select sizing */
.select { min-height: 44px; border-radius: 10px; padding: 0 14px; }

/* Event card chip refinements */
.chip { padding: 2px 10px; border-radius: 12px; font-size: 11px; }
.chips-row { margin-top: 6px; display: flex; gap: 4px; flex-wrap: wrap; }

/* Empty state */
.empty-state { padding: 60px 20px; text-align: center; color: var(--text-muted); }

/* Results meta (count heading) */
.results-meta { margin: 12px 0 16px; }

/* Load more button */
.load-more {
  background: var(--accent, #ff4b5c);
  color: white;
  border: 0;
  border-radius: 12px;
  padding: 12px 24px;
  font-size: 15px;
  font-weight: 600;
  cursor: pointer;
  transition: transform 0.12s ease;
}
.load-more:hover { transform: translateY(-1px); }
.load-more:active { transform: translateY(1px); }

/* Landing event strips */
.landing-strip {
  max-width: 960px;
  margin: 40px auto;
  padding: 0 24px;
}
.strip-header {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  margin-bottom: 12px;
}
.strip-header h2 { font-size: 20px; margin: 0; }
.strip-link {
  font-size: 14px;
  color: var(--text-muted);
  text-decoration: none;
}
.strip-link:hover { color: var(--accent, #ff4b5c); }

/* Event breadcrumb */
.event-breadcrumb {
  font-size: 13px;
  color: var(--text-muted);
}
.event-breadcrumb a { color: var(--text-muted); text-decoration: none; }
.event-breadcrumb a:hover { color: var(--fg, #fff); }
.event-breadcrumb span { margin: 0 6px; }

/* Related events strip on event detail */
.related-strip { max-width: 960px; margin: 48px auto 0; padding: 0 24px; }
@media (max-width: 768px) { .related-strip { padding: 0 12px; } }

/* =========================
   Explore — shared
   ========================= */
.explore {
  min-height: calc(100vh - 64px);
  padding-bottom: 40px;
}

/* Filter bar */
.filter-bar {
  padding-top: 20px;
  padding-bottom: 4px;
}
.filter-form {
  display: flex;
  gap: 10px;
  flex-wrap: wrap;
  align-items: center;
}
.filter-search {
  flex: 1 1 280px;
  min-height: 44px;
  padding: 0 16px;
  border-radius: 22px;
  border: 1px solid rgba(255,255,255,0.08);
  background: #14161c;
  color: #fff;
  font-size: 15px;
  outline: none;
  transition: border-color 0.2s, box-shadow 0.2s;
}
.filter-search:focus {
  border-color: #ff4b5c;
  box-shadow: 0 0 0 3px rgba(255,75,92,0.18);
}
.filter-select {
  min-height: 44px;
  min-width: 140px;
  padding: 0 14px;
  border-radius: 22px;
  border: 1px solid rgba(255,255,255,0.08);
  background: #14161c;
  color: #fff;
  font-size: 14px;
  cursor: pointer;
}

/* Quick chips (secondary row) */
.quick-chips {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
  padding-top: 8px;
  padding-bottom: 20px;
  overflow-x: auto;
  -webkit-overflow-scrolling: touch;
}
.quick-chip {
  flex: 0 0 auto;
  padding: 8px 16px;
  border-radius: 20px;
  background: rgba(255,255,255,0.04);
  color: #e0e0e0;
  text-decoration: none;
  font-size: 14px;
  font-weight: 500;
  white-space: nowrap;
  transition: background 0.15s, transform 0.1s;
}
.quick-chip:hover { background: rgba(255,255,255,0.08); }
.quick-chip.active {
  background: #ff4b5c;
  color: #fff;
}

/* View toggle pills */
.view-toggle {
  display: inline-flex;
  background: #14161c;
  border: 1px solid rgba(255,255,255,0.08);
  border-radius: 24px;
  padding: 3px;
  gap: 2px;
}
.view-toggle-btn {
  background: transparent;
  color: #aaa;
  border: 0;
  padding: 8px 16px;
  border-radius: 21px;
  font-size: 13px;
  font-weight: 600;
  cursor: pointer;
  transition: background 0.15s, color 0.15s;
}
.view-toggle-btn:hover { color: #fff; }
.view-toggle-btn.is-active {
  background: #ff4b5c;
  color: #fff;
}

/* Panels — mutually exclusive */
.view-panels > section { width: 100%; }

/* ===================
   Calendar Grid
   =================== */
.calendar-grid-wrap { max-width: 1400px; margin: 0 auto; padding: 0 24px; }
.section-heading { margin: 0; font-size: 18px; color: #fff; font-weight: 600; }

.calendar-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
  gap: 18px;
}
.cal-card {
  display: flex;
  flex-direction: column;
  background: #14161c;
  border: 1px solid rgba(255,255,255,0.06);
  border-radius: 16px;
  padding: 16px;
  text-decoration: none;
  color: inherit;
  transition: transform 0.14s, box-shadow 0.14s, border-color 0.14s;
  min-height: 180px;
}
.cal-card:hover {
  transform: translateY(-2px);
  border-color: rgba(255,75,92,0.4);
  box-shadow: 0 12px 32px -8px rgba(0,0,0,0.5);
}
.cal-card-top {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  margin-bottom: 14px;
}
.cal-card-date {
  display: flex;
  flex-direction: column;
  line-height: 1.1;
}
.cal-card-dow {
  font-size: 12px;
  color: #ff4b5c;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.05em;
}
.cal-card-day {
  font-size: 22px;
  color: #fff;
  font-weight: 700;
  margin-top: 2px;
}
.cal-card-time {
  font-size: 12px;
  color: #888;
  margin-top: 2px;
}
.cal-card-price {
  font-size: 11px;
  font-weight: 600;
  color: #e0e0e0;
  background: rgba(255,255,255,0.06);
  padding: 4px 9px;
  border-radius: 10px;
}
.cal-card-body { flex: 1; }
.cal-card-title {
  margin: 0 0 6px 0;
  font-size: 16px;
  line-height: 1.25;
  color: #fff;
  font-weight: 600;
  display: -webkit-box;
  -webkit-line-clamp: 3;
  -webkit-box-orient: vertical;
  overflow: hidden;
}
.cal-card-venue {
  font-size: 13px;
  color: #d0d0d0;
  font-weight: 500;
  margin-top: 4px;
}
.cal-card-city {
  font-size: 12px;
  color: #888;
  margin-top: 2px;
}
.cal-card-foot {
  margin-top: 12px;
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 8px;
  flex-wrap: wrap;
}
.cal-card-source {
  font-size: 10px;
  color: #666;
  font-family: ui-monospace, monospace;
}

/* ===================
   Map View (stub for Chunk 1)
   =================== */
.map-layout {
  display: grid;
  grid-template-columns: 1fr 380px;
  gap: 0;
  height: calc(100vh - 220px);
  max-width: 1400px;
  margin: 0 auto;
  padding: 0 24px 24px;
}
.map-layout #map {
  background: #0a0b0f;
  border-radius: 16px;
  height: 100%;
  width: 100%;
}
.map-sidebar {
  display: flex;
  flex-direction: column;
  height: 100%;
  overflow: hidden;
  padding-left: 16px;
}
.results-meta-compact {
  font-size: 13px;
  color: #888;
  padding: 4px 0 12px;
  border-bottom: 1px solid rgba(255,255,255,0.06);
}
.map-list {
  flex: 1;
  overflow-y: auto;
  padding-top: 12px;
  scrollbar-width: thin;
  scrollbar-color: rgba(255,255,255,0.1) transparent;
}
.map-card {
  display: block;
  padding: 10px 12px;
  margin-bottom: 6px;
  border-radius: 10px;
  color: inherit;
  text-decoration: none;
  border: 1px solid transparent;
  transition: background 0.1s, border-color 0.1s;
}
.map-card:hover {
  background: rgba(255,255,255,0.04);
  border-color: rgba(255,255,255,0.08);
}
.map-card-date {
  font-size: 11px;
  color: #ff4b5c;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.05em;
}
.map-card-title {
  font-size: 14px;
  color: #fff;
  font-weight: 500;
  margin: 3px 0;
  line-height: 1.3;
}
.map-card-venue {
  font-size: 12px;
  color: #999;
}

/* Mobile responsive */
@media (max-width: 768px) {
  .filter-bar { padding: 14px 12px 6px; }
  .filter-select { flex: 1 1 calc(50% - 5px); min-width: 0; }
  .filter-search { flex: 1 1 100%; }
  .quick-chips { padding-left: 12px; padding-right: 12px; }
  .calendar-grid-wrap { padding: 0 12px; }
  .calendar-grid { grid-template-columns: 1fr 1fr; gap: 10px; }
  .cal-card { padding: 12px; min-height: 160px; }
  .cal-card-title { font-size: 14px; -webkit-line-clamp: 2; }
  .cal-card-day { font-size: 18px; }

  /* Map bottom-sheet layout */
  .map-layout {
    grid-template-columns: 1fr;
    grid-template-rows: 1fr;
    height: calc(100vh - 170px);
    padding: 0;
    position: relative;
  }
  .map-layout #map {
    width: 100%;
    height: 100%;
    border-radius: 0;
  }
  .map-sidebar {
    position: absolute;
    left: 0; right: 0; bottom: 0;
    height: 32vh;
    max-height: 90vh;
    background: #14161c;
    border-top: 1px solid rgba(255,255,255,0.08);
    border-radius: 20px 20px 0 0;
    transition: height 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    z-index: 2;
    padding: 0 12px 8px;
    box-shadow: 0 -12px 40px -8px rgba(0,0,0,0.6);
    overflow: hidden;
    display: flex;
    flex-direction: column;
  }
  .map-sidebar.is-half  { height: 55vh; }
  .map-sidebar.is-full  { height: 92vh; }
  .sheet-grip {
    width: 40px;
    height: 4px;
    background: rgba(255,255,255,0.3);
    border-radius: 2px;
    margin: 10px auto 6px;
    flex: 0 0 auto;
  }
  .map-sidebar .map-list { padding-top: 4px; }
}

@media (max-width: 480px) {
  .calendar-grid { grid-template-columns: 1fr; }
}

/* Header adjustment — make room for toggle */
header .brand { flex: 0 1 auto; }
header > .container { align-items: center; }
header .view-toggle { margin-left: auto; }
.region-links { display: flex; gap: 8px; align-items: center; }
@media (max-width: 640px) {
  header .view-toggle-btn { padding: 8px 10px; font-size: 12px; }
  .region-links { display: none; }
}

/* ==============
   Detail overlay
   ============== */
.detail-overlay {
  position: fixed;
  inset: 0;
  z-index: 1000;
  display: flex;
  align-items: stretch;
  justify-content: flex-end;
  background: rgba(0,0,0,0);
  transition: background 0.25s ease;
}
.detail-overlay[hidden] { display: none; }
.detail-overlay[aria-hidden="false"] {
  background: rgba(0,0,0,0.5);
}
.detail-backdrop {
  position: absolute;
  inset: 0;
  cursor: pointer;
}
.detail-panel {
  position: relative;
  width: min(520px, 100%);
  max-width: 100%;
  background: #14161c;
  overflow-y: auto;
  padding: 24px 28px;
  box-shadow: -20px 0 48px -12px rgba(0,0,0,0.6);
  animation: detail-slide-in 0.3s cubic-bezier(0.2, 0, 0.2, 1);
  border-left: 1px solid rgba(255,255,255,0.06);
}
@keyframes detail-slide-in {
  from { transform: translateX(100%); }
  to { transform: translateX(0); }
}
.detail-close {
  position: absolute;
  top: 12px;
  right: 12px;
  background: rgba(255,255,255,0.06);
  border: 0;
  border-radius: 50%;
  width: 36px; height: 36px;
  color: #fff;
  font-size: 22px;
  line-height: 1;
  cursor: pointer;
}
.detail-close:hover { background: rgba(255,255,255,0.12); }
.detail-skeleton {
  padding: 80px 0;
  text-align: center;
  color: #888;
}
body.detail-open { overflow: hidden; }
@media (max-width: 768px) {
  .detail-overlay { align-items: flex-end; }
  .detail-panel {
    width: 100%;
    max-height: 90vh;
    border-left: 0;
    border-radius: 20px 20px 0 0;
    animation: detail-slide-up 0.3s cubic-bezier(0.2, 0, 0.2, 1);
  }
  @keyframes detail-slide-up {
    from { transform: translateY(100%); }
    to { transform: translateY(0); }
  }
}

/* Map-card highlight state */
.map-card.is-hover {
  background: rgba(255,75,92,0.08);
  border-color: rgba(255,75,92,0.3);
}
.map-card .map-card-category-dot {
  display: inline-block;
  width: 8px;
  height: 8px;
  border-radius: 50%;
  vertical-align: middle;
  margin-right: 6px;
}

/* ---- Event Detail Page ---- */
.event-detail { max-width: 820px; padding-top: 20px; }
.event-head { margin-bottom: 24px; }
.event-title { font-size: 32px; font-weight: 700; margin: 8px 0 12px; line-height: 1.15; }
.event-meta-row { display: flex; gap: 18px; align-items: baseline; flex-wrap: wrap; margin-bottom: 8px; }
.event-when strong { font-size: 17px; display: block; }
.event-time { color: #aaa; font-size: 14px; }
.event-price {
  background: rgba(255,75,92,0.14);
  color: #ff4b5c;
  padding: 6px 12px;
  border-radius: 12px;
  font-weight: 600;
  font-size: 13px;
}
.event-location { color: #d0d0d0; font-size: 15px; margin-top: 4px; }
.event-location .venue-link { color: #fff; font-weight: 500; text-decoration: none; border-bottom: 1px solid rgba(255,255,255,0.2); }
.event-location .venue-link:hover { border-color: #ff4b5c; }
.event-description { font-size: 16px; line-height: 1.6; color: #d0d0d0; margin: 24px 0; }
.event-cta-row { display: flex; gap: 10px; flex-wrap: wrap; margin: 24px 0; }
.cta-primary {
  background: #ff4b5c; color: #fff;
  padding: 12px 22px; border-radius: 12px;
  font-size: 15px; font-weight: 600;
  text-decoration: none;
  display: inline-flex; align-items: center; gap: 6px;
  transition: transform 0.12s;
}
.cta-primary:hover { transform: translateY(-1px); }
.cta-secondary {
  background: rgba(255,255,255,0.06);
  color: #fff;
  padding: 12px 22px; border-radius: 12px;
  font-size: 15px; font-weight: 500;
  text-decoration: none;
  border: 1px solid rgba(255,255,255,0.1);
  display: inline-flex; align-items: center; gap: 6px;
  transition: background 0.12s;
}
.cta-secondary:hover { background: rgba(255,255,255,0.1); }
.detail-map-wrap { margin: 24px 0; border-radius: 14px; overflow: hidden; }
#detail-map { width: 100%; height: 240px; background: #0a0b0f; }
.venue-info { margin: 16px 0 32px; padding: 14px 18px; background: rgba(255,255,255,0.03); border-radius: 12px; }
.venue-hours, .venue-web { font-size: 14px; color: #d0d0d0; }
.venue-web a { color: #ff4b5c; text-decoration: none; }
@media (max-width: 768px) {
  .event-title { font-size: 24px; }
  .event-meta-row { gap: 10px; }
  #detail-map { height: 200px; }
  .event-detail { padding: 14px 12px 40px; }
}

/* ========================
   Phase 4 — regional events
   ======================== */
.chip-regional {
  background: rgba(255, 75, 92, 0.14);
  color: #ff4b5c;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.04em;
}
.regional-note {
  background: rgba(255, 75, 92, 0.08);
  border: 1px solid rgba(255, 75, 92, 0.18);
  color: #fce4e6;
  padding: 14px 18px;
  border-radius: 12px;
  margin: 16px 0;
  font-size: 14px;
  line-height: 1.5;
}
.regional-note strong { color: #ff4b5c; margin-right: 4px; }
.regional-note a { color: #ff4b5c; text-decoration: underline; }
