/* Styles for Lesson 12: Electric Vehicles & EMF */

:root {
  --ink: #152239;
  --muted: #586579;
  --blue: #235ad3;
  --lime: #a8f074;
  --line: #dce2e9;
  --paper: #f5f7f9;
  --accent-cyan: #06b6d4;
  --accent-amber: #f59e0b;
  --accent-orange: #ea580c;
  --accent-red: #ef4444;
  --accent-green: #10b981;
  --radius: 12px;
}

/* Tabs */
.lesson-tabs {
  display: flex;
  gap: 10px;
  margin: 24px 0 16px;
  overflow-x: auto;
  padding-bottom: 6px;
}

.tab-btn {
  background: var(--paper);
  border: 1px solid var(--line);
  color: var(--ink);
  font-weight: 600;
  font-size: 14px;
  padding: 10px 18px;
  border-radius: 8px;
  cursor: pointer;
  white-space: nowrap;
  transition: all 0.2s ease;
}

.tab-btn:hover {
  border-color: var(--blue);
  color: var(--blue);
}

.tab-btn.active {
  background: var(--ink);
  color: #fff;
  border-color: var(--ink);
}

.lesson-panel {
  margin-top: 10px;
  padding: 32px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: #fff;
}

.panel-subtitle {
  color: var(--muted);
  font-size: 15px;
  margin-top: -6px;
  margin-bottom: 24px;
  line-height: 1.6;
}

/* Chapter 0: EV Sources Grid */
.ev-sources-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 16px;
  margin-bottom: 24px;
}

.ev-card {
  background: var(--paper);
  border: 1px solid var(--line);
  border-radius: 10px;
  padding: 20px;
}

.ev-icon {
  font-size: 26px;
  margin-bottom: 8px;
  display: block;
}

.ev-card h3 {
  margin: 0 0 6px;
  font-size: 16px;
  color: var(--ink);
}

.ev-card p {
  margin: 0;
  font-size: 13.5px;
  color: var(--muted);
  line-height: 1.5;
}

/* Chapter 1: Cabin Scanner */
.cabin-scanner-container {
  display: grid;
  grid-template-columns: 1.1fr 1fr;
  gap: 24px;
  background: #0f172a;
  border-radius: 12px;
  padding: 24px;
  color: #fff;
  align-items: center;
}

.car-stage-canvas {
  background: #1e293b;
  border: 2px dashed #475569;
  border-radius: 12px;
  padding: 16px;
  display: flex;
  justify-content: center;
}

.car-body-outline {
  width: 220px;
  background: #0f172a;
  border: 2px solid #64748b;
  border-radius: 40px 40px 30px 30px;
  padding: 16px 12px;
  display: flex;
  flex-direction: column;
  gap: 14px;
  text-align: center;
}

.car-nose {
  font-size: 10px;
  font-weight: 800;
  color: #f87171;
  background: rgba(239, 68, 68, 0.15);
  padding: 4px;
  border-radius: 20px;
  letter-spacing: 0.05em;
}

.car-interior-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 10px;
}

.cabin-spot-btn {
  background: #1e293b;
  border: 1px solid #475569;
  border-radius: 8px;
  padding: 10px 6px;
  color: #fff;
  cursor: pointer;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 4px;
  font-size: 11px;
  transition: all 0.2s ease;
}

.cabin-spot-btn:hover {
  border-color: var(--blue);
  background: #2563eb;
}

.cabin-spot-btn.active {
  background: var(--blue);
  border-color: #60a5fa;
  box-shadow: 0 0 14px rgba(37, 99, 235, 0.8);
}

.spot-indicator {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: #a8f074;
}

.car-rear {
  font-size: 10px;
  font-weight: 700;
  color: #94a3b8;
  background: rgba(100, 116, 139, 0.2);
  padding: 4px;
  border-radius: 12px;
}

.cabin-readout-panel {
  display: flex;
  flex-direction: column;
  gap: 14px;
}

.zone-badge {
  font-size: 10px;
  font-weight: 700;
  color: #93c5fd;
  letter-spacing: 0.05em;
}

.readout-header h3 {
  margin: 4px 0 0;
  font-size: 18px;
  color: #fff;
}

.meter-readout-row {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 12px;
}

.m-val-box {
  background: #1e293b;
  border-radius: 8px;
  padding: 12px;
  display: flex;
  flex-direction: column;
  gap: 2px;
}

.m-label {
  font-size: 10px;
  font-weight: 700;
  color: #94a3b8;
  text-transform: uppercase;
}

.m-stat {
  font-size: 18px;
  font-weight: 800;
}

.m-stat.orange {
  color: #fb923c;
}

.m-stat.green {
  color: #34d399;
}

.m-val-box small {
  font-size: 11px;
  color: #94a3b8;
}

.readout-desc {
  margin: 0;
  color: #cbd5e1;
  font-size: 13.5px;
  line-height: 1.5;
}

