/**
 * Vendor Evaluation Wizard CSS
 * Styling for the 15-question vendor risk assessment wizard
 */

/* ================================================================
   Root Variables - Colors and Sizing
   ================================================================ */

:root {
  --accent: #0066FF;
  --accent-hover: #0052CC;
  --border: #CCCCCC;
  --text: #212121;
  --muted: #666666;
  --bg-alt: #F5F5F5;
  --radius: 6px;

  --risk-low: #2E7D32;
  --risk-moderate: #F57C00;
  --risk-high: #C62828;
}

/* ================================================================
   Container & Layout
   ================================================================ */

.wizard-intro,
.wizard-question,
.wizard-results {
  max-width: 600px;
  margin: 0 auto;
  padding: 2rem;
}

.wizard-intro {
  text-align: center;
}

/* ================================================================
   Introduction Screen
   ================================================================ */

.wizard-intro-title {
  color: var(--accent);
  font-size: 1.5rem;
  font-weight: 600;
  margin-bottom: 0.5rem;
}

.wizard-intro-subtitle {
  font-size: 1.125rem;
  color: var(--muted);
  margin-bottom: 1.5rem;
  font-weight: 500;
}

.wizard-intro-description {
  font-size: 1rem;
  line-height: 1.6;
  color: var(--text);
  margin-bottom: 1.5rem;
}

.wizard-intro-time {
  font-size: 0.95rem;
  color: var(--muted);
  margin-bottom: 2rem;
}

.wizard-buttons {
  display: flex;
  flex-direction: column;
  gap: 1rem;
  margin-top: 2rem;
}

.wizard-buttons .btn {
  padding: 0.875rem 1.5rem;
  font-size: 1rem;
}

/* ================================================================
   Progress Bar
   ================================================================ */

.progress-container {
  margin-bottom: 2rem;
}

.progress-bar {
  height: 8px;
  background: var(--border);
  border-radius: 4px;
  margin-bottom: 1rem;
  overflow: hidden;
}

.progress-fill {
  height: 100%;
  background: var(--accent);
  transition: width 0.3s ease;
}

.progress-text {
  font-size: 0.875rem;
  color: var(--muted);
}

.section-label {
  font-size: 0.875rem;
  color: var(--accent);
  font-weight: 600;
  text-transform: uppercase;
  margin-bottom: 1rem;
  letter-spacing: 0.5px;
}

/* ================================================================
   Question Text
   ================================================================ */

.question-text {
  font-size: 1.5rem;
  font-weight: 600;
  line-height: 1.4;
  margin-bottom: 2rem;
  color: var(--text);
}

/* ================================================================
   Options / Radio Buttons
   ================================================================ */

.options {
  display: flex;
  flex-direction: column;
  gap: 1rem;
  margin-bottom: 2rem;
}

.option-label {
  display: flex;
  align-items: flex-start;
  padding: 1rem;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  cursor: pointer;
  transition: all 0.2s ease;
  background: white;
}

.option-label:hover {
  border-color: var(--accent);
  background: var(--bg-alt);
}

.option-label input[type="radio"] {
  margin-right: 0.75rem;
  margin-top: 0.25rem;
  cursor: pointer;
  width: 20px;
  height: 20px;
  flex-shrink: 0;
  accent-color: var(--accent);
}

.option-text {
  flex: 1;
  line-height: 1.5;
  color: var(--text);
}

.option-label input[type="radio"]:checked + .option-text {
  color: var(--accent);
  font-weight: 600;
}

.option-label input[type="radio"]:focus {
  outline: 3px solid rgba(0, 102, 255, 0.5);
  outline-offset: 2px;
}

/* ================================================================
   Buttons
   ================================================================ */

.btn {
  padding: 0.875rem 1.5rem;
  font-size: 0.95rem;
  font-weight: 500;
  border: 1px solid transparent;
  border-radius: var(--radius);
  cursor: pointer;
  transition: all 0.2s ease;
  white-space: nowrap;
}

.btn-primary {
  background: var(--accent);
  color: white;
  border-color: var(--accent);
}

.btn-primary:hover:not(:disabled) {
  background: var(--accent-hover);
  border-color: var(--accent-hover);
}

.btn-primary:active:not(:disabled) {
  transform: scale(0.98);
}

.btn-secondary {
  background: white;
  color: var(--accent);
  border-color: var(--accent);
}

.btn-secondary:hover:not(:disabled) {
  background: var(--bg-alt);
  border-color: var(--accent-hover);
  color: var(--accent-hover);
}

.btn-disabled,
.btn:disabled {
  opacity: 0.5;
  cursor: not-allowed;
  pointer-events: none;
}

.btn:focus {
  outline: 3px solid rgba(0, 102, 255, 0.5);
  outline-offset: 2px;
}

.button-group {
  display: flex;
  gap: 1rem;
  justify-content: center;
  margin-top: 2rem;
}

.button-group button {
  flex: 1;
  min-width: 120px;
}

/* ================================================================
   Results Screen
   ================================================================ */

.results-title {
  font-size: 1.75rem;
  font-weight: 600;
  margin-bottom: 2rem;
  text-align: center;
  color: var(--text);
}

/* Risk Score Display */

.risk-score-display {
  border-left: 4px solid;
  padding: 2rem;
  border-radius: var(--radius);
  text-align: center;
  margin: 2rem 0;
}

.risk-icon {
  display: inline-block;
  margin-bottom: 0.5rem;
}

