/* Bố cục các trang Flashcard: sidebar menu thẻ trắng (từ 1200px), nhỏ hơn thành thanh tab pill ngang; thẻ flashcard dạng card */

/* ---------- Sidebar ---------- */
.fc-side { background: #fff !important; border-color: #eef0f6 !important; }
.fc-side .fc-side-nav { gap: 4px; padding: 14px 4px; }
.fc-side .nav-item { margin-top: 0 !important; }
.fc-side .nav-item a { display: block; text-decoration: none; }
.fc-side .nav-item button {
  display: flex; align-items: center; gap: 12px; width: 100%; padding: 8px 10px;
  color: #2b2f45; font-size: 15px; font-weight: 600; text-transform: none; line-height: 1.3;
  background: transparent; border: 0 !important; border-radius: 12px; transition: background .15s, color .15s;
}
.fc-side .nav-item button svg {
  flex: 0 0 auto; box-sizing: content-box; width: 20px; height: 20px; padding: 8px;
  background: #eef5ff; border-radius: 10px; transition: background .15s;
}
.fc-side .nav-item button:hover { color: var(--main); background: #f5f8fd; }
.fc-side .nav-item button.active { color: var(--main); background: #e8f3ff; box-shadow: inset 3px 0 0 var(--main); }
.fc-side .nav-item button.active svg { background: #fff; }

@media (max-width: 1199.98px) {
  .fc-side { min-height: 0; padding: 0; background: transparent !important; border: 0 !important; }
  .fc-side .flashcard-sidebar-sticky { position: static; height: auto; }
  .fc-side .fc-side-nav {
    flex-direction: row !important; flex-wrap: nowrap; justify-content: flex-start; justify-content: safe center; gap: 8px; margin: 14px 0 4px; padding: 6px;
    overflow-x: auto; scrollbar-width: none; background: #fff; border-radius: 999px; box-shadow: 0 2px 12px rgba(30, 50, 110, .08);
  }
  .fc-side .fc-side-nav::-webkit-scrollbar { display: none; }
  .fc-side .nav-item { flex: 0 0 auto; width: auto !important; }
  .fc-side .nav-item button { gap: 6px; padding: 7px 14px; font-size: 14px; white-space: nowrap; border-radius: 999px; }
  .fc-side .nav-item button svg { width: 18px; height: 18px; padding: 0; background: none; }
  .fc-side .nav-item button.active { color: #fff; background: var(--main); box-shadow: none; }
  .fc-side .nav-item button.active svg { fill: #fff; background: none; }
}

/* ---------- Thẻ flashcard (giống thẻ quiz) ---------- */
.fc-card {
  display: flex; flex-direction: column; gap: 10px; min-width: 0; padding: 14px; color: #2b2f45; text-decoration: none;
  background: #fff; border: 1px solid #eceef5; border-radius: 14px; box-shadow: 0 2px 10px rgba(30, 50, 110, .06);
  transition: transform .18s ease, box-shadow .18s ease, border-color .18s ease;
}
.fc-card:hover { color: #2b2f45; border-color: #cfe3ff; transform: translateY(-3px); box-shadow: 0 10px 22px rgba(30, 50, 110, .12); }
.fc-card-title {
  display: -webkit-box; margin: 0; overflow: hidden; color: #1f2a5a; font-size: 15px; font-weight: 700; line-height: 1.35;
  -webkit-line-clamp: 2; -webkit-box-orient: vertical;
}
.fc-card:hover .fc-card-title { color: var(--main); }
.fc-card-tags { display: flex; flex-wrap: wrap; gap: 6px; }
.fc-chip { display: inline-flex; align-items: center; gap: 4px; padding: 3px 9px; font-size: 12px; font-weight: 700; border-radius: 999px; }
.fc-chip-n { color: #7a3fe0; background: #f1e9ff; }
.fc-chip-lop { color: #0a7d4f; background: #e3f7ee; }
.fc-chip-mon { color: #b4560b; background: #fff1e0; }
.fc-card-desc { display: -webkit-box; margin: auto 0 0; overflow: hidden; color: #7a8099; font-size: 12.5px; line-height: 1.45; -webkit-line-clamp: 2; -webkit-box-orient: vertical; }

/* Flashcard gần đây: hàng cuộn ngang */
.fc-scroll { display: flex; gap: 16px; padding: 4px 2px 10px; overflow-x: auto; scroll-snap-type: x mandatory; scrollbar-width: thin; }
.fc-card-recent { flex: 0 0 300px; scroll-snap-align: start; }

/* ---------- Flashcard phổ biến theo môn ---------- */
.fc-topics { display: flex; flex-direction: column; gap: 28px; width: 100%; }
.fc-topic-head { display: flex; align-items: center; justify-content: space-between; gap: 12px; margin-bottom: 12px; }
.fc-topic-name { display: flex; align-items: center; gap: 12px; min-width: 0; color: #1f2a5a; text-decoration: none; }
.fc-topic-name:hover { color: var(--main); }
.fc-topic-ico { display: grid; flex: 0 0 46px; place-items: center; width: 46px; height: 46px; background: #fff; border-radius: 14px; box-shadow: 0 2px 10px rgba(30, 50, 110, .08); }
.fc-topic-ico img { width: 30px; height: 30px; object-fit: contain; }
.fc-topic-name b { display: block; font-size: 18px; font-weight: 800; line-height: 1.2; }
.fc-topic-name small { color: #8a90a8; font-size: 13px; }
.fc-more {
  flex: 0 0 auto; padding: 6px 14px; color: var(--main); font-size: 14px; font-weight: 700; text-decoration: none;
  background: #e8f3ff; border-radius: 999px; transition: background .15s, color .15s;
}
.fc-more:hover { color: #fff; background: var(--main); }
.fc-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 16px; }

@media (max-width: 767.98px) {
  .fc-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}
@media (max-width: 575.98px) {
  .fc-grid { grid-template-columns: 1fr; }
  .fc-card-recent { flex-basis: 82%; }
  .fc-topic-name b { font-size: 16px; }
}
