/* ============================================================
   progress.css — All progress tracker styles
   ============================================================ */

/* ──────────────────────────────────────────────────────────────
   LEVEL 1 — Navbar chip arc SVG  (inside .nav-chip)
   ────────────────────────────────────────────────────────────── */
.nav-chip-arc svg { display: block; }

/* ──────────────────────────────────────────────────────────────
   LEVEL 2 — Chapter progress bar  (inside .chapter-card header)
   Already defined in home.css (.chapter-progress-*)
   ────────────────────────────────────────────────────────────── */

/* ──────────────────────────────────────────────────────────────
   LEVEL 2 — Topic check toggle visual states
   Shared with home.css but isolated here for clarity
   ────────────────────────────────────────────────────────────── */

/* ──────────────────────────────────────────────────────────────
   LEVEL 3 — Subtopic progress panel (content page sidebar)
   ────────────────────────────────────────────────────────────── */

/* Card-style panel at top of sidebar */
.subtopic-panel {
  background: var(--surface-2);
  border: 1px solid var(--border);
  border-radius: var(--r-m);
  padding: 14px 14px 12px;
  margin-bottom: 16px;
}

/* Top row: title + count */
.subtopic-panel-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 10px;
}

.subtopic-panel-title {
  font-size: 0.7rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--text-muted);
}

.subtopic-panel-count {
  font-size: 0.72rem;
  font-weight: 700;
  color: var(--primary);
  background: var(--primary-light);
  padding: 2px 8px;
  border-radius: var(--r-xl);
}

/* Segmented progress bar — one segment per subtopic */
.subtopic-segments {
  display: flex;
  gap: 3px;
  margin-bottom: 10px;
  flex-wrap: wrap;
}

.subtopic-seg {
  flex: 1;
  min-width: 6px;
  height: 6px;
  border-radius: 3px;
  background: var(--border);
  transition: background 0.25s var(--ease), transform 0.15s var(--ease);
}

.subtopic-seg.done {
  background: linear-gradient(90deg, var(--primary), var(--accent));
  transform: scaleY(1.3);
}

/* Percentage text */
.subtopic-pct-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 10px;
}

.subtopic-pct-bar-wrap {
  flex: 1;
  height: 4px;
  background: var(--border);
  border-radius: 50px;
  overflow: hidden;
  margin-right: 10px;
}

.subtopic-pct-bar {
  height: 100%;
  background: linear-gradient(90deg, var(--primary), var(--accent));
  border-radius: 50px;
  width: 0%;
  transition: width 0.4s var(--ease);
}

.subtopic-pct-text {
  font-size: 0.78rem;
  font-weight: 800;
  color: var(--primary);
  min-width: 32px;
  text-align: right;
}

/* Mark-all toggle button */
.subtopic-mark-all {
  width: 100%;
  padding: 7px 10px;
  font-size: 0.75rem;
  font-weight: 600;
  border: 1px solid var(--border);
  border-radius: var(--r-s);
  background: var(--surface);
  color: var(--text-muted);
  cursor: pointer;
  transition: background var(--t) var(--ease), border-color var(--t) var(--ease), color var(--t) var(--ease);
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
}

.subtopic-mark-all:hover {
  background: var(--primary-light);
  border-color: var(--primary);
  color: var(--primary);
}

.subtopic-mark-all.all-done {
  background: var(--success-light);
  border-color: var(--success);
  color: var(--success);
}

/* ──────────────────────────────────────────────────────────────
   LEVEL 3 — Subtopic check dots in sidebar nav
   ────────────────────────────────────────────────────────────── */
.sub-row {
  display: flex;
  align-items: center;
  gap: 4px;
  margin-bottom: 1px;
}

.sub-row > a {
  flex: 1;
  min-width: 0;
  margin-bottom: 0 !important;
}

.sub-row > a.sub-done {
  color: var(--primary);
  opacity: 0.7;
}

/* small dot-style check button */
.sub-check {
  width: 16px;
  height: 16px;
  min-width: 16px;
  border-radius: 50%;
  border: 1.5px solid var(--border);
  background: transparent;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: border-color var(--t), background var(--t), transform 0.12s var(--ease);
  flex-shrink: 0;
  position: relative;
}

/* inner pip when hovered */
.sub-check::after {
  content: '';
  width: 5px;
  height: 5px;
  border-radius: 50%;
  background: transparent;
  transition: background var(--t);
}

.sub-check:hover {
  border-color: var(--primary);
  transform: scale(1.15);
}

.sub-check:hover::after { background: var(--primary); }

.sub-check.checked {
  background: var(--primary);
  border-color: var(--primary);
  transform: scale(1.0);
}

.sub-check.checked::after {
  background: #ffffff;
  width: 4px;
  height: 4px;
}

/* ── Responsive ────────────────────────────────────────────── */
@media (max-width: 480px) {
  .nav-progress-pill { display: none; }
}
