/* ============================================================
   TOCFL LISTENING (js/tocfl.js) — ngang hàng với các cấp HSK
   - 2 nút "TOCFL A LISTENING" / "TOCFL B LISTENING" cạnh nhau (nút bấm thường, nút của
     kỳ thi đang làm sáng xanh)
   - Ô "Chọn nội dung": dùng lại y nguyên dropdown của "Chọn bài" (.lesson-select-wrap /
     .lesson-toggle / .lesson-menu / .lesson-option) nên cùng cỡ chữ, cùng kiểu bảng chọn
   - Thẻ câu hỏi: tên phần, ảnh đề, audio, nút A/B/C(/D), Kiểm tra / Câu tiếp theo
   ============================================================ */

.tocfl-area{
  display:flex;
  flex-direction:column;
  gap:10px;
  width:100%;
  margin:10px 0 0;
}

/* 2 nút kỳ thi (TOCFL A / TOCFL B) nằm cạnh nhau, chia đều bề ngang. */
.tocfl-btns{
  display:grid;
  grid-template-columns:repeat(2,minmax(0,1fr));
  gap:10px;
}
/* Cùng khung với các nút chế độ / "Khoá học": cao 48px, viền xanh, chữ 14px. */
.tocfl-btn{
  width:100% !important;
  height:48px !important;
  min-height:48px !important;
  margin:0 !important;
  padding:0 12px !important;
  display:flex !important;
  align-items:center !important;
  justify-content:center !important;
  box-sizing:border-box !important;
  border:1px solid #145A32 !important;
  border-radius:10px !important;
  background:#fff !important;
  color:#111 !important;
  font-family:'Nunito',Arial,sans-serif !important;
  font-size:14px !important;
  line-height:22px !important;
  font-weight:400 !important;
  cursor:pointer;
}
.tocfl-btn.active{
  background:#145A32 !important;
  border-color:#145A32 !important;
  color:#fff !important;
}

/* Ô "Chọn nội dung": cỡ chữ y như #lessonToggle (rule đó khoá bằng ID ở patches.css). */
#tocflPartToggle{
  font-family:'Nunito',Arial,sans-serif !important;
  font-size:14px !important;
  line-height:22px !important;
  font-weight:400 !important;
}
.tocfl-part-wrap{ margin:0 !important; }
/* Dòng báo "đang cập nhật" trong bảng chọn (kỳ thi chưa có dữ liệu) — không bấm được. */
.tocfl-menu-empty{ color:#888 !important; cursor:default !important; background:#fff !important; }

/* ---- Thẻ câu hỏi ---- */
#app .card.tocfl-card .tocfl-title{
  font-size:18px !important;
  line-height:26px !important;
  font-weight:500 !important;
  text-align:center;
  align-self:center;
}
.tocfl-question-img{
  display:block;
  max-width:100%;
  max-height:340px;
  width:auto;
  height:auto;
  align-self:center;
  object-fit:contain;
}
/* Nhóm câu (TOCFL B): mỗi câu 1 khối "Câu k" + audio câu hỏi + nút đáp án, xếp dọc. */
#app .card.tocfl-card .tocfl-subs{
  display:flex;
  flex-direction:column;
  gap:18px;
  width:100%;
  align-self:center;
}
#app .card.tocfl-card .tocfl-sub{
  display:flex;
  flex-direction:column;
  align-items:center;
  gap:10px;
}
#app .card.tocfl-card .tocfl-sub .listening-audio{ margin:0 !important; }
#app .card.tocfl-card .tocfl-options{
  align-self:center;
  justify-content:center;
}
#app .card.tocfl-card .tocfl-options .option{
  width:38px;
  height:38px;
}
#app .card.tocfl-card .tocfl-feedback{
  display:flex;
  align-items:center;
  justify-content:center;
  min-height:27px;
  line-height:27px;
  font-weight:600;
}
/* Dòng "Chính xác" / "Chưa chính xác" — cùng màu, cùng độ đậm với #feedback của Trắc nghiệm. */
#app .card.tocfl-card .tocfl-feedback{ font-weight:400; font-size:16px !important; }
#app .card.tocfl-card .tocfl-feedback.feedback-correct{ color:#145A32 !important; font-weight:700 !important; }
#app .card.tocfl-card .tocfl-feedback.feedback-wrong{ color:#b94a48 !important; font-weight:700 !important; }

/* Đúng/sai sau khi Kiểm tra: giống hệt Trắc nghiệm — đáp án đúng nền trắng, chữ đậm, viền
   xanh 2px; đáp án chọn sai nền hồng nhạt, viền đỏ (rule .option.correct/.wrong chung ở
   base.css + patches.css), không ghi đè riêng. */

/* Kiểm tra / Câu tiếp theo xếp dọc như mẫu. */
#app .card.tocfl-card .tocfl-actions{
  display:flex !important;
  flex-direction:column !important;
  align-items:stretch !important;
  gap:10px !important;
  width:100% !important;
  max-width:540px !important;
  align-self:center;
}
#app .card.tocfl-card .tocfl-actions button{
  width:100%;
  margin:0 !important;
}
