/* ===========================================================
   LaptopCheck — in-browser test toolkit styles (compact, pro)
   Loaded on tester.html, on top of style.css
   =========================================================== */

/* ---- config panel ---- */
.config-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(158px, 1fr)); gap: 10px; margin: 6px 0; }
.config-card { background: var(--bg-card); border: 1px solid var(--border); border-radius: 12px; padding: 12px 13px; }
.config-card .ck { font-size: 0.68rem; text-transform: uppercase; letter-spacing: 0.03em; color: var(--text-muted); font-weight: 700; }
.config-card .cv { font-size: 0.95rem; font-weight: 700; color: var(--text); margin-top: 3px; word-break: break-word; }
.config-card .cv.sm { font-size: 0.8rem; font-weight: 600; line-height: 1.4; }

/* ---- live metrics ---- */
.live-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(196px, 1fr)); gap: 12px; margin: 6px 0; }
.live-card { background: var(--bg-card); border: 1px solid var(--border); border-radius: 14px; padding: 15px; box-shadow: var(--shadow-sm); }
.live-head { display: flex; align-items: center; gap: 11px; margin-bottom: 11px; }
.live-ico { width: 38px; height: 38px; border-radius: 11px; display: grid; place-items: center; font-size: 18px; flex: 0 0 auto; }
.live-ico.mem { background: rgba(124,131,255,.18); }
.live-ico.cpu { background: var(--accent-soft); }
.live-ico.fps { background: var(--green-soft); }
.live-ico.net { background: var(--amber-soft); }
.live-ico.bat { background: var(--green-soft); }
.live-title { font-weight: 700; font-size: 0.98rem; color: var(--text); line-height: 1.1; }
.live-sub { color: var(--text-muted); font-size: 0.76rem; }
.live-val { font-size: 1.3rem; font-weight: 800; letter-spacing: -0.01em; font-variant-numeric: tabular-nums; color: var(--text); }
.live-val .grn { color: var(--green); } .live-val .red { color: var(--red); }
.live-line { color: var(--text-muted); font-size: 0.85rem; margin-top: 3px; }
.live-dot { width: 10px; height: 10px; border-radius: 50%; display: inline-block; vertical-align: middle; margin-right: 7px; }
.live-bar { height: 7px; background: var(--bg-soft); border-radius: 999px; overflow: hidden; margin-top: 11px; }
.live-fill { height: 100%; width: 0%; border-radius: 999px; transition: width .45s ease; background: linear-gradient(90deg, var(--accent), #9333ea); }
.live-fill.warn { background: linear-gradient(90deg, var(--amber), var(--red)); }

/* ---- summary bar ---- */
.summary { position: sticky; top: 12px; z-index: 10; background: var(--bg-card); border: 1px solid var(--border); border-radius: 14px; padding: 13px 17px; box-shadow: var(--shadow-sm); margin-bottom: 18px; }
.summary-top { display: flex; align-items: center; justify-content: space-between; gap: 12px; flex-wrap: wrap; margin-bottom: 10px; }
.summary-top h3 { margin: 0; font-size: 1rem; }
.summary-counts { display: flex; gap: 12px; flex-wrap: wrap; font-size: 0.82rem; font-weight: 600; }
.summary-counts .sc { display: inline-flex; align-items: center; gap: 6px; color: var(--text-soft); }
.summary-counts .sc b { font-variant-numeric: tabular-nums; }
.dotc { width: 8px; height: 8px; border-radius: 50%; display: inline-block; }
.dotc.pass { background: var(--green); } .dotc.fail { background: var(--red); }
.dotc.skip { background: var(--amber); } .dotc.pend { background: var(--text-muted); }
.summary .progress-bar { height: 8px; background: var(--bg-soft); border-radius: 999px; overflow: hidden; }
.summary .progress-fill { height: 100%; width: 0%; background: linear-gradient(90deg, var(--accent), #9333ea); transition: width .35s ease; }
.summary-actions { margin-top: 11px; display: flex; gap: 10px; flex-wrap: wrap; align-items: center; }

/* ---- test cards ---- */
.test { background: var(--bg-card); border: 1px solid var(--border); border-radius: 13px; margin-bottom: 9px; box-shadow: var(--shadow-sm); overflow: hidden; transition: border-color .15s ease, box-shadow .15s ease; }
.test:hover { box-shadow: var(--shadow-md); }
.test.is-pass { border-color: color-mix(in srgb, var(--green) 45%, transparent); }
.test.is-fail { border-color: color-mix(in srgb, var(--red) 45%, transparent); }
.test.is-skip { border-color: color-mix(in srgb, var(--amber) 45%, transparent); }
.test-top { display: flex; align-items: center; gap: 13px; padding: 12px 15px; cursor: pointer; }
.test-ico { width: 36px; height: 36px; flex: 0 0 auto; border-radius: 10px; background: var(--accent-soft); color: var(--accent); display: grid; place-items: center; font-size: 17px; }
.test-h { flex: 1; min-width: 0; }
.test-h h3 { margin: 0; font-size: 1rem; display: flex; align-items: center; gap: 9px; flex-wrap: wrap; line-height: 1.2; }
.test-h .tnum { color: var(--text-muted); font-variant-numeric: tabular-nums; font-size: 0.85rem; font-weight: 700; }
.test-h p { margin: 2px 0 0; color: var(--text-soft); font-size: 0.83rem; }
.status-badge { flex: 0 0 auto; font-size: 0.68rem; font-weight: 800; text-transform: uppercase; letter-spacing: .02em; padding: 4px 10px; border-radius: 999px; background: var(--bg-soft); color: var(--text-muted); white-space: nowrap; }
.status-badge.pass { background: var(--green-soft); color: var(--green); }
.status-badge.fail { background: var(--red-soft); color: var(--red); }
.status-badge.skip { background: var(--amber-soft); color: var(--amber); }
.test-chevron { flex: 0 0 auto; color: var(--text-muted); transition: transform .2s ease; }
.test.open .test-chevron { transform: rotate(180deg); }
.test-body { display: none; padding: 0 15px 15px; }
.test.open .test-body { display: block; }
.test-body .how { background: var(--bg-soft); border: 1px solid var(--border); border-radius: 10px; padding: 11px 14px; margin-bottom: 12px; }
.test-body .how h4 { margin: 0 0 6px; font-size: 0.74rem; text-transform: uppercase; letter-spacing: .03em; color: var(--accent); }
.test-body .how ol, .test-body .how ul { margin: 0; padding-left: 18px; }
.test-body .how li { margin: 3px 0; color: var(--text-soft); font-size: 0.86rem; }

/* ---- interactive stage ---- */
.stage { border: 1px dashed var(--border-strong); border-radius: 10px; padding: 14px; margin-bottom: 12px; background: var(--bg); }
.stage .controls { display: flex; gap: 10px; flex-wrap: wrap; }

/* ---- verdict buttons ---- */
.verdicts { display: flex; gap: 9px; flex-wrap: wrap; }
.vbtn { display: inline-flex; align-items: center; gap: 7px; padding: 8px 15px; border-radius: 9px; border: 1px solid var(--border); background: var(--bg-card); color: var(--text); font-weight: 700; font-size: 0.85rem; cursor: pointer; transition: all .15s ease; }
.vbtn:hover { transform: translateY(-1px); }
.vbtn.pass:hover, .vbtn.pass.on { background: var(--green); color: #fff; border-color: var(--green); }
.vbtn.fail:hover, .vbtn.fail.on { background: var(--red); color: #fff; border-color: var(--red); }
.vbtn.skip:hover, .vbtn.skip.on { background: var(--amber); color: #fff; border-color: var(--amber); }

/* ---- fullscreen colour overlay ---- */
.fs-overlay { position: fixed; inset: 0; z-index: 500; background: #000; display: none; cursor: pointer; }
.fs-overlay.show { display: block; }
.fs-overlay .fs-hud { position: absolute; top: 18px; left: 50%; transform: translateX(-50%); z-index: 2; background: rgba(0,0,0,.74); color: #fff; padding: 9px 18px; border-radius: 999px; font-size: 0.84rem; font-weight: 600; pointer-events: none; white-space: nowrap; max-width: 92vw; overflow: hidden; text-overflow: ellipsis; box-shadow: 0 4px 18px rgba(0,0,0,.4); transition: opacity .4s ease; }
.fs-overlay .fs-exit { position: absolute; top: 16px; right: 18px; z-index: 2; background: rgba(0,0,0,.55); color: #fff; border: none; border-radius: 999px; padding: 8px 15px; font-size: 0.8rem; font-weight: 700; cursor: pointer; }
.fs-overlay .fs-exit:hover { background: rgba(0,0,0,.78); }

/* ---- keyboard visualiser ---- */
.kbd { display: flex; flex-direction: column; gap: 5px; user-select: none; }
.kbd-row { display: flex; gap: 5px; justify-content: center; flex-wrap: wrap; }
.kbd-key { min-width: 32px; height: 36px; padding: 0 7px; border-radius: 7px; border: 1px solid var(--border-strong); background: var(--bg-card); display: grid; place-items: center; font-size: 0.7rem; font-weight: 600; color: var(--text-soft); transition: background .1s ease, color .1s ease, transform .05s ease; }
.kbd-key.wide { min-width: 60px; } .kbd-key.xwide { min-width: 130px; }
.kbd-key.hit { background: var(--accent); color: #fff; border-color: var(--accent); }
.kbd-key.held { background: var(--amber); color: #fff; border-color: var(--amber); transform: translateY(1px); }
.kbd-readout { text-align: center; margin-top: 10px; font-size: 0.84rem; color: var(--text-soft); }
.kbd-readout b { color: var(--text); }

/* ---- mouse pad ---- */
.mouse-pad { position: relative; height: 210px; border-radius: 10px; background: var(--bg-soft); border: 1px solid var(--border); overflow: hidden; }
.mouse-zones { position: absolute; inset: 10px; display: grid; grid-template-columns: 1fr 1fr 1fr; grid-template-rows: 1fr 1fr; gap: 9px; }
.mzone { border: 1px solid var(--border-strong); border-radius: 9px; display: grid; place-items: center; text-align: center; font-size: 0.78rem; font-weight: 700; color: var(--text-soft); background: var(--bg-card); padding: 6px; transition: all .12s ease; }
.mzone.done { background: var(--green); color: #fff; border-color: var(--green); }
.mouse-cursor-info { text-align: center; font-size: 0.82rem; color: var(--text-muted); margin-top: 8px; }
.mouse-cursor-info b { color: var(--text); font-variant-numeric: tabular-nums; }
.mouse-cross { position: absolute; width: 16px; height: 16px; margin: -8px 0 0 -8px; border: 2px solid var(--accent); border-radius: 50%; pointer-events: none; opacity: 0; transition: opacity .15s ease; box-shadow: 0 0 0 4px var(--accent-soft); z-index: 3; }

/* ---- touch / draw ---- */
.draw-wrap { border: 1px solid var(--border); border-radius: 10px; overflow: hidden; background: var(--bg-soft); }
.draw-wrap canvas { display: block; width: 100%; height: 210px; touch-action: none; }

/* ---- level meter ---- */
.meter { height: 20px; background: var(--bg-soft); border: 1px solid var(--border); border-radius: 999px; overflow: hidden; }
.meter-fill { height: 100%; width: 0%; background: linear-gradient(90deg, var(--green), var(--amber), var(--red)); transition: width .05s linear; }

/* ---- webcam ---- */
.cam-wrap { border-radius: 10px; overflow: hidden; background: #000; max-width: 400px; }
.cam-wrap video { display: block; width: 100%; height: auto; }

/* ---- misc ---- */
.readout { font-size: 0.9rem; color: var(--text-soft); margin: 8px 0 0; }
.readout b { color: var(--text); font-variant-numeric: tabular-nums; }
.big-num { font-size: 1.6rem; font-weight: 800; color: var(--text); font-variant-numeric: tabular-nums; }
.note-soft { font-size: 0.8rem; color: var(--text-muted); margin-top: 8px; }
.err-text { color: var(--red); font-size: 0.86rem; margin-top: 8px; }
