/* NOLA.Today — palette carried over from the original site:
   charcoal map land, teal water (#79a8a9), slate-teal popups (#68909E),
   pale aqua (#AACFD0), off-white (#F4F7F7), yellow badges, orange markers. */

:root {
  --bg: #2b2e2f;
  --bg-elev: #353a3b;
  --bg-elev-2: #3f4546;
  --line: #4b5354;
  --text: #f4f7f7;
  --muted: #a7b8ba;
  --accent: #f5b700;
  --accent-hover: #ffc929;
  --accent-ink: #1b2b35;
  --marker: #ffa500;
  --marker-ring: rgba(255, 165, 0, 0.45);
  --teal: #68909e;
  --teal-deep: #2a5669;
  --aqua: #aacfd0;
  --water: #79a8a9;
  --link: #f7c948;
  --popup-bg: #68909e;
  --popup-text: #f4f7f7;
  --shadow: 0 10px 30px rgba(0, 0, 0, 0.35);
  --radius: 14px;
  --font-body: 'Barlow Semi Condensed', system-ui, -apple-system, 'Segoe UI', sans-serif;
  --font-display: 'Orelega One', Georgia, serif;
  color-scheme: dark;
}

@media (prefers-color-scheme: light) {
  :root:not([data-theme='dark']) {
    --bg: #f4f7f7;
    --bg-elev: #ffffff;
    --bg-elev-2: #e6eeee;
    --line: #d2dcdc;
    --text: #1e2a2e;
    --muted: #536d74;
    --accent-ink: #1b2b35;
    --marker: #e8590c;
    --marker-ring: rgba(232, 89, 12, 0.35);
    --link: #2a5669;
    --popup-bg: #ffffff;
    --popup-text: #1e2a2e;
    --shadow: 0 10px 30px rgba(30, 42, 46, 0.15);
    color-scheme: light;
  }
}

:root[data-theme='light'] {
  --bg: #f4f7f7;
  --bg-elev: #ffffff;
  --bg-elev-2: #e6eeee;
  --line: #d2dcdc;
  --text: #1e2a2e;
  --muted: #536d74;
  --accent-ink: #1b2b35;
  --marker: #e8590c;
  --marker-ring: rgba(232, 89, 12, 0.35);
  --link: #2a5669;
  --popup-bg: #ffffff;
  --popup-text: #1e2a2e;
  --shadow: 0 10px 30px rgba(30, 42, 46, 0.15);
  color-scheme: light;
}

/* Theme-specific images and icons */
.only-light,
.icon-moon { display: none; }
:root[data-theme='light'] .only-light,
:root[data-theme='light'] .icon-moon { display: block; }
:root[data-theme='light'] .only-dark,
:root[data-theme='light'] .icon-sun { display: none; }
@media (prefers-color-scheme: light) {
  :root:not([data-theme='dark']) .only-light,
  :root:not([data-theme='dark']) .icon-moon { display: block; }
  :root:not([data-theme='dark']) .only-dark,
  :root:not([data-theme='dark']) .icon-sun { display: none; }
}

*, *::before, *::after { box-sizing: border-box; }
[hidden] { display: none !important; }

html { -webkit-text-size-adjust: 100%; }

body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font-family: var(--font-body);
  font-size: 18px;
  line-height: 1.45;
}

::selection { background: rgba(118, 47, 169, 0.5); }

a { color: var(--link); text-decoration-thickness: 1px; text-underline-offset: 3px; }
a:hover { text-decoration-thickness: 2px; }

h1, h2, h3 {
  font-family: var(--font-display);
  font-weight: 400;
  line-height: 1.15;
  margin: 0 0 0.4em;
  letter-spacing: 0.005em;
}
h1 { font-size: clamp(2.2rem, 6vw, 3.6rem); }
h2 { font-size: clamp(1.6rem, 3.5vw, 2.2rem); }
h3 { font-size: 1.3rem; }

.wrap { max-width: 1120px; margin: 0 auto; padding: 0 16px; }
.muted { color: var(--muted); }
.lede { font-size: 1.2rem; color: var(--muted); max-width: 46em; }
.visually-hidden {
  position: absolute !important; width: 1px; height: 1px; overflow: hidden;
  clip: rect(0 0 0 0); white-space: nowrap; border: 0; padding: 0; margin: -1px;
}

