/* ==========================================================================
   Sidebar Progress & Completion Button
   Progress indicators within the sidebar and per-page completion UI
   ========================================================================== */

/* ==========================================================================
   Sidebar Mini Progress Bar
   ========================================================================== */

.sidebar-progress {
  padding: 12px 16px;
  border-bottom: 1px solid var(--border-color, rgba(255, 255, 255, 0.1));
  transition: var(--transition-colors, background-color 0.3s ease);
}

.sidebar-progress-label {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 6px;
}

.sidebar-progress-title {
  font-size: 11px;
  font-weight: 600;
  color: var(--text-secondary, #a0aec0);
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

.sidebar-progress-text {
  font-size: 11px;
  color: var(--text-muted, #718096);
  font-variant-numeric: tabular-nums;
}

.sidebar-progress-bar {
  height: 6px;
  background: var(--bg-tertiary, #2d3748);
  border-radius: 3px;
  overflow: hidden;
}

.sidebar-progress-bar-fill {
  height: 100%;
  border-radius: 3px;
  background: var(--accent, #61dafb);
  transition: width 0.5s ease;
}

/* ==========================================================================
   Sidebar Item Completed State
   ========================================================================== */

.sidebar-item-completed {
  position: relative;
}

.sidebar-item-completed::after {
  content: '\2713';
  position: absolute;
  right: 8px;
  top: 50%;
  transform: translateY(-50%);
  color: var(--success, #4ecdc4);
  font-size: 14px;
  font-weight: 700;
  line-height: 1;
  pointer-events: none;
}

/* Dim completed items slightly */
.sidebar-item-completed > a {
  opacity: 0.75;
}

.sidebar-item-completed > a:hover {
  opacity: 1;
}

/* ==========================================================================
   Completion Section (per-page)
   ========================================================================== */

.completion-section {
  margin-top: 40px;
  padding-top: 20px;
  border-top: 1px solid var(--border-color, rgba(255, 255, 255, 0.1));
  text-align: center;
}

.completion-section-label {
  font-size: 13px;
  color: var(--text-muted, #718096);
  margin-bottom: 12px;
}

.completion-btn {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 12px 24px;
  border-radius: 8px;
  font-size: 14px;
  font-weight: 600;
  border: none;
  cursor: pointer;
  transition: background-color 0.2s ease, transform 0.15s ease, box-shadow 0.2s ease;
  -webkit-appearance: none;
  appearance: none;
  outline: none;
  line-height: 1.4;
}

.completion-btn:not(.completed) {
  background-color: var(--accent, #61dafb);
  color: var(--text-inverse, #1a1a2e);
}

.completion-btn:not(.completed):hover {
  background-color: var(--accent-hover, #79e3ff);
  transform: scale(1.04);
  box-shadow: var(--shadow-md, 0 4px 12px rgba(0, 0, 0, 0.4));
}

.completion-btn.completed {
  background-color: var(--success, #4ecdc4);
  color: #ffffff;
}

.completion-btn.completed:hover {
  transform: scale(1.04);
  box-shadow: var(--shadow-md, 0 4px 12px rgba(0, 0, 0, 0.4));
}

.completion-btn:active {
  transform: scale(0.97);
}

.completion-btn:focus-visible {
  outline: 2px solid var(--accent, #61dafb);
  outline-offset: 2px;
}

/* Checkmark icon inside the completed button */
.completion-btn-icon {
  font-size: 16px;
  line-height: 1;
}

/* ==========================================================================
   Phase Progress Summary (optional sidebar section)
   ========================================================================== */

.sidebar-phase-list {
  padding: 8px 16px;
  border-bottom: 1px solid var(--border-color, rgba(255, 255, 255, 0.1));
}

.sidebar-phase-item {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 4px 0;
  font-size: 12px;
  color: var(--text-secondary, #a0aec0);
}

.sidebar-phase-item-bar {
  width: 48px;
  height: 4px;
  background: var(--bg-tertiary, #2d3748);
  border-radius: 2px;
  overflow: hidden;
  flex-shrink: 0;
}

.sidebar-phase-item-bar-fill {
  height: 100%;
  border-radius: 2px;
  background: var(--accent, #61dafb);
  transition: width 0.4s ease;
}

.sidebar-phase-item-label {
  flex: 1;
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.sidebar-phase-item-count {
  font-size: 11px;
  color: var(--text-muted, #718096);
  font-variant-numeric: tabular-nums;
}
