/* ============================================
   PRACTICE PROGRESS TRACKER — Component Styles
   Covers: mark-done button, completion badge,
   section progress bar, continue banner,
   reset area, tracker bar.
   Print hiding and responsive rules included.
   ============================================ */

/* ── Tracker Bar (wrapper on practice pages) ── */
.bob-tracker-bar {
  display: flex;
  align-items: center;
  justify-content: flex-start;
  padding: 12px 16px;
  margin: 12px 0;
  background: #f8f9fa;
  border: 1px solid #e0e0e0;
  border-radius: 8px;
  box-sizing: border-box;
  max-width: 100%;
}

/* ── Mark as Done Button ── */
.bob-mark-done-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  min-height: 44px;
  min-width: 44px;
  padding: 10px 20px;
  font-size: 1rem;
  font-weight: 600;
  color: #2c3e50;
  background: #ffffff;
  border: 2px solid #4a90e2;
  border-radius: 6px;
  cursor: pointer;
  transition:
    background 0.2s ease,
    color 0.2s ease,
    border-color 0.2s ease;
  box-sizing: border-box;
  white-space: nowrap;
}

.bob-mark-done-btn:hover:not(:disabled) {
  background: #4a90e2;
  color: #ffffff;
}

.bob-mark-done-btn:focus-visible {
  outline: 3px solid #4a90e2;
  outline-offset: 2px;
}

/* Completed state */
.bob-mark-done-btn--done {
  background: #27ae60;
  border-color: #27ae60;
  color: #ffffff;
  cursor: default;
}

.bob-mark-done-btn--done:hover {
  background: #27ae60;
  color: #ffffff;
}

/* ── Completion Badge (dashboard card overlay) ── */
.bob-completion-badge {
  position: absolute;
  top: 8px;
  right: 8px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 28px;
  height: 28px;
  background: #27ae60;
  color: #ffffff;
  font-size: 0.85rem;
  font-weight: 700;
  border-radius: 50%;
  pointer-events: none;
  z-index: 2;
  line-height: 1;
  box-shadow: 0 2px 6px rgba(39, 174, 96, 0.4);
}

/* ── Section Progress Bar ── */
.bob-section-progress {
  display: flex;
  flex-direction: column;
  gap: 4px;
  margin-top: 8px;
  box-sizing: border-box;
  max-width: 100%;
}

.bob-section-progress__text {
  font-size: 0.85rem;
  color: #555;
  font-weight: 500;
}

.bob-section-progress__track {
  width: 100%;
  height: 8px;
  background: #e0e0e0;
  border-radius: 4px;
  overflow: hidden;
  box-sizing: border-box;
}

.bob-section-progress__fill {
  height: 100%;
  background: #4a90e2;
  border-radius: 4px;
  transition: width 0.3s ease;
}

/* All-complete state */
.bob-section-progress--complete .bob-section-progress__text {
  color: #27ae60;
  font-weight: 700;
}

.bob-section-progress--complete .bob-section-progress__fill {
  background: #27ae60;
}

/* ── Continue Banner ── */
.bob-continue-banner {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 14px 18px;
  margin-bottom: 24px;
  background: #ebf5fb;
  border: 2px solid #4a90e2;
  border-radius: 10px;
  box-sizing: border-box;
  max-width: 100%;
}

.bob-continue-banner__icon {
  font-size: 1.4rem;
  flex-shrink: 0;
  color: #4a90e2;
}

.bob-continue-banner__body {
  display: flex;
  flex-direction: column;
  gap: 4px;
  min-width: 0;
}

.bob-continue-banner__label {
  font-size: 0.85rem;
  font-weight: 600;
  color: #2c3e50;
  text-transform: uppercase;
  letter-spacing: 0.4px;
}

.bob-continue-banner__link {
  font-size: 1rem;
  font-weight: 700;
  color: #4a90e2;
  text-decoration: none;
  word-break: break-word;
}

.bob-continue-banner__link:hover {
  text-decoration: underline;
}

/* All-complete variant */
.bob-continue-banner--complete {
  background: #eafaf1;
  border-color: #27ae60;
}

.bob-continue-banner--complete .bob-continue-banner__icon {
  color: #27ae60;
}

.bob-continue-banner--complete .bob-continue-banner__label {
  font-size: 1rem;
  text-transform: none;
  color: #27ae60;
}

/* ── Reset Area ── */
.bob-reset-area {
  display: flex;
  justify-content: center;
  padding: 24px 16px;
  margin-top: 32px;
  border-top: 1px solid #e0e0e0;
  box-sizing: border-box;
  max-width: 100%;
}

/* ── Reset Button ── */
.bob-reset-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  min-height: 44px;
  min-width: 44px;
  padding: 10px 24px;
  font-size: 0.9rem;
  font-weight: 600;
  color: #c0392b;
  background: #ffffff;
  border: 2px solid #c0392b;
  border-radius: 6px;
  cursor: pointer;
  transition:
    background 0.2s ease,
    color 0.2s ease;
  box-sizing: border-box;
}

.bob-reset-btn:hover {
  background: #c0392b;
  color: #ffffff;
}

.bob-reset-btn:focus-visible {
  outline: 3px solid #c0392b;
  outline-offset: 2px;
}

/* ── Responsive: prevent horizontal overflow at 320px ── */
@media (max-width: 360px) {
  .bob-tracker-bar {
    padding: 10px 12px;
  }

  .bob-mark-done-btn {
    padding: 10px 14px;
    font-size: 0.9rem;
    width: 100%;
    justify-content: center;
  }

  .bob-continue-banner {
    flex-direction: column;
    align-items: flex-start;
    padding: 12px 14px;
    gap: 8px;
  }

  .bob-reset-area {
    padding: 20px 12px;
  }

  .bob-reset-btn {
    width: 100%;
    justify-content: center;
  }

  .bob-section-progress__text {
    font-size: 0.8rem;
  }
}

/* ── Print: hide all tracker UI ── */
@media print {
  .bob-mark-done-btn,
  .bob-tracker-bar,
  .bob-continue-banner,
  .bob-reset-area,
  .bob-section-progress,
  .bob-completion-badge {
    display: none !important;
  }
}
