/* tracker.css — funding thermometer + horizontal strip + countdown */

.tracker-container {
  max-width: 520px;
  padding-top: 2.5rem;
}

.tracker-profile {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.25rem;
  margin-bottom: 1.5rem;
}

.tracker-profile .avatar {
  width: 64px;
  height: 64px;
  border-radius: 50%;
  object-fit: cover;
  border: 2px solid var(--border);
}

.tracker-profile .profile-name {
  font-size: 1rem;
  font-weight: 600;
}

.tracker-profile .profile-bio {
  font-size: 0.8rem;
  color: var(--muted);
  text-align: center;
}

.tracker-title {
  font-size: 1.6rem;
  font-weight: 800;
  text-align: center;
  letter-spacing: -0.01em;
  margin-bottom: 0.4rem;
}

.tracker-description {
  text-align: center;
  color: var(--muted);
  font-size: 0.95rem;
  max-width: 460px;
  margin: 0 auto 1.5rem;
  line-height: 1.5;
  white-space: pre-wrap;
}

/* ── Vertical thermometer ───────────────────────────────────────────────── */

.tracker-viz {
  display: flex;
  align-items: flex-start;
  justify-content: center;
  gap: 1.25rem;
  margin: 1.5rem 0 1.25rem;
}

.therm-legend {
  display: flex;
  flex-direction: column;
  gap: 0.55rem;
  padding-top: 0.75rem; /* optically aligns with the top of the tube */
  min-width: 0;
}

.therm-legend-item {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  font-size: 0.8rem;
  font-weight: 600;
  line-height: 1.3;
  white-space: nowrap;
}

.therm-legend-dot {
  width: 10px;
  height: 10px;
  border-radius: 50%;
  flex-shrink: 0;
  display: inline-block;
}

.thermometer {
  position: relative;
  width: 70px;
  height: 320px;
  display: flex;
  flex-direction: column;
  align-items: center;
}

.therm-tube {
  position: relative;
  width: 36px;
  flex: 1;
  background: var(--surface);
  border: 3px solid var(--border);
  border-bottom: none;
  border-top-left-radius: 18px;
  border-top-right-radius: 18px;
  overflow: hidden;
  /* Tube sits above the bulb; slight overlap handled by negative margin on bulb */
  z-index: 1;
}

.therm-fill {
  position: absolute;
  left: 0;
  right: 0;
  bottom: 0;
  width: 100%;
  display: flex;
  flex-direction: column-reverse;
  transition: height 0.6s cubic-bezier(.2,.7,.2,1);
  background: linear-gradient(180deg, rgba(255,255,255,0) 0%, rgba(0,0,0,0.05) 100%);
}

.therm-seg {
  width: 100%;
  min-height: 2px;
  transition: background 0.2s;
}

.therm-seg:hover {
  filter: brightness(1.15);
}

.therm-bulb {
  position: relative;
  width: 70px;
  height: 70px;
  border-radius: 50%;
  background: var(--surface);
  border: 3px solid var(--border);
  margin-top: -8px;
  overflow: hidden;
  z-index: 0;
}

.therm-bulb-fill {
  position: absolute;
  inset: 4px;
  border-radius: 50%;
  background: var(--border);
  transition: background 0.4s;
}

/* Ticks on the side of the tube — purely decorative */
.therm-tube::before,
.therm-tube::after {
  content: '';
  position: absolute;
  left: -10px;
  width: 6px;
  height: 2px;
  background: var(--border);
}
.therm-tube::before { top: 25%; }
.therm-tube::after  { top: 75%; }

/* ── Numbers ─────────────────────────────────────────────────────────────── */

.tracker-numbers {
  text-align: center;
  font-size: 1rem;
  margin: 0.5rem 0 1rem;
  line-height: 1.5;
}

.tracker-numbers strong {
  font-weight: 700;
}

.tracker-numbers .pct {
  color: var(--muted);
  font-size: 0.9rem;
  margin-left: 0.25rem;
}

/* ── Horizontal segment strip ────────────────────────────────────────────── */

.segment-strip {
  display: flex;
  width: 100%;
  height: 18px;
  border-radius: 999px;
  overflow: hidden;
  background: var(--surface);
  border: 1px solid var(--border);
  margin-bottom: 1.5rem;
}

.strip-seg {
  height: 100%;
  transition: filter 0.15s;
  border-right: 1px solid rgba(0,0,0,0.12);
}

.strip-seg:last-child {
  border-right: none;
}

.strip-seg:hover {
  filter: brightness(1.15);
}

/* ── Countdown ───────────────────────────────────────────────────────────── */

.countdown {
  margin-top: 1.5rem;
  text-align: center;
}

.cd-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 0.5rem;
  max-width: 360px;
  margin: 0 auto;
}

.cd-box {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 0.6rem 0.25rem;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.15rem;
}

.cd-num {
  font-size: 1.5rem;
  font-weight: 700;
  font-variant-numeric: tabular-nums;
  font-family: ui-monospace, SFMono-Regular, Menlo, monospace;
}

.cd-label {
  font-size: 0.7rem;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--muted);
}

.cd-ended {
  font-size: 1.1rem;
  font-weight: 600;
  padding: 1rem;
}

/* ── Back link ───────────────────────────────────────────────────────────── */

.tracker-back {
  text-align: center;
  margin-top: 2rem;
  font-size: 0.85rem;
}

.tracker-back a {
  color: var(--muted);
}

.tracker-back a:hover {
  color: var(--text);
}
