.module-container {
  width: 100%;
  /* overflow: hidden; */
}

.container-mindmap {
  flex: 1;
  display: flex;
  flex-direction: column;
  height: 100vh;
  transition: all 0.3s ease;
  position: relative;
}

#mindMapContainer {
  flex: 1;
  background: #fff !important;
  position: relative;
  overflow: hidden;
}

.learning-space-container #mindMapContainer {
  background: rgb(68, 68, 68, 0.1) !important;
}

#mindMapContainer svg {
  height: 100% !important;
}

#mindMapContainer .smm-quick-create-child-btn {
  cursor: pointer;
}

.progress-wrapper {
  padding: 12px 24px;
  font-size: 14px;
  font-weight: 500;
}

.progress-wrapper .badge {
  background-color: #17726d;
  font-size: 12px;
  color: #fff;
  font-weight: 500;
  border-radius: 16px;
  padding: 8px 12px;
}

.btn-back-dashboard {
  position: absolute;
  top: 10px;
  left: 10px;
  z-index: 1000;
  background-color: white;
  color: #4a5565;
  padding: 6px 16px;
  text-decoration: none;
  border-radius: 8px;
  box-shadow: 0 2px 5px rgba(0, 0, 0, 0.2); /* Tạo bóng đổ nhẹ */
  font-family: Arial, sans-serif;
  font-size: 12px;
  border: 1px solid rgb(229 231 235);
  transition: all 0.3s ease;
}

.container-mindmap .progress-wrapper {
  position: absolute;
  top: 10px;
  right: 10px;
  z-index: 1000;
  background-color: white;
  color: #4a5565;
  padding: 6px 16px;
  text-decoration: none;
  border-radius: 8px;
  box-shadow: 0 2px 5px rgba(0, 0, 0, 0.2); /* Tạo bóng đổ nhẹ */
  font-size: 12px;
  border: 1px solid rgb(229 231 235);
  transition: all 0.3s ease;
}

.module-container .cert-alert-modern {
  position: absolute;
  top: 20px;
  right: 20px;
  z-index: 1000;
  background-color: white;
  color: #4a5565;
  padding: 6px 16px;
  text-decoration: none;
  border-radius: 8px;
  box-shadow: 0 2px 5px rgba(0, 0, 0, 0.2); /* Tạo bóng đổ nhẹ */
  font-size: 12px;
  border: 1px solid rgb(229 231 235);
  transition: all 0.3s ease;
}

.cert-alert-modern {
  background-color: #ecfdf5;
  border-left: 4px solid #10b981;
  padding: 16px 20px;
  border-radius: 4px;
  margin-bottom: 20px;
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.1);
}

.btn-get-cert {
  color: #059669;
  font-weight: 600;
  text-decoration: none;
  font-size: 14px;
  padding: 6px 12px;
  border-radius: 4px;
  background: rgba(16, 185, 129, 0.1);
  transition: all 0.2s;
}

.btn-get-cert:hover {
  background: rgba(16, 185, 129, 0.2);
  color: #047857;
}

.block-zoom {
  position: absolute;
  bottom: 16px;
  right: 16px;
  z-index: 1000;
}

.floating-btn-ai {
  position: fixed;
  bottom: 80px;
  right: 30px;
  z-index: 1000;
  background: #17726d;
  color: white;
  height: 50px;
  display: flex;
  align-items: center;
  padding: 0 12px;
  border-radius: 25px;
  cursor: pointer;
  box-shadow: 0 4px 10px rgba(23, 114, 109, 0.4);
  overflow: hidden;
  font-size: 12px;
}

.floating-btn-ai svg {
  flex-shrink: 0;
  transition: transform 0.4s ease;
}

/* --- TRẠNG THÁI HOVER --- */
.floating-btn-ai:hover {
  box-shadow: 0 8px 20px rgba(23, 114, 109, 0.5);
  padding-right: 20px;
}

.floating-btn-ai:hover .btn-text {
  max-width: 200px;
  opacity: 1;
}

.ic-zoom {
  padding: 8px 12px;
  background-color: #fff;
  border-radius: 8px;
  cursor: pointer;
}

.lesson-container .section-header {
  border-bottom: 1px solid #e9eef1;
  padding: 16px 24px;
}

.section-header .lesson-title {
  color: #000;
  font-size: 18px;
  font-weight: 700;
  line-height: 150%;
  margin-right: 24px;
}

.section-content .block-content {
  padding: 24px;
}

