/* ============================================================
   Chem Y11 Module 2 - Component Styles
   Supports synthesis/review lessons and other module-specific
   component surfaces not covered by shared lesson.css.
   ============================================================ */

.badge-gold {
  background: var(--accent);
  color: white;
}

.badge-synthesis {
  background: linear-gradient(135deg, var(--primary), var(--accent));
  color: white;
  box-shadow: var(--shadow-accent);
}

.iq-map {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 16px;
  margin: 24px 0 28px;
}

.iq-card {
  background: rgba(255, 255, 255, 0.82);
  border: 1px solid rgba(255, 255, 255, 0.92);
  border-radius: var(--radius);
  padding: 20px 22px;
  box-shadow: var(--shadow);
  backdrop-filter: blur(14px);
  -webkit-backdrop-filter: blur(14px);
  border-top: 4px solid var(--primary);
}

.iq-card.iq1 { border-top-color: var(--accent); }
.iq-card.iq2 { border-top-color: var(--primary-mid); }
.iq-card.iq3 { border-top-color: var(--accent-dark); }

.iq-label {
  font-size: 10px;
  font-weight: 800;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--text-light);
  margin-bottom: 8px;
}

.iq-card h4 {
  font-family: 'Outfit', sans-serif;
  font-size: 18px;
  font-weight: 700;
  color: var(--text);
  margin-bottom: 12px;
  line-height: 1.25;
}

.iq-card ul {
  list-style: none;
  margin: 0;
  padding: 0;
}

.iq-card li {
  position: relative;
  padding: 7px 0 7px 16px;
  color: var(--text-muted);
  font-size: 14px;
  line-height: 1.55;
  border-bottom: 1px solid var(--border);
}

.iq-card li:last-child {
  border-bottom: none;
}

.iq-card li::before {
  content: '•';
  position: absolute;
  left: 0;
  color: var(--primary-mid);
  font-weight: 800;
}

.iq-card.iq1 li::before { color: var(--accent); }
.iq-card.iq2 li::before { color: var(--primary-mid); }
.iq-card.iq3 li::before { color: var(--accent-dark); }

.chain-problem {
  background: rgba(255, 255, 255, 0.84);
  border: 1px solid rgba(255, 255, 255, 0.94);
  border-radius: var(--radius);
  overflow: hidden;
  box-shadow: var(--shadow);
  margin: 18px 0 22px;
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
}

.cp-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 16px 20px;
  background: linear-gradient(135deg, rgba(56, 189, 248, 0.16), rgba(129, 140, 248, 0.14));
  border-bottom: 1px solid var(--border);
}

.cp-header h4 {
  font-family: 'Outfit', sans-serif;
  font-size: 18px;
  font-weight: 700;
  color: var(--text);
  margin: 0;
  line-height: 1.3;
}

.cp-badge {
  display: inline-flex;
  align-items: center;
  padding: 5px 10px;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.82);
  border: 1px solid var(--border);
  color: var(--text-muted);
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  white-space: nowrap;
}

.cp-body {
  padding: 20px 22px 22px;
}

.cp-scenario {
  background: var(--primary-light);
  border-left: 4px solid var(--primary-mid);
  border-radius: 12px;
  padding: 14px 16px;
  color: var(--text);
  font-size: 14.5px;
  line-height: 1.65;
  margin-bottom: 16px;
}

.cp-parts {
  margin: 0 0 16px 0;
  padding: 0;
  list-style: none;
  display: grid;
  gap: 12px;
}

.cp-part {
  background: var(--surface-2);
  border: 1px solid var(--border);
  border-radius: 12px;
  padding: 14px 16px;
}

.cp-part-label {
  font-size: 11px;
  font-weight: 800;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--accent-dark);
  margin-bottom: 6px;
}

.cp-part p {
  margin: 0;
  color: var(--text);
  font-size: 14.5px;
  line-height: 1.6;
}

.cp-answer {
  margin-top: 14px;
}

.cp-answer-trigger {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 12px 16px;
  border-radius: 12px;
  border: 1px solid var(--border);
  background: rgba(255, 255, 255, 0.8);
  color: var(--text);
  font-size: 13px;
  font-weight: 700;
  cursor: pointer;
}

.cp-answer-trigger:hover {
  background: var(--surface-2);
}

.cp-answer-body {
  display: none;
  margin-top: 10px;
  padding: 14px 16px;
  border-radius: 12px;
  background: #f8fafc;
  border: 1px solid #dbeafe;
  color: var(--text-muted);
  font-size: 14px;
  line-height: 1.7;
}

