/**
 * CRRT REASONING CONSOLE STYLES
 * Separate styling for the educational sandbox
 */

/* ===== ACKNOWLEDGMENT GATE ===== */
.reasoning-acknowledgment {
  max-width: 600px;
  margin: 40px auto;
  padding: 30px;
  background: white;
  border-radius: 12px;
  box-shadow: 0 4px 20px rgba(0,0,0,0.1);
}

.reasoning-header {
  text-align: center;
  margin-bottom: 30px;
}

.reasoning-header h1 {
  color: #5e35b1;
  margin: 0 0 10px 0;
}

.reasoning-subtitle {
  color: #666;
  font-size: 16px;
  margin: 0;
}

.reasoning-disclaimer {
  background: #fff3e0;
  border-left: 4px solid #ff9800;
  padding: 20px;
  margin-bottom: 25px;
  border-radius: 0 8px 8px 0;
}

.reasoning-disclaimer h3 {
  margin: 0 0 10px 0;
  color: #e65100;
}

.reasoning-disclaimer ul {
  margin: 10px 0 0 0;
  padding-left: 20px;
}

.reasoning-disclaimer li {
  margin: 8px 0;
  line-height: 1.5;
}

.acknowledgment-box {
  background: #f5f5f5;
  padding: 20px;
  border-radius: 8px;
  margin-bottom: 25px;
}

.acknowledgment-label {
  display: flex;
  align-items: flex-start;
  gap: 12px;
  cursor: pointer;
  line-height: 1.5;
}

.acknowledgment-label input[type="checkbox"] {
  margin-top: 4px;
  width: 20px;
  height: 20px;
  cursor: pointer;
}

.reasoning-actions {
  display: flex;
  gap: 15px;
  justify-content: flex-end;
}

.reasoning-actions button {
  padding: 12px 24px;
  font-size: 15px;
  border-radius: 6px;
  cursor: pointer;
}

.reasoning-actions button:disabled {
  opacity: 0.5;
  cursor: not-allowed;
}

/* ===== MAIN CONSOLE ===== */
.reasoning-console {
  max-width: 900px;
  margin: 20px auto;
  padding: 0 20px;
}

.reasoning-nav {
  display: flex;
  gap: 8px;
  margin-bottom: 20px;
  flex-wrap: nowrap;
  background: #f5f5f5;
  padding: 10px;
  border-radius: 8px;
  overflow-x: auto;
  max-width: 900px;
  margin-left: auto;
  margin-right: auto;
  box-sizing: border-box;
}

.nav-tab {
  padding: 10px 14px;
  border: 2px solid #ccc;
  background: white;
  color: #555;
  font-size: 13px;
  font-weight: 600;
  cursor: pointer;
  border-radius: 6px;
  transition: all 0.2s;
  box-shadow: 0 2px 4px rgba(0,0,0,0.08);
  white-space: nowrap;
  flex: 1;
  text-align: center;
}

.nav-tab:hover {
  background: #e8e8e8;
  border-color: #999;
  transform: translateY(-1px);
  box-shadow: 0 3px 6px rgba(0,0,0,0.12);
}

.nav-tab.active {
  background: #5e35b1;
  color: white;
  border-color: #5e35b1;
  box-shadow: 0 3px 8px rgba(94, 53, 177, 0.3);
}

/* On smaller screens, allow horizontal scroll if needed */
@media (max-width: 600px) {
  .nav-tab {
    padding: 8px 12px;
    font-size: 12px;
    flex: 0 0 auto;
  }
}

/* ===== SECTIONS ===== */
.reasoning-section {
  background: white;
  padding: 25px;
  border-radius: 12px;
  box-shadow: 0 2px 12px rgba(0,0,0,0.08);
}

.reasoning-section h2 {
  color: #5e35b1;
  margin: 0 0 10px 0;
  font-size: 22px;
}

.section-note {
  color: #666;
  font-size: 14px;
  margin-bottom: 25px;
  padding-bottom: 15px;
  border-bottom: 1px solid #eee;
}

/* ===== CONCEPT CARDS ===== */
.concept-card {
  background: #fafafa;
  border: 1px solid #e0e0e0;
  border-radius: 8px;
  padding: 20px;
  margin-bottom: 20px;
}

.concept-card h3 {
  margin: 0 0 15px 0;
  color: #333;
  font-size: 17px;
}

.concept-card p {
  margin: 0 0 12px 0;
  line-height: 1.6;
}

.formula-box {
  background: #e8eaf6;
  padding: 15px 20px;
  border-radius: 6px;
  font-family: 'Courier New', monospace;
  font-size: 14px;
  text-align: center;
  margin: 15px 0;
}

.explanation {
  background: #e3f2fd;
  padding: 15px;
  border-radius: 6px;
  margin-top: 15px;
}

.explanation p {
  margin: 0 0 8px 0;
}

.explanation ul {
  margin: 0;
  padding-left: 20px;
}

.explanation li {
  margin: 5px 0;
}

/* ===== MODALITY GRID ===== */
.modality-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 15px;
  margin-top: 15px;
}

.modality-box {
  background: white;
  border: 1px solid #ddd;
  border-radius: 6px;
  padding: 15px;
  text-align: center;
}

.modality-box strong {
  display: block;
  font-size: 16px;
  color: #5e35b1;
  margin-bottom: 8px;
}

.modality-box p {
  margin: 5px 0;
  font-size: 13px;
}