.lesson-container,
.assessment-container {
  overflow: hidden;
  position: relative;
}

.section-header {
  flex-shrink: 0;
  padding: 16px;
  background: #fff;
  border-bottom: 1px solid #eee;
}

.section-content {
  flex: 1;
  display: flex;
  flex-direction: column;
  overflow: auto;
  height: 90vh;
  position: relative;
  scrollbar-width: thin;
  scrollbar-color: #ccc #f1f1f1;
}

/* --- CHAT POPUP CONTAINER --- */
.chat-popup {
  height: 100%;
  background: #fff;
  box-shadow: 0 12px 28px rgba(0, 0, 0, 0.15);
  display: flex;
  flex-direction: column;
  overflow: hidden;
  z-index: 999;
  opacity: 1;
  visibility: visible;
  transition: all 0.3s cubic-bezier(0.25, 0.8, 0.25, 1);
}

.chat-popup.active {
  opacity: 1;
  transform: translateY(0) scale(1);
  visibility: visible;
}

/* --- 1. HEADER (Cập nhật màu nền) --- */
.chat-header {
  /* Dùng màu #17726D */
  background: #17726d;
  color: white;
  padding: 15px 20px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-shrink: 0;
}

.header-info {
  display: flex;
  align-items: center;
  gap: 10px;
  font-weight: 600;
}

.status-dot {
  width: 8px;
  height: 8px;
  background: #4ade80; /* Giữ màu xanh lá cho trạng thái Online */
  border-radius: 50%;
  display: inline-block;
  margin-left: 5px;
  box-shadow: 0 0 5px #4ade80;
}

.close-btn {
  background: none;
  border: none;
  color: white;
  cursor: pointer;
  opacity: 0.8;
  padding: 0;
  transition: 0.2s;
}

/* --- 2. BODY --- */
.chat-body {
  flex: 1;
  background: #f8f9fa;
  padding: 20px;
  overflow-y: auto;
  display: flex;
  flex-direction: column;
  gap: 15px;
}

.message {
  max-width: 80%;
  display: flex;
  flex-direction: column;
}

.message-content {
  padding: 10px 14px;
  border-radius: 12px;
  font-size: 14px;
  line-height: 1.5;
  position: relative;
}

.message-time {
  font-size: 11px;
  color: #9ca3af;
  margin-top: 4px;
}

/* Tin nhắn AI (Bên trái - Giữ nền trắng) */
.ai-message {
  align-self: flex-start;
}
.ai-message .message-content {
  background: #fff;
  color: #374151;
  border: 1px solid #e5e7eb;
  border-bottom-left-radius: 2px;
}

/* Tin nhắn User (Bên phải - Cập nhật màu #17726D) */
.user-message {
  align-self: flex-end;
  align-items: flex-end;
}
.user-message .message-content {
  background: #17726d; /* Màu nền tin nhắn user */
  color: white;
  border-bottom-right-radius: 2px;
}

/* Typing Indicator */
.typing-indicator span {
  display: inline-block;
  width: 6px;
  height: 6px;
  background: #ccc;
  border-radius: 50%;
  margin: 0 2px;
  animation: bounce 1.4s infinite ease-in-out both;
}
.typing-indicator span:nth-child(1) {
  animation-delay: -0.32s;
}
.typing-indicator span:nth-child(2) {
  animation-delay: -0.16s;
}
@keyframes bounce {
  0%,
  80%,
  100% {
    transform: scale(0);
  }
  40% {
    transform: scale(1);
  }
}

/* --- 3. FOOTER (INPUT) --- */
.chat-footer {
  padding: 15px;
  background: #fff;
  border-top: 1px solid #eee;
  display: flex;
  gap: 10px;
  align-items: center;
}

#chatInput {
  flex: 1;
  border: 1px solid #e5e7eb;
  border-radius: 20px;
  padding: 10px 15px;
  outline: none;
  font-size: 14px;
  transition: 0.2s;
}

/* Đổi màu viền khi focus */
#chatInput:focus {
  border-color: #17726d;
}

.send-btn {
  background: #17726d; /* Nút gửi màu Teal */
  border: none;
  width: 36px;
  height: 36px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition: 0.2s;
  flex-shrink: 0;
}

/* Hover nút gửi tối đi một chút */
.send-btn:hover {
  background: #125b57;
  transform: scale(1.1);
}

.block-content__file {
  background-color: rgb(248, 249, 250);
  border-bottom-left-radius: 12px;
  border-bottom-right-radius: 12px;
}

