/* ===================== GENERAL HEADING STYLE ===================== */
#lesson-container h2,
#lesson-container h3,
#lesson-container h4 {
  font-weight: 600;
  color: #00b300;
  display: flex;
  align-items: center;
  gap: 8px;
  margin-top: 15px;
  margin-bottom: 12px;
}

/* Biểu tượng trước tiêu đề theo cấp */
#lesson-container h2::before {
  content: '📘';
  font-size: 24px;
}
#lesson-container h3::before {
  content: '✍️';
  font-size: 22px;
	margin-bottom: 8px;
}


/* Kích thước tiêu đề */
#lesson-container h2 {
  font-size: 26px;
}
#lesson-container h3 {
  font-size: 22px;
}
#lesson-container h4 {
  font-size: 20px;
	  line-height: 1.4 !important;
	margin-bottom: 8px;
}

/* Sub intro dưới mỗi tiêu đề */
.lesson-subintro {
  font-size: 16px;
  font-style: italic;
  color: #555;
  margin-bottom: 16px;
}


<style>
/* ==================== GLOBAL LAYOUT ==================== */

.section-box {
  background-color: #f9fdf9;
  border-radius: 12px;
  padding: 10px;
  box-shadow: 0 3px 10px rgba(0, 0, 0, 0.1);

  margin-bottom: 40px;
}