.badge {
  display: inline-block;
  padding: 1px 10px;
  margin-bottom: 12px;
  border-radius: 999px;
  background: var(--accent);
  color: var(--accent-ink);
  font-size: 0.72rem;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 46px;
  padding: 0 20px;
  border-radius: 10px;
  border: 1px solid var(--line);
  background: var(--bg-elev);
  color: var(--text);
  font: inherit;
  font-weight: 600;
  text-decoration: none;
  cursor: pointer;
}
.button:hover { background: var(--bg-elev-2); }
.button.primary { background: var(--accent); border-color: var(--accent); color: var(--accent-ink); }
.button.primary:hover { background: var(--accent-hover); }
.button-row { display: flex; flex-wrap: wrap; gap: 10px; margin-top: 18px; }

.brand {
  font-family: var(--font-display);
  font-size: 1.5rem;
  color: var(--text);
  text-decoration: none;
  white-space: nowrap;
}
.brand span { color: var(--marker); }
.brand:hover { color: var(--accent); }

/* Header & footer ------------------------------------------------------- */
.site-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  max-width: 1120px;
  margin: 0 auto;
  padding: 14px 16px;
}
.site-nav { display: flex; align-items: center; gap: 4px; }
.site-nav a {
  padding: 8px 12px;
  border-radius: 8px;
  color: var(--muted);
  font-weight: 600;
  text-decoration: none;
}
.site-nav a:hover, .site-nav a[aria-current='page'] { color: var(--text); background: var(--bg-elev); }

.theme-toggle {
  display: inline-grid;
  place-items: center;
  width: 40px;
  height: 40px;
  border: 1px solid var(--line);
  border-radius: 10px;
  background: var(--bg-elev);
  color: var(--text);
  cursor: pointer;
}
.theme-toggle:hover { color: var(--accent); }

.site-footer {
  margin-top: 64px;
  padding: 40px 0 56px;
  border-top: 1px solid var(--line);
  background: var(--bg-elev);
}
.footer-inner { display: flex; flex-wrap: wrap; gap: 24px 48px; justify-content: space-between; }
.footer-inner p { max-width: 36em; margin: 8px 0 0; font-size: 0.95rem; }
.colophon { color: var(--muted); }

/* Venue page ------------------------------------------------------------ */
.map-banner {
  position: relative;
  height: clamp(180px, 28vw, 360px);
  overflow: hidden;
  background: var(--bg-elev);
}
.map-banner--empty { height: 140px; background: linear-gradient(135deg, var(--teal-deep), var(--bg)); }
.map-banner img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}
.map-banner::after {
  content: '';
  position: absolute;
  inset: auto 0 0 0;
  height: 45%;
  background: linear-gradient(to bottom, transparent, var(--bg));
  pointer-events: none;
}

.venue-hero {
  position: relative;
  display: grid;
  gap: 28px;
  margin-top: -64px;
  align-items: end;
}
@media (min-width: 900px) {
  .venue-hero { grid-template-columns: 1fr 520px; margin-top: -96px; }
}
.venue-hero h1 { margin-bottom: 8px; text-shadow: 0 2px 18px var(--bg); }
.venue-address { margin: 0; font-size: 1.2rem; color: var(--muted); }
.venue-note { color: var(--muted); font-style: italic; margin: 8px 0 0; }
.venue-photo {
  position: relative;
  margin: 0;
  border-radius: 28px;
  overflow: hidden;
  box-shadow: var(--shadow);
  aspect-ratio: 4 / 3;
  background: var(--bg-elev);
}
.venue-photo img { width: 100%; height: 100%; object-fit: cover; display: block; }
.photo-credit {
  position: absolute;
  right: 0;
  bottom: 0;
  max-width: 100%;
  padding: 4px 14px 5px;
  border-top-left-radius: 12px;
  background: rgba(0, 0, 0, 0.6);
  color: #fff;
  font-size: 0.75rem;
  line-height: 1.35;
}
.photo-credit a { color: inherit; }

