/* ===== Ghi âm + chấm bài kiểu Google Docs (lop-cham.js, 21/11/2026) — theo màu phiếu bài làm (biến --bl-* của lop-bai-lam.css) ===== */
.ch-am { margin: 14px 0 4px; padding: 12px 14px; border: 1.5px solid var(--bl-line, #CFC8B6); border-radius: 8px; background: #FBF8F0; }
.ch-am.dang { border-color: #B5523B; background: #FCF1EC; }
.ch-am-nhan { display: flex; align-items: center; gap: 8px; margin: 0 0 10px; color: var(--bl-ink, #3B3A36); font-size: 15px; }
.ch-am-nhan svg { width: 20px; height: 20px; color: var(--bl-c, #5F6D45); flex: none; }
.ch-am.dang .ch-am-nhan svg { color: #B5523B; }
.ch-am-nhan small { margin-left: auto; font-variant-numeric: tabular-nums; color: var(--bl-mute, #6B675E); font-weight: 600; }
.ch-am-nut { display: flex; flex-wrap: wrap; align-items: center; gap: 10px; }
.ch-nut { display: inline-flex; align-items: center; gap: 8px; min-height: 44px; padding: 0 18px; border: 0; border-radius: 999px; background: var(--bl-c, #5F6D45); color: #FBF6EA; font: 700 15px "Be Vietnam Pro", system-ui, sans-serif; cursor: pointer; box-shadow: 0 2px 0 rgba(0, 0, 0, .18); }
.ch-nut svg { width: 18px; height: 18px; flex: none; }
.ch-nut.do { background: #B5523B; }
.ch-nut.phu { background: #EFE6D1; color: #3A4A32; box-shadow: 0 2px 0 #DCCFB0; }
.ch-nut:disabled { opacity: .55; cursor: default; }
.ch-nut:focus-visible, .ch-tb button:focus-visible { outline: 3px solid #2F4A62; outline-offset: 2px; }
.ch-song { display: inline-flex; align-items: center; gap: 3px; height: 24px; }
.ch-song i { width: 4px; height: 8px; border-radius: 2px; background: #B5523B; animation: ch-song 0.9s ease-in-out infinite; }
.ch-song i:nth-child(2) { animation-delay: .15s; } .ch-song i:nth-child(3) { animation-delay: .3s; } .ch-song i:nth-child(4) { animation-delay: .45s; } .ch-song i:nth-child(5) { animation-delay: .6s; }
@keyframes ch-song { 0%, 100% { height: 6px; } 50% { height: 22px; } }
@media (prefers-reduced-motion: reduce) { .ch-song i { animation: none; height: 14px; } }
.ch-am-tt { min-height: 1em; margin: 8px 0 0; font-size: 13.5px; color: var(--bl-mute, #6B675E); }
.ch-am-tt:empty { display: none; }
.ch-am-tt.loi { color: #9A3B26; font-weight: 600; }
.ch-lk { margin-left: 6px; padding: 0; border: 0; background: none; color: #2F4A62; font: inherit; font-weight: 700; text-decoration: underline; cursor: pointer; }
.ch-am-audio { display: block; width: 100%; max-width: 460px; height: 44px; }
.ch-am-trong { margin: 4px 0; font-size: 14px; font-style: italic; color: var(--bl-mute, #6B675E); }

/* ô điểm + nhận xét của giáo viên */
.ch-diem-o { display: grid; gap: 8px; margin-top: 12px; padding-top: 10px; border-top: 1px dashed var(--bl-line, #CFC8B6); }
.ch-diem { display: inline-flex; align-items: center; gap: 8px; font-weight: 700; font-size: 14.5px; color: var(--bl-ink, #3B3A36); }
.ch-diem input { width: 76px; min-height: 40px; padding: 4px 8px; border: 1.5px solid var(--bl-line, #CFC8B6); border-radius: 6px; background: #fff; font: 700 16px "Be Vietnam Pro", system-ui, sans-serif; text-align: center; }
.ch-diem span { color: var(--bl-mute, #6B675E); font-weight: 600; }
.ch-nx-o { width: 100%; box-sizing: border-box; padding: 8px 10px; border: 1.5px solid var(--bl-line, #CFC8B6); border-radius: 6px; background: #fff; font: 500 15px/1.5 "Be Vietnam Pro", system-ui, sans-serif; resize: vertical; }
.ch-diem input:focus, .ch-nx-o:focus, .ch-the textarea:focus { outline: none; border-color: var(--bl-c, #5F6D45); box-shadow: 0 0 0 3px var(--bl-c2, #ECEEDF); }
.ch-phan-hoi { margin-top: 12px; padding: 10px 12px; border-left: 4px solid var(--bl-c, #5F6D45); border-radius: 0 6px 6px 0; background: var(--bl-c2, #ECEEDF); font-size: 14.5px; }
.ch-phan-hoi em { font-style: normal; color: var(--bl-c, #5F6D45); }
.ch-phan-hoi p { margin: 4px 0 0; white-space: pre-wrap; line-height: 1.55; }

/* vùng chấm phần viết: khung tiêu chí (bl-side) lên trên để bài viết + lề nhận xét đủ rộng */
.bl-body.has-box:has(.ch-vb-o) { grid-template-columns: minmax(0, 1fr); }
.bl-body.has-box:has(.ch-vb-o) .bl-side { order: 0; }
.ch-vb { margin-top: 6px; }
.ch-vb-goi { margin: 0 0 8px; font-size: 13px; color: var(--bl-mute, #6B675E); font-style: italic; }
.ch-vb-hang { position: relative; display: grid; grid-template-columns: minmax(0, 1fr) 200px; gap: 14px; align-items: start; }
.ch-vb-chu { min-height: 120px; padding: 12px 14px; border: 1.5px solid var(--bl-line, #CFC8B6); border-radius: 6px; background: #fff; color: #222; font: 500 16px/1.75 "Be Vietnam Pro", system-ui, sans-serif; white-space: pre-wrap; overflow-wrap: anywhere; }
.ch-vb.sua .ch-vb-chu { cursor: text; -webkit-user-select: text; user-select: text; }
.ch-vb-chu ::selection { background: #BFD3EA; }
.ch-rong { color: var(--bl-mute, #6B675E); font-style: italic; }
.ch-dam { font-weight: 800; }
.ch-hl-vang { background: #FFE58A; } .ch-hl-xanh { background: #C8EBB4; } .ch-hl-hong { background: #F9C6D3; } .ch-hl-lam { background: #BEE0F5; }
.ch-xoa { color: #A13A26; text-decoration: line-through; text-decoration-thickness: 1.5px; }
.ch-moi { margin-left: 2px; padding: 0 2px; border-radius: 3px; background: #E3EFF9; color: #1F5F99; text-decoration: underline; text-decoration-color: #7FA9D1; font-weight: 700; }
.ch-vb.sua .ch-moi { cursor: pointer; }
.ch-cmt { border-bottom: 2px solid #E0A33A; background-image: linear-gradient(rgba(240, 190, 80, .22), rgba(240, 190, 80, .22)); cursor: pointer; }
.ch-cmt.noi { background-image: linear-gradient(rgba(240, 170, 40, .45), rgba(240, 170, 40, .45)); }
.ch-tam { background: #BFD3EA; }
.ch-so { margin: 0 1px; padding: 0 4px; border-radius: 8px; background: #E0A33A; color: #fff; font: 800 10.5px/1.5 "Be Vietnam Pro", system-ui, sans-serif; vertical-align: super; -webkit-user-select: none; user-select: none; }
.ch-vb-le { position: relative; min-height: 1px; }
.ch-the { position: absolute; left: 0; right: 0; padding: 8px 10px 8px 12px; border: 1px solid #E8D2A6; border-left: 4px solid #E0A33A; border-radius: 6px; background: #FFFBF1; box-shadow: 0 1px 4px rgba(60, 50, 30, .1); font-size: 13.5px; line-height: 1.45; cursor: pointer; transition: box-shadow .15s; }
.ch-the.noi { box-shadow: 0 0 0 2px #E0A33A, 0 2px 8px rgba(60, 50, 30, .18); }
.ch-the-so { display: inline-grid; place-items: center; min-width: 18px; height: 18px; margin-right: 6px; border-radius: 9px; background: #E0A33A; color: #fff; font-size: 11px; }
.ch-the q { color: var(--bl-mute, #6B675E); font-style: italic; font-size: 12.5px; }
.ch-the p { margin: 4px 0 0; white-space: pre-wrap; color: #2E2C28; }
.ch-the textarea { display: block; width: 100%; box-sizing: border-box; margin-top: 6px; padding: 5px 7px; border: 1px solid #E8D2A6; border-radius: 4px; background: #fff; font: 500 13.5px/1.45 "Be Vietnam Pro", system-ui, sans-serif; resize: vertical; }
.ch-the-x { position: absolute; top: 2px; right: 4px; width: 28px; height: 28px; padding: 0; border: 0; background: none; color: #9A3B26; font-size: 20px; line-height: 1; cursor: pointer; }
.ch-vb-le.doc { display: grid; gap: 8px; }
.ch-vb-le.doc .ch-the { position: relative; top: auto !important; }
@media (max-width: 760px) {
  .ch-vb-hang { grid-template-columns: minmax(0, 1fr); }
  .ch-vb-le { display: grid; gap: 8px; }
  .ch-vb-le .ch-the { position: relative; top: auto !important; }
}

/* thanh công cụ khi bôi đen chữ (nổi trên mọi thứ, cả khung xem bài của /giao-vien) */
.ch-tb { position: fixed; z-index: 2147483000; display: flex; align-items: center; gap: 4px; max-width: calc(100vw - 16px); padding: 5px; border: 1px solid #3A4A32; border-radius: 10px; background: #FFFDF7; box-shadow: 0 6px 22px rgba(30, 25, 15, .25); font-family: "Be Vietnam Pro", system-ui, sans-serif; }
.ch-tb[hidden] { display: none; }
.ch-tb > button, .ch-tb-mau button { display: inline-flex; align-items: center; justify-content: center; gap: 6px; min-width: 40px; min-height: 40px; padding: 0 10px; border: 0; border-radius: 7px; background: transparent; color: #2E3A28; font: 700 14px "Be Vietnam Pro", system-ui, sans-serif; cursor: pointer; }
.ch-tb > button:hover { background: #EFE6D1; }
.ch-tb > button svg { width: 18px; height: 18px; }
.ch-tb > button b { font-size: 17px; font-weight: 900; }
.ch-tb-mau { display: inline-flex; gap: 3px; padding: 0 4px; border-left: 1px solid #E2D8C2; border-right: 1px solid #E2D8C2; }
.ch-tb-mau .ch-o-mau { min-width: 0; width: 26px; height: 26px; min-height: 26px; padding: 0; border: 1.5px solid rgba(0, 0, 0, .25); border-radius: 50%; }
.ch-tb-mau .ch-o-mau:hover { transform: scale(1.12); }
.ch-tb-mau .ch-o-mau.ch-hl-vang { background: #FFE58A; } .ch-tb-mau .ch-o-mau.ch-hl-xanh { background: #C8EBB4; } .ch-tb-mau .ch-o-mau.ch-hl-hong { background: #F9C6D3; } .ch-tb-mau .ch-o-mau.ch-hl-lam { background: #BEE0F5; }
.ch-tb-nhap { display: grid; gap: 6px; width: min(340px, calc(100vw - 32px)); padding: 4px; }
.ch-tb-nhap label { font-size: 13px; font-weight: 700; color: #3A4A32; }
.ch-tb-nhap textarea, .ch-tb-nhap input { width: 100%; box-sizing: border-box; padding: 8px 10px; border: 1.5px solid #CFC8B6; border-radius: 6px; font: 500 16px/1.45 "Be Vietnam Pro", system-ui, sans-serif; resize: vertical; }
.ch-tb-nhap > div { display: flex; justify-content: flex-end; gap: 8px; }
.ch-tb-nhap button { min-height: 40px; padding: 0 16px; border: 0; border-radius: 6px; font: 700 14px "Be Vietnam Pro", system-ui, sans-serif; cursor: pointer; }
.ch-tb-nhap .chinh { background: #5F6D45; color: #FBF6EA; }
.ch-tb-nhap .phu { background: #EFE6D1; color: #3A4A32; }
@media (max-width: 520px) { .ch-tb > button span { display: none; } }

/* thanh lưu của giáo viên + bảng điểm học viên */
.ch-thanh { display: inline-flex; flex-wrap: wrap; align-items: center; justify-content: flex-end; gap: 8px; }
.ch-tt { font-size: 13px; font-weight: 700; color: var(--bl-mute, #6B675E); }
.ch-tt.xong { color: #4F7A3A; }
.ch-tt.doi { color: #9A5B12; }
.ch-bang { display: grid; gap: 2px; margin: 0 0 6px; padding: 12px 16px; border: 1.5px solid var(--bl-c, #5F6D45); border-radius: 8px; background: var(--bl-c2, #ECEEDF); font-size: 15px; }
.ch-bang:empty { display: none; }
.ch-bang em { font-style: normal; font-weight: 800; color: var(--bl-c, #5F6D45); }
.ch-bang small { color: var(--bl-mute, #6B675E); }
@media (max-width: 640px) {
  .bl-top .ch-thanh .bl-btn { min-height: 36px; padding: 0 12px; font-size: 13.5px; }
  .bl-top .ch-tt { flex-basis: 100%; text-align: right; }
}
