/* ============================================================
   CSS riêng cho Hóa học 10 - Chương 7 (Nhóm VIIA - Halogen).
   Chỉ chứa các lớp KHÔNG có sẵn trong assets/css/tool-common.css
   (topbar/brand/tabs/panel/step-panel/step-line/detail-*/essay-*/
   trend-chart/trend-item/trend-bar-track/trend-bar/trend-symbol/
   trend-value... đã dùng chung với Chương 1, 2, không lặp lại ở đây).
   ============================================================ */

/* --- Lọ hoá chất F2/Cl2/Br2/I2 (Tổng quan + Trạng thái vật lí) --- */
.halogen-jars { display: flex; gap: 18px; flex-wrap: wrap; margin: 18px 0; }
.jar { display: flex; flex-direction: column; align-items: center; gap: 8px; min-width: 90px; }
.jar-body { width: 64px; height: 64px; border-radius: 12px; opacity: 0.85; border: 2px solid rgba(0,0,0,0.08); }
.jar-gas .jar-body { border-radius: 50%; opacity: 0.55; }
.jar-liquid .jar-body { border-radius: 8px 8px 20px 20px; }
.jar-solid .jar-body { border-radius: 4px; opacity: 1; }
.jar-label { font-family: "IBM Plex Mono", monospace; font-weight: 700; font-size: 14px; color: var(--ink, #1b2130); }
.jar-state { font-size: 12px; color: var(--ink-soft); text-align: center; }

/* --- Mindmap rút gọn (tab Tổng quan) --- */
.mindmap-lite { margin: 24px 0; text-align: center; }
.mm-root {
  display: inline-block; background: var(--blue); color: #fff; font-weight: 700;
  padding: 10px 22px; border-radius: 10px; font-family: "IBM Plex Mono", monospace;
}
.mm-branches { display: flex; justify-content: center; gap: 40px; margin-top: 18px; flex-wrap: wrap; }
.mm-branch { display: flex; flex-direction: column; align-items: center; gap: 4px; max-width: 260px; }
.mm-node {
  background: var(--card); border: 1px solid var(--line); border-radius: 8px;
  padding: 8px 14px; font-size: 13.5px; color: var(--ink, #1b2130);
}
.mm-arrow { color: var(--ink-soft); font-size: 14px; }

/* --- Mô hình nguyên tử (lớp vỏ electron) --- */
.atom-visual { display: flex; justify-content: center; padding: 12px 0; }
.atom-meta { max-width: 480px; margin: 0 auto; }

/* --- Cầu thang tính oxi hoá --- */
.oxidizing-stairs { display: flex; flex-direction: column; gap: 10px; margin-top: 12px; max-width: 480px; }
.stair-row { display: flex; align-items: center; gap: 10px; }
.stair-label { width: 44px; font-family: "IBM Plex Mono", monospace; font-weight: 700; color: var(--ink, #1b2130); }
.stair-bar { height: 22px; border-radius: 6px 0 0 6px; }

/* --- Ống nghiệm nhận biết ion (AgNO3) --- */
.test-tubes { display: flex; gap: 18px; flex-wrap: wrap; margin-top: 16px; }
.tube { display: flex; flex-direction: column; align-items: center; gap: 8px; cursor: pointer; width: 130px; }
.tube-label { font-family: "IBM Plex Mono", monospace; font-size: 13px; font-weight: 700; color: var(--ink, #1b2130); }
.tube-glass {
  width: 40px; height: 90px; border: 2px solid var(--line); border-top: none;
  border-radius: 0 0 16px 16px; display: flex; align-items: flex-end; overflow: hidden;
  background: #fafbff;
}
.tube-liquid { width: 100%; height: 55%; background: #d7e3ff; transition: background 0.3s; }
.tube-liquid.has-precipitate { height: 75%; }
.tube-liquid.no-precipitate { opacity: 0.4; }
.tube-result { font-size: 11.5px; color: var(--ink-soft); text-align: center; min-height: 32px; }

/* --- Controls chung cho các nút chọn halogen/H2/... ---
   Dùng class riêng .choice-btn (thay vì chọn theo thẻ <button> trần) và thêm
   !important cho color/background/width để KHÔNG bị các rule global của
   tool-common.css (vd "button { width:100%; ... }" dùng cho form khác) đè mất
   chữ hoặc làm nút giãn full-width — đây chính là lỗi "nút trống trơn, xếp
   dọc" đã gặp ở tab Tác dụng với H2. */
.controls {
  display: flex !important; flex-wrap: wrap; align-items: center; gap: 10px; margin: 10px 0;
}
.controls .choice-btn,
.controls button {
  display: inline-flex !important; align-items: center; justify-content: center;
  width: auto !important; flex: 0 0 auto !important;
  border: 1.5px solid var(--line, #d8dbe8) !important;
  background: var(--card, #ffffff) !important;
  color: var(--ink, #1b2130) !important;
  border-radius: 8px; padding: 8px 14px; font-size: 13px; line-height: 1.3;
  cursor: pointer; transition: all 0.12s;
}
.controls .choice-btn:hover,
.controls button:hover { border-color: var(--blue, #4d7cf0) !important; color: var(--blue, #4d7cf0) !important; }
.controls .choice-btn.active,
.controls button.active {
  background: var(--blue, #4d7cf0) !important; border-color: var(--blue, #4d7cf0) !important;
  color: #fff !important;
}
.controls select {
  width: auto !important;
  border: 1.5px solid var(--line, #d8dbe8) !important; border-radius: 8px;
  padding: 7px 10px; font-size: 13px; background: var(--card, #fff) !important;
  color: var(--ink, #1b2130) !important;
}

/* --- Trắc nghiệm (PHP-only, không qua bảng SQL questions/exams) --- */
.quiz-list { display: flex; flex-direction: column; gap: 16px; margin-top: 16px; }
.quiz-card {
  background: var(--card, #fff); border: 1px solid var(--line, #d8dbe8);
  border-radius: var(--radius, 12px); padding: 16px 18px;
}
.quiz-q-head { display: flex; justify-content: space-between; gap: 10px; margin-bottom: 8px; }
.quiz-q-index { font-family: "IBM Plex Mono", monospace; font-weight: 700; color: var(--ink, #1b2130); }
.quiz-q-level { font-size: 11.5px; color: var(--ink-soft, #5b6478); background: #eef0fa; padding: 2px 9px; border-radius: 999px; }
.quiz-q-content { font-size: 14.5px; color: var(--ink, #1b2130); margin-bottom: 10px; }
.quiz-options { display: flex; flex-direction: column; gap: 8px; }
.quiz-option {
  display: flex !important; align-items: center; gap: 10px; text-align: left;
  width: 100% !important; border: 1.5px solid var(--line, #d8dbe8) !important;
  background: var(--card, #fff) !important; color: var(--ink, #1b2130) !important;
  border-radius: 8px; padding: 9px 12px; font-size: 13.5px; cursor: pointer;
}
.quiz-option:hover { border-color: var(--blue, #4d7cf0) !important; }
.quiz-option.correct { border-color: #2ea043 !important; background: #eaf7ee !important; color: #1c6b30 !important; }
.quiz-option.wrong { border-color: #e0524a !important; background: #fdecea !important; color: #a3271f !important; }
.quiz-option .opt-key { font-family: "IBM Plex Mono", monospace; font-weight: 700; }
.quiz-explain {
  margin-top: 10px; font-size: 13px; color: var(--ink-soft, #5b6478);
  background: #f7f8fc; border-radius: 8px; padding: 10px 12px; display: none;
}
.quiz-explain.shown { display: block; }
.quiz-locked {
  position: relative; background: var(--card, #fff); border: 1.5px dashed var(--line, #d8dbe8);
  border-radius: var(--radius, 12px); padding: 22px 18px; text-align: center; color: var(--ink-soft, #5b6478);
}
.quiz-locked .lock-icon { font-size: 22px; margin-bottom: 6px; }
.quiz-locked a { color: var(--blue, #4d7cf0); font-weight: 700; text-decoration: none; }
.quiz-score-bar {
  display: flex; align-items: center; justify-content: space-between; gap: 10px;
  background: var(--card, #fff); border: 1px solid var(--line, #d8dbe8);
  border-radius: var(--radius, 12px); padding: 12px 16px; margin-bottom: 16px;
  font-size: 13.5px; color: var(--ink, #1b2130);
}
