/* O&E popups (see oe-popup.js). Matches the "Bento Clarity" theme in light and dark mode.
   Every rule is scoped to #oe-popups, so the screens' own button, input and label styles never leak in. */

#oe-popups{
  --oep-s:#FFFFFF;--oep-t:#0F172A;--oep-m:#475569;--oep-b:#E6EBF2;--oep-hd:#F5F7FA;
  --oep-p:#0F2A5C;--oep-pt:#FFFFFF;--oep-dg:#C2271B;--oep-fc:#1E4FA3;
  --oep-ov:rgba(15,23,42,.42);--oep-sh:0 1px 2px rgba(15,23,42,.06),0 18px 48px rgba(15,23,42,.18);--oep-ring:0 0 0 0 transparent;
  --oep-ok:#1F9D55;--oep-okb:#E7F6EE;--oep-in:#1E4FA3;--oep-inb:#E8EFFB;
  --oep-wa:#B45309;--oep-wab:#FEF3E2;--oep-er:#C2271B;--oep-erb:#FDECEC;
  font:14px/1.5 'Plus Jakarta Sans',Inter,system-ui,-apple-system,'Segoe UI',Roboto,sans-serif;
  color:var(--oep-t);-webkit-font-smoothing:antialiased;text-align:left}
:root[data-theme=dark] #oe-popups{
  --oep-s:#141B2B;--oep-t:#E8EDF5;--oep-m:#9AA6BC;--oep-b:#232C40;--oep-hd:#1A2234;
  --oep-p:#264C93;--oep-pt:#FFFFFF;--oep-dg:#D93B30;--oep-fc:#7DB8FF;
  --oep-ov:rgba(2,6,23,.62);--oep-sh:0 18px 48px rgba(0,0,0,.45);--oep-ring:0 0 0 1px #232C40;
  --oep-ok:#4ADE80;--oep-okb:rgba(74,222,128,.13);--oep-in:#7DB8FF;--oep-inb:rgba(125,184,255,.13);
  --oep-wa:#FBBF24;--oep-wab:rgba(251,191,36,.13);--oep-er:#FCA5A5;--oep-erb:rgba(248,113,113,.14)}
@media (prefers-color-scheme:dark){:root:not([data-theme=light]) #oe-popups{
  --oep-s:#141B2B;--oep-t:#E8EDF5;--oep-m:#9AA6BC;--oep-b:#232C40;--oep-hd:#1A2234;
  --oep-p:#264C93;--oep-pt:#FFFFFF;--oep-dg:#D93B30;--oep-fc:#7DB8FF;
  --oep-ov:rgba(2,6,23,.62);--oep-sh:0 18px 48px rgba(0,0,0,.45);--oep-ring:0 0 0 1px #232C40;
  --oep-ok:#4ADE80;--oep-okb:rgba(74,222,128,.13);--oep-in:#7DB8FF;--oep-inb:rgba(125,184,255,.13);
  --oep-wa:#FBBF24;--oep-wab:rgba(251,191,36,.13);--oep-er:#FCA5A5;--oep-erb:rgba(248,113,113,.14)}}

#oe-popups *,#oe-popups *::before,#oe-popups *::after{box-sizing:border-box}
html.oep-lock{overflow:hidden}

/* Colour of each kind */
#oe-popups .oep-success{--c:var(--oep-ok);--cb:var(--oep-okb)}
#oe-popups .oep-info,#oe-popups .oep-confirm,#oe-popups .oep-prompt{--c:var(--oep-in);--cb:var(--oep-inb)}
#oe-popups .oep-warning,#oe-popups .oep-validation{--c:var(--oep-wa);--cb:var(--oep-wab)}
#oe-popups .oep-error,#oe-popups .oep-denied,#oe-popups .oep-danger{--c:var(--oep-er);--cb:var(--oep-erb)}

/* Icon bubble */
#oe-popups .oep-ic{display:grid;place-items:center;flex:none;border-radius:50%;background:var(--cb);color:var(--c)}
#oe-popups .oep-ic svg{width:54%;height:54%;display:block}

/* ---------- Toasts: small popups in the corner that close by themselves ---------- */
#oe-popups .oep-toasts{position:fixed;top:calc(16px + env(safe-area-inset-top,0px));right:16px;z-index:3100;
  display:flex;flex-direction:column;gap:10px;width:min(380px,calc(100vw - 32px));pointer-events:none}
