/* TSCM MATURITY ASSESSMENT  -  Assessment-Specific Styles */
/* Extends style.css with assessment components */

/* --- INTRO --- */
.intro-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 1.5rem;
  margin: 2rem 0;
}
.intro-item {
  text-align: center;
  color: var(--gray-600);
  font-size: 0.85rem;
}
.intro-number {
  font-size: 2rem;
  font-weight: 800;
  color: var(--navy);
  margin-bottom: 0.25rem;
}

/* --- PROGRESS BAR --- */
.progress-bar {
  display: flex;
  justify-content: space-between;
  margin-bottom: 2rem;
  padding: 0 0.25rem;
}
.progress-step {
  display: flex;
  flex-direction: column;
  align-items: center;
  flex: 1;
  position: relative;
}
.progress-step::after {
  content: '';
  position: absolute;
  top: 14px;
  left: calc(50% + 16px);
  right: calc(-50% + 16px);
  height: 2px;
  background: var(--gray-200);
}
.progress-step:last-child::after { display: none; }
.progress-step.done::after { background: var(--green); }
.progress-step.active::after { background: var(--gold); }

.step-dot {
  width: 28px;
  height: 28px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 0.7rem;
  font-weight: 700;
  background: var(--gray-200);
  color: var(--gray-600);
  z-index: 1;
  margin-bottom: 0.3rem;
}
.progress-step.done .step-dot {
  background: var(--green);
  color: white;
}
.progress-step.active .step-dot {
  background: var(--navy);
  color: var(--gold);
  box-shadow: 0 0 0 3px rgba(30, 58, 95, 0.2);
}
.step-label {
  font-size: 0.55rem;
  color: var(--gray-400);
  text-align: center;
  max-width: 70px;
  line-height: 1.2;
}
.progress-step.active .step-label { color: var(--navy); font-weight: 600; }
.progress-step.done .step-label { color: var(--green); }

/* --- LEVER HEADER --- */
.lever-header {
  margin-bottom: 1.5rem;
  padding-bottom: 1rem;
  border-bottom: 2px solid var(--gold);
}
.lever-header h2 { margin-top: 0.5rem; border-bottom: none; padding-bottom: 0; }
.lever-badge {
  display: inline-block;
  background: var(--navy);
  color: var(--gold);
  font-size: 0.7rem;
  font-weight: 700;
  padding: 0.2rem 0.6rem;
  border-radius: 3px;
  text-transform: uppercase;
  letter-spacing: 1px;
  margin-bottom: 0.5rem;
}
.lever-arrows {
  font-size: 0.9rem;
  color: var(--gold-dark);
  font-weight: 700;
  margin-bottom: 0.25rem;
}

/* --- QUESTION ROWS --- */
.question-row {
  display: flex;
  gap: 1rem;
  padding: 1.25rem 0;
  border-bottom: 1px solid var(--gray-200);
  align-items: flex-start;
}
.question-row:last-of-type { border-bottom: none; }
.question-number {
  flex-shrink: 0;
  width: 36px;
  height: 36px;
  border-radius: 50%;
  background: var(--navy);
  color: var(--gold);
  font-weight: 700;
  font-size: 0.7rem;
  display: flex;
  align-items: center;
  justify-content: center;
  margin-top: 0.15rem;
}
.question-body { flex: 1; }
.question-text {
  font-size: 0.95rem;
  line-height: 1.5;
  margin-bottom: 0.75rem;
  color: var(--navy-dark);
}
.answer-buttons {
  display: flex;
  gap: 0.5rem;
}
.answer-btn {
  padding: 0.45rem 1.2rem;
  border: 2px solid var(--gray-200);
  border-radius: 6px;
  background: var(--white);
  font-size: 0.85rem;
  font-weight: 600;
  cursor: pointer;
  transition: var(--transition);
  font-family: inherit;
}
.answer-btn:hover {
  border-color: var(--navy);
  background: var(--off-white);
}
.answer-btn.selected {
  background: var(--navy);
  border-color: var(--navy);
  color: var(--white);
}

/* --- LEVER SCORE --- */
.lever-score {
  margin-top: 1.5rem;
  padding-top: 1rem;
  border-top: 2px solid var(--gray-200);
}
.score-bar-container { max-width: 400px; }
.score-label {
  font-size: 0.85rem;
  color: var(--gray-600);
  margin-bottom: 0.4rem;
}
.score-bar {
  height: 8px;
  background: var(--gray-200);
  border-radius: 4px;
  overflow: hidden;
}
.score-fill {
  height: 100%;
  border-radius: 4px;
  transition: width 0.4s ease, background 0.4s ease;
}

/* --- EMAIL GATE --- */
.email-gate {
  max-width: 520px;
  margin: 0 auto;
}
.email-gate h2 {
  text-align: center;
  font-size: 1.4rem;
  border-bottom: none;
  margin-bottom: 0.5rem;
}
.email-gate .subtitle {
  text-align: center;
  color: var(--gray-600);
  font-size: 0.9rem;
  margin-bottom: 1.5rem;
}
.form-row {
  margin-bottom: 0.75rem;
}
.form-row label {
  display: block;
  font-size: 0.8rem;
  font-weight: 600;
  color: var(--gray-600);
  margin-bottom: 0.25rem;
}
.form-row input,
.form-row select {
  width: 100%;
  padding: 0.6rem 0.75rem;
  border: 1px solid var(--gray-200);
  border-radius: 6px;
  font-size: 0.9rem;
  font-family: inherit;
  transition: var(--transition);
  background: var(--white);
}
.form-row input:focus,
.form-row select:focus {
  outline: none;
  border-color: var(--navy);
  box-shadow: 0 0 0 3px rgba(30, 58, 95, 0.1);
}
.form-row-half {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 0.75rem;
}
.form-error {
  color: var(--red);
  font-size: 0.75rem;
  margin-top: 0.25rem;
  display: none;
}
.form-row.error input,
.form-row.error select {
  border-color: var(--red);
}
.form-row.error .form-error {
  display: block;
}
.email-privacy {
  text-align: center;
  font-size: 0.72rem;
  color: var(--gray-400);
  margin-top: 1rem;
}

