/* sidebar.css: Sidebar nav, level tree, progress widget */

/* -------------------------------------------------------------------------
   Progress widget (streak, completion bar)
------------------------------------------------------------------------- */
.progress-widget {
  padding: 10px 14px 12px;
  border-bottom: 1px solid var(--border);
}

.xp-row {
  display: flex;
  align-items: baseline;
  gap: 6px;
  margin-bottom: 5px;
}

.streak-badge {
  font-size: 12px;
  color: var(--accent-orange);
  font-weight: 600;
}

.xp-bar-track {
  width: 100%;
  height: 5px;
  background: var(--bg-surface0);
  border-radius: 3px;
  overflow: hidden;
}

.xp-bar-fill {
  height: 100%;
  background: linear-gradient(90deg, var(--accent) 0%, var(--accent-teal) 100%);
  border-radius: 3px;
  transition: width .4s ease;
}

.xp-meta {
  font-size: 11px;
  color: var(--text-faint);
  margin-top: 4px;
  text-align: right;
}

/* -------------------------------------------------------------------------
   Level groups
------------------------------------------------------------------------- */
.level-group {
  border-bottom: 1px solid var(--border);
}

.level-header {
  display: flex;
  align-items: center;
  gap: 6px;
  padding: 9px 14px;
  cursor: pointer;
  user-select: none;
  transition: background .12s;
}

.level-header:hover { background: var(--bg-surface0); }

.level-name {
  flex: 1;
  font-size: 12px;
  font-weight: 600;
  color: var(--text-muted);
}

.level-count {
  font-size: 11px;
  color: var(--text-faint);
  background: var(--bg-surface0);
  padding: 1px 5px;
  border-radius: 10px;
}

.level-group.collapsed .challenge-list {
  display: none;
}

/* -------------------------------------------------------------------------
   Challenge items
------------------------------------------------------------------------- */
.challenge-list {
  padding: 2px 0;
}

.challenge-item {
  display: flex;
  align-items: center;
  gap: 7px;
  padding: 6px 14px 6px 24px;
  cursor: pointer;
  transition: background .1s;
  border-left: 2px solid transparent;
}

.challenge-item:hover { background: var(--bg-surface0); }

.challenge-item.active {
  background: var(--bg-surface0);
  border-left-color: var(--accent);
}

.challenge-item.done .ch-status { color: var(--accent-green); }

.ch-status {
  font-size: 10px;
  color: var(--text-faint);
  width: 10px;
  flex-shrink: 0;
}

.ch-title {
  flex: 1;
  font-size: 12px;
  color: var(--text-muted);
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.ch-project-badge {
  font-size: 10px;
  margin-left: 3px;
  opacity: .85;
}

.challenge-item.done .ch-title {
  color: var(--text-primary);
}

/* -------------------------------------------------------------------------
   Difficulty indicator in sidebar: a small color dot, not a text chip
------------------------------------------------------------------------- */
.ch-diff-dot {
  width: 7px;
  height: 7px;
  border-radius: 50%;
  flex-shrink: 0;
  background: currentColor;
}

.diff-easy   { color: var(--accent-green); }
.diff-medium { color: var(--accent-yellow); }
.diff-hard   { color: var(--accent-red); }

.ch-intro-badge {
  font-size: 10px;
  flex-shrink: 0;
  opacity: .85;
}