.risk-level {
  font-size: 1.5rem;
  font-weight: 700;
  margin-bottom: 0.5rem;
}

.risk-score {
  font-size: 2.5rem;
  font-weight: 700;
  color: var(--text);
  margin-bottom: 0.5rem;
}

.risk-status {
  font-size: 1rem;
  color: var(--muted);
}

/* Score Breakdown */

.score-breakdown {
  background: var(--bg-alt);
  padding: 1.5rem;
  border-radius: var(--radius);
  margin: 2rem 0;
}

.score-breakdown h3 {
  font-size: 1.125rem;
  font-weight: 600;
  margin-bottom: 1.5rem;
  color: var(--text);
}

.breakdown-item {
  margin-bottom: 1.5rem;
}

.breakdown-item:last-child {
  margin-bottom: 0;
}

.breakdown-label {
  display: flex;
  justify-content: space-between;
  margin-bottom: 0.5rem;
  font-size: 0.95rem;
}

.section-name {
  font-weight: 600;
  color: var(--text);
}

.breakdown-label .score {
  color: var(--muted);
  font-size: 0.85rem;
}

.breakdown-bar {
  height: 6px;
  background: #e0e0e0;
  border-radius: 3px;
  overflow: hidden;
}

.breakdown-fill {
  height: 100%;
  background: var(--accent);
  transition: width 0.3s ease;
}

/* Recommendations */

.recommendations-section,
.concerns-section,
.strengths-section {
  background: white;
  padding: 1.5rem;
  border-radius: var(--radius);
  margin: 1.5rem 0;
  border: 1px solid var(--border);
}

.recommendations-section h3,
.concerns-section h4,
.strengths-section h4 {
  font-size: 1.125rem;
  font-weight: 600;
  margin-bottom: 1rem;
  color: var(--text);
}

.recommendation-intro {
  font-size: 0.95rem;
  line-height: 1.6;
  color: var(--text);
  margin-bottom: 1rem;
}

.recommendations-list,
.concerns-list,
.strengths-list {
  list-style: none;
  padding: 0;
  margin: 0;
}

.recommendations-list li,
.concerns-list li,
.strengths-list li {
  padding: 0.5rem 0 0.5rem 1.5rem;
  position: relative;
  font-size: 0.95rem;
  line-height: 1.5;
  color: var(--text);
}

.recommendations-list li:before {
  content: '✓';
  position: absolute;
  left: 0;
  color: var(--risk-low);
  font-weight: bold;
}

.concerns-list li:before {
  content: '⚠';
  position: absolute;
  left: 0;
  color: var(--risk-moderate);
}

.strengths-list li:before {
  content: '✓';
  position: absolute;
  left: 0;
  color: var(--risk-low);
  font-weight: bold;
}

/* ================================================================
   Mobile Responsive (<768px)
   ================================================================ */

@media (max-width: 767px) {
  .wizard-intro,
  .wizard-question,
  .wizard-results {
    padding: 1rem;
  }

  .wizard-intro-title {
    font-size: 1.25rem;
  }

  .wizard-intro-subtitle {
    font-size: 1rem;
  }

  .question-text {
    font-size: 1.25rem;
  }

  .option-label {
    padding: 0.875rem;
  }

  .option-label input[type="radio"] {
    min-width: 44px;
    min-height: 44px;
  }

  .button-group {
    flex-direction: column;
  }

  .button-group button {
    width: 100%;
  }

  .btn {
    padding: 0.75rem 1rem;
    font-size: 0.9rem;
    min-height: 44px;
  }

  .risk-score {
    font-size: 2rem;
  }

  .breakdown-label {
    font-size: 0.85rem;
  }

  .recommendations-list li,
  .concerns-list li,
  .strengths-list li {
    padding: 0.5rem 0 0.5rem 1.5rem;
    font-size: 0.9rem;
  }
}

/* ================================================================
   Tablet Responsive (768px - 1024px)
   ================================================================ */

@media (min-width: 768px) and (max-width: 1023px) {
  .wizard-intro,
  .wizard-question,
  .wizard-results {
    max-width: 600px;
    padding: 1.5rem;
  }

  .button-group {
    gap: 0.75rem;
  }

  .button-group button {
    min-width: 100px;
  }
}

/* ================================================================
   Desktop Responsive (>1024px)
   ================================================================ */

@media (min-width: 1024px) {
  .wizard-intro,
  .wizard-question,
  .wizard-results {
    max-width: 600px;
    padding: 2rem;
  }

  .button-group button {
    flex: 0 1 auto;
    min-width: 140px;
  }
}

/* ================================================================
   Accessibility & Focus States
   ================================================================ */

/* High contrast mode support */
@media (prefers-contrast: more) {
  .option-label {
    border-width: 2px;
  }

  .btn {
    border-width: 2px;
  }
}

/* Reduced motion support */
@media (prefers-reduced-motion: reduce) {
  .progress-fill,
  .breakdown-fill,
  .option-label,
  .btn {
    transition: none;
  }
}

/* Print styles */
@media print {
  .button-group {
    display: none;
  }

  .progress-container {
    display: none;
  }

  .wizard-intro,
  .wizard-question {
    display: none;
  }

  .wizard-results {
    padding: 0;
  }

  .result-title {
    page-break-after: avoid;
  }

  .recommendations-section,
  .concerns-section,
  .strengths-section {
    page-break-inside: avoid;
  }
}
