/* ===================================================
   STATUS STYLING - CENTRALIZED STATUS COMPONENT STYLES
   ===================================================
   
   This file provides centralized styling for status indicators,
   progress bars, and related elements.
*/

/* Status text styling */
.status-text-passed {
  color: var(--color-success);
  font-weight: var(--font-bold);
}

.status-text-attention {
  color: var(--color-warning);
  font-weight: var(--font-bold);
}

.status-text-failed {
  color: var(--color-danger);
  font-weight: var(--font-bold);
}

.status-none {
  color: var(--color-secondary);
  text-align: center;
}

.status-passed {
  background-color: var(--color-success);
}

.status-attention {
  background-color: var(--color-warning);
  color: #212529;
}

.status-failed {
  background-color: var(--color-danger);
}

/* Progress styling */
.progress {
  height: 20px;
  border-radius: var(--radius-sm);
  background-color: var(--bg-lighter);
  box-shadow: var(--shadow-inset);
}

.progress-bar {
  display: flex;
  flex-direction: column;
  justify-content: center;
  color: var(--color-text-white);
  text-align: center;
  background-color: var(--color-primary);
  transition: width var(--transition-slow) var(--ease-smooth);
}

.progress-text {
  margin-right: 10px;
  color: var(--color-secondary);
  font-size: var(--text-sm);
}

/* Badge styling */
.badge {
  font-size: var(--text-sm);
  padding: 0.35em 0.65em;
}

/* ===================================================
   CIRCULAR PROGRESS INDICATOR
   =================================================== */

/* Container for circular progress with text */
.progress-circle-container {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
}

/* Circular progress ring using SVG */
.progress-circle {
  width: 24px;
  height: 24px;
  transform: rotate(-90deg);
}

.progress-circle-bg {
  fill: none;
  stroke: var(--bg-gray-200);
  stroke-width: 3;
}

.progress-circle-fill {
  fill: none;
  stroke: var(--color-primary);
  stroke-width: 3;
  stroke-linecap: round;
  transition: stroke-dashoffset var(--transition-slow) var(--ease-smooth);
}

/* Progress circle text label */
.progress-circle-text {
  font-size: var(--text-sm);
  color: var(--color-secondary);
}

/* ===================================================
   STATUS DISTRIBUTION BAR
   Composite progress bar showing student status counts.
   Used in Course/Session Overview and Question Overview.
   =================================================== */

.status-bar {
  display: flex;
  width: 100%;
  height: 24px;
  border-radius: var(--radius-sm);
  overflow: hidden;
  background-color: var(--bg-gray-200);
}

/* Compact inline variant for use inside table cells */
.status-bar--inline {
  height: 18px;
  min-width: 120px;
}

.status-bar--inline .status-bar__label {
  font-size: 0.6rem;
}

/* Compact legend variant for inline status bars (labels only, no counts) */
.status-bar-legend--inline {
  gap: var(--space-2, 8px);
  margin-top: var(--space-1, 4px);
  font-size: var(--text-xs);
}

.status-bar__segment {
  display: flex;
  align-items: center;
  justify-content: center;
  min-width: 0;
  transition: width var(--transition-slow) var(--ease-smooth);
}

/* Count label inside segment */
.status-bar__label {
  font-size: 0.7rem;
  font-weight: 600;
  color: var(--color-text-white);
  white-space: nowrap;
  overflow: hidden;
  padding: 0 var(--space-1, 4px);
}

/* Segment colors */
.status-bar__segment--not-started {
  background-color: var(--color-secondary);
}

.status-bar__segment--started {
  background-color: var(--color-primary);
}

.status-bar__segment--pending {
  background-color: var(--color-primary);
}

.status-bar__segment--passed {
  background-color: var(--color-success);
}

/* Evaluation submitted without a score (mention detection, unscored reviews) */
.status-bar__segment--completed {
  background-color: var(--color-info);
}

.status-bar__segment--attention {
  background-color: var(--color-warning);
}

.status-bar__segment--attention .status-bar__label {
  color: #212529;
}

.status-bar__segment--failed {
  background-color: var(--color-danger);
}

/* Legend below the bar */
.status-bar-legend {
  display: flex;
  flex-wrap: wrap;
  gap: var(--space-3, 12px);
  margin-top: var(--space-2, 8px);
  font-size: var(--text-sm);
  color: var(--color-text-secondary);
}

.status-bar-legend__item {
  display: inline-flex;
  align-items: center;
  gap: var(--space-1, 4px);
}

.status-bar-legend__swatch {
  display: inline-block;
  width: 12px;
  height: 12px;
  border-radius: 2px;
}

.status-bar-legend__swatch--not-started {
  background-color: var(--color-secondary);
}

.status-bar-legend__swatch--started {
  background-color: var(--color-primary);
}

.status-bar-legend__swatch--pending {
  background-color: var(--color-primary);
}

.status-bar-legend__swatch--passed {
  background-color: var(--color-success);
}

.status-bar-legend__swatch--completed {
  background-color: var(--color-info);
}

.status-bar-legend__swatch--attention {
  background-color: var(--color-warning);
}

.status-bar-legend__swatch--failed {
  background-color: var(--color-danger);
}