.live-now {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  margin: 14px 0 0;
  padding: 6px 12px;
  border-radius: 999px;
  background: var(--bg-elev);
  border: 1px solid var(--line);
}
.live-dot {
  width: 10px; height: 10px; border-radius: 50%;
  background: var(--marker);
  box-shadow: 0 0 0 0 var(--marker-ring);
  animation: pulse 2s infinite;
}
@keyframes pulse {
  0% { box-shadow: 0 0 0 0 var(--marker-ring); }
  70% { box-shadow: 0 0 0 10px transparent; }
  100% { box-shadow: 0 0 0 0 transparent; }
}

.schedule { margin-top: 48px; }
.schedule-meta { margin-top: -4px; }
.day { margin-top: 28px; }
.day-heading {
  display: flex;
  gap: 10px;
  align-items: baseline;
  padding-bottom: 8px;
  border-bottom: 1px solid var(--line);
}
.day-date { font-family: var(--font-body); font-size: 1rem; font-weight: 600; color: var(--muted); }
.event-list { list-style: none; margin: 0; padding: 0; }
.event {
  display: grid;
  grid-template-columns: 5.5em 1fr;
  gap: 12px;
  padding: 12px 0;
  border-bottom: 1px solid color-mix(in srgb, var(--line) 55%, transparent);
}
.event-time { color: var(--accent); font-weight: 700; font-variant-numeric: tabular-nums; }
:root[data-theme='light'] .event-time { color: var(--teal-deep); }
@media (prefers-color-scheme: light) { :root:not([data-theme='dark']) .event-time { color: var(--teal-deep); } }
.event-title { font-size: 1.1rem; font-weight: 600; }
.event-title a { color: var(--text); text-decoration: none; }
.event-title a:hover { color: var(--link); text-decoration: underline; }
.event.is-live .event-time::after { content: ' • live'; color: var(--marker); }

.notice {
  margin-top: 16px;
  padding: 20px 22px;
  border-radius: var(--radius);
  background: var(--bg-elev);
  border: 1px solid var(--line);
}
.notice p { margin: 0; }
.notice h2 { font-size: 1.5rem; }
.venue-story { margin-top: 40px; }
.venue-story > * { max-width: 720px; }
.venue-story h2 { margin-bottom: 4px; }
.venue-story p { margin: 0 0 1em; }
.venue-story .story-summary { font-size: 1.2rem; margin-bottom: 4px; }
.story-photo { margin: 0 0 1em; }
.story-photo img { display: block; max-width: 100%; height: auto; border-radius: var(--radius); }
.referrals { margin-top: 48px; }
.referrals h2 { font-size: 1.5rem; }
.referral-list {
  list-style: none;
  margin: 0;
  padding: 0;
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
  gap: 12px;
}
.referral-list li { display: flex; }
.referral {
  flex: 1;
  display: flex;
  align-items: center;
  gap: 14px;
  padding: 16px 18px;
  border-radius: var(--radius);
  border: 1px solid var(--line);
  background: var(--bg-elev);
  color: var(--text);
  font-weight: 600;
  line-height: 1.3;
  text-decoration: none;
}
.referral:hover { background: var(--bg-elev-2); border-color: var(--link); }
.referral svg { flex: none; color: var(--link); }
.referral-text { text-wrap: balance; }
.referral-arrow { margin-left: auto; padding-left: 4px; color: var(--muted); }
.referral:hover .referral-arrow { color: var(--link); }
.referral-note { margin: 10px 0 0; font-size: 0.85rem; }
.venue-foot { margin-top: 40px; font-size: 0.95rem; }