/* --- RESULTS BANNER --- */
.results-banner {
  display: flex;
  align-items: center;
  gap: 2rem;
  padding: 2rem;
  border-radius: var(--radius);
  margin-bottom: 1.5rem;
  color: var(--white);
}
.results-banner.maturity-reactive { background: linear-gradient(135deg, #dc2626 0%, #b91c1c 100%); }
.results-banner.maturity-aware { background: linear-gradient(135deg, #ea580c 0%, #c2410c 100%); }
.results-banner.maturity-structured { background: linear-gradient(135deg, #ca8a04 0%, #a16207 100%); }
.results-banner.maturity-optimized { background: linear-gradient(135deg, #2563eb 0%, #1d4ed8 100%); }
.results-banner.maturity-strategic { background: linear-gradient(135deg, #16a34a 0%, #15803d 100%); }

.score-circle {
  flex-shrink: 0;
  width: 120px;
  height: 120px;
  border-radius: 50%;
  background: rgba(255,255,255,0.15);
  border: 3px solid rgba(255,255,255,0.4);
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
}
.big-score {
  font-size: 2.5rem;
  font-weight: 800;
  line-height: 1;
}
.score-of {
  font-size: 0.85rem;
  opacity: 0.7;
}
.score-detail { flex: 1; }
.score-detail h2 {
  margin-bottom: 0.25rem;
  font-size: 1.6rem;
  border-bottom: none;
  color: var(--white);
  padding-bottom: 0;
}
.org-name { opacity: 0.8; font-size: 0.9rem; margin-bottom: 0.5rem; }
.maturity-summary { font-size: 0.9rem; line-height: 1.6; opacity: 0.9; }

/* --- MATURITY CHART --- */
.maturity-chart {
  display: flex;
  gap: 0.75rem;
  align-items: flex-end;
  height: 220px;
  padding: 0 0.5rem;
}
.chart-col {
  flex: 1;
  display: flex;
  flex-direction: column;
  align-items: center;
  height: 100%;
}
.bar-container {
  flex: 1;
  width: 100%;
  display: flex;
  align-items: flex-end;
  justify-content: center;
}
.bar {
  width: 100%;
  max-width: 55px;
  border-radius: 6px 6px 0 0;
  display: flex;
  align-items: flex-start;
  justify-content: center;
  padding-top: 0.4rem;
  transition: height 0.5s ease;
  min-height: 20px;
}
.bar span {
  color: white;
  font-weight: 700;
  font-size: 0.8rem;
}
.bar-label {
  margin-top: 0.5rem;
  font-size: 0.62rem;
  text-align: center;
  color: var(--gray-600);
  line-height: 1.2;
  max-width: 70px;
}

/* --- PRIORITY CARD --- */
.priority-card {
  border-left: 4px solid var(--red);
  background: linear-gradient(135deg, var(--white) 0%, #fef2f2 100%);
}
.priority-card h2 { color: var(--red); }
.priority-item {
  margin-bottom: 1.25rem;
  padding-bottom: 1.25rem;
  border-bottom: 1px solid var(--gray-200);
}
.priority-item:last-child { border-bottom: none; padding-bottom: 0; }
.priority-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 0.5rem;
}
.priority-title {
  font-weight: 700;
  color: var(--navy);
  font-size: 0.95rem;
}
.priority-score {
  font-weight: 700;
  font-size: 0.8rem;
}
.priority-actions {
  margin: 0.5rem 0 0 1.5rem;
  line-height: 1.6;
}
.priority-actions li {
  font-size: 0.88rem;
  margin-bottom: 0.35rem;
}

/* --- SHARE EMAIL BUTTON --- */
.btn-share {
  background: var(--navy);
  color: var(--white);
}
.btn-share:hover {
  background: var(--navy-light);
}
.btn-print {
  background: var(--white);
  color: var(--navy);
  border: 2px solid var(--navy);
}
.btn-print:hover {
  background: var(--off-white);
}

/* --- PRINT --- */
@media print {
  .results-banner { break-inside: avoid; }
  .card { break-inside: avoid; page-break-inside: avoid; }
  .maturity-chart { height: 160px; }
  .email-gate { display: none; }
  .btn, .btn-group { display: none !important; }
  .print-show { display: block !important; }
}

/* --- RESPONSIVE --- */
@media (max-width: 768px) {
  .intro-grid { grid-template-columns: repeat(2, 1fr); gap: 1rem; }
  .results-banner { flex-direction: column; text-align: center; }
  .progress-bar { overflow-x: auto; gap: 0.25rem; }
  .step-label { font-size: 0.5rem; max-width: 55px; }
  .question-row { flex-direction: column; gap: 0.5rem; }
  .question-number { width: 28px; height: 28px; font-size: 0.6rem; }
  .answer-buttons { flex-wrap: wrap; }
  .form-row-half { grid-template-columns: 1fr; }
  .maturity-chart { height: 180px; }
  .bar-label { font-size: 0.55rem; }
}

@media (max-width: 480px) {
  .intro-grid { grid-template-columns: repeat(2, 1fr); }
  .score-circle { width: 90px; height: 90px; }
  .big-score { font-size: 1.8rem; }
}
