/* WELLNESSON_WEB_CAMERA_SCAN_20261113 - camera scan controls and overlay */
.barcode-input-camera{display:flex;align-items:center;gap:8px;min-width:0}
.barcode-input-camera>.input{flex:1;min-width:0}
.barcode-camera-button{flex:none;display:inline-flex;align-items:center;justify-content:center;gap:5px;min-height:42px;padding:8px 12px;border:1px solid #c4d1e4;border-radius:9px;background:#edf3fa;color:#263f6b;font-size:13px;font-weight:700;cursor:pointer;white-space:nowrap}
.barcode-camera-button:hover{background:#e0eafb}
.barcode-camera-button:focus-visible{outline:3px solid #96b8ed;outline-offset:2px}
.barcode-camera-button:disabled{opacity:.5;cursor:not-allowed}
.barcode-camera-backdrop{position:fixed;z-index:99999;inset:0;background:rgba(9,19,38,.8);display:flex;align-items:center;justify-content:center;padding:12px}
.barcode-camera-panel{width:min(100%,530px);max-height:calc(100dvh - 24px);overflow:auto;background:#fff;color:#233148;border-radius:16px;box-shadow:0 24px 60px rgba(0,0,0,.38);padding:15px}
.barcode-camera-header{display:flex;justify-content:space-between;align-items:center;gap:10px;margin-bottom:12px}
.barcode-camera-header strong{display:block;font-size:17px}
.barcode-camera-header small{display:block;margin-top:4px;color:#63718a;font-size:12px}
.barcode-camera-close{border:1px solid #dde3eb;border-radius:9px;background:#f6f8fb;padding:9px 11px;font-weight:700;white-space:nowrap;color:#304564}
.barcode-camera-preview{position:relative;overflow:hidden;border-radius:12px;aspect-ratio:4/3;background:#121b2b}
.barcode-camera-preview video{width:100%;height:100%;object-fit:cover;display:block}
.barcode-camera-target{position:absolute;left:9%;right:9%;top:31%;bottom:31%;border:2px solid #93eecc;border-radius:12px;box-shadow:0 0 0 200vmax rgba(0,0,0,.2);pointer-events:none}
.barcode-camera-status{min-height:42px;margin:13px 0 9px;font-size:13px;color:#314e79;line-height:1.5}
.barcode-camera-actions button{width:100%;border-radius:9px;background:#344e78;color:#fff;padding:12px 10px;font-weight:700;border:0;min-height:43px}
.barcode-camera-help{font-size:12px;color:#77849a;line-height:1.5;margin:12px 0 0}
.camera-scan-open{overflow:hidden}
.barcode-scan-toast{position:fixed;z-index:99998;left:50%;bottom:22px;transform:translateX(-50%);max-width:min(90vw,480px);background:#263e64;color:#fff;padding:12px 17px;border-radius:12px;font-size:13px;line-height:1.45;box-shadow:0 8px 28px rgba(0,0,0,.25)}
@media(max-width:520px){
 .barcode-input-camera{width:100%;gap:6px}
 .barcode-camera-button{font-size:12px;padding:8px 10px;min-height:40px}
 .barcode-camera-backdrop{padding:0;align-items:flex-end}
 .barcode-camera-panel{width:100%;max-height:98dvh;border-radius:19px 19px 0 0;padding:13px}
 .barcode-camera-preview{aspect-ratio:4/3}
}
/* WELLNESSON_WEB_CAMERA_FOCUS_V2_20261116 */
.barcode-camera-preview{aspect-ratio:4/3}
.barcode-camera-preview video{object-fit:contain;background:#101724}
.barcode-camera-target{top:37%;bottom:37%;left:7%;right:7%;border-radius:7px}
.barcode-camera-tools{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:8px;margin:0 0 12px}
.barcode-camera-tools button{border:1px solid #cfdbeb;background:#edf3fb;color:#25446d;border-radius:9px;padding:9px 10px;min-height:42px;font-weight:700;font-size:13px}
.barcode-camera-tools label{grid-column:1/-1;display:flex;align-items:center;gap:9px;color:#42536c;font-weight:600;font-size:13px;min-width:0}
.barcode-camera-tools label select{flex:1;min-width:0;padding:8px;border:1px solid #cdd8e9;border-radius:7px;color:#263d5d;background:#fff}
.barcode-camera-tools label[data-scanner-zoom-wrap] input{flex:1;min-width:0;accent-color:#2f3c68}
.barcode-camera-tools [hidden]{display:none!important}
.barcode-camera-help{line-height:1.65}
@media(max-width:520px){
 .barcode-camera-preview{aspect-ratio:3/4;max-height:53dvh}
 .barcode-camera-target{top:40%;bottom:40%;left:5%;right:5%}
 .barcode-camera-tools button{font-size:12px;padding:9px 6px}
}

/* WELLNESSON_WEB_CAMERA_DISTANCE_V3_20261116 */
/* The whole camera frame is decoded by ZXing. Remove the narrow reticle: it is not an ROI. */
.barcode-camera-target{display:none!important}
.barcode-camera-preview::after{
 content:"화면 전체에서 인식 · 가까이 붙이지 마세요";
 position:absolute;left:50%;bottom:12px;transform:translateX(-50%);
 width:max-content;max-width:calc(100% - 24px);box-sizing:border-box;
 text-align:center;background:rgba(10,23,41,.78);color:#fff;
 border-radius:999px;padding:7px 12px;font-size:12px;font-weight:700;
 line-height:1.4;pointer-events:none;
}
.barcode-camera-help{color:#43546d;font-size:13px;line-height:1.65}
@media(max-width:520px){
 .barcode-camera-preview::after{bottom:9px;font-size:11px;white-space:normal;width:calc(100% - 34px)}
}

/* WELLNESSON_WEB_CAMERA_ORIENTATION_V4_20261116 */
/* Avoid cropping in landscape; the fallback decoder checks both 90-degree orientations. */
@media (orientation:landscape) and (max-height:650px){
 .barcode-camera-panel{max-height:100dvh;overflow-y:auto}
 .barcode-camera-preview{aspect-ratio:16/9;max-height:58dvh}
}
.barcode-camera-preview::after{content:"가로·세로 방향 자동 인식 · 20~30cm 거리"}

/* WELLNESSON_WEB_BARCODE_PORTRAIT_V6_20261116 */
/* Restore portrait preview after the 16:9 experiment. No CSS cropping:
   portrait source fills portrait canvas without side pillars; the full source
   stays visible for detection on all aspect ratios. */
.barcode-camera-preview { aspect-ratio: 3 / 4; max-height: 53dvh; }
.barcode-camera-preview > video { position:static; width:100%; height:100%; object-fit:contain; background:#101724; }
@media (max-width: 850px) {
 .barcode-camera-preview { width:100%; aspect-ratio:3/4; max-height:53dvh; }
}
@media (orientation: landscape) and (max-height: 650px) {
 .barcode-camera-preview { width:min(100%, 52dvh); max-height:53dvh; aspect-ratio:3/4; margin-inline:auto; }
}
