/**
 * Progress Ring Component
 * SVG-based circular progress indicator
 * Usage: Include the SVG inline with data-progress attribute
 */

.progress-ring-container {
  position: relative;
  display: inline-flex;
  align-items: center;
  justify-content: center;
}

.progress-ring-svg {
  transform: rotate(-90deg);
}

.progress-ring-bg {
  fill: none;
  stroke: var(--surface-tertiary);
}

.progress-ring-fill {
  fill: none;
  stroke: var(--accent-primary);
  stroke-linecap: round;
  transition: stroke-dashoffset 0.6s cubic-bezier(0.4, 0, 0.2, 1);
}

.progress-ring-fill-success {
  stroke: var(--status-success);
}

.progress-ring-fill-warning {
  stroke: var(--status-warning);
}

.progress-ring-text {
  position: absolute;
  font-weight: 600;
  color: var(--text-primary);
  line-height: 1;
}

/* Size variants */
.progress-ring-sm {
  width: 40px;
  height: 40px;
}
.progress-ring-sm .progress-ring-text {
  font-size: 0.625rem;
}

.progress-ring-md {
  width: 56px;
  height: 56px;
}
.progress-ring-md .progress-ring-text {
  font-size: 0.875rem;
}

.progress-ring-lg {
  width: 80px;
  height: 80px;
}
.progress-ring-lg .progress-ring-text {
  font-size: 1.125rem;
}

/* Inline progress ring for course cards */
.course-progress-ring {
  flex-shrink: 0;
}

/* Celebration confetti */
.confetti-container {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  pointer-events: none;
  z-index: 9999;
  overflow: hidden;
}

.confetti-piece {
  position: absolute;
  width: 10px;
  height: 10px;
  background: var(--accent-secondary);
  animation: confetti-fall 3s ease-out forwards;
}

.confetti-piece:nth-child(odd) {
  background: var(--accent-primary);
}

.confetti-piece:nth-child(3n) {
  background: var(--status-success);
}

.confetti-piece:nth-child(4n) {
  background: var(--status-warning);
}

.confetti-piece:nth-child(5n) {
  background: #EC4899;
}

@keyframes confetti-fall {
  0% {
    transform: translateY(-100px) rotate(0deg) scale(1);
    opacity: 1;
  }
  100% {
    transform: translateY(100vh) rotate(720deg) scale(0.5);
    opacity: 0;
  }
}

/* Completion toast */
.completion-toast {
  position: fixed;
  top: 1.5rem;
  right: 1.5rem;
  background: var(--surface-secondary);
  border: 1px solid var(--border-primary);
  border-radius: var(--radius-xl);
  padding: var(--space-4) var(--space-6);
  box-shadow: var(--shadow-xl);
  z-index: 50;
  animation: toast-slide-in 0.4s cubic-bezier(0.34, 1.56, 0.64, 1);
}

@keyframes toast-slide-in {
  from {
    transform: translateX(120%);
    opacity: 0;
  }
  to {
    transform: translateX(0);
    opacity: 1;
  }
}

.completion-toast-icon {
  width: 2.5rem;
  height: 2.5rem;
  background: var(--surface-success);
  border-radius: var(--radius-full);
  display: flex;
  align-items: center;
  justify-content: center;
  margin-bottom: var(--space-2);
}
