/* ============================================================
   21-progress-tracker.css — active build progress tracker
   Module: <section id="active-builds">
   Data + render: js/progress-tracker.js
   ============================================================ */

#active-builds { background: var(--c-white); }

.bt-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: var(--s-4);
}
@media (max-width: 880px) { .bt-grid { grid-template-columns: 1fr; } }

/* --- card shell --- */
.bt-card {
  background: var(--c-bg);
  border: 1px solid var(--c-line);
  border-radius: var(--radius-lg);
  padding: 0;
  position: relative;
  overflow: hidden;
  transition: box-shadow 0.2s;
}

/* Subtle card-level pulse so visitors know these are live */
@media (prefers-reduced-motion: no-preference) {
  .bt-card {
    animation: bt-breathe 4s ease-in-out infinite;
  }
  @keyframes bt-breathe {
    0%, 100% { box-shadow: 0 0 0 0 rgba(45,106,79,0); }
    50%       { box-shadow: 0 0 0 3px rgba(45,106,79,0.12); }
  }
}

/* --- photo placeholder (top of card) --- */
.bt-photo {
  aspect-ratio: 16 / 7;
  background:
    repeating-linear-gradient(
      135deg,
      var(--c-card) 0 14px,
      var(--c-line) 14px 16px
    );
  display: grid;
  place-items: center;
  color: var(--c-muted);
  font-size: 0.8rem;
  font-weight: 600;
  position: relative;
}
/* When a real photo is set via style="background-image:…" */
.bt-photo[style*="background-image"] {
  background-size: cover;
  background-position: center;
}

/* --- body padding below the photo --- */
.bt-body {
  padding: var(--s-4) var(--s-5) var(--s-5);
}

/* --- live indicator --- */
.bt-live-dot {
  position: absolute;
  top: 14px;
  right: 14px;
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-size: 0.75rem;
  font-weight: 800;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--c-white);
  background: var(--c-green);
  padding: 3px 10px 3px 6px;
  border-radius: 999px;
  box-shadow: 0 2px 8px rgba(0,0,0,0.18);
}
.bt-live-dot::before {
  content: "";
  width: 7px;
  height: 7px;
  background: var(--c-white);
  border-radius: 50%;
  opacity: 0.9;
}
@media (prefers-reduced-motion: no-preference) {
  .bt-live-dot::before { animation: pulse 1.6s infinite; }
}

/* "Nathan on tools" badge — shown when u_nathan is in assignedStaffIds */
.bt-nathan-badge {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  font-size: 0.7rem;
  font-weight: 700;
  color: var(--c-blue);
  background: rgba(30,58,95,0.08);
  border: 1px solid rgba(30,58,95,0.18);
  padding: 3px 10px;
  border-radius: 999px;
  margin-top: var(--s-2);
}

/* --- card head --- */
.bt-card-head {
  margin-bottom: var(--s-3);
}
.bt-location {
  font-family: var(--f-display);
  font-size: 1.35rem;
  font-weight: 800;
  color: var(--c-ink);
  margin-bottom: 2px;
}
.bt-type {
  font-size: 0.92rem;
  color: var(--c-muted);
}

/* --- stage name pill + progress bar row --- */
.bt-progress-row {
  display: flex;
  align-items: center;
  gap: var(--s-3);
  margin: var(--s-3) 0 var(--s-2);
}
.bt-stage-pill {
  flex-shrink: 0;
  font-size: 0.78rem;
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--c-green);
  background: rgba(45,106,79,0.1);
  border: 1px solid rgba(45,106,79,0.2);
  padding: 3px 10px;
  border-radius: 999px;
  white-space: nowrap;
}
.bt-progress-bar {
  flex: 1;
  height: 6px;
  background: var(--c-line);
  border-radius: 3px;
  overflow: hidden;
}
.bt-progress-fill {
  height: 100%;
  background: linear-gradient(90deg, var(--c-green), var(--c-yellow));
  border-radius: 3px;
  /* width set inline via style="width: X%" */
  transition: width 0.6s ease;
}
.bt-week-label {
  flex-shrink: 0;
  font-size: 0.78rem;
  font-weight: 700;
  color: var(--c-blue);
  white-space: nowrap;
}

/* --- 5-dot stage strip --- */
.bt-stages {
  display: grid;
  grid-template-columns: repeat(5, 1fr);
  gap: 4px;
  margin: var(--s-2) 0 6px;
}
.bt-stage {
  text-align: center;
}
.bt-stage-dot {
  width: 100%;
  height: 6px;
  border-radius: 3px;
  background: var(--c-line);
  margin-bottom: 6px;
  transition: background 0.3s ease;
}
.bt-stage.is-done .bt-stage-dot,
.bt-stage.is-current .bt-stage-dot { background: var(--c-green); }
.bt-stage.is-current .bt-stage-dot {
  background: linear-gradient(90deg, var(--c-green) 0%, var(--c-green) 50%, var(--c-yellow) 50%, var(--c-yellow) 100%);
  box-shadow: 0 0 0 2px rgba(249,199,79,0.25);
}
.bt-stage-label {
  font-size: 0.75rem;
  font-weight: 700;
  color: var(--c-muted);
  text-transform: uppercase;
  letter-spacing: 0.05em;
}
.bt-stage.is-current .bt-stage-label { color: var(--c-ink); }

/* --- meta row --- */
.bt-meta {
  display: flex;
  justify-content: space-between;
  margin-top: var(--s-3);
  padding-top: var(--s-3);
  border-top: 1px solid var(--c-line);
  font-size: 0.88rem;
}
.bt-meta-item strong {
  display: block;
  color: var(--c-blue);
  font-size: 1.05rem;
  font-weight: 800;
  margin-bottom: 2px;
}
.bt-meta-item span {
  color: var(--c-muted);
  font-size: 0.78rem;
  text-transform: uppercase;
  letter-spacing: 0.08em;
}

/* --- next milestone strip --- */
.bt-next {
  margin-top: var(--s-3);
  padding: 10px 12px;
  background: var(--c-card);
  border-radius: var(--radius);
  font-size: 0.88rem;
  display: flex;
  align-items: flex-start;
  gap: 8px;
}
.bt-next-icon {
  flex-shrink: 0;
  font-size: 1rem;
  line-height: 1.4;
}
.bt-next-text strong {
  color: var(--c-blue);
  display: block;
  font-size: 0.78rem;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  margin-bottom: 2px;
}