.scan-tip-box {
  background: #1e293b;
  border-left: 3px solid var(--blue);
  padding: 10px 14px;
  border-radius: 0 6px 6px 0;
  font-size: 13px;
  color: #93c5fd;
  line-height: 1.5;
}

/* Chapter 2: Driving Dynamics */
.driving-state-toolbar {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 12px;
  margin-bottom: 20px;
}

.drive-btn {
  background: var(--paper);
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 14px 10px;
  text-align: left;
  cursor: pointer;
  display: flex;
  flex-direction: column;
  gap: 4px;
  transition: all 0.2s ease;
}

.drive-btn:hover {
  border-color: var(--blue);
}

.drive-btn.active {
  background: #edf2fc;
  border-color: var(--blue);
  outline: 2px solid var(--blue);
}

.drive-btn strong {
  font-size: 13px;
  color: var(--ink);
}

.drive-btn span {
  font-size: 11px;
  color: var(--muted);
}

.driving-sim-card {
  background: #0f172a;
  border-radius: 12px;
  padding: 24px;
  color: #fff;
  display: grid;
  grid-template-columns: 1fr 1.2fr;
  gap: 24px;
  align-items: center;
}

.gauge-display {
  background: #1e293b;
  border-radius: 10px;
  padding: 20px;
}

.gauge-title {
  font-size: 10px;
  font-weight: 700;
  color: #94a3b8;
  letter-spacing: 0.05em;
  margin-bottom: 8px;
}

.gauge-dial-box {
  display: flex;
  align-items: baseline;
  gap: 8px;
  margin-bottom: 12px;
}

.gauge-number {
  font-size: 34px;
  font-weight: 800;
  color: #60a5fa;
  font-family: monospace;
}

.gauge-unit {
  font-size: 13px;
  color: #94a3b8;
}

.gauge-bar-track {
  height: 10px;
  background: #334155;
  border-radius: 5px;
  overflow: hidden;
}

.gauge-bar-fill {
  height: 100%;
  background: var(--blue);
  transition: width 0.3s ease-out, background-color 0.2s;
}

.drive-state-details h3 {
  margin: 0 0 8px;
  font-size: 18px;
  color: #fff;
}

.drive-state-details p {
  margin: 0;
  color: #cbd5e1;
  font-size: 14px;
  line-height: 1.6;
}

/* Chapter 3: Tips */
.tips-grid-layout {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 16px;
}

.t-card {
  background: var(--paper);
  border: 1px solid var(--line);
  border-radius: 10px;
  padding: 20px;
}

.t-card h3 {
  margin: 0 0 8px;
  font-size: 16px;
  color: var(--ink);
}

.t-card p {
  margin: 0;
  font-size: 13.5px;
  color: var(--muted);
  line-height: 1.5;
}

/* Chapter 4: Quiz */
.quiz-form {
  display: flex;
  flex-direction: column;
  gap: 20px;
}

.quiz-fieldset {
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 18px 20px;
  background: var(--paper);
}

.quiz-question {
  font-weight: 700;
  font-size: 15px;
  color: var(--ink);
  margin-bottom: 12px;
  padding: 0 6px;
}

.check {
  display: flex;
  align-items: flex-start;
  gap: 10px;
  margin-bottom: 10px;
  font-size: 14px;
  cursor: pointer;
  color: var(--ink);
}

.check input {
  margin-top: 4px;
}

.quiz-feedback {
  margin-top: 20px;
  padding: 16px 20px;
  border-radius: 8px;
  font-size: 14px;
  line-height: 1.6;
}

.quiz-feedback.success {
  background: #e6f7df;
  border: 1px solid #a3e635;
  color: #1b6321;
}

.quiz-feedback.retry {
  background: #fffbeb;
  border: 1px solid #fde68a;
  color: #92400e;
}

.complete-card {
  background: #f0f7ff;
  border: 1px solid #bfdbfe;
  border-radius: 10px;
  padding: 24px;
  margin-top: 20px;
}

.complete-card h3 {
  margin: 0 0 8px;
  color: var(--blue);
}

.next-actions {
  display: flex;
  gap: 12px;
  flex-wrap: wrap;
  margin-top: 16px;
}

.lesson-nav-controls {
  display: flex;
  justify-content: space-between;
  margin-top: 28px;
  padding-top: 20px;
  border-top: 1px solid var(--line);
}

.transcript-details {
  margin-top: 30px;
}

.transcript-content {
  font-size: 14px;
  color: var(--muted);
  line-height: 1.7;
}

@media (max-width: 800px) {
  .lesson-panel {
    padding: 20px 16px;
  }
  .ev-sources-grid, .cabin-scanner-container, .driving-state-toolbar, .driving-sim-card, .tips-grid-layout {
    grid-template-columns: 1fr;
  }
}