.block-content__title {
  padding: 12px;
}

.block-note {
  border: 1px solid #e0e0e0;
  border-radius: 12px;
}

.block-note__header .badge {
  color: #4a5565;
  font-size: 12px;
  padding: 0px !important;
}

.block-note__header {
  background-color: #f3f4f5;
  border-top-left-radius: 12px;
  border-top-right-radius: 12px;
  padding: 16px 12px;
  border-bottom: 1px solid #e0e0e0;
}

/* Container của form thêm ghi chú */
.note-form-container,
#dynamic-edit-form {
  background: #fff;
  border: 1px solid #e0e0e0;
  border-radius: 12px;
  padding: 20px;
  margin-top: 15px;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.05);
  animation: fadeIn 0.3s ease;
}

/* Header: Tiêu đề + Nút đóng */
.note-form-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 15px;
}
.note-form-header h4 {
  margin: 0;
  font-size: 16px;
  font-weight: 600;
  color: #333;
}
.note-close-btn {
  cursor: pointer;
  color: #999;
  font-size: 18px;
}
.note-close-btn:hover {
  color: #333;
}

/* Khu vực nhập thời gian (2 cột) */
.note-time-row {
  display: flex;
  gap: 12px;
}
.note-input-group {
  flex: 1;
  display: flex;
  flex-direction: column;
}
.note-label {
  font-size: 12px;
  color: #666;
  margin-bottom: 5px;
  font-weight: 600;
}
.note-input-wrapper {
  position: relative;
}
.note-input-wrapper i,
.note-input-wrapper span {
  /* Icon đồng hồ */
  position: absolute;
  left: 10px;
  top: 50%;
  transform: translateY(-50%);
  color: #999;
}
.note-input {
  width: 100%;
  padding: 8px 10px 8px 30px; /* Chừa chỗ cho icon */
  border: 1px solid #dfe1e5;
  border-radius: 6px;
  background: #f8f9fa;
  font-size: 14px;
  color: #4a5565;
  outline: none;
}

/* Textarea nội dung */
.note-textarea {
  width: 100%;
  height: 80px;
  padding: 10px;
  border: 1px solid #dfe1e5;
  border-radius: 8px;
  resize: none;
  font-size: 14px;
  outline: none;
  background: #fff;
  color: #4a5565;
  margin-bottom: 15px;
}
.note-textarea::placeholder {
  color: #aaa;
}

/* Footer buttons */
.note-actions {
  display: flex;
  justify-content: flex-end;
  gap: 12px;
}

