/* ==========================================================================
   BAMFLOW — enroll.css (2026-10-05, #44)
   Popup "Đăng ký khoá NocoBase" (#enrollModal, dựng bởi assets/js/enroll.js) trên trang /khoa-hoc.
   Hộp thoại dùng lại lớp của form tư vấn và form dùng thử (.modal-*, .form, .field, .trial-done__*):
   tệp này chỉ thêm phần riêng — ô học viên AppSheet, chọn hoá đơn, bước chuyển khoản VietQR.
   Nạp SAU trial.css. Cùng bảng màu xanh của trial.css.
   ========================================================================== */

#enrollModal .modal-header { padding-right: 48px; }
#enrollModal .modal-container { max-width: 600px; }
#enrollModal .modal-form[hidden] { display: none; }
#enrollModal .field select.custom-select option:disabled { color: #94a3b8; }

/* khối học viên AppSheet + học phí */
.enroll-box {
  display: grid; gap: 10px; padding: 12px 14px; border-radius: 12px;
  background: #f6f9ff; border: 1px solid #dbe6fb;
}
.enroll-check {
  display: flex; align-items: flex-start; gap: 10px; cursor: pointer;
  font-size: 0.9rem; line-height: 1.5; color: #1e293b;
}
.enroll-check input[type="checkbox"] { flex: none; width: 18px; height: 18px; margin: 2px 0 0; accent-color: #1d4ed8; cursor: pointer; }
.enroll-check b { color: #15803d; font-weight: 700; }
.enroll-fee { margin: 0; font-size: 0.92rem; color: #334155; }
.enroll-fee b { font-size: 1.05rem; color: #0b1633; }
.enroll-fee s { margin-left: 6px; color: #94a3b8; font-size: 0.85rem; }
.enroll-fee s[hidden] { display: none; }
.enroll-reveal { display: grid; gap: 12px; }
.enroll-reveal[hidden] { display: none; }

/* chọn hoá đơn: ba nút liền nhau */
.enroll-invoice { border: 0; margin: 0; padding: 0; min-width: 0; display: grid; gap: 10px; }
.enroll-invoice legend { padding: 0; margin-bottom: 8px; }
.enroll-seg { display: grid; grid-template-columns: repeat(3, 1fr); gap: 0; border: 1px solid #cbd5e1; border-radius: 10px; overflow: hidden; }
.enroll-seg label { position: relative; cursor: pointer; }
.enroll-seg label + label { border-left: 1px solid #cbd5e1; }
.enroll-seg input { position: absolute; opacity: 0; inset: 0; margin: 0; cursor: pointer; }
.enroll-seg span {
  display: flex; align-items: center; justify-content: center; min-height: 40px; padding: 8px 10px;
  font-size: 0.9rem; font-weight: 600; color: #334155; background: #ffffff; text-align: center;
  transition: background 160ms ease, color 160ms ease;
}
.enroll-seg input:checked + span { background: #1d4ed8; color: #ffffff; }
.enroll-seg input:focus-visible + span { outline: 2px solid #1d4ed8; outline-offset: -4px; }
.enroll-seg label:hover input:not(:checked) + span { background: #eef4ff; }

/* dòng báo lỗi (nền đỏ nhạt, như form dùng thử) */
#enrollStatus.enroll-status--error[data-visible="true"] {
  display: grid; gap: 10px; align-items: start; text-align: left;
  padding: 12px 14px; border-radius: 12px;
  background: #fef2f2; border: 1px solid #fecaca; color: #991b1b; font-size: 0.9rem; line-height: 1.5;
}
#enrollStatus .form__status-actions { display: flex; flex-wrap: wrap; gap: 8px; }
#enrollStatus .form__status-btn { padding: 9px 14px; font-size: 0.9rem; min-height: 40px; }

/* bước 2: chuyển khoản */
.enroll-pay { display: grid; gap: 16px; padding: 4px 0 24px; overflow-y: auto; min-height: 0; }
.enroll-pay[hidden] { display: none; }
.enroll-pay:focus { outline: none; }
.enroll-pay__head { display: flex; gap: 14px; align-items: flex-start; }
.enroll-pay__head .trial-done__icon { flex: none; }
.enroll-pay__head .trial-done__lead { margin-top: 4px; }
.enroll-pay__body { display: grid; grid-template-columns: auto 1fr; gap: 18px; align-items: center; }
.enroll-qr { margin: 0; display: grid; justify-items: center; gap: 6px; padding: 10px; border-radius: 14px; background: #ffffff; border: 1px solid #e2e8f0; }
.enroll-qr img { display: block; width: 220px; height: 220px; object-fit: contain; background: #f8fafc; border-radius: 8px; }
.enroll-qr figcaption { font-size: 0.78rem; color: #64748b; }
.enroll-bank { margin: 0; display: grid; grid-template-columns: auto 1fr; gap: 8px 12px; font-size: 0.9rem; line-height: 1.45; }
.enroll-bank dt { color: #64748b; white-space: nowrap; }
.enroll-bank dd { margin: 0; color: #0b1633; overflow-wrap: anywhere; display: flex; flex-wrap: wrap; align-items: center; gap: 6px; }
.enroll-copy {
  appearance: none; cursor: pointer; padding: 2px 10px; min-height: 26px; border-radius: 999px;
  border: 1px solid #bfdbfe; background: #ffffff; color: #1d4ed8; font: 600 0.78rem/1.2 var(--font-body, inherit);
}
.enroll-copy:hover { background: #eef4ff; }
.enroll-copy:focus-visible { outline: 2px solid #1d4ed8; outline-offset: 2px; }
.enroll-pay__hint { margin: 0; font-size: 0.86rem; line-height: 1.55; color: #475569; }
.enroll-pay__hint a { color: #1d4ed8; }

@media (max-width: 560px) {
  .enroll-pay__body { grid-template-columns: 1fr; }
  .enroll-qr { justify-self: center; }
  .enroll-seg span { font-size: 0.85rem; padding: 8px 4px; }
}
@media (pointer: coarse) {
  .enroll-seg span { min-height: 44px; }
  .enroll-copy { min-height: 36px; padding: 4px 12px; }
  #enrollStatus .form__status-btn { min-height: 44px; }
}
