/* pages/classes.css — trang Lớp học phía học viên (templates/pages/classes.html). Tiền tố cls2-. */

.cls2-wide { max-width: 980px; }
.cls2-detail { max-width: 1040px; }
.cls2-gap { height: 12px; }
.crumb-link { color: var(--muted); text-decoration: none; }
.crumb-link:hover { color: var(--accent); }

/* Hộp nhấn nhá: icon trắng + chữ + nút (giống learn-next) */
.callout + .callout { margin-top: 12px; }
.callout { padding: 16px 18px; }
.cls2-callout-icon {
  width: 32px; height: 32px; flex-shrink: 0;
  border-radius: var(--r-md); background: var(--bg);
  display: grid; place-items: center; color: var(--accent);
}
.cls2-callout-text { flex-grow: 1; min-width: 0; }
.cls2-callout-label { margin: 0 0 2px; font-size: 13px; color: var(--muted); }
.cls2-callout-title { margin: 0; font-size: 16px; font-weight: 600; color: var(--ink); }
.cls2-callout-sub { margin: 2px 0 0; font-size: 13px; line-height: 1.5; color: var(--text); }
.callout .btn { font-size: 14px; flex-shrink: 0; }
.cls2-manage { background: var(--bg-soft); margin-bottom: 12px; }

/* Thẻ lớp */
.cls2-cards { gap: 14px; }
.cls2-card {
  display: flex; flex-direction: column; overflow: hidden;
  border: 1px solid var(--line); border-radius: var(--r-md);
  background: var(--bg); color: var(--ink); text-decoration: none;
}
a.cls2-card:hover { border-color: var(--faint); color: var(--ink); }
.cls2-card-band { height: 72px; background: var(--blue-tag); color: var(--blue); display: grid; place-items: center; }
.cls2-card-body { padding: 14px 16px 16px; display: flex; flex-direction: column; gap: 8px; flex-grow: 1; }
.cls2-card-head { display: flex; align-items: center; gap: 8px; min-width: 0; }
.cls2-card-name {
  margin: 0; font-size: 15px; font-weight: 600; color: var(--ink);
  overflow: hidden; text-overflow: ellipsis; white-space: nowrap;
}
.cls2-card-desc { margin: 0; font-size: 13px; line-height: 1.5; color: var(--muted); }
.cls2-card-foot {
  margin-top: auto; padding-top: 10px; border-top: 1px solid var(--line);
  display: flex; align-items: center; gap: 6px; font-size: 13px; color: var(--text);
}
.cls2-card-foot .icon { color: var(--muted); }
.cls2-card-foot .grow { flex-grow: 1; }
.cls2-card-more {
  justify-content: center; gap: 10px; padding: 18px;
  border-style: dashed; border-color: var(--faint); background: var(--bg-side);
}
.cls2-card-more .cls2-card-name { white-space: normal; }
.cls2-more-icon {
  width: 32px; height: 32px; border-radius: var(--r-md);
  background: var(--bg); box-shadow: 0 0 0 1px var(--line); color: var(--muted);
  display: grid; place-items: center;
}

/* Chưa có lớp */
.cls2-empty {
  display: flex; flex-direction: column; align-items: center; text-align: center; gap: 8px;
  padding: 40px 24px; border: 1px solid var(--line); border-radius: var(--r-md);
}
.cls2-empty p { margin: 0; font-size: 14px; }
.cls2-empty-icon {
  width: 48px; height: 48px; border-radius: 12px; background: var(--bg-soft); color: var(--muted);
  display: grid; place-items: center;
}
.cls2-empty .cls2-empty-title { margin-top: 8px; font-size: 16px; font-weight: 600; color: var(--ink); }
.cls2-step { display: flex; align-items: flex-start; gap: 14px; padding: 16px 0; border-top: 1px solid var(--line); }
.cls2-step-num {
  width: 28px; height: 28px; flex-shrink: 0; border-radius: 50%;
  background: var(--callout); color: var(--accent);
  display: grid; place-items: center; font-size: 13px; font-weight: 700;
}
.cls2-step-text { flex-grow: 1; min-width: 0; }
.cls2-step-title { margin: 3px 0 4px; font-size: 15px; font-weight: 600; color: var(--ink); }
.cls2-step-sub { margin: 0; font-size: 14px; line-height: 1.55; color: var(--muted); }
.cls2-step-sub b { color: var(--ink); word-break: break-all; }
.cls2-step .btn { font-size: 14px; flex-shrink: 0; }

/* Tab trong chi tiết lớp */
.cls2-tabs { display: flex; gap: 20px; margin: 28px 0 8px; border-bottom: 1px solid var(--line); overflow-x: auto; }
.cls2-tab {
  height: 44px; padding: 0 2px; border: 0; background: none;
  font-size: 14px; color: var(--muted); white-space: nowrap; cursor: pointer;
}
.cls2-tab:hover { color: var(--ink); }
.cls2-tab.is-active { color: var(--ink); font-weight: 600; box-shadow: inset 0 -2px 0 var(--ink); }
.cls2-tab-count { margin-left: 4px; color: var(--faint); font-weight: 400; }