@keyframes fadeIn {
  from {
    opacity: 0;
    transform: translateY(-10px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

/* Container của từng Note Item */
.note-item {
  background: #e8f3f2;
  border-radius: 12px;
  padding: 12px;
  margin-bottom: 12px;
  position: relative; /* Để căn chỉnh nút Edit/Delete */
  transition: all 0.2s ease;
  box-shadow: 0 2px 5px rgba(0, 0, 0, 0.05);
  font-size: 12px;
}

.note-item:hover {
  box-shadow: 0 4px 8px rgba(0, 0, 0, 0.1);
}

/* Header: Badge thời gian + Nút hành động */
.note-item-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 10px;
  height: 28px; /* Cố định chiều cao để không bị nhảy layout */
}

.list-note {
  padding: 0px 16px;
}

/* Badge thời gian*/
.note-time-badge {
  background: #eef0ff;
  color: #17726d;
  border-radius: 6px;
  font-size: 12px;
  font-weight: 600;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  gap: 6px;
  transition: background 0.2s;
}

.note-time-badge:hover {
  background: #dfe2ff;
}

/* Nội dung ghi chú */
.note-item-content {
  font-size: 13px;
  color: #4a5565;
  line-height: 1.5;
  word-wrap: break-word;
}

/* --- HIỆU ỨNG HOVER CHO NÚT SỬA/XÓA --- */
.note-item-actions {
  display: flex;
  gap: 12px;
  transition:
    opacity 0.2s ease,
    visibility 0.2s;
}

.action-icon {
  cursor: pointer;
  color: #999;
  font-size: 16px;
}
.action-icon:hover {
  color: #17726d;
}

/* Container chính */
.lesson-overview-wrapper {
  background-color: #e7f0f0;
  padding: 24px;
  box-shadow: 0 2px 4px rgba(0, 0, 0, 0.05);
  border: 1px solid #e9eef1;
  display: flex;
  flex-direction: column;
  gap: 12px;
  margin: 24px 24px 0px 24px;
  border-radius: 16px;
}

/* Header: Icon + Title */
.overview-header {
  display: flex;
  align-items: center;
  gap: 8px;
  color: #17726d;
  font-weight: 700;
}

.overview-header h3 {
  margin: 0;
  font-size: 16px;
  font-weight: 700;
  text-transform: uppercase;
}

.overview-content {
  font-size: 14px;
  line-height: 1.6;
  color: #333;
  transition: all 0.3s ease;
  position: relative;
}

.overview-content.collapsed {
  display: -webkit-box;
  -webkit-line-clamp: 3;
  line-clamp: 3;
  -webkit-box-orient: vertical;
  overflow: hidden;
  /* -webkit-mask-image: linear-gradient(180deg, #000 60%, transparent);
  mask-image: linear-gradient(180deg, #000 60%, transparent); */
}

/* Trạng thái MỞ RỘNG */
.overview-content.expanded {
  display: block;
  -webkit-line-clamp: unset;
  line-clamp: unset;
  -webkit-mask-image: none;
  mask-image: none;
}

/* Nút bấm Toggle */
.btn-toggle-overview {
  background: none;
  border: none;
  color: #17726c;
  font-size: 13px;
  font-weight: 600;
  cursor: pointer;
  padding: 8px 0 0 0;
  display: flex;
  align-items: center;
  gap: 4px;
  transition: color 0.2s;
}

.btn-toggle-overview:hover {
  color: #1e7e34;
}

/* Xoay icon mũi tên khi mở ra */
.btn-toggle-overview .btn-icon {
  transition: transform 0.3s ease;
}

.btn-toggle-overview.active .btn-icon {
  transform: rotate(180deg); /* Xoay ngược mũi tên lên */
}

.note-actions button {
  font-size: 12px !important;
  padding: 8px !important;
  border-radius: 12px !important;
  min-width: 100px;
}

.sticky-bar {
  min-height: 50px;
  width: 100%;
  background-color: #fff;
  color: #4a5565;
  display: flex;
  flex-direction: column;
  padding: 12px;
  z-index: 100;
  box-shadow: 0 -2px 10px rgba(0, 0, 0, 0.1);
  flex-shrink: 0;
  position: relative;
  align-items: center;
}

.sticky-content {
  flex: 1;
  padding: 0 24px;
  display: flex;
  align-items: center;
  justify-content: space-between;
}

/* --- THANH PROGRESS BAR --- */
.progress-track {
  width: 100%;
  height: 2px;
  background-color: #f0f0f0;
  position: absolute;
  top: -2px;
  left: 0;
  z-index: 101;
}

.progress-fill {
  width: 0%;
  height: 100%;
  background-color: #4ade80;
  transition: width 0.2s linear;
}

.sticky-bar .progress-wrapper {
  font-size: 12px;
  display: flex;
  flex-direction: column;
  gap: 8px;
  padding: 4px;
}

.section-header .badge {
  padding: 4px 8px;
  border-radius: 40px;
  font-size: 12px;
  font-weight: 500;
  line-height: 150%;
}

.section-header .status-completed {
  background-color: #d0fae5;
  color: #007a55;
}

.section-header .status-in-progress {
  background-color: #fef3c6;
  color: #bb4d00;
}

.section-header .status-not-started {
  background-color: #ffe4e6;
  color: #c70036;
}

/* .smm-node.node-locked {
  pointer-events: auto;
}

.smm-node.node-locked > *:not(.node-status-icon) {
  opacity: 0.6;
  filter: grayscale(100%);
} */
.smm-node.node-locked {
  /* opacity: 0.6; */
  /* filter: grayscale(100%); */
  pointer-events: auto;
}

.smm-node.node-locked > *:not(.node-status-icon) {
  opacity: 0.6;
  filter: grayscale(100%);
}

/* Container bao ngoài, mặc định ẩn, z-index cao nhất */
.drawer-wrapper {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  z-index: 9999;
  visibility: hidden; /* Ẩn */
  transition: visibility 0.3s;
}

/* Khi có class .open thì hiện */
.drawer-wrapper.open {
  visibility: visible;
}

/* Panel nội dung chính */

/* --- MINDMAP TOGGLE --- */
.btn-toggle-mindmap {
  /* Reset absolute logic for header placement */
  position: relative;
  width: 32px;
  height: 32px;
  background: transparent;
  border: 1px solid #e5e7eb;
  border-radius: 6px;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition: all 0.2s ease;
  color: #6b7280;
}

.btn-toggle-mindmap:hover {
  background: #f9fafb;
  color: #17726d;
}

/* Collapsed State */
.mindmap-collapsed .container-mindmap {
  width: 0 !important;
  min-width: 0 !important;
  overflow: hidden;
  padding: 0;
  opacity: 0;
}

.mindmap-collapsed .learning-container,
.mindmap-collapsed .assessment-container {
  width: 100% !important;
}

/* Move button to left when collapsed */
.mindmap-collapsed .btn-toggle-mindmap {
  left: 0;
}

/* Rotate icon */
.mindmap-collapsed .btn-toggle-mindmap svg {
  transform: rotate(180deg);
}

.module-container.learning-space-container {
  position: relative; /* Anchor for absolute button */
}

.drawer-panel {
  position: absolute;
  top: 71px;
  right: 0;
  bottom: 64px;
  width: 35%;
  max-width: 90%;
  background: #fff;
  box-shadow: -4px 0 16px rgba(0, 0, 0, 0.1);
  transform: translateX(100%); /* Đẩy hết sang phải để ẩn */
  transition: transform 0.3s cubic-bezier(0.4, 0, 0.2, 1);
  display: flex;
  flex-direction: column;
}

/* Khi open thì trượt về 0 */
.drawer-wrapper.open .drawer-panel {
  transform: translateX(0);
}

/* Header & Body styling */
.drawer-header {
  padding: 16px 24px;
  border-bottom: 1px solid #e5e7eb;
}
.drawer-body {
  padding: 24px;
  overflow-y: auto;
  flex: 1;
}
.btn-close-drawer {
  background: transparent;
  border: none;
  cursor: pointer;
  padding: 4px;
  border-radius: 4px;
}
.btn-close-drawer:hover {
  background: #f3f4f6;
}

/* Styling cho Item Rec */
.rec-item {
  padding: 10px;
  border: 1px solid #e5e7eb;
  border-radius: 8px;
  transition: all 0.2s;
}
.rec-item:hover {
  border-color: #17726d;
  background: #f0fdfa;
}
.rec-name {
  font-weight: 700;
  font-size: 14px;
  color: #111827;
}
.rec-sub {
  font-size: 12px;
  color: #6b7280;
}
.rec-thumb {
  width: 36px;
  height: 36px;
  padding: 8px;
  background: #f3f4f6;
  border-radius: 4px;
  display: flex;
  align-items: center;
  justify-content: center;
}

.text-truncate-1 {
  display: -webkit-box;
  -webkit-line-clamp: 1;
  line-clamp: 1;
  -webkit-box-orient: vertical;
  overflow: hidden;
  text-overflow: ellipsis;
}

.text-truncate-2 {
  display: -webkit-box;
  -webkit-line-clamp: 2;
  line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
  text-overflow: ellipsis;
}

.text-truncate-3 {
  display: -webkit-box;
  -webkit-line-clamp: 3;
  line-clamp: 3;
  -webkit-box-orient: vertical;
  overflow: hidden;
  text-overflow: ellipsis;
}

/* Container của footer cần flex để căn chỉnh */
.chat-footer {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 10px;
  background: #fff;
  border-top: 1px solid #eee;
  /* position: relative; đã set inline trong HTML để định vị popup */
}

/* Style cho nút Menu 3 gạch */
.menu-btn {
  background: none;
  border: none;
  cursor: pointer;
  padding: 8px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: background 0.2s;
}

.menu-btn:hover {
  background-color: #f0f2f5;
}

/* Style cho Popup FAQs */
.faq-popup {
  position: absolute;
  bottom: 100%; /* Hiển thị phía trên footer */
  left: 10px; /* Canh trái */
  width: 250px;
  background: white;
  border-radius: 12px;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
  border: 1px solid #e0e0e0;
  margin-bottom: 10px; /* Cách footer một chút */

  /* Ẩn mặc định */
  display: none;
  opacity: 0;
  transform: translateY(10px);
  transition:
    opacity 0.3s,
    transform 0.3s;
  z-index: 100;
}

/* Class để kích hoạt hiển thị */
.faq-popup.show {
  display: block;
  opacity: 1;
  transform: translateY(0);
}

/* Class active - hiển thị popup */
.faq-popup.active {
  display: block;
  opacity: 1;
  transform: translateY(0);
}

/* Header của Popup */
.faq-header {
  padding: 12px 16px;
  font-weight: 600;
  font-size: 14px;
  color: #333;
  border-bottom: 1px solid #eee;
  background-color: #f9fafb;
  border-radius: 12px 12px 0 0;
}

/* Danh sách câu hỏi */
.faq-list {
  list-style: none;
  margin: 0;
  padding: 0;
  max-height: 200px; /* Giới hạn chiều cao nếu nhiều câu hỏi */
  overflow-y: auto;
}

.faq-list li {
  padding: 10px 16px;
  font-size: 13px;
  color: #4a5565;
  cursor: pointer;
  border-bottom: 1px solid #f0f0f0;
  transition: background 0.2s;
}

.faq-list li:last-child {
  border-bottom: none;
  border-radius: 0 0 12px 12px;
}

.faq-list li:hover {
  background-color: #f0f9ff;
  color: #17726d; /* Màu chủ đạo của bạn */
}

/* Style cho input để nó chiếm hết khoảng trống còn lại */
#chatInput {
  flex: 1;
  /* Các style cũ của bạn giữ nguyên */
}

/* --- CONTAINER BAO NGOÀI --- */
.faq-suggestion-container {
  background-color: #f8f9fa; /* Nền xám rất nhạt để tách biệt với chat */
  border-radius: 12px;
  padding: 16px;
  margin: 10px 0 20px 0;
  border: 1px solid #e9ecef; /* Viền mờ */
}

/* --- DÒNG TIÊU ĐỀ (LABEL) --- */
.faq-label {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 13px;
  font-weight: 600;
  color: #6c757d; /* Màu chữ xám trung tính */
  margin-bottom: 12px;
  text-transform: uppercase; /* Chữ in hoa cho tiêu đề nhỏ */
  letter-spacing: 0.5px;
}

/* Icon bóng đèn */
.faq-icon {
  color: #ffc107;
  filter: drop-shadow(0 2px 4px rgba(255, 193, 7, 0.3));
}

/* --- DANH SÁCH CÁC NÚT (LIST) --- */
.faq-chips-list {
  display: flex;
  flex-direction: column; /* Xếp dọc cho dễ đọc (hoặc row nếu muốn xếp ngang) */
  gap: 10px;
}

/* --- NÚT CÂU HỎI (CHIP) --- */
.faq-chip {
  background-color: #ffffff;
  border: 1px solid #e0e0e0;
  color: #495057;

  padding: 10px 16px;
  border-radius: 8px; /* Bo góc vừa phải */

  font-size: 14px;
  line-height: 1.4;
  text-align: left;

  cursor: pointer;
  transition: all 0.25s cubic-bezier(0.25, 0.8, 0.25, 1); /* Chuyển động mượt */

  /* Đổ bóng nhẹ tạo chiều sâu */
  box-shadow: 0 2px 4px rgba(0, 0, 0, 0.03);

  /* Đảm bảo text không bị tràn */
  white-space: normal;
  word-break: break-word;
  width: 100%;

  /* Layout bên trong nút (để thêm icon mũi tên nếu cần sau này) */
  display: flex;
  justify-content: space-between;
  align-items: center;
}

/* --- HIỆU ỨNG HOVER (KHI DI CHUỘT) --- */
.faq-chip:hover {
  border-color: #2e8b57; /* Viền chuyển màu xanh */
  background-color: #f1f8e9; /* Nền chuyển xanh rất nhạt */
  color: #1b5e20; /* Chữ đậm hơn */

  /* Nút nổi lên một chút */
  transform: translateY(-2px);
  box-shadow: 0 4px 8px rgba(46, 139, 87, 0.15);
}

/* --- HIỆU ỨNG ACTIVE (KHI BẤM) --- */
.faq-chip:active {
  transform: translateY(0);
  background-color: #e8f5e9;
  box-shadow: none;
}

/* Thêm một icon nhỏ (mũi tên ảo) bằng CSS after để gợi ý bấm vào */
.faq-chip::after {
  content: "➔"; /* Mũi tên nhỏ */
  font-size: 12px;
  opacity: 0;
  transform: translateX(-10px);
  transition: all 0.2s ease;
  color: #2e8b57;
}

.faq-chip:hover::after {
  opacity: 1;
  transform: translateX(0);
}

.badge-assessment {
  background-color: #e9ecef;
  color: #495057;
  font-size: 12px;
  font-weight: 600;
  padding: 4px 8px;
  border-radius: 8px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  line-height: 1;
  border: 1px solid #dee2e6;
  white-space: nowrap;
}

/* --- CSS CHO TOOLTIP MỚI --- */
#smm-custom-tooltip {
  position: fixed;
  z-index: 9999;
  background: #fff;
  border: 0;
  border-radius: 12px;
  box-shadow:
    0 10px 25px 4px rgba(0, 0, 0, 0.1),
    0 8px 10px -6px rgba(0, 0, 0, 0.1);
  padding: 16px;
  min-width: 240px;
  display: none;
  pointer-events: none;
}