#oe-popups .oep-toast{pointer-events:auto;position:relative;display:flex;align-items:flex-start;gap:12px;margin:0;
  padding:14px 12px 14px 14px;background:var(--oep-s);color:var(--oep-t);border-radius:20px;overflow:hidden;
  box-shadow:var(--oep-sh),var(--oep-ring);animation:oep-in .24s cubic-bezier(.2,.8,.2,1)}
#oe-popups .oep-toast::before{content:"";position:absolute;left:0;top:14px;bottom:14px;width:3px;border-radius:0 3px 3px 0;background:var(--c)}
#oe-popups .oep-toast .oep-ic{width:34px;height:34px}
#oe-popups .oep-tx{flex:1;min-width:0;padding-top:1px}
#oe-popups .oep-tx b{display:block;margin:0 0 1px;font-size:13.5px;font-weight:700;line-height:1.35;color:var(--oep-t)}
#oe-popups .oep-tx p{margin:0;font-size:13px;line-height:1.45;color:var(--oep-m);white-space:pre-line;overflow-wrap:anywhere}
#oe-popups .oep-x{appearance:none;flex:none;display:grid;place-items:center;width:28px;height:28px;min-width:0;margin:-2px -2px 0 0;padding:0;
  border:0;border-radius:50%;background:transparent;color:var(--oep-m);cursor:pointer;box-shadow:none}
#oe-popups .oep-x:hover{background:var(--oep-hd);color:var(--oep-t)}
#oe-popups .oep-x svg{width:16px;height:16px;display:block}
#oe-popups .oep-bar{position:absolute;left:0;right:0;bottom:0;height:3px;background:var(--c);opacity:.5;transform-origin:left center;animation:oep-bar linear forwards}
#oe-popups .oep-toast:hover .oep-bar,#oe-popups .oep-toast:focus-within .oep-bar{animation-play-state:paused}
#oe-popups .oep-toast.oep-out{animation:oep-out .2s ease forwards}

/* ---------- Dialogs: centred popups that need an answer ---------- */
#oe-popups .oep-ov{position:fixed;inset:0;z-index:3000;display:grid;place-items:center;padding:20px;background:var(--oep-ov);
  -webkit-backdrop-filter:blur(3px);backdrop-filter:blur(3px);animation:oep-fade .18s ease}
#oe-popups .oep-dlg{width:100%;max-width:440px;max-height:calc(100vh - 40px);overflow:auto;margin:0;padding:26px 26px 22px;
  background:var(--oep-s);color:var(--oep-t);border-radius:28px;box-shadow:var(--oep-sh),var(--oep-ring);outline:none;
  animation:oep-pop .24s cubic-bezier(.2,.8,.2,1)}
#oe-popups .oep-dlg .oep-ic{width:48px;height:48px;margin:0 0 14px}
#oe-popups .oep-t{margin:0 0 6px;padding:0;font-size:18px;font-weight:800;line-height:1.3;letter-spacing:-.01em;color:var(--oep-t);text-transform:none}
#oe-popups .oep-m{margin:0;font-size:14px;line-height:1.55;color:var(--oep-m);white-space:pre-line;overflow-wrap:anywhere}
#oe-popups .oep-f{display:block;margin:16px 0 0;padding:0;font-size:12.5px;font-weight:600;color:var(--oep-t)}
#oe-popups .oep-f>span{display:block;margin:0 0 6px}
#oe-popups .oep-in{display:block;width:100%;min-width:0;height:auto;margin:0;padding:11px 14px;font:inherit;font-size:14px;font-weight:500;line-height:1.4;
  color:var(--oep-t);background:var(--oep-s);border:1px solid var(--oep-b);border-radius:14px;outline:none;box-shadow:none;transition:border-color .15s,box-shadow .15s}
