/* Biểu quyết, hỏi đáp — mọi lớp tiền tố .bq- (tệp này nạp ở mọi trang). Dùng token của app.css. */

/* ── Chung: biểu đồ cột ngang, phân bố điểm, đám mây ─────────────────── */
.bq-so { flex: none; display: inline-grid; place-items: center; min-width: 32px; height: 32px; padding: 0 6px; border-radius: 999px;
  background: var(--c-nhat); color: var(--c-dam); font-weight: 800; font-size: .875rem; font-variant-numeric: tabular-nums; }
.bq-trong { color: var(--phu); text-align: center; padding: 18px 0; margin: 0; }
.bq-cot, .bq-thang { list-style: none; margin: 0; padding: 0; display: grid; gap: 14px; }
.bq-cot__nhan { display: flex; justify-content: space-between; gap: 12px; align-items: baseline; margin-bottom: 4px; }
.bq-cot__nhan span { min-width: 0; overflow-wrap: anywhere; }
.bq-cot__nhan b { flex: none; font-variant-numeric: tabular-nums; }
.bq-cot__thanh { height: 14px; border-radius: 999px; background: #e6ebe7; overflow: hidden; }
.bq-cot__thanh > span { display: block; height: 100%; min-width: 2px; background: var(--c); border-radius: inherit; transition: width .4s ease; }
.bq-cot--dau .bq-cot__thanh > span { background: var(--c-dam); }
.bq-pb { display: flex; gap: 6px; align-items: flex-end; height: 96px; }
.bq-pb__cot { flex: 1; min-width: 0; height: 100%; display: flex; flex-direction: column; justify-content: flex-end; align-items: center; gap: 2px; }
.bq-pb__so { font-size: .8125rem; font-weight: 700; font-variant-numeric: tabular-nums; }
.bq-pb__thanh { width: 100%; max-width: 44px; min-height: 2px; background: var(--c); border-radius: 4px 4px 0 0; transition: height .4s ease; }
.bq-pb__diem { font-size: .8125rem; color: var(--phu); border-top: 1px solid var(--vien); width: 100%; text-align: center; }
.bq-may { list-style: none; margin: 0; padding: 12px 0; display: flex; flex-wrap: wrap; justify-content: center; align-items: center; gap: 4px 18px; }
.bq-may__tu { font-size: calc(var(--c, 1) * 1.05rem); font-weight: 700; line-height: 1.15; color: var(--c-dam); overflow-wrap: anywhere; }
.bq-may__tu--1 { color: var(--c); } .bq-may__tu--2 { color: var(--nhan-dam); } .bq-may__tu--3 { color: #1f5a4f; }
.bq-may__tu small { font-size: .75rem; font-weight: 600; color: var(--phu); margin-left: 3px; vertical-align: super; }
.bq-may__tu--an { opacity: .45; text-decoration: line-through; }
.bq-may__nut { font: inherit; color: inherit; background: none; border: 0; padding: 2px 4px; border-radius: 6px; cursor: pointer; text-decoration: inherit; }
.bq-may__nut:hover { background: var(--c-nhat); }

/* ── Soạn phiên ─────────────────────────────────────────────────────── */
.bq-ds-trang .ds__muc { align-items: center; }
.bq-nut-nho { display: flex; gap: 0; flex: none; }
.bq-nut-nho .nut-bt { width: 38px; height: 38px; }
.bq-nut-nho .nut-bt:disabled { opacity: .3; cursor: default; background: none; }
.bq-xoay .bt { transform: rotate(90deg); }
.bq-kq-trang h2 { margin-bottom: 4px; }

/* ── Điều khiển phòng ───────────────────────────────────────────────── */
.bq-dk-luoi { display: grid; gap: 14px; margin-bottom: 14px; }
.bq-dk-luoi > .the { margin: 0; }
@media (min-width: 860px) { .bq-dk-luoi { grid-template-columns: 1fr 1fr; } }
.bq-moi__in { display: flex; gap: 14px; align-items: flex-start; justify-content: space-between; margin-bottom: 12px; }
.bq-moi__in > div:first-child { flex: 1; min-width: 0; }
.bq-moi__ma { display: inline-block; font-size: 2rem; margin: 2px 0 10px; }
.bq-qr { flex: none; width: 132px; background: #fff; border: 1px solid var(--vien); border-radius: var(--r-nho); padding: 4px; }
.bq-qr svg, .bq-chieu__qr svg { display: block; width: 100%; height: auto; }
.bq-qr:empty { display: none; }
.bq-chuyen { display: flex; align-items: center; gap: 8px; margin-bottom: 12px; }
.bq-chuyen__giua { flex: 1; min-width: 0; display: flex; flex-direction: column; text-align: center; }
.bq-chuyen__giua strong { overflow-wrap: anywhere; }
.bq-chuyen__nut { width: 52px; height: 52px; border: 1px solid var(--c-vien); }
.bq-chuyen__nut:disabled { opacity: .35; cursor: default; }
.bq-dk__nut form[hidden] { display: none; }
[data-khi][hidden] { display: none !important; }
.bq-muc-luc { margin-top: 6px; }
.bq-muc-luc summary { cursor: pointer; font-weight: 600; color: var(--c-dam); padding: 6px 0; }
.bq-muc-luc ol { list-style: none; margin: 4px 0 0; padding: 0; max-height: 260px; overflow: auto; border: 1px solid var(--vien); border-radius: var(--r-nho); }
.bq-muc-luc li + li { border-top: 1px solid var(--vien); }
.bq-muc-luc form { display: block; }
.bq-muc-luc__nut { display: block; width: 100%; text-align: left; background: none; border: 0; padding: 9px 12px; font: inherit; color: var(--chu); cursor: pointer; }
.bq-muc-luc__nut:hover { background: var(--c-nhat); }
.bq-ql .ds__muc { align-items: center; flex-wrap: wrap; }
.bq-ql__chu, .bq-hoi__chu { overflow-wrap: anywhere; }
.bq-ql__nut { display: flex; gap: 6px; flex-wrap: wrap; }
.bq-ql--an .bq-ql__chu { color: var(--phu); text-decoration: line-through; }
.bq-duyet-het { margin-bottom: 6px; }
.bq-bao--noi { position: fixed; left: 50%; bottom: 20px; transform: translateX(-50%); z-index: 60; max-width: calc(100% - 32px); }
.bq-bao { background: var(--chu); color: #fff; padding: 10px 16px; border-radius: 999px; font-weight: 600; text-align: center; margin: 12px auto 0; width: fit-content; max-width: 100%; }
.bq-bao--loi { background: var(--do); }
.bq-bao[hidden] { display: none; }

/* ── Hỏi đáp ────────────────────────────────────────────────────────── */
.bq-hoi { list-style: none; margin: 0; padding: 0; }
.bq-hoi__o { display: flex; gap: 12px; align-items: center; padding: 12px 0; border-bottom: 1px solid var(--vien); }
.bq-hoi__o:last-child { border-bottom: 0; }
.bq-hoi__than { flex: 1; min-width: 0; }
.bq-hoi__phu { margin-top: 2px; font-size: .875rem; color: var(--phu); }
.bq-hoi__dem { flex: none; display: grid; place-items: center; min-width: 52px; height: 44px; border-radius: var(--r-nho); background: var(--nhan-nhat); color: var(--nhan-dam);
  font-variant-numeric: tabular-nums; font-size: 1.05rem; }
.bq-hoi__o--da_tra_loi .bq-hoi__chu { color: var(--phu); }
.bq-hoi__o--an .bq-hoi__chu { color: var(--phu); text-decoration: line-through; }
.bq-hoi--gv .bq-hoi__o { flex-wrap: wrap; }

/* ── Học sinh ───────────────────────────────────────────────────────── */
.bq-vao h1 { margin-top: 4px; }
.bq-hs__dau { display: flex; justify-content: space-between; align-items: center; gap: 10px; margin-bottom: 10px; }
.bq-hs__dau .phu { min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.bq-cho { text-align: center; padding: 36px 16px; }
.bq-cho__chu { font-size: 1.25rem; font-weight: 700; color: var(--c-dam); margin-bottom: 4px; }
.bq-trang-hs__so { margin: 0; }
.bq-trang-hs__h { font-size: 1.375rem; overflow-wrap: anywhere; }
.bq-form { display: flex; flex-direction: column; gap: 10px; }
.bq-form .form-nut, .bq-form .nut { margin-top: 4px; }
.bq-lc { display: grid; gap: 10px; }
.bq-lc__o { display: flex; gap: 12px; align-items: center; min-height: 56px; padding: 12px 14px; border: 2px solid var(--vien); border-radius: var(--r);
  background: #fff; cursor: pointer; font-size: 1.0625rem; font-weight: 600; overflow-wrap: anywhere; }
.bq-lc__o input { width: 22px; height: 22px; flex: none; margin: 0; accent-color: var(--c); }
.bq-lc__o:has(input:checked) { border-color: var(--c); background: var(--c-nhat); color: var(--c-dam); }
.bq-lc__o:has(input:disabled) { cursor: default; opacity: .8; }
.bq-o { width: 100%; min-height: 50px; padding: 11px 13px; border: 1px solid #cfd6d1; border-radius: var(--r-nho); font: inherit; font-size: 1.0625rem; color: var(--chu); background: #fff; }
textarea.bq-o { min-height: 96px; resize: vertical; }
.bq-o:focus { border-color: var(--c); outline: 3px solid var(--c-nhat); }
.bq-dem-chu { text-align: right; margin: -6px 0 0; }
.bq-tt-em { margin: 0; font-weight: 600; color: var(--xanh-la); }
.bq-diem { border: 1px solid var(--vien); border-radius: var(--r); padding: 10px 12px 8px; margin: 0; }
.bq-diem legend { font-weight: 700; padding: 0 4px; }
.bq-diem__hang { display: grid; grid-template-columns: repeat(5, 1fr); gap: 6px; }
.bq-diem__o { position: relative; }
.bq-diem__o input { position: absolute; opacity: 0; inset: 0; margin: 0; cursor: pointer; }
.bq-diem__o span { display: grid; place-items: center; min-height: 48px; border: 2px solid var(--vien); border-radius: var(--r-nho); font-weight: 800; font-size: 1.125rem;
  background: #fff; font-variant-numeric: tabular-nums; }
.bq-diem__o input:checked + span { background: var(--c); border-color: var(--c); color: #fff; }
.bq-diem__o input:focus-visible + span { outline: 3px solid color-mix(in srgb, var(--c) 55%, #fff); outline-offset: 2px; }
.bq-diem__o input:disabled + span { opacity: .6; }
.bq-diem__chu { display: flex; justify-content: space-between; margin-top: 4px; }
.bq-hoi--hs .nut { flex: none; min-width: 64px; min-height: 44px; }

/* ── Màn chiếu (1280–1920px, nền navy của che-do-chieu) ─────────────── */
.bq-chieu { min-height: calc(100vh - 48px); display: flex; flex-direction: column; }
.bq-chieu__dau { display: flex; justify-content: space-between; align-items: center; gap: 24px; font-size: clamp(1rem, 1.5vw, 1.625rem); color: #dfe8f5; flex-wrap: wrap; }
.bq-chieu__vao b { color: #fff; }
.bq-chieu__ma { font-weight: 900; letter-spacing: .12em; color: var(--nhan); font-size: 1.35em; font-variant-numeric: tabular-nums; }
.bq-chieu__dem b { color: var(--nhan); font-size: 1.35em; font-variant-numeric: tabular-nums; }
.bq-chieu__tieu-de { font-size: clamp(2rem, 3.6vw, 4.25rem); line-height: 1.2; margin: 3vh 0 3vh; max-width: 80%; overflow-wrap: anywhere; }
.bq-chieu__qr { position: fixed; right: clamp(16px, 2vw, 40px); bottom: clamp(16px, 2vw, 40px); width: clamp(120px, 10vw, 200px); background: #fff; padding: 6px; border-radius: 10px; }
.bq-chieu__qr:empty { display: none; }
.bq-da-xong .bq-chieu__dem::after { content: " · đã kết thúc"; }
.bq-kq--chieu { flex: 1; font-size: clamp(1.125rem, 1.9vw, 2.25rem); padding-right: clamp(140px, 12vw, 230px); }
.bq-kq--chieu .bq-trong { color: #c9d6ea; font-size: 1.1em; }
.bq-kq--chieu .bq-cot { gap: 2.4vh; }
.bq-kq--chieu .bq-cot__nhan { margin-bottom: .3em; }
.bq-kq--chieu .bq-cot__nhan b { color: var(--nhan); }
.bq-kq--chieu .bq-cot__thanh { height: clamp(22px, 3vh, 40px); background: rgba(255,255,255,.12); }
.bq-kq--chieu .bq-cot__thanh > span { background: #7fa6dc; }
.bq-kq--chieu .bq-cot--dau .bq-cot__thanh > span { background: var(--nhan); }
.bq-kq--chieu .bq-thang { gap: 3vh; grid-template-columns: repeat(auto-fit, minmax(420px, 1fr)); column-gap: 5vw; }
.bq-kq--chieu .bq-thang .bq-cot__nhan { flex-direction: column; gap: 0; }
.bq-kq--chieu .bq-thang .bq-cot__nhan b { font-size: .85em; }
.bq-kq--chieu .bq-pb { height: clamp(110px, 18vh, 220px); gap: .5vw; }
.bq-kq--chieu .bq-pb__so { font-size: .7em; color: #fff; }
.bq-kq--chieu .bq-pb__thanh { max-width: none; background: var(--nhan); }
.bq-kq--chieu .bq-pb__diem { font-size: .6em; color: #c9d6ea; border-color: rgba(255,255,255,.3); }
.bq-kq--chieu .bq-may { gap: .2em 1em; padding: 2vh 0; }
.bq-kq--chieu .bq-may__tu { font-size: calc(var(--c, 1) * 1.15em); color: #fff; }
.bq-kq--chieu .bq-may__tu--1 { color: var(--nhan); } .bq-kq--chieu .bq-may__tu--2 { color: #a9c7f0; } .bq-kq--chieu .bq-may__tu--3 { color: #ffe3a6; }
.bq-kq--chieu .bq-may__tu small { color: #c9d6ea; font-size: .45em; }
.bq-the-mo { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: repeat(auto-fill, minmax(340px, 1fr)); gap: 16px; }
.bq-the-mo__o { background: #fff; color: var(--chu); border-radius: 14px; padding: .8em 1em; font-size: .8em; line-height: 1.35; overflow-wrap: anywhere; border-left: 8px solid var(--nhan); }
.bq-kq--chieu .bq-hoi__o { border-color: rgba(255,255,255,.18); padding: 1.6vh 0; gap: 1em; }
.bq-kq--chieu .bq-hoi__dem { min-width: 3.2em; height: 2.2em; font-size: .9em; background: var(--nhan); color: var(--c-dam); }
.bq-kq--chieu .bq-hoi__chu { font-size: .95em; }
.bq-kq--chieu .bq-hoi__o--da_tra_loi { opacity: .6; }
.bq-kq--chieu .bq-hoi__o--da_tra_loi .bq-hoi__chu { color: #fff; }
.bq-kq--chieu .bq-hoi__phu .nhan { font-size: .55em; }
.bq-an { text-align: center; padding-top: 6vh; color: #dfe8f5; }
.bq-an__so { font-size: 3.4em; font-weight: 900; color: var(--nhan); margin: 0; line-height: 1; font-variant-numeric: tabular-nums; }
.bq-an__phu { color: #c9d6ea; font-size: .8em; }
