/* ============================================================
   FunFinderPro — Mobile-first stylesheet
   ============================================================ */

/* --- CSS custom properties (colors, spacing) --- */
:root {
  --header-bg:    #1a1a2e;
  --accent:       #f4a261;   /* warm orange */
  --accent-dark:  #e07a3a;
  --bg:           #f2f2f7;
  --card-bg:      #ffffff;
  --text-primary: #1c1c1e;
  --text-secondary: #6e6e73;
  --divider:      #c7c7cc;
  --btn-bg:       #e5e5ea;
  --btn-active-bg: var(--accent);
  --btn-active-text: #ffffff;
  --radius-card:  12px;
  --radius-btn:   20px;
  --shadow:       0 1px 4px rgba(0,0,0,0.10);
}

/* --- Reset & base --- */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }

html { font-size: 16px; }

body {
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
  background: var(--bg);
  color: var(--text-primary);
  min-height: 100vh;
}

/* --- Header --- */
.header {
  background: var(--header-bg);
  color: #fff;
  padding: 6px 12px 4px;
  position: sticky;
  top: 0;
  z-index: 100;
  box-shadow: 0 2px 8px rgba(0,0,0,0.25);
}

.header-inner {
  max-width: 640px;
  margin: 0 auto;
}

.header-top-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.logo {
  font-size: 1.2rem;
  font-weight: 700;
  letter-spacing: -0.5px;
  color: #fff;
}