#oe-popups textarea.oep-in{min-height:104px;resize:vertical}
#oe-popups .oep-in:focus{border-color:var(--oep-fc);box-shadow:0 0 0 4px color-mix(in srgb,var(--oep-fc) 20%,transparent)}
#oe-popups .oep-in[aria-invalid=true]{border-color:var(--oep-er)}
#oe-popups .oep-in::placeholder{color:var(--oep-m);opacity:.7}
#oe-popups .oep-hint{margin:8px 0 0;font-size:12.5px;color:var(--oep-m)}
#oe-popups .oep-hint code{font:700 12px/1 ui-monospace,SFMono-Regular,Menlo,Consolas,monospace;letter-spacing:.04em;padding:3px 7px;border-radius:7px;background:var(--oep-hd);color:var(--oep-t)}
#oe-popups .oep-err{margin:8px 0 0;font-size:12.5px;font-weight:600;color:var(--oep-er)}
#oe-popups .oep-err[hidden]{display:none}
#oe-popups .oep-act{display:flex;justify-content:flex-end;gap:10px;margin:22px 0 0}
#oe-popups .oep-btn{appearance:none;width:auto;min-width:96px;height:auto;margin:0;padding:10px 20px;border:1px solid transparent;border-radius:999px;
  font:600 14px/1.2 inherit;font-family:inherit;text-transform:none;letter-spacing:0;cursor:pointer;box-shadow:none;
  transition:background-color .15s,border-color .15s,color .15s,opacity .15s,filter .15s}
#oe-popups .oep-ok{background:var(--oep-p);border-color:var(--oep-p);color:var(--oep-pt)}
#oe-popups .oep-ok:hover{filter:brightness(1.15)}
#oe-popups .oep-danger .oep-ok{background:var(--oep-dg);border-color:var(--oep-dg);color:#fff}
#oe-popups .oep-ok:disabled{opacity:.42;cursor:not-allowed;filter:none}
#oe-popups .oep-cancel{background:var(--oep-s);border-color:var(--oep-b);color:var(--oep-t)}
#oe-popups .oep-cancel:hover{border-color:var(--oep-fc);color:var(--oep-fc)}
#oe-popups .oep-btn:focus-visible,#oe-popups .oep-x:focus-visible{outline:none;box-shadow:0 0 0 4px color-mix(in srgb,var(--oep-fc) 30%,transparent)}
#oe-popups .oep-dlg.oep-shake{animation:oep-shake .34s ease}
#oe-popups .oep-ov.oep-out{animation:oep-fade-out .17s ease forwards}
#oe-popups .oep-ov.oep-out .oep-dlg{animation:oep-pop-out .17s ease forwards}

/* Phones: dialogs sit at the bottom like a sheet; toasts span the width */
@media (max-width:520px){
  #oe-popups .oep-toasts{left:12px;right:12px;width:auto;top:calc(12px + env(safe-area-inset-top,0px))}
  #oe-popups .oep-ov{place-items:end center;padding:12px 12px calc(12px + env(safe-area-inset-bottom,0px))}
  #oe-popups .oep-dlg{max-width:none;padding:24px 20px 18px;border-radius:26px}
  #oe-popups .oep-act{flex-direction:column-reverse}
  #oe-popups .oep-btn{width:100%;padding:13px 20px}
}

@keyframes oep-in{from{opacity:0;transform:translateX(24px)}to{opacity:1;transform:none}}
@keyframes oep-out{to{opacity:0;transform:translateX(24px)}}
@keyframes oep-fade{from{opacity:0}to{opacity:1}}
@keyframes oep-fade-out{from{opacity:1}to{opacity:0}}
@keyframes oep-pop{from{opacity:0;transform:translateY(10px) scale(.96)}to{opacity:1;transform:none}}
@keyframes oep-pop-out{to{opacity:0;transform:translateY(6px) scale(.97)}}
@keyframes oep-bar{from{transform:scaleX(1)}to{transform:scaleX(0)}}
@keyframes oep-shake{0%,100%{transform:none}20%{transform:translateX(-7px)}40%{transform:translateX(6px)}60%{transform:translateX(-4px)}80%{transform:translateX(2px)}}
@media (prefers-reduced-motion:reduce){
  #oe-popups .oep-toast,#oe-popups .oep-ov,#oe-popups .oep-dlg{animation-duration:1ms!important}
  #oe-popups .oep-bar{display:none}
}
@media print{#oe-popups{display:none!important}}
