/* Smart Meters Shielding & Distance Lesson CSS */
#smart-meter-lesson {
  margin-top: 1.5rem;
}

.lesson-tabs {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
  margin-bottom: 1.5rem;
  border-bottom: 1px solid var(--line);
  padding-bottom: 0.75rem;
}

.tab-btn {
  background: var(--paper);
  border: 1px solid var(--line);
  padding: 0.5rem 0.9rem;
  border-radius: 6px;
  font-family: inherit;
  font-size: 0.9rem;
  font-weight: 500;
  color: var(--ink);
  cursor: pointer;
  transition: all 0.2s ease;
}

.tab-btn:hover {
  background: #e8ecf2;
}

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

.lesson-panel {
  display: none;
  background: #fff;
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 1.75rem;
  margin-bottom: 1.5rem;
  box-shadow: 0 2px 8px rgba(21, 34, 57, 0.04);
}

.lesson-panel.active {
  display: block;
}

.lesson-panel h2 {
  font-size: 1.4rem;
  margin-top: 0;
  margin-bottom: 0.5rem;
  color: var(--ink);
}

.panel-subtitle {
  color: #556987;
  font-size: 0.95rem;
  margin-bottom: 1.5rem;
  line-height: 1.5;
}

/* Chapter 1: Meter Transmission Types */
.transmission-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
  gap: 1rem;
  margin-bottom: 1.5rem;
}

.tech-card {
  border: 2px solid var(--line);
  border-radius: 8px;
  padding: 1.25rem;
  background: var(--paper);
  cursor: pointer;
  transition: all 0.2s ease;
  text-align: left;
}

.tech-card:hover {
  border-color: #a0aec0;
}

.tech-card.active {
  border-color: var(--blue);
  background: #f0f5ff;
}

.tech-card h3 {
  margin: 0.4rem 0;
  font-size: 1.05rem;
  color: var(--ink);
}

.tech-tag {
  display: inline-block;
  font-size: 0.75rem;
  font-weight: 700;
  padding: 0.2rem 0.5rem;
  border-radius: 4px;
  background: #e2e8f0;
  color: #4a5568;
}

.pulse-simulator {
  background: #0b1320;
  border-radius: 8px;
  padding: 1.5rem;
  color: #fff;
  margin: 1.5rem 0;
}

.pulse-sim-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex-wrap: wrap;
  gap: 1rem;
  margin-bottom: 1rem;
}

.pulse-scope {
  height: 120px;
  background: #0f1c2e;
  border: 1px solid #1e3a5f;
  border-radius: 6px;
  position: relative;
  overflow: hidden;
}

.pulse-line {
  position: absolute;
  bottom: 20px;
  left: 0;
  right: 0;
  height: 2px;
  background: #235ad3;
}

.pulse-spike {
  position: absolute;
  bottom: 20px;
  width: 6px;
  background: #a8f074;
  border-radius: 3px 3px 0 0;
  transition: height 0.15s ease;
  box-shadow: 0 0 10px #a8f074;
}

.pulse-readouts {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
  gap: 1rem;
  margin-top: 1rem;
}

.readout-box {
  background: #152239;
  border: 1px solid #23395d;
  padding: 0.85rem;
  border-radius: 6px;
}

.readout-label {
  font-size: 0.75rem;
  color: #8da4c4;
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

.readout-value {
  font-size: 1.3rem;
  font-weight: 700;
  color: #a8f074;
  margin-top: 0.2rem;
}

/* Chapter 2: Interactive Distance & Wall Simulator */
.calc-container {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 1.5rem;
  margin-bottom: 1.5rem;
}

@media (max-width: 768px) {
  .calc-container {
    grid-template-columns: 1fr;
  }
}

.calc-controls {
  background: var(--paper);
  padding: 1.25rem;
  border-radius: 8px;
  border: 1px solid var(--line);
}

.form-group {
  margin-bottom: 1.25rem;
}

.form-group label {
  display: block;
  font-size: 0.9rem;
  font-weight: 600;
  margin-bottom: 0.5rem;
  color: var(--ink);
}

.slider-container {
  display: flex;
  align-items: center;
  gap: 1rem;
}

.slider-container input[type="range"] {
  flex: 1;
}

.slider-val {
  font-weight: 700;
  color: var(--blue);
  min-width: 60px;
}

.custom-select {
  width: 100%;
  padding: 0.6rem;
  border-radius: 6px;
  border: 1px solid var(--line);
  font-family: inherit;
  font-size: 0.9rem;
  background: #fff;
  color: var(--ink);
}

.calc-visualizer {
  background: #0f172a;
  border-radius: 8px;
  padding: 1.25rem;
  color: #fff;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
}

.viz-diagram {
  position: relative;
  height: 140px;
  background: #1e293b;
  border-radius: 6px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0 1.5rem;
  overflow: hidden;
}

.viz-meter {
  text-align: center;
  z-index: 2;
}

.viz-meter-icon {
  font-size: 2.5rem;
  display: block;
}

.viz-wall {
  width: 14px;
  height: 100%;
  background: #64748b;
  position: absolute;
  left: 30%;
  z-index: 1;
}

.viz-target {
  text-align: center;
  z-index: 2;
}

.viz-target-icon {
  font-size: 2.2rem;
  display: block;
}

.viz-waves {
  position: absolute;
  left: 20%;
  right: 20%;
  height: 100%;
  pointer-events: none;
}

.calc-stat-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 0.75rem;
  margin-top: 1rem;
}