/* 1. Phần Tổng quan (Header) */
.tooltip-overall {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 12px;
  padding-bottom: 12px;
  border-bottom: 1px solid #f0f0f0;
}

.tooltip-overall .label {
  font-size: 12px;
  font-weight: 600;
  color: #64748b;
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

.tooltip-overall .value {
  font-size: 12px;
  font-weight: 700;
  color: #17726d; /* Màu Brand */
}

/* 2. Các dòng chi tiết (Lesson/Assessment) */
.stat-row {
  display: flex;
  align-items: center;
  margin-bottom: 8px;
  gap: 8px;
}
.stat-row:last-child {
  margin-bottom: 0;
}

/* Icon bên trái */
.stat-icon {
  width: 32px;
  height: 32px;
  border-radius: 8px;
  background-color: #f1f5f9; /* Xám nhạt nền icon */
  display: flex;
  align-items: center;
  justify-content: center;
  color: #475569;
  flex-shrink: 0;
}

/* Phần nội dung giữa (Tên + Bar) */
.stat-content {
  flex-grow: 1;
}

.stat-header {
  display: flex;
  justify-content: space-between;
  font-size: 12px;
}
.stat-name {
  font-weight: 500;
  color: #334155;
}
.stat-percent {
  font-weight: 600;
  color: #334155;
  font-size: 12px;
}

/* --- 1. SETUP KHUNG CUỘN (SCROLL CONTAINER) --- */
.overview-container {
  height: 85vh; /* Chiều cao cố định */
  overflow-y: auto; /* Chỉ cuộn dọc */
  padding-right: 8px; /* Tránh nội dung dính sát thanh cuộn */

  /* Scrollbar đẹp (như đã làm ở bước trước) */
  scrollbar-width: thin;
  scrollbar-color: #cbd5e1 #f1f5f9;
  padding: 24px;
}
.overview-container::-webkit-scrollbar {
  width: 6px;
}
.overview-container::-webkit-scrollbar-track {
  background: #f1f5f9;
  border-radius: 4px;
}
.overview-container::-webkit-scrollbar-thumb {
  background: #cbd5e1;
  border-radius: 4px;
}
.overview-container::-webkit-scrollbar-thumb:hover {
  background: #17726d;
}

/* --- 2. WRAPPER (LAYOUT) --- */
.overview-wrapper {
  display: flex;
  flex-direction: column;
  gap: 24px; /* Khoảng cách giữa các Card lớn hơn (24px) cho thoáng */
  padding-bottom: 40px; /* Khoảng đệm dưới cùng */
}

/* --- 3. INFO CARD (GIAO DIỆN KHỐI) --- */
.info-card {
  background: #ffffff;
  border-radius: 12px;
  border: 1px solid #e2e8f0; /* Viền xám rất nhạt */
  box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.05); /* Đổ bóng nhẹ hiện đại */
  overflow: hidden;
}

