/* Nút "Quét mã QR" + màn quét toàn màn hình (scan.js) — dùng chung cho trang chủ
   (home.css chỉnh lại kiểu nút) và các trang tra cứu (public.css). */

.pv-scan {
  display: flex; align-items: center; justify-content: center; gap: 10px;
  width: 100%; max-width: 520px; height: 48px; margin: 10px auto 0; padding: 0 18px;
  border: 1.5px solid #1B2A44; border-radius: 8px; background: #fff; color: #1B2A44;
  font: inherit; font-weight: 600; font-size: 16px; cursor: pointer;
}
.pv-scan[hidden] { display: none; }
.pv-scan:hover { background: #1B2A44; color: #fff; }
.pv-scan:focus-visible { outline: 3px solid rgba(43, 101, 176, 0.35); outline-offset: 2px; }
.pv-scan svg { flex: none; }
.pv-lookup-sm .pv-scan { height: 44px; font-size: 15px; }

body.pv-noscroll { overflow: hidden; }
.pv-scanner {
  position: fixed; inset: 0; z-index: 100; display: flex; flex-direction: column;
  background: #0B1220; color: #fff;
}
.pv-scan-top {
  display: flex; align-items: center; justify-content: space-between; gap: 12px;
  padding: 12px 12px 12px 18px; font-weight: 600; font-size: 16px;
}
.pv-scan-x {
  width: 44px; height: 44px; border: 0; border-radius: 50%; background: rgba(255, 255, 255, 0.12);
  color: #fff; font-size: 20px; line-height: 1; cursor: pointer;
}
.pv-scan-x:hover { background: rgba(255, 255, 255, 0.22); }
.pv-scan-view { position: relative; flex: 1; min-height: 0; overflow: hidden; }
.pv-scan-view video { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; background: #000; }
.pv-scan-frame {
  position: absolute; left: 50%; top: 50%; width: min(68vmin, 340px); aspect-ratio: 1;
  transform: translate(-50%, -50%);
  box-shadow: 0 0 0 100vmax rgba(11, 18, 32, 0.55); border-radius: 14px;
}
.pv-scan-frame i { position: absolute; width: 34px; height: 34px; border: 4px solid #C9A867; }
.pv-scan-frame i:nth-child(1) { left: -2px; top: -2px; border-right: 0; border-bottom: 0; border-top-left-radius: 14px; }
.pv-scan-frame i:nth-child(2) { right: -2px; top: -2px; border-left: 0; border-bottom: 0; border-top-right-radius: 14px; }
.pv-scan-frame i:nth-child(3) { left: -2px; bottom: -2px; border-right: 0; border-top: 0; border-bottom-left-radius: 14px; }
.pv-scan-frame i:nth-child(4) { right: -2px; bottom: -2px; border-left: 0; border-top: 0; border-bottom-right-radius: 14px; }
.pv-scanner.ok .pv-scan-frame i { border-color: #3FBF75; }
.pv-scanner.err .pv-scan-frame { display: none; }
.pv-scan-msg { margin: 0; padding: 16px 20px calc(20px + env(safe-area-inset-bottom)); text-align: center; font-size: 15px; line-height: 1.5; }
.pv-scanner.err .pv-scan-msg { color: #FFD7D2; }
