/* Listening Module Styles - Yulzari Brand */

.sec-outer[data-sec="listening"] .sec-inner {
  font-family: var(--font-b);
  background: var(--bg);
  color: var(--text);
  height: calc(100vh - 46px);
  display: flex;
  flex-direction: column;
  overflow: hidden;
}

/* ──── SELECTOR SCREEN ──── */
#selScreen {
  position: absolute;
  inset: 0;
  background: var(--bg);
  z-index: 900;
  display: flex;
  flex-direction: column;
  overflow-y: auto;
}

.sel-body {
  padding: 40px 24px;
  max-width: 1000px;
  margin: 0 auto;
  width: 100%;
}

.sel-subtitle {
  font-size: 16px;
  color: var(--text2);
  margin-bottom: 32px;
  max-width: 600px;
}

.test-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
  gap: 20px;
}

.test-card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 24px;
  cursor: pointer;
  transition: all 0.2s;
  box-shadow: var(--shadow-sm);
}

.test-card:hover {
  border-color: var(--accent);
  box-shadow: var(--shadow);
  transform: translateY(-4px);
}

.test-card.resume-card {
  border: 2px solid #1a73e8;
  background: #e8f0fe;
}
.test-card.resume-card .tc-book { color: #1a73e8; }

.tc-book {
  font-size: 11px;
  font-weight: 700;
  color: var(--text3);
  text-transform: uppercase;
  letter-spacing: 1px;
  margin-bottom: 8px;
}

.tc-name {
  font-size: 18px;
  font-weight: 700;
  color: var(--navy);
  margin-bottom: 6px;
}

.tc-topics {
  font-size: 13px;
  color: var(--text2);
  line-height: 1.5;
  margin-bottom: 16px;
}

.tc-btn {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 8px 16px;
  background: var(--accent);
  color: white;
  border-radius: 50px;
  font-size: 13px;
  font-weight: 700;
  transition: background 0.2s;
}

/* ──── TEST UI ──── */
/* Topbar, bottom bar, part tabs, qstrip, nav arrows —
   now use shared .it-topbar / .it-botbar classes from reading.css */

/* ──── AUDIO BAR (always on top) ──── */
.audio-bar {
  background: #1e293b;
  padding: 12px 24px;
  flex-shrink: 0;
  border-bottom: 2px solid #0ea5e9;
}

.audio-bar-inner {
  display: flex;
  align-items: center;
  gap: 16px;
}

.audio-bar-meta {
  min-width: 0;
  flex-shrink: 0;
}

.audio-bar-part-label {
  font-size: 10px;
  font-weight: 700;
  color: #94a3b8;
  text-transform: uppercase;
  letter-spacing: 1.5px;
  margin-bottom: 2px;
}

.audio-bar-topic {
  font-size: 14px;
  font-weight: 700;
  color: white;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  max-width: 260px;
}

.ts-toggle-btn {
  background: rgba(255,255,255,.08);
  border: 1px solid rgba(255,255,255,.15);
  color: #94a3b8;
  padding: 4px 12px;
  border-radius: 4px;
  cursor: pointer;
  font-size: 11px;
  font-weight: 600;
  white-space: nowrap;
  flex-shrink: 0;
  transition: all 0.2s;
}

.ts-toggle-btn:hover { background: rgba(255,255,255,.15); color: white; }

.audio-bar-desc {
  font-size: 12px;
  color: #64748b;
  margin-top: 4px;
  font-style: italic;
}

/* ──── LISTEN FROM HERE ──── */
.listen-here-wrap {
  margin: 20px 0 4px;
  display: flex;
  align-items: center;
  gap: 12px;
}

.listen-here-wrap::after {
  content: '';
  flex: 1;
  height: 1px;
  background: #e2e8f0;
}

.listen-here-wrap.first {
  margin-top: 0;
}

.listen-here-btn {
  background: #eff6ff;
  border: 1.5px solid #bfdbfe;
  color: #2563eb;
  padding: 5px 14px;
  border-radius: 50px;
  font-size: 12px;
  font-weight: 700;
  cursor: pointer;
  transition: all 0.2s;
  white-space: nowrap;
  flex-shrink: 0;
}

.listen-here-btn:hover { background: #dbeafe; border-color: #93c5fd; transform: scale(1.03); }

/* Current part question buttons */
.qbtn.cur-part { border-color: #93c5fd; background: #eff6ff; color: #2563eb; }

/* ──── AUDIO PANEL ──── */
.ap-title {
  font-size: 11px;
  font-weight: 700;
  color: var(--text3);
  text-transform: uppercase;
  letter-spacing: 1.5px;
  padding-bottom: 12px;
  border-bottom: 1px solid var(--border);
  margin-bottom: 16px;
}

.pt-name {
  font-size: 20px;
  font-weight: 800;
  color: var(--navy);
  margin-bottom: 4px;
  font-family: var(--font-d);
}

.pt-desc {
  font-size: 14px;
  color: var(--text2);
  margin-bottom: 24px;
  line-height: 1.5;
}

.aud-card {
  background: var(--navy);
  border-radius: var(--radius);
  padding: 20px;
  margin-bottom: 16px;
  box-shadow: var(--shadow);
}

.aud-lbl {
  font-size: 11px;
  font-weight: 700;
  color: var(--accent-lt);
  letter-spacing: 1.5px;
  text-transform: uppercase;
  margin-bottom: 12px;
}

.aud-note {
  font-size: 12px;
  color: #94a3b8;
  margin-top: 12px;
  line-height: 1.5;
}

.aud-note b { color: var(--accent-lt); }

/* Map images */
.map-img-wrap {
  margin: 12px 0;
  padding: 12px;
  background: #fff;
  border: 1px solid #ddd;
  border-radius: 6px;
  text-align: center;
}
.map-img {
  max-width: 100%;
  height: auto;
  filter: contrast(1.1) brightness(1.03);
}

.ts-btn {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-size: 13px;
  font-weight: 600;
  color: var(--accent);
  cursor: pointer;
  padding: 10px 16px;
  background: var(--accent-lt);
  border-radius: var(--radius-sm);
  border: 1px solid rgba(5, 150, 105, 0.2);
  margin-bottom: 12px;
  transition: all 0.2s;
}

.ts-btn:hover { background: #bdf6dd; }

.ts-box {
  display: none;
  background: var(--bg);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  padding: 16px;
  font-size: 14px;
  line-height: 1.8;
  color: var(--text2);
  max-height: 400px;
  overflow-y: auto;
}

.ts-box.open { display: block; }
.sp { font-weight: 700; color: var(--accent); }
.ts-hint { font-size: 12px; color: var(--text3); margin-top: 8px; font-style: italic; }

/* ──── QUESTIONS ──── */
.q-grp { margin-bottom: 32px; }
.q-grp-title {
  font-size: 15px;
  font-weight: 700;
  color: var(--navy);
  margin-bottom: 8px;
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.bm { font-size: 20px; cursor: pointer; color: var(--text3); margin-left: auto; transition: color 0.2s; }
.bm.on { color: var(--gold); }
.q-grp-instr {
  font-size: 13px;
  color: var(--text2);
  line-height: 1.6;
  margin-bottom: 16px;
  padding: 10px 14px;
  background: var(--surface2);
  border-left: 3px solid var(--accent);
  border-radius: 0 var(--radius-sm) var(--radius-sm) 0;
}

.q-grp-instr b { color: var(--navy); font-weight: 700; }

/* Note / Table completion — official IELTS style */
.note-box {
  background: #fff;
  border: 1px solid #ccc;
  border-radius: 4px;
  padding: 20px 24px;
}

.note-hdg {
  font-size: 18px;
  font-weight: 700;
  color: #000;
  margin-bottom: 16px;
  text-align: center;
  padding-bottom: 12px;
  border-bottom: 2px solid #333;
}

.note-sub {
  font-size: 14px;
  font-weight: 700;
  color: #333;
  margin: 20px 0 8px;
  padding: 4px 0;
  border-bottom: 1px solid #999;
}

.note-row {
  display: flex;
  align-items: baseline;
  gap: 8px;
  padding: 10px 0 10px 12px;
  border-bottom: 1px solid #eee;
  font-size: 15px;
  line-height: 1.7;
}
.note-row:last-child { border-bottom: none; }

.note-row-text {
  padding: 6px 0 6px 12px;
  font-size: 14px;
  color: #555;
}

.nlbl { color: #333; flex: 1; }

/* Gap input — matches official IELTS CD style */
.iinput {
  display: inline-block;
  border: 1px solid #999;
  border-radius: 2px;
  padding: 5px 8px;
  font-size: 14px;
  font-family: inherit;
  color: #000;
  outline: none;
  background: #fff;
  transition: border-color 0.2s;
  width: 140px;
  text-align: center;
  vertical-align: baseline;
}

.iinput:focus { border-color: #1a73e8; box-shadow: 0 0 0 2px rgba(26,115,232,0.15); }
.iinput.answered { border-color: #1a73e8; background: #f0f6ff; }
.iinput.correct { border-color: #34a853 !important; background: #e6f4ea !important; font-weight: 600; }
.iinput.wrong { border-color: #ea4335 !important; background: #fce8e6 !important; }
/* Note rendered as table */
.note-table {
  width: 100%;
  border-collapse: collapse;
  margin: 8px 0;
}
.note-table td {
  border: 1px solid #ddd;
  padding: 10px 14px;
  vertical-align: top;
  font-size: 14px;
  line-height: 1.7;
}
.note-table-label {
  font-weight: 600;
  color: #333;
  white-space: nowrap;
  width: 30%;
  background: #fafafa;
}
.note-table .note-row { padding: 4px 0; border-bottom: none; }
.note-table .note-row-text { padding: 2px 0; color: #555; }

.hint { font-size: 13px; color: #34a853; font-weight: 700; }

.hint-wrapper { margin-top: 8px; }
.exp-box {
  margin-top: 6px;
  background: #f8fafc;
  border: 1px solid #e2e8f0;
  border-radius: 6px;
  padding: 10px 14px;
  font-size: 12px;
  color: var(--text2);
  line-height: 1.5;
}
.exp-box b { color: var(--navy); }

/* Table Questions */
.table-wrap {
  margin-top: 16px;
  overflow-x: auto;
  background: white;
  border: 1px solid var(--border);
  border-radius: var(--radius);
}

.table-wrap table {
  width: 100%;
  border-collapse: collapse;
  font-size: 14px;
}

.table-wrap th {
  background: var(--surface2);
  color: var(--navy);
  font-weight: 700;
  text-align: left;
  padding: 12px 16px;
  border-bottom: 2px solid var(--border);
}

.table-wrap td {
  padding: 12px 16px;
  border-bottom: 1px solid var(--border);
  color: var(--text2);
  line-height: 1.5;
  vertical-align: top;
}

.table-wrap tr:last-child td { border-bottom: none; }

.table-wrap .iinput {
  width: 100%;
  min-width: 80px;
  margin: 4px 0;
}

/* MCQ */
.mcq-item { margin-bottom: 20px; }
.mcq-stem { font-size: 15px; color: var(--text); line-height: 1.6; margin-bottom: 12px; }
.mcqn { font-weight: 700; color: var(--accent); font-family: var(--font-m); }

.mcq-opt {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 10px 16px;
  border: 1.5px solid var(--border);
  border-radius: 50px;
  cursor: pointer;
  font-size: 14px;
  color: var(--text2);
  margin-bottom: 8px;
  transition: all 0.2s;
  user-select: none;
  background: white;
}

.mcq-opt:hover { border-color: var(--accent); background: var(--accent-lt); }
.mcq-opt.sel { border-color: var(--accent); background: var(--accent-lt); color: var(--accent); font-weight: 600; }
.mcq-opt.correct { border-color: var(--success)!important; background: var(--accent-lt)!important; color: var(--success)!important; font-weight: 700; }
.mcq-opt.wrong { border-color: var(--danger)!important; background: #fee2e2!important; color: var(--danger)!important; }

.mdot {
  width: 18px;
  height: 18px;
  border: 2px solid var(--border);
  border-radius: 50%;
  flex-shrink: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: all 0.2s;
}

.mcq-opt.sel .mdot { border-color: var(--accent); background: var(--accent); }
.mcq-opt.sel .mdot::after, .mcq-opt.correct .mdot::after { content:''; width:6px; height:6px; border-radius:50%; background:white; }

/* Choose TWO */
.c2-stem { font-size: 15px; color: var(--navy); line-height: 1.6; margin-bottom: 8px; font-weight: 600; }
.c2-limit { font-size: 12px; color: var(--text3); margin-bottom: 12px; font-style: italic; }

.c2-opt {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 10px 16px;
  border: 1.5px solid var(--border);
  border-radius: var(--radius-sm);
  cursor: pointer;
  font-size: 14px;
  color: var(--text2);
  margin-bottom: 8px;
  transition: all 0.2s;
  user-select: none;
  background: white;
}

.c2-opt:hover { border-color: var(--accent2); background: var(--accent2-lt); }
.c2-opt.checked { border-color: var(--accent2); background: var(--accent2-lt); color: var(--accent2); font-weight: 600; }
.c2-opt.correct { border-color: var(--success)!important; background: var(--accent-lt)!important; color: var(--success)!important; font-weight: 700; }

.cbox {
  width: 18px;
  height: 18px;
  border: 2px solid var(--border);
  border-radius: 4px;
  flex-shrink: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: all 0.2s;
  font-size: 10px;
  color: white;
  font-weight: 900;
}

.c2-opt.checked .cbox { background: var(--accent2); border-color: var(--accent2); }
.c2-opt.correct .cbox { background: var(--success); border-color: var(--success); }

/* Matching */
.match-box { background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius); overflow: hidden; }
.match-legend { background: var(--surface2); border-bottom: 1px solid var(--border); padding: 16px; }
.match-legend-title { font-size: 11px; font-weight: 700; color: var(--text3); text-transform: uppercase; letter-spacing: 1px; margin-bottom: 10px; }
.legend-opts { display: flex; flex-wrap: wrap; gap: 8px 20px; }
.legend-opt { font-size: 13px; color: var(--text2); display: flex; gap: 6px; }
.legend-opt b { color: var(--accent); font-family: var(--font-m); }

.match-row { display: flex; align-items: center; gap: 12px; padding: 12px 16px; border-bottom: 1px dashed var(--border); font-size: 14px; }
.msel {
  border: 1.5px solid var(--border);
  border-radius: var(--radius-sm);
  padding: 6px 10px;
  font-size: 14px;
  font-family: var(--font-b);
  color: var(--text);
  outline: none;
  background: white;
  cursor: pointer;
  min-width: 64px;
  transition: all 0.2s;
}

.msel:focus { border-color: var(--accent); box-shadow: 0 0 0 3px var(--accent-lt); }
.msel.answered { border-color: var(--text3); background: var(--surface2); }

/* Bottom bar uses shared .it-botbar from reading.css.
   Override qbtn review states for listening. */
.qbtn.correct { background: var(--success, #34a853); border-color: var(--success, #34a853); color: white; }
.qbtn.wrong { background: var(--danger, #ea4335); border-color: var(--danger, #ea4335); color: white; }

/* pulse-highlight → see global.css */

/* Custom scrollbar for Q Strip */
#lQStrip::-webkit-scrollbar { height: 4px; }
#lQStrip::-webkit-scrollbar-track { background: #e2e8f0; }
#lQStrip::-webkit-scrollbar-thumb { background: #94a3b8; border-radius: 4px; }

/* Topbar uses shared .it-topbar from reading.css */

/* .modal → see global.css */

.scn { font-size: 32px; font-weight: 800; color: var(--navy); font-family: var(--font-m); }
.band-box {
  background: linear-gradient(135deg, var(--navy) 0%, var(--accent2) 100%);
  border-radius: var(--radius);
  padding: 24px;
  margin-bottom: 24px;
  box-shadow: 0 8px 20px rgba(15, 23, 42, 0.2);
}

.bandn { font-size: 56px; font-weight: 900; color: white; font-family: var(--font-m); }
.bandl { color: var(--accent2-lt); font-weight: 600; text-transform: uppercase; letter-spacing: 1px; }

/* ── RESPONSIVE DESIGN ── */
@media (max-width: 768px) {
  .audio-bar { padding: 10px 12px; }
  .audio-bar-inner { flex-wrap: wrap; gap: 8px; }
  .audio-bar-topic { max-width: 200px; }

  #qScroll { padding: 20px 16px; }
}

@media (max-width: 480px) {
  .iinput { width: 100%; }
  .mcq-opt, .c2-opt { padding: 8px 12px; font-size: 13px; }
}