/* Header của Card */
.card-header {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 16px 20px;
  background-color: #f8fafc;
  border-bottom: 1px solid #e2e8f0;
}

.header-icon {
  color: #17726d;
  display: flex;
  align-items: center;
}

.header-title {
  font-size: 16px;
  font-weight: 700;
  color: #4a5565;
  margin: 0;
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

/* Body của Card */
.card-body {
  padding: 20px;
  color: #4a5565;
  font-size: 14px;
  line-height: 1.5;
}

/* Lưới hiển thị các luật */
.rule-grid {
  display: grid;
  grid-template-columns: 1fr 1fr; /* Chia 2 cột trên PC */
  gap: 16px;
}

@media (max-width: 768px) {
  .rule-grid {
    grid-template-columns: 1fr;
  } /* 1 cột trên Mobile */
}

/* Từng dòng luật */
.rule-item {
  display: flex;
  align-items: flex-start;
  gap: 12px;
  padding: 12px;
  background-color: #f8fafc;
  border-radius: 8px;
  border: 1px solid #e2e8f0;
}

/* Riêng dòng GPA quan trọng thì highlight nền vàng nhạt */
.rule-item.highlight-rule {
  background-color: #fffbeb;
  border-color: #fcd34d;
  /* grid-column: span 2; Chiếm trọn 2 cột để gây chú ý */
}
@media (max-width: 768px) {
  .rule-item.highlight-rule {
    grid-column: span 1;
  }
}

.rule-icon {
  background: #fff;
  padding: 6px;
  border-radius: 6px;
  box-shadow: 0 1px 2px rgba(0, 0, 0, 0.05);
  display: flex;
}

.rule-content strong {
  display: block;
  font-size: 14px;
  color: #334155;
  margin-bottom: 4px;
}

.rule-content p {
  font-size: 13px;
  color: #64748b;
  margin: 0;
  line-height: 1.4;
}

/* Badge con số % */
.badge-rule {
  display: inline-block;
  padding: 2px 6px;
  border-radius: 4px;
  font-weight: 700;
  font-size: 12px;
  background-color: #e0f2f1; /* Xanh nhạt */
  color: #17726d;
  border: 1px solid #b2dfdb;
  margin-top: 6px;
}

.btn-open-assistant {
  width: 32px;
  height: 32px;
  background: #fff;
  border: none !important;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  color: #4a5565;
  transition: all 0.2s ease;
  margin-left: 8px; /* Spacing from badge */
}

.badge-rule.warning {
  background-color: #fef3c7; /* Vàng nhạt */
  color: #d97706;
  border-color: #fcd34d;
}

.header-bar {
  padding: 10px 20px;
  background: #fff;
  border-bottom: 1px solid #eee;
}

.header-bar a {
  font-weight: 500;
  color: #4a5565;
}

@media (max-width: 991px) {
  .iframe-video {
    height: 50vh !important;
  }

  .section-content .block-content {
    padding-bottom: 48px;
  }
}


/* Mindmap Guide Overlay (Desktop - Glassy Style) */
    .mindmap-guide-overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.04);
    /* backdrop-filter: blur(1px); */
    /* -webkit-backdrop-filter: blur(6px); */
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 1000;
    cursor: pointer;
    transition: opacity 0.4s ease;
}