.section-divider {
  height: 1px;
	width: 80%;
  background: linear-gradient(to right, #ccc, #eee, #ccc);
  margin: 32px auto;
  border: none;
  opacity: 1;
}


.highlight {
  background: #e6ffe6;
  padding: 2px 4px;
  border-radius: 4px;
}

.lesson-title {
  font-size: 28px;
  font-weight: bold;
  color: #00b300;
  margin-bottom: 16px;
  display: flex;
  align-items: center;
  gap: 8px;
}

.lesson-title::before {
  content: '📘';
}

h3 {
  font-size: 22px;
  margin-top: 24px;
  margin-bottom: 12px;
  color: #333;
}
</style>


.lesson-title {
    font-size: 30px;
    font-weight: bold;
    margin-bottom: 20px;
    color: #00b300;
}

/* Container đoạn văn: fixed height + scroll */
.lesson-paragraph-container {
    max-height: 650px;
    overflow-y: auto;
    padding: 10px;
    border-radius: 8px;
    border: 1px solid #eee;
    background-color: #fff;
  box-shadow: 0 3px 10px rgba(0, 0, 0, 0.1);
}

/* Bubble đoạn văn */
.lesson-paragraph-container .lesson-bubble {
    max-width: 100%;
    margin: 8px auto;
    background-color: #18a55a;
    padding: 15px;
    border-radius: 12px;
  box-shadow: 0 3px 10px rgba(0, 0, 0, 0.1);
}

.lesson-chat-container {
    display: flex;
    flex-direction: column;
    gap: 20px;
    padding: 15px;
    border-radius: 12px;
    border: 1px solid #eee;
    background-color: #fff;
    max-height: 650px;
    overflow-y: auto;
  box-shadow: 0 3px 10px rgba(0, 0, 0, 0.1);

}

.lesson-bubble {
  max-width: 90%;
  position: relative;
  padding: 12px 16px;
  border-radius: 25px;
  box-shadow: 0 2px 6px rgba(0, 0, 0, 0.05);
  font-size: 1.1em;
  line-height: 1.6;
  word-break: break-word;
}

/* Bên trái - Người nói số 0 */
.lesson-bubble[data-speaker-index="0"] {
  align-self: flex-start;
  background-color: #007173; /* Xanh lơ */
  border-top-left-radius: 2px;
}


/* Bên phải - Người nói số 1 */
.lesson-bubble[data-speaker-index="1"] {
  align-self: flex-end;
  background-color: #18a55a; /* Xanh lá */
  border-top-right-radius: 2px;
}



.bubble-speaker {
    font-style: normal;
    color: #777;
    margin-bottom: 4px;
    display: block;
}

.bubble-text {
    margin-bottom: 6px;
    font-size: 16px;
    line-height: 1.5;
    color: #fff;
}


.lesson-bubble .lesson-bubble-icons span {
    cursor: pointer;
    font-size: 15px;
}



/* Action icons */
.lesson-bubble-icons {
    display: flex;
    gap: 12px;
    margin-top: 4px;
}

.lesson-bubble-icons span {
    cursor: pointer;
    transition: transform 0.2s;
}

.lesson-bubble-icons span:hover {
    transform: scale(1.2);
}

/* Translation + Explanation text */
.translation-text {
    margin-top: 6px;
    font-size: 15px;
    color: #555;
    background: #f9f9f9;
    padding: 6px 10px;
    border-radius: 6px;
}

/* Xóa shadow ngoài elementor */
.elementor-shortcode {
    box-shadow: none !important;
    border: none;
}

/* Vocabulary Table */
.vocabulary-table {
    width: 100%;
    border-collapse: separate;
    border-spacing: 0;
    border-radius: 10px;
    overflow: hidden;
    background: #fff;
  box-shadow: 0 3px 10px rgba(0, 0, 0, 0.1);
    margin-top: 16px;
}

/* Bo tròn header table */
.vocabulary-table thead th:first-child {
    border-top-left-radius: 5px;
}
.vocabulary-table thead th:last-child {
    border-top-right-radius: 5px;
}

/* Cell table */
.vocabulary-table th,
.vocabulary-table td {
    border: 1px solid #ddd;
    padding: 8px;
    text-align: center;
}

/* Table header */
.vocabulary-table th {
    background-color: #18a55a;
    color: white;
    font-weight: bold;
}

/* Hàng xen kẽ */
.vocabulary-table tr:nth-child(even) {
    background-color: #f9f9f9;
}

/* Hover row */
.vocabulary-table tr:hover {
    background-color: #e8f5e9;
    transition: background 0.2s;
}

/* Cố định height các row */
.vocabulary-table td {
    height: 50px;
    vertical-align: middle;
}

/* Ô cuối cùng của bảng: giữ width hợp lý hơn */
.vocabulary-table td:last-child {
    width: 50px; /* tăng hơn 40px một chút */
    text-align: center;
    white-space: nowrap; /* chống xuống dòng */
}

/* Icon audio */
.vocabulary-table td .icon-audio {
    display: inline-flex;
    width: 20px;
    height: 20px;
    justify-content: center;
    align-items: center;
    cursor: pointer;
    transition: transform 0.2s;
    text-decoration: none;
    font-size: 17px; /* fix size nếu dùng emoji hoặc icon font */
    line-height: 1;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: clip;
}

.vocabulary-table td .icon-audio:hover {
    transform: scale(1.2);
}

.exercise-section {
    margin-bottom: 15px;
    padding: 20px;
    background: #fff;
    border-radius: 10px;
  box-shadow: 0 3px 10px rgba(0, 0, 0, 0.1);
}

.exercise-section h4 {
    color: #00b300;
	margin-top: 2px; /* Giảm bớt khoảng trống đầu */
    margin-bottom: 8px;
}

.exercise-section p {
    font-style: italic;
	margin-top: 8px;
    margin-bottom: 12px;
}

.exercise-section ul {
    margin-bottom: 12px;
    padding-left: 20px;
}

.exercise-section textarea {
    width: 100%;
    min-height: 100px;
    border: 1px solid #ddd;
    padding: 10px;
    border-radius: 6px;
}

.exercise-section button.show-answer {
    margin-top: 10px;
    padding: 6px 12px;
    background: #00b300;
    border: none;
    color: #fff;
    border-radius: 4px;
    cursor: pointer;
    transition: background 0.3s;
}

.exercise-section button.show-answer:hover {
    background: #009900;
}

.exercise-answer {
    margin-top: 10px;
    background: #f9f9f9;
    padding: 10px;
    border-radius: 6px;
    border: 1px solid #eee;
}

.grammar-list {
    margin-top: 10px;
    background: #fff;
    padding: 20px;
    border-radius: 10px;
  box-shadow: 0 3px 10px rgba(0, 0, 0, 0.1);
}

.lesson-grammar h2 {
    color: #00b300;
    margin-bottom: 12px;
}

.lesson-grammar ul {
    padding-left: 20px;
    line-height: 1.6;
}

.lesson-grammar li {
    margin-bottom: 8px;
}

lesson-subtitle {
    font-size: 22px; !important;
    font-style: italic; !important;
    font-weight: 500; !important;
    color: #00b300; !important;
    margin-bottom: 6px;
}

.lesson-subintro {
    font-size: 16px;
    font-style: italic;
    color: #555;
    margin-bottom: 16px;
}

.grammar-item {
  margin-bottom: 16px;
  line-height: 1.6;
  font-size: 16px;
}

.grammar-example {
  margin-left: 16px;
  color: #333;
  font-style: normal;
}

.elementor-shortcode {
  padding: 0rem !important;
}


.explanation-text {
  margin-top: 12px;
  padding: 10px;
  background: #f9f9ff;
  border: 1px solid #008c7f;
  border-left: 4px solid #008c7f;
  border-radius: 8px;
  font-size: 15px;
  line-height: 1.6;
  color: #333;
  white-space: pre-wrap;
  animation: fadeIn 0.3s ease-in-out;
}

@keyframes fadeIn {
  from { opacity: 0; transform: translateY(5px); }
  to { opacity: 1; transform: translateY(0); }
}

.explanation-text strong {
  color: #00b300;
}

//Layout Nhap text
.lesson-overview.element.style {
    display: flex;
}

.lesson-overview .two-column-layout {
  display: flex !important;
  gap: 24px;
  align-items: stretch; /* Giúp 2 column có cùng chiều cao */
  width: 100%;
  flex-wrap: nowrap;
}

.lesson-overview .column.left {
	width: 67%;
}

.lesson-overview .column.right {
  width: 33%;
}

/* ✨ Chiều cao đầy đủ cho textarea */
.lesson-overview .user-note {
  width: 100%;
  height: 100%;
  padding: 12px;
	font-weight: 300px;
  font-size: 1rem;
  border: 1px solid #ccc;
  border-radius: 6px;
	margin-bottom: 12px;
  resize: vertical;
  box-sizing: border-box;
}

/* 📱 Mobile responsive */
@media (max-width: 768px) {
  .lesson-overview .two-column-layout {
    flex-direction: column;
  }

	.lesson-bubble {
    max-width: 97%;
  }
	
  .lesson-overview .column.left,
  .lesson-overview .column.right {
    width: 100%;
  }

  .lesson-overview .user-note {
    height: 150px;
  }
}

.speed-control {
  margin: 16px 0;
  font-size: 16px;
}

.speed-control select {
  padding: 4px 8px;
  font-size: 15px;
	margin-top: 10px;
    margin-bottom: 5px;
}

.lesson-pages-wrapper {
  position: relative !important;
  padding-bottom: 40px !important;
  min-height: 400px !important;
	  padding: 25px 25px;
  border-radius: 25px;
  box-shadow: 0 3px 10px rgba(0, 0, 0, 0.1);
}

.flip-corner-button {
  display: flex;
  justify-content: flex-end;
  padding: 12px 16px;
}

.flip-corner-button button {
	margin-top:12px;
  background-color: #0e9c00;
  border: 1px solid #b7b7b7;
  border-radius: 20px;
  padding: 6px 14px;
  font-size: 16px;
  font-weight: 300;
  cursor: pointer;
  transition: background-color 0.2s ease;
}

.flip-corner-button button:hover {
  background-color: #12ca00;
}


.translated-page.hidden-by-default {
  display: none;
}

.translated-page .translated-list {
  padding: 20px;
}


.vietnamese-line {
  display: block;
  margin-bottom: 4px;
  font-weight: 300;
  color: #111;
}

.reverse-line {
  display: flex;
  align-items: center;
  gap: 6px;
}



.reverse-input:focus {
  border-bottom: 2px solid #007bff;
}

input.reverse-input {
  border: none !important;
  border-bottom: 1px solid #ccc !important;
  margin-bottom: 10px !important;
  border-radius: 0 !important;
  padding: 2px 4px;
  background: transparent;
  box-shadow: none;
  outline: none;
}

.check-answer-btn {
  background: transparent;
  border: none;
  font-size: 16px;
  cursor: pointer;
  padding: 4px 8px;
  border-radius: 6px;
  transition: background 0.2s ease;
}

.check-answer-btn:hover {
  background: #f0f0f0;
}
.reverse-line {
  display: flex;
  align-items: center;
  gap: 6px;
  margin-top: 4px;
  flex-wrap: wrap;
}

.reverse-input {
  flex: 1;
  padding: 4px 8px;
  border: 1px solid #ccc;
  border-radius: 4px;
  font-size: 14px;
  min-width: 200px;
}


.comparison span {
  margin-right: 1px;
  font-family: monospace;
  font-size: 14px;
}

.compare-result {
  display: none;
  margin-top: 8px;
  background: #EEF3F8;
  padding: 15px 20px;
  border-radius: 8px;
  font-size: 16px;
  line-height: 1.6;
  width: fit-content;
  max-width: 100%;
	opacity: 0;
  transition: opacity 0.3s ease-in;
}

.compare-result.show {
  display: block;
  opacity: 1;
}


.translated-item {
  margin-bottom: 25px;
}

.reverse-line {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-wrap: wrap; /* ✅ Cho phép xuống dòng */
}

.compare-result small {
  font-size: 100% !important;
  color: #372e2e;
}

textarea::placeholder {
  font-weight: 300 !important;
}

input.reverse-input::placeholder {
  font-weight: 300;
  color: #999; /* màu nhẹ cho dễ đọc, tùy chọn */
}

/* Roles Play */
.bubble-line {
  background: #f0f0f0;
  padding: 12px;
  margin-bottom: 10px;
  border-radius: 12px;
  max-width: 90%;
}
.ai-bubble {
  background-color: #e3f2fd;
}
.user-bubble {
  background-color: #fff8e1;
}
.hint-bubble {
  background-color: #f9fbe7;
  font-style: italic;
  opacity: 0.85;
}