/* Directory ------------------------------------------------------------- */
.page-intro { padding: 32px 0 8px; }
.search input {
  width: 100%;
  max-width: 420px;
  min-height: 48px;
  margin-top: 8px;
  padding: 0 16px;
  border-radius: 10px;
  border: 1px solid var(--line);
  background: var(--bg-elev);
  color: var(--text);
  font: inherit;
}
.search input:focus { outline: 2px solid var(--accent); outline-offset: 1px; }
.venue-grid {
  list-style: none;
  margin: 24px 0 0;
  padding: 0;
  display: grid;
  gap: 16px;
  grid-template-columns: repeat(auto-fill, minmax(260px, 1fr));
}
.venue-card a {
  display: flex;
  flex-direction: column;
  height: 100%;
  border-radius: var(--radius);
  overflow: hidden;
  background: var(--bg-elev);
  border: 1px solid var(--line);
  color: var(--text);
  text-decoration: none;
  transition: transform 0.15s ease, border-color 0.15s ease;
}
.venue-card a:hover { border-color: var(--marker); transform: translateY(-2px); }
.card-media {
  aspect-ratio: 16 / 9;
  background: linear-gradient(135deg, var(--teal-deep), var(--teal));
  display: grid;
  place-items: center;
}
.card-media img { width: 100%; height: 100%; object-fit: cover; display: block; }
.card-placeholder { font-size: 2.5rem; color: var(--aqua); opacity: 0.8; }
.card-body { padding: 14px 16px 16px; }
.card-body h2 { font-size: 1.35rem; margin: 0 0 2px; }
.card-body p { margin: 0; }
.card-address { font-size: 0.95rem; }
.card-next { margin-top: 8px !important; font-weight: 600; }
.card-count { font-size: 0.9rem; }
.closed-venues { margin-top: 56px; }
.closed-list { display: flex; flex-wrap: wrap; gap: 8px 20px; padding: 0; list-style: none; }
.closed-list a { color: var(--muted); }

.not-found { padding: 64px 16px; }

/* Map page -------------------------------------------------------------- */
.page-map { overflow: hidden; }
.map-page { position: fixed; inset: 0; }
/* Higher specificity than mapbox-gl.css's .mapboxgl-map { position: relative } */
.map-page #map { position: absolute; inset: 0; width: 100%; height: 100%; background: var(--bg); }