.guide-content {
    background: rgba(255, 255, 255, 0.7);
    backdrop-filter: blur(4px);
    -webkit-backdrop-filter: blur(4px);
    padding: 60px 80px;
    border-radius: 40px;
    text-align: center;
    max-width: 600px;
    width: 90%;
    animation: fadeInScale 0.5s cubic-bezier(0.165, 0.84, 0.44, 1);
}

.guide-main-text {
    font-size: 18px;
    line-height: 1.6;
    color: #2c3e50;
    font-weight: 600;
    margin-bottom: 24px;
}

.guide-footer span {
    font-size: 13px;
    color: #2c3e50;
    opacity: 0.6;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 1.2px;
}

    @keyframes fadeInScale {
        from { opacity: 0; transform: scale(0.9); }
        to { opacity: 1; transform: scale(1); }
    }

    .guide-animation-wrap {
        margin-bottom: 30px;
    }

    .guide-grid {
        display: flex;
        justify-content: center;
        gap: 60px;
    }

    .guide-item {
        display: flex;
        flex-direction: column;
        align-items: center;
        gap: 16px;
    }

    .guide-animation {
        position: relative;
        width: 80px;
        height: 80px;
        display: flex;
        align-items: center;
        justify-content: center;
        color: #2c3e50;
    }

    .icon-zoom {
        animation: zoomScale 2s infinite ease-in-out;
    }

    @keyframes zoomScale {
        0%, 100% { transform: scale(1); opacity: 0.7; }
        50% { transform: scale(1.15); opacity: 1; }
    }

    .icon-hand {
        animation: handMove 2.5s infinite ease-in-out;
    }

    @keyframes handMove {
        0%, 100% { transform: translate(0, 0); }
        25% { transform: translate(-8px, -8px); }
        50% { transform: translate(8px, 4px); }
        75% { transform: translate(-4px, 8px); }
    }

    @keyframes pulse {
        0%, 100% { opacity: 0.4; }
        50% { opacity: 1; }
    }

    @media (max-width: 768px) {
    .guide-content {
        padding: 12px;
        border-radius: 12px;
    }
    .guide-main-text {
        font-size: 14px;
        margin-bottom: 8px;
    }

    .guide-footer span {
        font-size: 12px;
    }
    .guide-grid {
        gap: 30px;
    }
    .guide-animation {
        width: 60px;
        height: 60px;
    }
    .guide-animation svg {
        width: 50px;
        height: 50px;
    }
}
