/* ============================================================
   CSS riêng cho Hóa học 10 - Chương 6 (Tốc độ phản ứng hóa học).
   Tự chứa, độc lập theo đúng quy ước từng chương (xem
   QUY_TRINH_THEM_CHUONG_MOI.md) — có lặp lại vài class nhỏ giống Chương 3
   (chip, lab-select, quiz-*, ...) là chủ ý, để sửa Chương 6 không ảnh
   hưởng Chương 3 và ngược lại.
   Ưu tiên MOBILE: khối chạm (button/select/input) cao tối thiểu ~46px,
   chữ đủ lớn để đọc không cần zoom, xếp dọc khi màn hẹp.
   ============================================================ */

/* --- Form nhập liệu cho 2 lab tính toán (Tốc độ trung bình, Van't Hoff) --- */
.form-row { display: flex; gap: 14px; flex-wrap: wrap; margin-bottom: 14px; }
.form-row label { flex: 1 1 200px; display: block; font-size: 13px; font-weight: 600; color: var(--ink-soft); }
.lab-select, .lab-input {
  display: block; width: 100%; margin-top: 6px; padding: 12px 14px; font-size: 15px;
  border: 1.5px solid var(--line); border-radius: 10px; background: var(--card);
  font-family: "IBM Plex Mono", monospace; min-height: 46px; box-sizing: border-box;
}
.lab-select-label { display: block; font-size: 13px; font-weight: 600; color: var(--ink-soft); margin-bottom: 18px; }

/* --- Chip chọn yếu tố / hướng thay đổi / filter luyện tập --- */
.chip-row { display: flex; gap: 8px; flex-wrap: wrap; }
.pt-filters { display: flex; flex-wrap: wrap; gap: 14px 22px; align-items: center; margin-bottom: 14px; }
.filter-group { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; }
.filter-label { font-size: 12.5px; color: var(--ink-soft); font-weight: 600; }
.chip {
  border: 1px solid var(--line); background: var(--card); border-radius: 999px;
  padding: 9px 16px; font-size: 13.5px; cursor: pointer; color: var(--ink-soft);
  min-height: 40px; transition: all 0.12s; display: inline-flex; align-items: center; gap: 6px;
}
.chip:hover { border-color: var(--blue); color: var(--blue); }
.chip.active { background: var(--blue); border-color: var(--blue); color: white; }

/* --- Khối tóm tắt kết quả — LUÔN đặt ngay trên phần giải thích để mobile
       thấy ngay không cần cuộn --- */
.lab-summary { display: flex; align-items: center; gap: 14px; margin-bottom: 16px; min-height: 58px; }
.lab-badge {
  flex-shrink: 0; width: 58px; height: 58px; border-radius: 14px; display: flex; align-items: center;
  justify-content: center; color: white; font-weight: 700; font-size: 22px;
  font-family: "IBM Plex Mono", monospace; text-align: center; line-height: 1.1; padding: 4px;
}
.lab-summary-title { font-size: 16px; font-weight: 700; }
.lab-summary-tendency { font-size: 14px; font-weight: 600; margin-top: 3px; }
.lab-summary-sub { font-size: 13px; color: var(--ink-soft); margin-top: 2px; }

