/**
 * reflex-status-panel.css — Styling for the reflex characteristics
 * and progress-to-neutral sidebar panels (AeyeMedTech-inspired)
 * ============================================================================
 * Professional clinical UI with color-coded direction indicators,
 * animated characteristic meters, and a progress bar.
 * ============================================================================
 */

/* ═══ Panel Container ═══ */
.rsp-panel {
  display: flex;
  flex-direction: column;
  gap: 14px;
  width: 100%;
}

/* ═══ Card Base ═══ */
.rsp-card {
  background: #ffffff;
  border: none;
  box-shadow: 0 4px 16px rgba(0,0,0,0.03);
  border-radius: 10px;
  padding: 16px;
}

.rsp-card-head {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-bottom: 14px;
  padding-bottom: 10px;
  border-bottom: 1px solid var(--border);
}

.rsp-icon {
  font-size: 14px;
  opacity: 0.7;
}

.rsp-card-title {
  font-size: 11px;
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--accent-strong);
}

/* ═══ Direction Indicator ═══ */
.rsp-direction-box {
  display: flex;
  align-items: flex-start;
  gap: 12px;
  padding: 14px;
  border-radius: 8px;
  background: var(--ret-surface, var(--surface));
  border: 1px solid transparent;
  margin-bottom: 14px;
  transition: background 0.25s ease, border-color 0.25s ease;
}

/* Direction color-coded states */
.rsp-direction-box.rsp-box--neutral {
  background: rgba(16, 185, 129, 0.12);
  border-color: #10b981;
  box-shadow: none;
}
.rsp-direction-box.rsp-box--with {
  background: rgba(245, 158, 11, 0.12);
  border-color: #f59e0b;
  box-shadow: none;
}
.rsp-direction-box.rsp-box--against {
  background: rgba(239, 68, 68, 0.12);
  border-color: #ef4444;
  box-shadow: none;
}

/* Direction dot (color indicator circle) */
.rsp-direction-dot {
  width: 14px;
  height: 14px;
  border-radius: 50%;
  flex-shrink: 0;
  margin-top: 3px;
  background: #555;
  transition: background 0.2s ease, box-shadow 0.2s ease;
}
.rsp-direction-dot.rsp-dot--neutral {
  background: #34d399;
  box-shadow: 0 0 8px rgba(52, 211, 153, 0.5);
}
.rsp-direction-dot.rsp-dot--with {
  background: #fac832;
  box-shadow: 0 0 8px rgba(250, 200, 50, 0.5);
}
.rsp-direction-dot.rsp-dot--against {
  background: #ef4444;
  box-shadow: 0 0 8px rgba(239, 68, 68, 0.5);
}
.rsp-direction-dot.rsp-dot--idle {
  background: #444;
  box-shadow: none;
}

/* Direction text */
.rsp-direction-text {
  display: flex;
  flex-direction: column;
  gap: 4px;
  min-width: 0;
}
.rsp-direction-label {
  font-size: 16px;
  font-weight: 800;
  color: var(--text);
  letter-spacing: 0.02em;
  line-height: 1.2;
}
.rsp-direction-hint {
  font-size: 12px;
  color: var(--text-soft);
  line-height: 1.35;
}

/* ═══ Characteristic Meters ═══ */
.rsp-meters {
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.rsp-meter-row {
  display: flex;
  align-items: center;
  gap: 12px;
}

.rsp-meter-label {
  font-size: 12px;
  font-weight: 600;
  color: var(--text-soft);
  text-transform: uppercase;
  letter-spacing: 0.04em;
  width: 90px;
  flex-shrink: 0;
}

.rsp-meter-track {
  flex: 1;
  height: 6px;
  background: var(--surface-sunken);
  border-radius: 3px;
  overflow: hidden;
}

.rsp-meter-fill {
  height: 100%;
  border-radius: 3px;
  transition: width 0.2s ease;
  min-width: 2px;
}

/* Color coding for each bar */
.rsp-fill-width {
  background: linear-gradient(90deg, #f59e0b, #fbbf24);
}
.rsp-fill-brightness {
  background: linear-gradient(90deg, #3b82f6, #60a5fa);
}
.rsp-fill-speed {
  background: linear-gradient(90deg, #ef4444, #f87171);
}

/* ═══ Progress to Neutral ═══ */
.rsp-progress-bar-wrap {
  width: 100%;
  height: 10px;
  background: var(--surface-sunken);
  border-radius: 5px;
  overflow: hidden;
  margin-bottom: 6px;
}

.rsp-progress-bar {
  height: 100%;
  border-radius: 5px;
  background: linear-gradient(90deg, var(--accent, #0e7c86), var(--accent));
  transition: width 0.3s ease, background 0.3s ease;
  min-width: 2px;
}
.rsp-progress-bar.rsp-bar--good {
  background: linear-gradient(90deg, #f59e0b, #fbbf24);
}
.rsp-progress-bar.rsp-bar--complete {
  background: linear-gradient(90deg, #10b981, #34d399);
}

.rsp-progress-pct {
  font-size: 12px;
  font-weight: 600;
  color: var(--text-soft);
  text-align: center;
  margin-bottom: 12px;
  text-transform: uppercase;
  letter-spacing: 0.04em;
}

/* ═══ Stats Row (Correct / Total) ═══ */
.rsp-stats-row {
  display: flex;
  justify-content: center;
  gap: 40px;
  padding-top: 10px;
  border-top: 1px solid var(--border);
}

.rsp-stat {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 2px;
}

.rsp-stat-num {
  font-size: 28px;
  font-weight: 700;
  color: var(--text);
  font-variant-numeric: tabular-nums;
  line-height: 1;
}

.rsp-stat-label {
  font-size: 11px;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  color: var(--text-faint);
}

/* ═══ Responsive ═══ */
@media (max-width: 1024px) {
  .rsp-panel {
    gap: 10px;
  }
  .rsp-card {
    padding: 12px;
  }
  .rsp-direction-label {
    font-size: 14px;
  }
  .rsp-stat-num {
    font-size: 24px;
  }
}

@media (max-width: 480px) {
  .rsp-meter-label {
    width: 72px;
    font-size: 11px;
  }
  .rsp-stats-row {
    gap: 28px;
  }
}

/* ═══ Accessibility: reduced motion ═══ */
@media (prefers-reduced-motion: reduce) {
  .rsp-meter-fill,
  .rsp-progress-bar,
  .rsp-direction-box,
  .rsp-direction-dot {
    transition: none;
  }
}
