/* 1.7.4 - locally bundled, theme-isolated scanner, QR handoff and photo editor. */
:is(.bsgp-photo-simple,.bsgp-scan-simple,.bsgp-qr-dialog,.bsgp-mobile-page) {font-family:Inter,ui-sans-serif,-apple-system,BlinkMacSystemFont,"Segoe UI",Arial,sans-serif;color:#16234d;line-height:1.5;box-sizing:border-box}
:is(.bsgp-photo-simple,.bsgp-scan-simple,.bsgp-qr-dialog,.bsgp-mobile-page) *{box-sizing:border-box}
:is(.bsgp-photo-simple,.bsgp-scan-simple,.bsgp-qr-dialog,.bsgp-mobile-page) [hidden]{display:none!important}
dialog:is(.bsgp-photo-simple,.bsgp-scan-simple,.bsgp-qr-dialog){position:fixed;inset:0;margin:auto;padding:0;border:1px solid #d8e0ef;border-radius:16px;background:#fff;box-shadow:0 24px 85px #08182a40;max-width:calc(100vw - 24px);max-height:calc(100dvh - 24px);overflow:auto}
dialog:is(.bsgp-photo-simple,.bsgp-scan-simple,.bsgp-qr-dialog)::backdrop{background:#0c1732b3}
:is(.bsgp-photo-simple,.bsgp-scan-simple,.bsgp-qr-dialog) header{display:flex;align-items:center;justify-content:space-between;gap:16px;padding:18px 24px;border-bottom:1px solid #e2e8f2;background:#fff}
:is(.bsgp-photo-simple,.bsgp-scan-simple,.bsgp-qr-dialog) h2{margin:0;font-size:22px;font-weight:750;line-height:1.25;color:#15265b}
:is(.bsgp-photo-simple,.bsgp-scan-simple,.bsgp-qr-dialog) header small{font-size:11px;text-transform:uppercase;letter-spacing:.12em;color:#66728b}
:is(.bsgp-photo-simple,.bsgp-scan-simple,.bsgp-qr-dialog,.bsgp-mobile-page) button{appearance:none;cursor:pointer;min-height:46px;min-width:44px;border:1px solid #cbd6ea;border-radius:9px;background:#f6f8fc;color:#17265b;font:inherit;font-weight:700;padding:10px 16px;line-height:1.3;white-space:normal;max-width:100%}
:is(.bsgp-photo-simple,.bsgp-scan-simple,.bsgp-qr-dialog,.bsgp-mobile-page) button:disabled{opacity:.55;cursor:not-allowed}
:is(.bsgp-photo-simple,.bsgp-scan-simple,.bsgp-qr-dialog,.bsgp-mobile-page) :is(button,input,canvas):focus-visible{outline:3px solid #839fed;outline-offset:3px}
:is(.bsgp-photo-simple,.bsgp-scan-simple,.bsgp-qr-dialog) [data-close]{background:#fff;font-size:25px;padding:3px 10px;border-color:transparent}
:is(.bsgp-photo-simple,.bsgp-scan-simple,.bsgp-qr-dialog) footer{display:flex;justify-content:space-between;gap:10px;position:sticky;bottom:0;z-index:2;background:#fff;padding:16px 24px;border-top:1px solid #dfe7f4}
:is(.bsgp-photo-simple,.bsgp-scan-simple,.bsgp-mobile-page) :is([data-save],[data-use],[data-take],[data-mobile-finish]),.bsgp-photo-controls button[aria-pressed="true"]{background:#18265d;color:#fff;border-color:#18265d}
:is(.bsgp-photo-simple,.bsgp-scan-simple,.bsgp-qr-dialog,.bsgp-mobile-page) .is-error{color:#a0202c!important;background:#fff4f3;border:1px solid #e8b8b7;padding:12px;border-radius:8px}
.bsgp-photo-simple{width:920px}
.bsgp-photo-layout{display:grid;grid-template-columns:minmax(220px,350px) minmax(240px,1fr);gap:28px;padding:24px;align-items:start}
.bsgp-photo-preview{min-width:0}
.bsgp-photo-canvas{width:100%;aspect-ratio:7/9;border:1px solid #b3bfd8;border-radius:0;background-color:#fff;background-image:conic-gradient(#f0f2f6 25%,transparent 0 50%,#f0f2f6 0 75%,transparent 0);background-size:20px 20px;overflow:hidden}
.bsgp-photo-canvas canvas{display:block;width:100%;height:100%;aspect-ratio:7/9;touch-action:none;cursor:grab}
.bsgp-photo-preview p{display:flex;justify-content:space-between;gap:8px;font-size:12px;margin:9px 0;color:#67758e}
.bsgp-photo-controls{min-width:0}
.bsgp-photo-controls nav{display:grid;grid-template-columns:1fr 1fr;gap:10px}
.bsgp-photo-controls section{padding-top:12px}
.bsgp-photo-controls p{font-size:14px;line-height:1.6;margin:12px 0;overflow-wrap:anywhere}
.bsgp-photo-controls label{display:block;font-size:13px;font-weight:700;margin:16px 0}
.bsgp-photo-controls input[type=range]{display:block;width:100%;height:44px;padding:0;background:none;accent-color:#1b2a62;box-shadow:none}
.bsgp-photo-controls small{display:block;color:#697793;font-size:12px;margin:16px 0}
.bsgp-scan-simple{width:630px}
.bsgp-scan-simple>p{padding:0 20px;font-size:14px}
.bsgp-scan-stage{position:relative;margin:0 16px;background:#111b2c;height:min(53dvh,570px);min-height:240px;overflow:hidden;border-radius:10px}
.bsgp-scan-stage video{display:block;width:100%;height:100%;object-fit:contain}
.bsgp-scan-outline{position:absolute;border:2px solid #fff;box-shadow:0 0 0 2000px #070f2670;pointer-events:none;border-radius:2px}
.bsgp-scan-stage img{display:block;width:100%;height:100%;object-fit:contain}
.bsgp-scan-size{display:flex;align-items:center;gap:16px;padding:10px 20px;font-size:12px;font-weight:700}
.bsgp-scan-size input{width:100%;min-width:0;height:36px;accent-color:#18265d}
.bsgp-scan-simple footer{justify-content:center}
.bsgp-scan-simple footer button{flex:1}
.bsgp-qr-dialog{width:460px;text-align:center}
.bsgp-qr-dialog>p,.bsgp-qr-dialog>small,.bsgp-qr-dialog>[data-progress]{margin:16px 24px;display:block;font-size:14px}
.bsgp-qr-dialog canvas{display:block;width:min(300px,75vw);max-width:calc(100% - 40px);height:auto;margin:15px auto;background:#fff}
.bsgp-qr-dialog [data-progress]{text-align:left;color:#546884}.bsgp-qr-dialog [data-progress] p{margin:5px 0}
.bsgp-qr-dialog footer{justify-content:center}.bsgp-qr-dialog footer [data-close]{font-size:14px;border:1px solid #cbd6ea;padding:10px 16px}
.bsgp-mobile-handoff{display:flex;align-items:center;gap:18px;flex-wrap:wrap;padding:15px;border:1px solid #dce5f3;background:#f7f9fc;border-radius:12px;margin:16px 0}
.bsgp-mobile-handoff p{margin:0;font-size:13px;color:#60708d}
body.bsgp-mobile-page{margin:0;background:#f1f4f9;min-height:100dvh;padding:16px}
.bsgp-mobile-page main{max-width:680px;margin:auto;background:#fff;border-radius:18px;padding:22px;box-shadow:0 12px 50px #2334520b}
.bsgp-mobile-page header img{max-width:250px;width:90%;height:auto;display:block;margin:5px auto 20px}
.bsgp-mobile-page h1{font-size:25px;margin:0 0 6px;line-height:1.25}
.bsgp-mobile-page header>p{font-size:14px;color:#697891;margin:0}
.bsgp-mobile-page [data-mobile-status]{padding:12px 0;color:#5e6e8a;font-size:14px;overflow-wrap:anywhere}
.bsgp-mobile-item{border:1px solid #e1e7f1;border-radius:12px;padding:16px;margin:12px 0}
.bsgp-mobile-item h2{font-size:17px;margin:0 0 4px;color:#1b2d62}
.bsgp-mobile-item p{font-size:13px;color:#7e8493;margin:4px 0 14px}.bsgp-mobile-item .is-saved{color:#207249;font-weight:700}
.bsgp-mobile-actions{display:flex;gap:10px}.bsgp-mobile-actions button{flex:1;font-size:14px}
.bsgp-mobile-item img{display:block;max-height:180px;max-width:100%;margin:12px auto;object-fit:contain}
.bsgp-mobile-page [data-mobile-finish]{width:100%;margin-top:12px}.bsgp-mobile-expiry{font-size:11px;color:#8391a8;text-align:center}
#bsgp-document-images:not(.is-photo-pair){display:block!important}
#bsgp-document-images #bsgp-document-result{margin:0 auto;max-width:100%}
#bsgp-document-images img{object-fit:contain}
@media(max-width:700px){
 .bsgp-photo-layout{grid-template-columns:1fr;gap:16px;padding:16px}
 .bsgp-photo-preview{width:min(100%,260px);margin:auto}
 :is(.bsgp-photo-simple,.bsgp-scan-simple,.bsgp-qr-dialog) header{padding:14px 16px}
 :is(.bsgp-photo-simple,.bsgp-scan-simple,.bsgp-qr-dialog) h2{font-size:20px}
 :is(.bsgp-photo-simple,.bsgp-scan-simple,.bsgp-qr-dialog) footer{padding:12px 16px calc(12px + env(safe-area-inset-bottom))}
 .bsgp-photo-controls nav button{font-size:14px;padding:11px 8px}
 .bsgp-photo-controls section{padding-top:0}.bsgp-photo-controls label{margin:10px 0}
 .bsgp-scan-simple{width:100%}.bsgp-scan-stage{height:49dvh}
 .bsgp-mobile-handoff{display:none}
 .bsgp-mobile-page main{padding:16px}.bsgp-mobile-page{padding:8px!important}
}
@media(prefers-reduced-motion:reduce){.bsgp-photo-simple *,.bsgp-scan-simple *{scroll-behavior:auto!important;transition:none!important}}
