/* ═══════════════════════════════════════════════════════════
   V3 — Timeline Styles
   Vertical chronological scroll — color-coded by event type
   ═══════════════════════════════════════════════════════════ */

/* ─── Filter bar ──────────────────────────────────────── */
.tl-filter-bar {
  display: flex; flex-direction: column; gap: 8px;
  padding: calc(14px + 60px + env(safe-area-inset-top, 0px)) 16px 0;
  max-width: 600px; margin: 0 auto;
}
.tl-filter-pills {
  display: flex; align-items: center; gap: 6px;
  flex-wrap: wrap;
}
.tl-pill {
  display: flex; align-items: center; gap: 4px;
  padding: 6px 14px; flex-shrink: 0;
  background: var(--surface); border: 1px solid var(--border);
  border-radius: 100px; font-size: 12px; font-weight: 700;
  color: var(--text-dim, #bbb); white-space: nowrap;
  transition: all .18s ease; cursor: pointer;
}
.tl-pill:hover { border-color: rgba(255,255,255,.25); color: #fff; }
.tl-pill.active {
  background: linear-gradient(135deg, rgba(255,179,71,.18), rgba(255,107,157,.18));
  border-color: rgba(255,179,71,.5);
  color: #ffb347;
  text-shadow: 0 0 8px rgba(255,179,71,.25);
}
.tl-pill svg { flex-shrink: 0; }

/* ─── Funnel toggle button ────────────────────────────── */
.tl-funnel-btn { position: relative; padding: 6px 10px; }
.tl-funnel-btn.open { background: rgba(255,255,255,.08); }
.tl-funnel-badge {
  position: absolute; top: 4px; right: 4px;
  width: 6px; height: 6px; border-radius: 50%;
  background: #ffb347;
}
/* ─── Filter expand panel ─────────────────────────────��─ */
.tl-filter-expand {
  display: flex; align-items: center; gap: 6px;
  padding: 6px 0 2px;
  animation: tlFilterSlide .2s ease;
}
@keyframes tlFilterSlide {
  from { opacity: 0; transform: translateY(-6px); }
  to   { opacity: 1; transform: translateY(0); }
}

/* ─── Share button on timeline cards ──────────────────── */
.tl-share-btn {
  display: flex; align-items: center; justify-content: center;
  width: 26px; height: 26px; flex-shrink: 0;
  border: none; background: transparent;
  color: var(--muted); border-radius: 6px;
  cursor: pointer; transition: color .15s, background .15s;
}
.tl-share-btn:hover { color: var(--text); background: rgba(255,255,255,.08); }
.tl-distance-slider-wrap {
  display: flex; align-items: center; gap: 8px; min-width: 120px;
}
/* ─── Top row: pills left, LED counter right ─────────── */
.tl-top-row {
  display: flex; align-items: center; justify-content: space-between; gap: 10px;
}

/* ─── Retro LED Ticker Counter ────────────────────────── */
.tl-led-counter {
  display: flex; align-items: center; gap: 1px;
  background: rgba(0,0,0,.5);
  padding: 5px 8px; border-radius: 6px;
  border: 1px solid rgba(255,155,100,.15);
  position: relative; overflow: hidden; flex-shrink: 0;
}
.tl-led-counter::after {
  content: ''; position: absolute; inset: 0;
  background: repeating-linear-gradient(0deg,transparent,transparent 2px,rgba(0,0,0,.08) 2px,rgba(0,0,0,.08) 4px);
  pointer-events: none; border-radius: 6px;
}
.led-digit {
  position: relative; width: 14px; height: 22px; overflow: hidden;
}
.led-strip {
  position: absolute; left: 0; right: 0;
  transition: transform .15s cubic-bezier(.23,1,.32,1);
  will-change: transform;
}
.led-num {
  display: flex; align-items: center; justify-content: center;
  width: 14px; height: 22px; font-size: 14px; font-weight: 800;
  font-family: 'Courier New', monospace;
  font-variant-numeric: tabular-nums;
  background: linear-gradient(180deg, #ffb347 20%, #ff6b9d 100%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
  filter: drop-shadow(0 0 4px rgba(255,179,71,.3));
}
.led-comma {
  font-size: 14px; font-weight: 800;
  font-family: 'Courier New', monospace;
  background: linear-gradient(180deg, #ffb347 20%, #ff6b9d 100%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
  filter: drop-shadow(0 0 4px rgba(255,179,71,.3));
  width: 6px; text-align: center;
}
.led-label {
  font-size: 9px; font-weight: 700; color: rgba(255,179,71,.5);
  text-transform: uppercase; letter-spacing: .08em;
  margin-left: 6px; align-self: center;
}

/* ─── Timeline list ────────────────────────────────────── */
.tl-mobile-list {
  display: flex;
  flex-direction: column;
  gap: 0;
  padding: 12px 16px 100px;
  max-width: 600px;
  margin: 0 auto;
}

/* ─── Month headers ────────────────────────────────────── */
.tl-month-header {
  font-size: 13px;
  font-weight: 700;
  color: var(--accent);
  letter-spacing: .08em;
  text-transform: uppercase;
  padding: 18px 0 8px;
  border-bottom: 1px solid var(--border);
  margin-bottom: 10px;
}

/* ─── Timeline items (left border line + dot) ──────────── */
.tl-mobile-item {
  position: relative;
  padding-left: 28px;
  padding-bottom: 18px;
}

.tl-mobile-item::before {
  content: "";
  position: absolute;
  left: 7px;
  top: 0;
  bottom: 0;
  width: 2px;
  background: var(--border);
}

/* Timeline dot — color set via CSS variable per event type */
.tl-mobile-item::after {
  content: "";
  position: absolute;
  left: 2px;
  top: 8px;
  width: 12px;
  height: 12px;
  border-radius: 50%;
  background: var(--tl-color, var(--accent));
  border: 2px solid var(--bg);
  box-shadow: 0 0 6px var(--tl-glow, transparent);
}

/* ─── Date label ───────────────────────────────────────── */
.tl-mobile-date {
  font-size: 11px;
  color: var(--muted);
  margin-bottom: 6px;
}

/* ─── Event card — color-coded by type ─────────────────── */
.tl-card {
  background: var(--tl-bg, var(--surface));
  border: 1px solid var(--tl-border, var(--border));
  border-radius: var(--radius);
  overflow: hidden;
  transition: box-shadow .2s, border-color .2s, transform .15s;
}

.tl-card:hover {
  box-shadow: 0 4px 20px rgba(0, 0, 0, .35), 0 0 12px var(--tl-glow, transparent);
  border-color: var(--tl-border-hover, var(--border-light));
  transform: translateX(2px);
}

/* ─── Event type color schemes ─────────────────────────── */
/* Festival — hot magenta */
.tl-type-festival-card {
  --tl-color: #e84393;
  --tl-glow: rgba(232, 67, 147, .25);
  --tl-bg: rgba(232, 67, 147, .12);
  --tl-border: rgba(232, 67, 147, .2);
  --tl-border-hover: rgba(232, 67, 147, .45);
}
/* Club — electric violet */
.tl-type-club-card {
  --tl-color: #a855f7;
  --tl-glow: rgba(168, 85, 247, .25);
  --tl-bg: rgba(168, 85, 247, .12);
  --tl-border: rgba(168, 85, 247, .2);
  --tl-border-hover: rgba(168, 85, 247, .45);
}
/* Show — warm amber */
.tl-type-show-card {
  --tl-color: #ffb347;
  --tl-glow: rgba(255, 179, 71, .25);
  --tl-bg: rgba(255, 179, 71, .12);
  --tl-border: rgba(255, 179, 71, .2);
  --tl-border-hover: rgba(255, 179, 71, .45);
}
/* Day party — sunset coral */
.tl-type-day-card {
  --tl-color: #ff6b6b;
  --tl-glow: rgba(255, 107, 107, .25);
  --tl-bg: rgba(255, 107, 107, .12);
  --tl-border: rgba(255, 107, 107, .2);
  --tl-border-hover: rgba(255, 107, 107, .45);
}
/* Boat party — ocean teal */
.tl-type-boat-card {
  --tl-color: #2dd4bf;
  --tl-glow: rgba(45, 212, 191, .25);
  --tl-bg: rgba(45, 212, 191, .12);
  --tl-border: rgba(45, 212, 191, .2);
  --tl-border-hover: rgba(45, 212, 191, .45);
}
/* Community — soft green */
.tl-type-community-card {
  --tl-color: #4ade80;
  --tl-glow: rgba(74, 222, 128, .2);
  --tl-bg: rgba(74, 222, 128, .12);
  --tl-border: rgba(74, 222, 128, .18);
  --tl-border-hover: rgba(74, 222, 128, .4);
}
/* Outdoor — sky cyan */
.tl-type-outdoor-card {
  --tl-color: #22d3ee;
  --tl-glow: rgba(34, 211, 238, .25);
  --tl-bg: rgba(34, 211, 238, .12);
  --tl-border: rgba(34, 211, 238, .2);
  --tl-border-hover: rgba(34, 211, 238, .45);
}
/* Food & Drink — warm gold */
.tl-type-food-card {
  --tl-color: #f59e0b;
  --tl-glow: rgba(245, 158, 11, .25);
  --tl-bg: rgba(245, 158, 11, .12);
  --tl-border: rgba(245, 158, 11, .2);
  --tl-border-hover: rgba(245, 158, 11, .45);
}
/* Art — lavender */
.tl-type-art-card {
  --tl-color: #c084fc;
  --tl-glow: rgba(192, 132, 252, .25);
  --tl-bg: rgba(192, 132, 252, .12);
  --tl-border: rgba(192, 132, 252, .2);
  --tl-border-hover: rgba(192, 132, 252, .45);
}
/* Dance — hot pink */
.tl-type-dance-card {
  --tl-color: #ff6b9d;
  --tl-glow: rgba(255, 107, 157, .25);
  --tl-bg: rgba(255, 107, 157, .12);
  --tl-border: rgba(255, 107, 157, .2);
  --tl-border-hover: rgba(255, 107, 157, .45);
}
/* Wellness — mint */
.tl-type-wellness-card {
  --tl-color: #34d399;
  --tl-glow: rgba(52, 211, 153, .2);
  --tl-bg: rgba(52, 211, 153, .12);
  --tl-border: rgba(52, 211, 153, .18);
  --tl-border-hover: rgba(52, 211, 153, .4);
}

/* ─── Vote buttons (Going / I'm in / Can't) ───────────── */
.vbtn {
  flex: 1;
  border: 1px solid var(--border);
  background: var(--bg);
  color: var(--text);
  padding: 6px 4px;
  border-radius: 8px;
  font-size: 11px;
  font-weight: 700;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 5px;
  transition: border-color .15s, background .15s;
}

.vbtn:hover {
  background: rgba(255, 255, 255, .05);
}

.vbtn .dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
}

.vbtn.g .dot { background: var(--success); }
.vbtn.y .dot { background: var(--warm); }
.vbtn.r .dot { background: var(--error); }

.vbtn.active.g { border-color: var(--success); background: rgba(74, 222, 128, .12); }
.vbtn.active.y { border-color: var(--warm); background: rgba(245, 192, 110, .12); }
.vbtn.active.r { border-color: var(--error); background: rgba(248, 113, 113, .12); }

/* ─── Voter chips ──────────────────────────────────────── */
.chip {
  font-size: 10px;
  font-weight: 800;
  padding: 3px 6px;
  border-radius: 999px;
  border: 1px solid var(--border);
  color: var(--text);
}

.chip.g { border-color: var(--success); color: var(--success); }
.chip.y { border-color: var(--warm); color: var(--warm); }
.chip.r { border-color: var(--error); color: var(--error); }

/* ─── Event type badge — playful pill with glow ──────── */
.tl-type-badge {
  flex-shrink: 0;
  font-size: 9px;
  font-weight: 800;
  letter-spacing: .1em;
  padding: 3px 10px;
  border-radius: 100px;
  text-transform: uppercase;
  border: 1px solid;
  /* backdrop-filter removed for mobile GPU perf */
}
.tl-type-festival {
  background: rgba(232, 67, 147, .18);
  color: #f472b6;
  border-color: rgba(232, 67, 147, .35);
  box-shadow: 0 0 8px rgba(232, 67, 147, .15);
}
.tl-type-club {
  background: rgba(168, 85, 247, .18);
  color: #c084fc;
  border-color: rgba(168, 85, 247, .35);
  box-shadow: 0 0 8px rgba(168, 85, 247, .15);
}
.tl-type-show {
  background: rgba(255, 179, 71, .18);
  color: #fbbf24;
  border-color: rgba(255, 179, 71, .35);
  box-shadow: 0 0 8px rgba(255, 179, 71, .15);
}
.tl-type-day {
  background: rgba(255, 107, 107, .18);
  color: #fca5a5;
  border-color: rgba(255, 107, 107, .35);
  box-shadow: 0 0 8px rgba(255, 107, 107, .15);
}
.tl-type-boat {
  background: rgba(45, 212, 191, .18);
  color: #5eead4;
  border-color: rgba(45, 212, 191, .35);
  box-shadow: 0 0 8px rgba(45, 212, 191, .15);
}
.tl-type-community {
  background: rgba(74, 222, 128, .15);
  color: #86efac;
  border-color: rgba(74, 222, 128, .3);
  box-shadow: 0 0 8px rgba(74, 222, 128, .1);
}
.tl-type-outdoor {
  background: rgba(34, 211, 238, .18);
  color: #67e8f9;
  border-color: rgba(34, 211, 238, .35);
  box-shadow: 0 0 8px rgba(34, 211, 238, .15);
}
.tl-type-food {
  background: rgba(245, 158, 11, .18);
  color: #fbbf24;
  border-color: rgba(245, 158, 11, .35);
  box-shadow: 0 0 8px rgba(245, 158, 11, .15);
}
.tl-type-art {
  background: rgba(192, 132, 252, .18);
  color: #d8b4fe;
  border-color: rgba(192, 132, 252, .35);
  box-shadow: 0 0 8px rgba(192, 132, 252, .15);
}
.tl-type-dance {
  background: rgba(255, 107, 157, .18);
  color: #f9a8d4;
  border-color: rgba(255, 107, 157, .35);
  box-shadow: 0 0 8px rgba(255, 107, 157, .15);
}
.tl-type-wellness {
  background: rgba(52, 211, 153, .18);
  color: #6ee7b7;
  border-color: rgba(52, 211, 153, .35);
  box-shadow: 0 0 8px rgba(52, 211, 153, .1);
}

/* ─── Venue line ──────────────────────────────────────── */
.tl-venue {
  display: flex;
  align-items: center;
  font-size: 12px;
  color: var(--text-dim);
  margin-bottom: 4px;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

/* ─── Card image expand transition ────────────────────── */
.tl-card-img {
  transition: height .3s ease;
}

/* ─── Expand arrow animation ───────────────────────────── */
.tl-expand-arrow {
  transition: transform .2s ease;
}

/* ─── Mobile adjustments ───────────────────────────────── */
@media (max-width: 760px) {
  .tl-mobile-list {
    padding: 12px 12px 120px;
  }
}

/* ─── Swipe-to-vote (iOS Mail-style) ────────────────────── */
.tl-swipe-wrapper {
  position: relative;
  overflow: hidden;
  border-radius: var(--radius);
}

/* Colored action labels revealed behind the card */
.tl-swipe-action {
  position: absolute;
  top: 0; bottom: 0;
  display: flex; align-items: center; gap: 8px;
  padding: 0 20px;
  font-size: 13px; font-weight: 700;
  opacity: 0;
  transition: opacity .1s;
  pointer-events: none;
}
.tl-swipe-action--right {
  left: 0; right: 50%;
  justify-content: flex-start;
  background: linear-gradient(90deg, rgba(245,192,110,.18), rgba(245,192,110,.06));
  color: var(--warm, #f5c06e);
}
.tl-swipe-action--left {
  right: 0; left: 50%;
  justify-content: flex-end;
  background: linear-gradient(270deg, rgba(248,113,113,.18), rgba(248,113,113,.06));
  color: var(--error, #f87171);
}

/* Card needs relative + background so it slides over the action labels */
.tl-swipe-wrapper .tl-card {
  position: relative;
  z-index: 1;
  will-change: transform;
  touch-action: pan-y;
  -webkit-user-select: none;
  user-select: none;
}

/* Already-voted indicator — subtle left border */
.tl-card.tl-voted-g {
  border-left: 3px solid var(--success, #4ade80);
}
.tl-card.tl-voted-y {
  border-left: 3px solid var(--warm, #f5c06e);
}
.tl-card.tl-voted-r {
  border-left: 3px solid var(--error, #f87171);
}

/* Inline confirmation banner after swipe */
.tl-swipe-confirm {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 14px 16px;
  border-radius: var(--radius);
  font-size: 13px;
  font-weight: 600;
  animation: tlConfirmIn .25s ease;
}
@keyframes tlConfirmIn {
  from { opacity: 0; transform: scale(.96); }
  to   { opacity: 1; transform: scale(1); }
}

.tl-confirm-interested {
  background: rgba(245, 192, 110, .1);
  border: 1px solid rgba(245, 192, 110, .25);
  color: var(--warm, #f5c06e);
}
.tl-confirm-cant {
  background: rgba(248, 113, 113, .1);
  border: 1px solid rgba(248, 113, 113, .25);
  color: var(--error, #f87171);
}

.tl-swipe-confirm-text {
  flex: 1;
}

.tl-swipe-undo {
  padding: 5px 14px;
  border-radius: 6px;
  border: 1px solid rgba(255,255,255,.15);
  background: rgba(255,255,255,.08);
  color: #fff;
  font-size: 12px;
  font-weight: 700;
  cursor: pointer;
  transition: background .12s;
}
.tl-swipe-undo:hover {
  background: rgba(255,255,255,.15);
}

/* Swiped item collapse transition */
.tl-swiped {
  transition: max-height .35s cubic-bezier(.4,0,.2,1),
              opacity .3s ease,
              padding-bottom .35s ease;
}

/* ─── Location Banner (shared by Timeline & Discover) ────── */
.loc-banner {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 8px 14px;
  margin: 0 0 8px;
  background: rgba(139, 92, 246, .08);
  border: 1px solid rgba(139, 92, 246, .15);
  border-radius: 10px;
  font-size: 12px;
  color: var(--text, #fff);
  animation: locBannerIn .25s ease;
}
@keyframes locBannerIn { from { opacity: 0; transform: translateY(-6px); } to { opacity: 1; transform: translateY(0); } }
.loc-banner-text { flex: 1; }
.loc-banner-text strong { color: #a78bfa; }
.loc-banner-action {
  padding: 4px 10px;
  border-radius: 6px;
  border: 1px solid rgba(139, 92, 246, .3);
  background: rgba(139, 92, 246, .12);
  color: #a78bfa;
  font-size: 11px;
  font-weight: 700;
  cursor: pointer;
  white-space: nowrap;
  transition: background .12s;
}
.loc-banner-action:active { background: rgba(139, 92, 246, .25); }
.loc-banner-dismiss {
  width: 22px; height: 22px;
  border: none; background: transparent;
  color: var(--muted, rgba(255,255,255,.4));
  font-size: 16px; cursor: pointer;
  display: flex; align-items: center; justify-content: center;
  border-radius: 50%;
  transition: background .1s;
}
.loc-banner-dismiss:hover { background: rgba(255,255,255,.06); }