.modality-box .key-point {
  color: #00897b;
  font-weight: 600;
}

/* ===== CALCULATOR FORM ===== */
.calculator-form {
  background: #f5f5f5;
  padding: 20px;
  border-radius: 8px;
  margin-bottom: 20px;
}

.calc-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 15px;
}

.calc-row:last-child {
  margin-bottom: 0;
}

.calc-row label {
  font-weight: 500;
  color: #333;
}

.calc-row input,
.calc-row select {
  width: 180px;
  padding: 10px 12px;
  border: 1px solid #ddd;
  border-radius: 6px;
  font-size: 15px;
}

.calc-row input:focus,
.calc-row select:focus {
  outline: none;
  border-color: #5e35b1;
}

/* ===== CALCULATION RESULTS ===== */
.calculation-result {
  background: #f5f5f5;
  padding: 20px;
  border-radius: 8px;
}

.calculation-result h3 {
  margin: 0 0 15px 0;
  color: #333;
  font-size: 16px;
}

.calc-step {
  margin-bottom: 15px;
  padding-bottom: 15px;
  border-bottom: 1px solid #e0e0e0;
}

.calc-step:last-of-type {
  border-bottom: none;
}

.calc-step strong {
  display: block;
  margin-bottom: 8px;
  color: #5e35b1;
}

.calc-step code {
  display: block;
  background: white;
  padding: 8px 12px;
  border-radius: 4px;
  font-family: 'Courier New', monospace;
  font-size: 14px;
  margin: 5px 0;
}

.calc-result {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 15px;
  padding: 20px;
  background: #e8f5e9;
  border-radius: 8px;
  margin: 20px 0;
}

.calc-result.high {
  background: #ffebee;
}

.calc-result.na {
  background: #f5f5f5;
}

.result-label {
  font-size: 18px;
  font-weight: 500;
}

.result-value {
  font-size: 28px;
  font-weight: 700;
  color: #2e7d32;
}

.calc-result.high .result-value {
  color: #c62828;
}

.calc-result.na .result-value {
  color: #666;
}

.calc-note {
  background: #e3f2fd;
  padding: 12px 15px;
  border-radius: 6px;
  font-size: 14px;
  line-height: 1.5;
}

.calc-note.warning {
  background: #fff3e0;
  border-left: 3px solid #ff9800;
}

/* ===== RESULTS GRID ===== */
.results-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 15px;
  margin: 20px 0;
}

.result-card {
  background: white;
  padding: 15px;
  border-radius: 8px;
  text-align: center;
  border: 1px solid #e0e0e0;
}

.result-card.highlight {
  background: #e8f5e9;
  border-color: #2e7d32;
}

.result-card .result-label {
  display: block;
  font-size: 12px;
  color: #666;
  margin-bottom: 5px;
}

.result-card .result-value {
  font-size: 20px;
  color: #333;
}

.result-card.highlight .result-value {
  color: #2e7d32;
}

/* ===== COMPARISON TABLE ===== */
.comparison-table {
  overflow-x: auto;
  margin: 20px 0;
}

.comparison-table table {
  width: 100%;
  border-collapse: collapse;
  font-size: 14px;
}

.comparison-table th,
.comparison-table td {
  padding: 12px 15px;
  text-align: left;
  border-bottom: 1px solid #e0e0e0;
}

.comparison-table th {
  background: #5e35b1;
  color: white;
  font-weight: 600;
}

.comparison-table tr:hover {
  background: #f5f5f5;
}

.comparison-table td.na {
  color: #999;
  font-style: italic;
}

/* ===== MECHANISM GRID ===== */
.mechanism-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 20px;
  margin-top: 15px;
}

.mechanism-box {
  background: white;
  border: 1px solid #ddd;
  border-radius: 8px;
  padding: 20px;
}

.mechanism-box h4 {
  margin: 0 0 10px 0;
  color: #5e35b1;
}

.mechanism-box p {
  margin: 0 0 10px 0;
}

.mechanism-box ul {
  margin: 0;
  padding-left: 20px;
}

.mechanism-box li {
  margin: 5px 0;
}

/* ===== FOOTER ===== */
.reasoning-footer {
  margin-top: 30px;
  padding-top: 20px;
  border-top: 2px solid #e0e0e0;
  text-align: center;
}

.reasoning-footer p {
  color: #666;
  margin-bottom: 15px;
}

/* ===== MOBILE RESPONSIVE ===== */
@media (max-width: 768px) {
  .reasoning-acknowledgment {
    margin: 20px 10px;
    padding: 20px;
  }
  
  .reasoning-actions {
    flex-direction: column;
  }
  
  .reasoning-actions button {
    width: 100%;
  }
  
  .reasoning-nav {
    flex-direction: column;
    gap: 5px;
  }
  
  .nav-tab {
    width: 100%;
    text-align: left;
  }
  
  .calc-row {
    flex-direction: column;
    align-items: stretch;
    gap: 8px;
  }
  
  .calc-row input,
  .calc-row select {
    width: 100%;
  }
  
  .modality-grid {
    grid-template-columns: 1fr;
  }
  
  .mechanism-grid {
    grid-template-columns: 1fr;
  }
  
  .results-grid {
    grid-template-columns: 1fr;
  }
  
  .comparison-table {
    font-size: 12px;
  }
  
  .comparison-table th,
  .comparison-table td {
    padding: 8px 10px;
  }
}