.cp-answer-body.open {
  display: block;
}

.cp-answer-body .ans-math {
  display: block;
  margin-bottom: 6px;
}

.formula-ref {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 16px;
  margin: 20px 0 28px;
}

.fr-card {
  background: rgba(255, 255, 255, 0.84);
  border: 1px solid rgba(255, 255, 255, 0.94);
  border-radius: var(--radius);
  padding: 20px 22px;
  box-shadow: var(--shadow);
  border-top: 4px solid var(--primary);
}

.fr-card.iq1 { border-top-color: var(--accent); }
.fr-card.iq2 { border-top-color: var(--primary-mid); }
.fr-card.iq3 { border-top-color: var(--accent-dark); }

.fr-label {
  font-size: 10px;
  font-weight: 800;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--text-light);
  margin-bottom: 12px;
}

.fr-formula {
  display: grid;
  gap: 5px;
  padding: 12px 0;
  border-bottom: 1px solid var(--border);
  font-family: 'DM Mono', monospace;
  font-size: 15px;
  color: var(--text);
}

.fr-formula:last-child {
  border-bottom: none;
  padding-bottom: 0;
}

.fr-formula span {
  font-family: 'DM Sans', sans-serif;
  font-size: 13px;
  color: var(--text-muted);
  line-height: 1.55;
}

.glossary-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 14px;
  margin: 20px 0 28px;
}

.glossary-item {
  background: rgba(255, 255, 255, 0.82);
  border: 1px solid rgba(255, 255, 255, 0.94);
  border-radius: 14px;
  padding: 16px 18px;
  box-shadow: var(--shadow-sm);
}

.glossary-term {
  font-family: 'Outfit', sans-serif;
  font-size: 16px;
  font-weight: 700;
  color: var(--text);
  margin-bottom: 8px;
}

.glossary-def {
  font-size: 14px;
  line-height: 1.65;
  color: var(--text-muted);
}

.checklist-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 16px;
  margin-top: 16px;
}

.checklist-section {
  background: var(--surface-2);
  border: 1px solid var(--border);
  border-left: 4px solid var(--primary-mid);
  border-radius: 14px;
  padding: 16px 18px;
}

.checklist-section.iq1 { border-left-color: var(--accent); }
.checklist-section.iq2 { border-left-color: var(--primary-mid); }
.checklist-section.iq3 { border-left-color: var(--accent-dark); }

.checklist-section h4 {
  font-family: 'Outfit', sans-serif;
  font-size: 16px;
  font-weight: 700;
  color: var(--text);
  margin-bottom: 12px;
}

.check-item {
  display: flex;
  align-items: flex-start;
  gap: 12px;
  padding: 10px 0;
  cursor: pointer;
  border-bottom: 1px solid var(--border);
}

.check-item:last-child {
  border-bottom: none;
  padding-bottom: 0;
}

.check-box {
  width: 22px;
  height: 22px;
  border-radius: 6px;
  border: 2px solid var(--border-2);
  background: white;
  flex-shrink: 0;
  margin-top: 1px;
}

.check-label {
  color: var(--text-muted);
  font-size: 14px;
  line-height: 1.5;
}

.check-item.checked .check-box {
  background: var(--success);
  border-color: var(--success);
  position: relative;
}

.check-item.checked .check-box::after {
  content: '✓';
  position: absolute;
  inset: 0;
  display: grid;
  place-items: center;
  color: white;
  font-size: 13px;
  font-weight: 800;
}

.check-item.checked .check-label {
  color: var(--text);
  font-weight: 600;
}

.exam-tips {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 14px;
  margin: 20px 0 28px;
}

.tip-card {
  background: rgba(255, 255, 255, 0.82);
  border: 1px solid rgba(255, 255, 255, 0.94);
  border-radius: 14px;
  padding: 16px 18px;
  box-shadow: var(--shadow-sm);
}

.tip-card h4 {
  font-family: 'Outfit', sans-serif;
  font-size: 16px;
  font-weight: 700;
  color: var(--text);
  margin-bottom: 8px;
}

.tip-card p {
  margin: 0;
  color: var(--text-muted);
  font-size: 14px;
  line-height: 1.65;
}

@media (max-width: 900px) {
  .iq-map,
  .formula-ref,
  .glossary-grid,
  .checklist-grid,
  .exam-tips {
    grid-template-columns: 1fr;
  }

  .cp-header {
    align-items: flex-start;
    flex-direction: column;
  }

  .cp-badge {
    white-space: normal;
  }
}