/* Buổi học (gập/mở) */
.cls2-session { padding: 4px 0 14px; }
.cls2-session-head {
  display: flex; align-items: center; gap: 8px; min-height: 44px; padding: 2px 4px;
  border-radius: var(--r); cursor: pointer; list-style: none; color: var(--muted);
}
.cls2-session-head::-webkit-details-marker { display: none; }
.cls2-session-head:hover { background: var(--bg-soft); }
.cls2-caret { color: var(--faint); transition: transform 0.15s ease; }
.cls2-session[open] .cls2-caret { transform: rotate(90deg); }
.cls2-session-title { font-size: 17px; font-weight: 600; color: var(--ink); }
.cls2-session-count { font-size: 13px; color: var(--faint); }
.cls2-session .cls2-table { margin-left: 26px; }

/* Bảng (từ vựng / bài lớp giao) */
.cls2-row {
  display: grid; align-items: center; column-gap: 12px;
  min-height: 48px; padding: 6px 8px; border-bottom: 1px solid var(--line);
  font-size: 14px; color: var(--ink);
}
.cls2-row > * { min-width: 0; }
.cls2-row-head { min-height: 36px; font-size: 13px; color: var(--muted); }
/* Cột co giãn: cột cố định 150+170+190px làm cột "Ví dụ" còn ~26px khi màn 860–1100px (chữ rơi từng ký tự). */
.cls2-vocab-row { grid-template-columns: minmax(96px, 0.7fr) minmax(0, 1fr) minmax(0, 1.3fr) 164px; }
.cls2-assign-table .cls2-row { grid-template-columns: minmax(0, 1fr) 110px 150px 130px; }
.cls2-row-actions { display: flex; justify-content: flex-end; gap: 4px; }
.cls2-row-actions .btn { height: 32px; font-size: 14px; }
.cls2-word { display: flex; align-items: baseline; gap: 8px; flex-wrap: wrap; }
.cls2-word-main { font-size: 18px; font-weight: 700; color: var(--ink); }
.cls2-word-reading { font-size: 13px; color: var(--muted); }
.cls2-meaning { display: flex; flex-direction: column; gap: 2px; }
.cls2-extra { font-size: 12px; color: var(--muted); }
.cls2-extra b { font-weight: 600; color: var(--faint); margin-right: 2px; }
.cls2-empty-meaning { color: var(--faint); font-style: italic; }
.cls2-example { display: flex; flex-direction: column; gap: 2px; color: var(--text); }
.cls2-example-trans { font-size: 12px; color: var(--muted); }
.cls2-context { font-style: italic; color: var(--muted); }
.cls2-saved { display: inline-flex; align-items: center; gap: 6px; height: 32px; font-size: 13px; color: var(--green); }
.cls2-assign-title { display: flex; align-items: center; gap: 8px; font-weight: 500; }
.cls2-assign-title .icon { color: var(--muted); }
.cls2-more { display: flex; justify-content: center; margin-top: 12px; }
.cls2-more[hidden] { display: none; }
.cls2-more .btn { font-size: 14px; }
.cls2-none { margin: 16px 4px; }
.cls2-error { color: var(--red); }

@media (max-width: 860px) {
  .cls2-card-more { padding: 16px; }
  .cls2-step { flex-wrap: wrap; }
  .cls2-step .btn { margin-left: 42px; }
  .cls2-session-title { font-size: 16px; }
  .cls2-session .cls2-table { margin-left: 4px; }
  /* Từ vựng: mỗi từ là một khối xếp dọc (bản vẽ LH_2_Detail_Mobile) */
  .prop-name { width: auto; min-width: 116px; margin-right: 8px; }  /* nhãn dài không đè lên giá trị */
  .cls2-vocab-row { display: flex; flex-direction: column; align-items: stretch; gap: 8px; padding: 14px 0; }
  .cls2-meaning { font-size: 15px; }
  .cls2-vocab-row .cls2-row-actions { justify-content: stretch; }
  .cls2-vocab-row .cls2-row-actions .btn { width: 100%; height: 44px; }
  .cls2-assign-table .cls2-row { grid-template-columns: minmax(0, 1fr) auto; row-gap: 6px; padding: 10px 0; }
  .cls2-assign-table .cls2-row > .num { grid-column: 1; grid-row: 2; }
  .cls2-assign-table .cls2-row-actions { grid-column: 1 / -1; }
  .cls2-assign-table .cls2-row-actions .btn { width: 100%; height: 44px; }
  .cls2-row.cls2-row-head { display: none; }
}

@media (prefers-reduced-motion: reduce) {
  .cls2-caret { transition: none; }
}