.map-top {
  position: absolute;
  z-index: 2;
  top: 12px;
  left: 12px;
  right: 12px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  pointer-events: none;
}
.map-top > * { pointer-events: auto; }
.map-brand {
  padding: 6px 14px;
  border-radius: 12px;
  background: color-mix(in srgb, var(--bg) 82%, transparent);
  backdrop-filter: blur(6px);
  box-shadow: var(--shadow);
}
.segmented {
  display: inline-flex;
  padding: 4px;
  gap: 2px;
  border-radius: 12px;
  background: color-mix(in srgb, var(--bg) 82%, transparent);
  backdrop-filter: blur(6px);
  box-shadow: var(--shadow);
}
.segmented button {
  min-height: 36px;
  padding: 0 14px;
  border: 0;
  border-radius: 9px;
  background: transparent;
  color: var(--text);
  font: inherit;
  font-weight: 600;
  cursor: pointer;
}
.segmented button:hover { background: var(--bg-elev-2); }
.segmented button[aria-selected='true'] { background: var(--marker); color: #1b1b1b; }
.segmented button:disabled { opacity: 0.4; cursor: not-allowed; }
.map-top .theme-toggle {
  background: color-mix(in srgb, var(--bg) 82%, transparent);
  backdrop-filter: blur(6px);
  box-shadow: var(--shadow);
}
@media (max-width: 560px) {
  .map-top { flex-wrap: wrap; }
  .map-brand { font-size: 1.25rem; }
  .segmented { order: 3; width: 100%; justify-content: center; }
  .segmented button { flex: 1; }
}

.map-status {
  position: absolute;
  z-index: 2;
  left: 50%;
  top: 50%;
  transform: translate(-50%, -50%);
  max-width: min(90vw, 420px);
  margin: 0;
  padding: 14px 18px;
  border-radius: 12px;
  background: color-mix(in srgb, var(--bg) 90%, transparent);
  box-shadow: var(--shadow);
  text-align: center;
}
.map-status:empty { display: none; }

.map-bottom {
  position: absolute;
  z-index: 2;
  left: 0;
  right: 0;
  bottom: 28px;
  display: flex;
  justify-content: center;
  pointer-events: none;
}
.pill-button {
  pointer-events: auto;
  padding: 10px 18px;
  border-radius: 999px;
  background: color-mix(in srgb, var(--bg) 85%, transparent);
  backdrop-filter: blur(6px);
  box-shadow: var(--shadow);
  color: var(--text);
  font-weight: 600;
  text-decoration: none;
}
.pill-button:hover { color: var(--accent); }

/* Markers: an orange dot that grows on hover; live venues ripple. */
.marker {
  position: relative;
  width: 22px;
  height: 22px;
  padding: 0;
  border: 0;
  background: none;
  cursor: pointer;
}
.marker::before, .marker::after {
  content: '';
  position: absolute;
  border-radius: 50%;
  background: var(--marker);
}
.marker::after {
  inset: 25%;
  box-shadow: 0 0 0 2px color-mix(in srgb, var(--bg) 60%, transparent);
  transition: inset 0.2s ease;
}
.marker:hover::after, .marker:focus-visible::after, .marker.is-open::after { inset: 0; }
.marker.live::before {
  inset: 50%;
  animation: ripple 4s cubic-bezier(0, 0.1, 0.7, 1) infinite;
  animation-delay: var(--delay, 0s);
  pointer-events: none;
}
@keyframes ripple {
  0% { inset: 50%; opacity: 1; }
  50%, 100% { inset: -150%; opacity: 0; }
}
@media (prefers-reduced-motion: reduce) {
  .marker.live::before, .live-dot { animation: none; }
}

/* Mapbox popups, restyled */
/* Fixed width so every card is the same size; long text wraps. */
.mapboxgl-popup { width: min(320px, 86vw); max-width: none !important; }
.mapboxgl-popup-content {
  padding: 0 !important;
  overflow: hidden;
  border-radius: var(--radius) !important;
  background: var(--popup-bg) !important;
  color: var(--popup-text);
  font-family: var(--font-body);
  box-shadow: var(--shadow) !important;
}
.mapboxgl-popup-close-button { display: none; }
.mapboxgl-popup-anchor-top .mapboxgl-popup-tip,
.mapboxgl-popup-anchor-top-left .mapboxgl-popup-tip,
.mapboxgl-popup-anchor-top-right .mapboxgl-popup-tip { border-bottom-color: var(--popup-bg) !important; }
.mapboxgl-popup-anchor-bottom .mapboxgl-popup-tip,
.mapboxgl-popup-anchor-bottom-left .mapboxgl-popup-tip,
.mapboxgl-popup-anchor-bottom-right .mapboxgl-popup-tip { border-top-color: var(--popup-bg) !important; }
.mapboxgl-popup-anchor-left .mapboxgl-popup-tip { border-right-color: var(--popup-bg) !important; }
.mapboxgl-popup-anchor-right .mapboxgl-popup-tip { border-left-color: var(--popup-bg) !important; }

.popup-banner {
  position: relative;
  display: flex;
  align-items: flex-end;
  min-height: 92px;
  padding: 12px 14px;
  background: var(--teal-deep) center / cover no-repeat;
  color: #fff;
  text-decoration: none;
}
.popup-banner::before {
  content: '';
  position: absolute;
  inset: 0;
  background: linear-gradient(to top, rgba(0, 0, 0, 0.7), rgba(0, 0, 0, 0.05));
}
.popup-banner h3 { position: relative; margin: 0; font-size: 1.35rem; color: #fff; overflow-wrap: anywhere; }
.popup-banner:hover h3 { text-decoration: underline; }
.popup-gigs { list-style: none; margin: 0; padding: 4px 14px 6px; max-height: 240px; overflow-y: auto; }
.popup-gigs li { padding: 8px 0; border-bottom: 1px solid color-mix(in srgb, currentColor 18%, transparent); }
.popup-gigs li:last-child { border-bottom: 0; }
.popup-time { display: block; font-weight: 700; font-size: 0.9rem; opacity: 0.85; }
.popup-title { font-size: 1.1rem; font-weight: 600; line-height: 1.25; overflow-wrap: anywhere; }
.popup-live { color: var(--marker); font-weight: 700; }
.popup-more {
  display: block;
  padding: 10px 14px 12px;
  font-weight: 700;
  color: inherit;
  text-decoration: none;
  border-top: 1px solid color-mix(in srgb, currentColor 18%, transparent);
}
.popup-more:hover { text-decoration: underline; }