.lab-cta-btn {
  display: block; width: 100%; padding: 15px; font-size: 16px; font-weight: 700; color: white;
  background: var(--blue); border: none; border-radius: 12px; cursor: pointer; margin-top: 8px;
  min-height: 50px;
}
.lab-cta-btn:disabled { background: #b8bfe0; cursor: not-allowed; }
.lab-cta-btn:hover:not(:disabled) { background: var(--blue-dark); }

/* --- Thẻ chi tiết yếu tố ảnh hưởng --- */
.factor-detail-card { border: 1.5px solid var(--line); border-radius: var(--radius); padding: 16px 18px; margin-top: 4px; }
.factor-detail-row { margin-bottom: 12px; }
.factor-detail-row:last-child { margin-bottom: 0; }
.factor-detail-label { font-size: 12px; font-weight: 700; text-transform: uppercase; letter-spacing: 0.03em; color: var(--blue); margin-bottom: 4px; }
.factor-detail-text { font-size: 14.5px; line-height: 1.6; color: var(--ink); }
.factor-applies { font-size: 12.5px; color: var(--ink-soft); margin: 10px 0 16px; font-style: italic; }

/* --- Panel giải thích từng bước (dùng chung cho cả 2 lab tính toán) --- */
.step-panel .step-line { padding: 10px 0; border-bottom: 1px dashed var(--line); font-size: 14.5px; line-height: 1.6; }
.step-panel .step-line:last-child { border-bottom: none; }

/* --- Tab Lý thuyết --- */
.theory-toc { display: flex; flex-wrap: wrap; gap: 8px; margin-bottom: 24px; }
.theory-toc-item {
  border: 1px solid var(--line); border-radius: 999px; padding: 8px 14px; font-size: 13px;
  color: var(--blue-dark); text-decoration: none; font-weight: 600; background: var(--card);
}
.theory-lesson { margin-bottom: 36px; scroll-margin-top: 16px; }
.theory-lesson-title { font-size: 19px; font-weight: 700; margin-bottom: 12px; border-bottom: 2px solid var(--line); padding-bottom: 8px; }
.theory-body p { line-height: 1.7; margin: 0 0 12px; font-size: 15px; }
.theory-body ul { margin: 0 0 14px; padding-left: 20px; line-height: 1.7; font-size: 15px; }
.theory-body li { margin-bottom: 6px; }
.theory-callout { background: #eef0fa; border-radius: var(--radius); padding: 16px 18px; margin: 16px 0; }
.theory-callout-title { font-weight: 700; margin-bottom: 8px; color: var(--blue-dark); }
.theory-callout ul { margin: 0; padding-left: 20px; }
.theory-callout p:last-child { margin-bottom: 0; }
.theory-table { width: 100%; border-collapse: collapse; margin: 16px 0; font-size: 13.5px; }
.theory-table th, .theory-table td { border: 1px solid var(--line); padding: 10px 12px; text-align: left; vertical-align: top; }
.theory-table th { background: #f5f6fb; font-weight: 700; }
.theory-note { font-size: 13px; color: var(--ink-soft); font-style: italic; }
.theory-link-tab { color: var(--blue); font-weight: 600; text-decoration: none; }
.theory-link-tab:hover { text-decoration: underline; }

/* --- Tab Luyện tập --- */
.practice-count { font-size: 13.5px; color: var(--ink-soft); margin: 4px 0 16px; }
.practice-progress-track { height: 8px; background: #eef0fa; border-radius: 999px; overflow: hidden; margin-bottom: 6px; }
.practice-progress-fill { height: 100%; background: var(--blue); border-radius: 999px; transition: width 0.2s; }
.practice-progress-label { font-size: 12.5px; color: var(--ink-soft); font-weight: 600; margin-bottom: 18px; }

.quiz-card { background: var(--card); border: 1px solid var(--line); border-radius: var(--radius); padding: 20px 18px; }
.quiz-topic { font-size: 12px; font-weight: 700; color: var(--blue); text-transform: uppercase; letter-spacing: 0.03em; margin-bottom: 8px; }
.quiz-question { font-size: 16.5px; font-weight: 600; line-height: 1.5; margin-bottom: 18px; }
.quiz-options { display: flex; flex-direction: column; gap: 10px; }
.quiz-option {
  text-align: left; padding: 13px 16px; border: 1.5px solid var(--line); border-radius: 10px;
  background: var(--card); font-size: 14.5px; cursor: pointer; min-height: 46px; line-height: 1.5;
}
.quiz-option:hover:not(.disabled) { border-color: var(--blue); background: #f5f7ff; }
.quiz-option.disabled { cursor: default; }
.quiz-option.correct { border-color: #2f9e6f; background: #e9f8f1; font-weight: 700; }
.quiz-option.wrong { border-color: #e05263; background: #fdedef; }
.quiz-explain { margin-top: 18px; padding: 14px 16px; border-radius: 12px; background: #f5f6fb; }
.quiz-explain.hidden { display: none; }
.explain-verdict { font-weight: 700; font-size: 14.5px; margin-bottom: 6px; }
.explain-text { font-size: 14px; line-height: 1.6; color: var(--ink); }

.score-wrap { display: flex; flex-direction: column; align-items: center; gap: 10px; margin: 12px 0 24px; }
.score-ring {
  position: relative; width: 130px; height: 130px; border-radius: 50%; display: flex; align-items: center;
  justify-content: center; font-size: 22px; font-weight: 700; color: var(--blue-dark);
  background: conic-gradient(var(--blue) calc(var(--pct) * 1%), #eef0fa 0);
}
.score-ring::before { content: ""; position: absolute; width: 100px; height: 100px; border-radius: 50%; background: var(--card); }
.score-ring span { position: relative; z-index: 1; }
.score-text { font-size: 15px; font-weight: 700; color: var(--ink-soft); }

.review-title { font-weight: 700; margin-bottom: 10px; }
.review-item { border: 1px solid var(--line); border-radius: var(--radius); padding: 14px 16px; margin-bottom: 12px; }
.review-q { font-weight: 600; font-size: 14.5px; margin-bottom: 8px; }
.review-a { font-size: 13.5px; margin-bottom: 4px; }
.wrong-a { color: #e05263; }
.correct-a { color: #2f9e6f; font-weight: 600; }
.review-explain { font-size: 13.5px; color: var(--ink-soft); margin-top: 6px; }

.hidden { display: none; }

@media (max-width: 560px) {
  .form-row { flex-direction: column; gap: 12px; }
  .quiz-question { font-size: 15.5px; }
  .score-ring { width: 110px; height: 110px; font-size: 19px; }
  .score-ring::before { width: 86px; height: 86px; }
  .lab-badge { width: 50px; height: 50px; font-size: 18px; }
}