.calc-stat {
  background: #1e293b;
  padding: 0.75rem;
  border-radius: 6px;
  border-left: 3px solid var(--blue);
}

.calc-stat.safe {
  border-left-color: #10b981;
}

.calc-stat.caution {
  border-left-color: #f59e0b;
}

.calc-stat.high {
  border-left-color: #ef4444;
}

/* Chapter 3: Shielding Options */
.shield-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: 1.25rem;
  margin-bottom: 1.5rem;
}

.shield-card {
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 1.25rem;
  background: #fff;
  transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.shield-card:hover {
  transform: translateY(-2px);
  box-shadow: 0 4px 12px rgba(21, 34, 57, 0.08);
}

.shield-badge {
  display: inline-block;
  font-size: 0.75rem;
  font-weight: 700;
  padding: 0.2rem 0.5rem;
  border-radius: 4px;
  margin-bottom: 0.5rem;
}

.badge-recommended {
  background: #dcfce7;
  color: #15803d;
}

.badge-effective {
  background: #e0e7ff;
  color: #4338ca;
}

.badge-warning {
  background: #fef3c7;
  color: #b45309;
}

/* Chapter 4: Interactive Room Layout */
.room-audit-box {
  background: var(--paper);
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 1.5rem;
  margin-bottom: 1.5rem;
}

.room-canvas-container {
  background: #fff;
  border: 2px dashed #cbd5e1;
  border-radius: 8px;
  height: 280px;
  position: relative;
  overflow: hidden;
  margin-bottom: 1rem;
}

.wall-outer {
  position: absolute;
  top: 0;
  left: 0;
  bottom: 0;
  width: 16px;
  background: #94a3b8;
  display: flex;
  align-items: center;
  justify-content: center;
  color: #fff;
  font-size: 0.7rem;
  writing-mode: vertical-rl;
  letter-spacing: 1px;
}

.meter-node {
  position: absolute;
  left: 16px;
  top: 40%;
  transform: translateY(-50%);
  background: #ef4444;
  color: #fff;
  padding: 0.5rem 0.75rem;
  border-radius: 6px;
  font-size: 0.85rem;
  font-weight: 700;
  box-shadow: 0 0 15px rgba(239, 68, 68, 0.4);
  z-index: 10;
}

.radiation-gradient {
  position: absolute;
  top: 40%;
  left: 16px;
  width: 350px;
  height: 350px;
  transform: translate(-50%, -50%);
  background: radial-gradient(circle, rgba(239,68,68,0.3) 0%, rgba(245,158,11,0.2) 40%, rgba(16,185,129,0.05) 75%, transparent 100%);
  border-radius: 50%;
  pointer-events: none;
}

.furniture-item {
  position: absolute;
  background: #1e293b;
  color: #fff;
  padding: 0.6rem 1rem;
  border-radius: 6px;
  font-size: 0.85rem;
  font-weight: 600;
  cursor: grab;
  user-select: none;
  z-index: 20;
  box-shadow: 0 4px 6px rgba(0,0,0,0.15);
  transition: border-color 0.2s;
}

.furniture-item:active {
  cursor: grabbing;
}

/* Chapter 5: Quiz */
.quiz-item {
  background: var(--paper);
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 1.25rem;
  margin-bottom: 1.25rem;
}

.quiz-question {
  font-weight: 600;
  font-size: 1rem;
  margin-bottom: 0.75rem;
  color: var(--ink);
}

.quiz-options {
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
}

.quiz-opt-btn {
  background: #fff;
  border: 1px solid var(--line);
  padding: 0.75rem 1rem;
  border-radius: 6px;
  text-align: left;
  font-family: inherit;
  font-size: 0.9rem;
  color: var(--ink);
  cursor: pointer;
  transition: all 0.2s ease;
}

.quiz-opt-btn:hover {
  background: #f1f5f9;
  border-color: #94a3b8;
}

.quiz-opt-btn.correct {
  background: #dcfce7;
  border-color: #16a34a;
  color: #15803d;
  font-weight: 600;
}

.quiz-opt-btn.incorrect {
  background: #fee2e2;
  border-color: #dc2626;
  color: #991b1b;
}

.quiz-feedback {
  margin-top: 0.75rem;
  padding: 0.75rem;
  border-radius: 6px;
  font-size: 0.88rem;
  line-height: 1.4;
  display: none;
}

.quiz-feedback.show {
  display: block;
}

.feedback-correct {
  background: #dcfce7;
  color: #166534;
}

.feedback-incorrect {
  background: #fee2e2;
  color: #991b1b;
}

/* Nav Controls */
.lesson-nav-bar {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-top: 2rem;
  padding-top: 1rem;
  border-top: 1px solid var(--line);
}

.callout-box {
  background: #f8fafc;
  border-left: 4px solid var(--blue);
  padding: 1rem 1.25rem;
  border-radius: 0 6px 6px 0;
  margin: 1.25rem 0;
  font-size: 0.92rem;
}
