/* css/reading-mode.css */
/* Sprint Đọc Báo Interactive — Phase 1 */
/* CSS cho section luyện đọc tiếng Trung bên dưới nội dung bài báo */

/* Container chính — tách biệt với popup-body bằng đường kẻ vàng mờ */
.reading-practice {
  margin-top: 24px;
  padding-top: 20px;
  border-top: 1px solid rgba(255, 215, 0, 0.2);
}

/* Tiêu đề section */
.reading-header {
  font-size: 1rem;
  font-weight: 600;
  color: #c8a84b;
  margin: 0 0 14px 0;
  letter-spacing: 0.02em;
}

/* Mỗi câu luyện đọc — layout cột, click để highlight */
.reading-sentence {
  display: flex;
  flex-direction: column;
  gap: 4px;
  padding: 12px;
  border-radius: 8px;
  border-left: 3px solid transparent;
  cursor: pointer;
  transition: background 0.2s, border-color 0.2s;
  margin-bottom: 8px;
}

.reading-sentence:hover {
  background: rgba(255, 215, 0, 0.05);
}

/* Câu đang được chọn */
.reading-sentence.active {
  background: rgba(255, 215, 0, 0.12);
  border-left-color: #ffd700;
  padding-left: 10px;
}

/* Hàng trên: chữ Trung và nút loa nằm cùng dòng */
.reading-sentence-top {
  display: flex;
  align-items: center;
  gap: 8px;
}

/* Chữ Hán — lớn, rõ, font hỗ trợ CJK */
.reading-zh {
  flex: 1;
  font-size: 1.2rem;
  font-weight: 500;
  color: #f0e6cc;
  font-family: 'Noto Serif SC', 'Source Han Serif', 'SimSun', serif;
  line-height: 1.4;
}

/* Pinyin — nhỏ hơn, màu nhạt */
.reading-py {
  font-size: 0.85rem;
  color: #aaa;
  line-height: 1.3;
}

/* Nghĩa tiếng Việt — italic, màu muted */
.reading-vi {
  font-size: 0.9rem;
  color: #888;
  font-style: italic;
  line-height: 1.3;
}

/* Nút phát âm 🔊 */
.tts-btn {
  flex-shrink: 0;
  margin-left: auto;
  background: transparent;
  border: 1px solid rgba(255, 215, 0, 0.3);
  color: #ffd700;
  border-radius: 50%;
  width: 32px;
  height: 32px;
  cursor: pointer;
  font-size: 0.85rem;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: background 0.15s, border-color 0.15s;
  line-height: 1;
}

.tts-btn:hover {
  background: rgba(255, 215, 0, 0.15);
  border-color: rgba(255, 215, 0, 0.6);
}

/* Engine tự thêm/xóa class này khi đang phát */
.tts-btn.tts-loading {
  opacity: 0.5;
  cursor: default;
}

/* ── Mobile ─────────────────────────────────────────────── */
@media (max-width: 767px) {
  .reading-zh {
    font-size: 1.05rem;
  }

  .reading-sentence {
    padding: 10px;
  }

  .reading-sentence.active {
    padding-left: 8px;
  }
}
