/* ASFOS centred notifications and progress pop-up (loaded after all other CSS). */
html body #asfosNoticeLayer{
  position:fixed!important;inset:0!important;z-index:2147483000!important;
  display:flex!important;flex-direction:column!important;align-items:center!important;justify-content:center!important;gap:10px!important;
  padding:max(16px,env(safe-area-inset-top)) max(16px,env(safe-area-inset-right)) max(16px,env(safe-area-inset-bottom)) max(16px,env(safe-area-inset-left))!important;
  pointer-events:none!important;box-sizing:border-box!important;transform:none!important;
}
html body #asfosNoticeLayer:empty{display:none!important}
html body .asfos-notice{
  pointer-events:auto;box-sizing:border-box;position:relative;display:flex;align-items:flex-start;gap:12px;
  width:min(440px,100%);max-height:calc(100dvh - 32px);max-height:calc(100vh - 32px);overflow-y:auto;
  padding:14px 40px 14px 14px;border-radius:16px;background:#fff;color:#0d0d0d;
  border:1px solid #e5e5e5;box-shadow:0 18px 60px rgba(0,0,0,.28);
  animation:asfosNoticeIn .2s ease-out;cursor:pointer;overflow-wrap:anywhere;word-break:break-word;
}
html body .asfos-notice.leaving{opacity:0;transform:scale(.97);transition:opacity .25s,transform .25s}
html body .asfos-notice-icon{flex:0 0 32px;width:32px;height:32px;border-radius:50%;display:flex;align-items:center;justify-content:center;font-weight:800;font-size:17px;background:#f2f4f7;color:#202123}
html body .asfos-notice.error .asfos-notice-icon{background:#fef3f2;color:#b42318}
html body .asfos-notice.warning .asfos-notice-icon{background:#fffaeb;color:#b54708}
html body .asfos-notice.success .asfos-notice-icon{background:#ecfdf3;color:#067647}
html body .asfos-notice.error{border-color:#f1c0bd}
html body .asfos-notice-body{min-width:0;flex:1;display:flex;flex-direction:column;gap:3px}
html body .asfos-notice-body strong{font-size:14.5px;font-weight:650;line-height:1.35;color:#0d0d0d}
html body .asfos-notice-body span{font-size:13px;line-height:1.45;color:#4b5563;white-space:pre-wrap}
html body .asfos-notice-close{position:absolute;top:6px;right:6px;width:30px;height:30px;border:0;border-radius:50%;background:transparent;color:#6b7280;font-size:20px;line-height:1;cursor:pointer}
html body .asfos-notice-close:hover{background:#f2f4f7}
@keyframes asfosNoticeIn{from{opacity:0;transform:scale(.96)}to{opacity:1;transform:scale(1)}}

/* Legacy toast containers are retired in favour of #asfosNoticeLayer. */
html body #asfosToastStack{display:none!important}
html body .asfos-toast{position:fixed!important;top:50%!important;left:50%!important;right:auto!important;bottom:auto!important;transform:translate(-50%,-50%)!important;width:min(440px,calc(100vw - 32px))!important;max-width:calc(100vw - 32px)!important;max-height:calc(100vh - 32px)!important;overflow:auto!important;box-sizing:border-box!important;z-index:2147483000!important;overflow-wrap:anywhere}

/* Progress / result pop-up: always centred and inside the screen. */
html body .asfos-progress-overlay{z-index:2147482000!important;padding:16px!important;box-sizing:border-box!important;align-items:center!important;justify-content:center!important;cursor:default}
html body .asfos-progress-overlay.fail,html body .asfos-progress-overlay.done{cursor:pointer}
html body .asfos-progress-card{width:min(400px,100%)!important;max-width:100%!important;max-height:calc(100vh - 32px)!important;overflow-y:auto!important;box-sizing:border-box!important;overflow-wrap:anywhere;word-break:break-word}
html body .asfos-progress-detail{white-space:pre-wrap}

@media(max-width:480px){
  html body .asfos-notice{padding:12px 36px 12px 12px;border-radius:14px}
  html body .asfos-notice-body strong{font-size:14px}
}
@media(prefers-reduced-motion:reduce){html body .asfos-notice{animation:none}}