/* --- Hamburger menu button --- */
.menu-btn {
  background: none;
  border: none;
  cursor: pointer;
  padding: 6px;
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.menu-icon {
  display: block;
  width: 22px;
  height: 2px;
  background: rgba(255,255,255,0.85);
  border-radius: 1px;
}

/* --- Menu drawer --- */
.menu-drawer {
  display: none;
  background: var(--header-bg);
  border-bottom: 1px solid rgba(255,255,255,0.15);
  padding: 0 16px 12px;
  max-width: 640px;
  margin: 0 auto;
}

.menu-drawer.open {
  display: block;
}

.menu-item {
  display: block;
  color: rgba(255,255,255,0.85);
  text-decoration: none;
  padding: 10px 0;
  font-size: 0.95rem;
  border-bottom: 1px solid rgba(255,255,255,0.1);
  background: none;
  border-left: none;
  border-right: none;
  border-top: none;
  width: 100%;
  text-align: left;
  cursor: pointer;
  font-family: inherit;
}

.menu-item:last-child { border-bottom: none; }

.menu-item:hover { color: var(--accent); }

.logo-pro {
  color: var(--accent);
}

.location-row {
  display: flex;
  align-items: center;
  gap: 4px;
  margin-top: 1px;
  font-size: 0.78rem;
  color: rgba(255,255,255,0.75);
}

.location-icon { font-size: 0.9rem; }

.change-location-btn {
  background: none;
  border: 1px solid rgba(255,255,255,0.35);
  color: rgba(255,255,255,0.75);
  border-radius: 10px;
  padding: 1px 8px;
  font-size: 0.75rem;
  cursor: pointer;
  margin-left: 4px;
}

.change-location-btn:hover { border-color: rgba(255,255,255,0.7); color: #fff; }

/* --- Zip code bar --- */
.zip-bar {
  background: #fff;
  padding: 10px 16px;
  display: flex;
  align-items: center;
  gap: 8px;
  border-bottom: 1px solid var(--divider);
  max-width: 640px;
  margin: 0 auto;
  width: 100%;
}

.zip-input {
  border: 1px solid var(--divider);
  border-radius: 8px;
  padding: 7px 12px;
  font-size: 1rem;
  width: 130px;
  outline: none;
}

.zip-input:focus { border-color: var(--accent); }

.zip-submit-btn {
  background: var(--accent);
  color: #fff;
  border: none;
  border-radius: 8px;
  padding: 8px 16px;
  font-size: 0.95rem;
  font-weight: 600;
  cursor: pointer;
}

.zip-submit-btn:hover { background: var(--accent-dark); }

.zip-error {
  font-size: 0.82rem;
  color: #c0392b;
}

/* --- Filters wrapper --- */
.filters-wrapper {
  background: #fff;
  border-bottom: 1px solid var(--divider);
  padding: 8px 12px;
  position: sticky;
  top: 52px;   /* below the header */
  z-index: 90;
  box-shadow: 0 2px 6px rgba(0,0,0,0.06);
}

.filter-section {
  max-width: 640px;
  margin: 0 auto 6px;
}

.filter-section:last-child { margin-bottom: 0; }

/* Thin divider between filter groups */
.filter-divider {
  max-width: 640px;
  margin: 0 auto 6px;
  height: 1px;
  background: var(--divider);
}

/* --- Distance slider --- */
.slider-row {
  display: flex;
  align-items: center;
  gap: 10px;
}

.slider-label {
  font-size: 0.78rem;
  color: var(--text-secondary);
  white-space: nowrap;
}

.radius-slider {
  flex: 1;
  accent-color: var(--accent);
  height: 4px;
  cursor: pointer;
}

.slider-value {
  font-size: 0.78rem;
  font-weight: 600;
  color: var(--text-primary);
  white-space: nowrap;
  min-width: 60px;
  text-align: right;
}

/* --- Filter button groups --- */
.filter-group {
  display: flex;
  flex-wrap: wrap;
  gap: 4px;
}

.filter-btn {
  background: var(--btn-bg);
  color: var(--text-primary);
  border: none;
  border-radius: var(--radius-btn);
  padding: 4px 9px;
  font-size: 0.75rem;
  font-weight: 500;
  cursor: pointer;
  transition: background 0.15s, color 0.15s;
  white-space: nowrap;
}

.filter-btn:hover { background: #d1d1d6; }

.filter-btn.active {
  background: var(--btn-active-bg);
  color: var(--btn-active-text);
  font-weight: 600;
}

/* --- Genre text row (for live music sub-filter) --- */
.genre-text-row {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 2px 6px;
  font-size: 0.75rem;
}

.genre-link {
  color: var(--text-secondary);
  cursor: pointer;
  font-weight: 500;
}

.genre-link:hover { color: var(--accent-dark); }

.genre-link.active {
  color: var(--accent-dark);
  font-weight: 700;
}

.genre-sep {
  color: var(--divider);
  font-size: 0.7rem;
}

/* --- Results area --- */
.results-wrapper {
  max-width: 640px;
  margin: 0 auto;
  padding: 12px 12px 32px;
}

.results-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 2px 4px;
}

.results-count {
  font-size: 0.72rem;
  color: var(--accent);
  font-weight: 500;
  line-height: 1;
  white-space: nowrap;
}

.search-box {
  position: relative;
  flex: 0 1 200px;
}

.search-input {
  width: 100%;
  padding: 6px 28px 6px 10px;
  border: 1px solid var(--divider);
  border-radius: var(--radius-btn);
  font-size: 0.8rem;
  background: var(--card-bg);
  color: var(--text-primary);
  outline: none;
}

.search-input:focus {
  border-color: var(--accent);
}

.search-input::placeholder {
  color: var(--text-secondary);
  font-size: 0.75rem;
}

.search-clear {
  position: absolute;
  right: 6px;
  top: 50%;
  transform: translateY(-50%);
  background: none;
  border: none;
  font-size: 1.1rem;
  color: var(--text-secondary);
  cursor: pointer;
  padding: 0 4px;
  line-height: 1;
}

/* --- Day divider --- */
.day-divider {
  display: flex;
  align-items: center;
  gap: 10px;
  margin: 18px 0 10px;
}

.day-divider-label {
  font-size: 0.9rem;
  font-weight: 700;
  color: var(--text-secondary);
  white-space: nowrap;
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

.day-divider-line {
  flex: 1;
  height: 1px;
  background: var(--divider);
}

/* --- Event card --- */
.event-card {
  background: var(--card-bg);
  border-radius: var(--radius-card);
  box-shadow: var(--shadow);
  padding: 10px 14px;
  margin-bottom: 8px;
  text-decoration: none;
  color: inherit;
  display: block;
  transition: box-shadow 0.15s;
}

.event-card:hover {
  box-shadow: 0 4px 12px rgba(0,0,0,0.13);
}

/* card-top removed — badge now in venue row */

.event-type-badge {
  font-size: 0.65rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  padding: 3px 9px;
  border-radius: 10px;
  color: #fff;
  white-space: nowrap;
  flex-shrink: 0;
  margin-left: 8px;
}

/* Badge colors per event type */
.badge-live_music    { background: #2196F3; }
.badge-karaoke       { background: #9c27b0; }
.badge-trivia        { background: #ff9800; }
.badge-bingo         { background: #e65100; }
.badge-comedy        { background: #f44336; }
.badge-dj_dance      { background: #00bcd4; }
.badge-dj            { background: #00bcd4; }  /* legacy */
.badge-open_mic      { background: #4caf50; }
.badge-tasting       { background: #795548; }
.badge-games         { background: #607d8b; }
.badge-special_event { background: #e91e63; }
.badge-other         { background: #9e9e9e; }  /* legacy */

/* time is now inline with event name */

.event-name {
  font-size: 0.85rem;
  font-weight: 700;
  color: var(--text-primary);
  line-height: 1.2;
  margin-bottom: 1px;
}

.ticketed-badge {
  display: inline-block;
  background: #2e7d32;
  color: #fff;
  font-size: 0.7rem;
  font-weight: 700;
  padding: 1px 5px;
  border-radius: 4px;
  margin-right: 4px;
  vertical-align: middle;
}

.venue-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 1px;
}

.venue-name {
  font-size: 0.82rem;
  color: var(--accent-dark);
  font-weight: 600;
  text-decoration: none;
}

a.venue-name:hover { text-decoration: underline; }

.genre-tag {
  font-size: 0.68rem;
  color: var(--text-secondary);
  font-weight: 500;
  white-space: nowrap;
}

.event-address {
  font-size: 0.75rem;
  color: var(--text-secondary);
}

.venue-phone {
  display: inline-block;
  font-size: 0.8rem;
  color: #2196F3;
  text-decoration: none;
  font-weight: 600;
}

.venue-phone:hover { text-decoration: underline; }

.confirm-link {
  font-size: 0.75rem;
  color: #999;
  text-decoration: none;
  font-style: italic;
}

a.confirm-link:hover { text-decoration: underline; color: #666; }

.card-footer {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-top: 6px;
  padding-top: 5px;
  border-top: 1px solid #f0f0f0;
}

.card-footer-links {
  display: flex;
  gap: 12px;
  align-items: center;
}

.event-link {
  font-size: 0.8rem;
  color: #2196F3;
  font-weight: 600;
  text-decoration: none;
}

.event-link:hover { text-decoration: underline; }

.event-distance {
  font-size: 0.82rem;
  color: var(--text-primary);
  font-weight: 600;
}

/* --- Empty state --- */
.empty-state {
  text-align: center;
  padding: 48px 24px;
  color: var(--text-secondary);
}

.empty-state-icon { font-size: 2.5rem; margin-bottom: 12px; }

.empty-state-msg {
  font-size: 1rem;
  font-weight: 600;
  color: var(--text-primary);
  margin-bottom: 6px;
}

.empty-state-sub {
  font-size: 0.88rem;
  margin-bottom: 20px;
}

.reset-btn {
  background: var(--accent);
  color: #fff;
  border: none;
  border-radius: var(--radius-btn);
  padding: 10px 24px;
  font-size: 0.95rem;
  font-weight: 600;
  cursor: pointer;
}

.reset-btn:hover { background: var(--accent-dark); }

/* --- Loading state --- */
.loading {
  text-align: center;
  padding: 40px;
  color: var(--text-secondary);
  font-size: 0.9rem;
}

/* --- Info pages (venues, artists, about) --- */
.page-content {
  max-width: 640px;
  margin: 0 auto;
  padding: 24px 16px;
  background: var(--bg);
}

.page-content h2 {
  font-size: 1.3rem;
  margin-bottom: 16px;
  color: var(--text-primary);
}

.page-content p {
  font-size: 0.95rem;
  line-height: 1.6;
  color: var(--text-primary);
  margin-bottom: 12px;
}

.page-content a {
  color: var(--accent-dark);
}

/* --- Desktop: center and constrain width --- */
@media (min-width: 680px) {
  .filters-wrapper { top: 56px; }
}
