/* SmartServa modal motion (2026-11-19) - one open/close motion for EVERY modal, matched to the
   SnookerKing "glass" modal (shared/js/modal-glass.js + style.css glassOverlay*):
   - backdrop: fade in .32s cubic-bezier(.32,.72,0,1); fade out .20s cubic-bezier(.55,.055,.675,.19)
   - dialog:   open .32s spring cubic-bezier(.34,1.45,.64,1) from scale .92 + 10px lower + blur 2px + transparent;
               close .20s ease-in back to the same state.
   Uses the independent scale/translate properties and filter (blur + opacity) so legacy
   "transform:none!important / opacity:1!important" pins on .pop_o never block it, and holds
   nothing after open: fill "backwards" so a finished dialog has no transform/filter (no containing
   block for position:fixed children such as pickers); close holds its end state until removal.
   POSERVA excluded (#poserva, #add_ticket, #edit_ticket, #add_tk_face, #ps_pay_o). */
@keyframes skmOvIn{from{opacity:0}to{opacity:1}}
@keyframes skmOvOut{from{opacity:1}to{opacity:0}}
@keyframes skmIn{from{scale:.92;translate:0 10px;filter:blur(2px) opacity(0)}to{scale:none;translate:none;filter:none}}
@keyframes skmOut{from{scale:none;translate:none;filter:none}to{scale:.92;translate:0 10px;filter:blur(2px) opacity(0)}}

/* 1. legacy popups (.pop_bg > .pop_o, .bepop_o_e > .page_c): open = .showe, close = .hidee (320ms hold) */
html body :is(.pop_bg,.bepop_o_e).showe:not(.hidee):not(#poserva):not(#add_ticket):not(#edit_ticket):not(#add_tk_face):not(#ps_pay_o){animation:skmOvIn .32s cubic-bezier(.32,.72,0,1) backwards}
html body :is(.pop_bg,.bepop_o_e).hidee:not(#poserva):not(#add_ticket):not(#edit_ticket):not(#add_tk_face):not(#ps_pay_o){animation:skmOvOut .2s cubic-bezier(.55,.055,.675,.19) forwards}
html body :is(.pop_bg,.bepop_o_e):is(.showe,.hidee):not(#poserva):not(#add_ticket):not(#edit_ticket):not(#add_tk_face):not(#ps_pay_o) :is(.pop_o,.page_c){transform:none!important;opacity:1!important}
html body :is(.pop_bg,.bepop_o_e).showe:not(.hidee):not(#poserva):not(#add_ticket):not(#edit_ticket):not(#add_tk_face):not(#ps_pay_o) :is(.pop_o,.page_c){animation:skmIn .32s cubic-bezier(.34,1.45,.64,1) backwards;animation-fill-mode:backwards!important}
html body :is(.pop_bg,.bepop_o_e).hidee:not(#poserva):not(#add_ticket):not(#edit_ticket):not(#add_tk_face):not(#ps_pay_o) :is(.pop_o,.page_c){animation:skmOut .2s cubic-bezier(.55,.055,.675,.19) forwards}

/* 2. Platform Console dialogs (#ps_md, #pf_cf): open = .pf-in, close = .pf-out (pf.js hides after 200ms) */
html body :is(#ps_md,#pf_cf,#pf_va_cf).pf-in{opacity:1;animation:skmOvIn .32s cubic-bezier(.32,.72,0,1) backwards}
html body :is(#ps_md,#pf_cf,#pf_va_cf).pf-in .bx{opacity:1;transform:none;transition:none;animation:skmIn .32s cubic-bezier(.34,1.45,.64,1) backwards}
html body :is(#ps_md,#pf_cf,#pf_va_cf).pf-out{opacity:1;transition:none;animation:skmOvOut .2s cubic-bezier(.55,.055,.675,.19) forwards}
html body :is(#ps_md,#pf_cf,#pf_va_cf).pf-out .bx{opacity:1;transform:none;transition:none;animation:skmOut .2s cubic-bezier(.55,.055,.675,.19) forwards}

/* 3. Bug Report / Feature Request modals (.fbk-ov > .fbk-modal; fbk.js adds .fbk-closing for 200ms) */
html body .fbk-ov{animation:skmOvIn .32s cubic-bezier(.32,.72,0,1) backwards}
html body .fbk-ov .fbk-modal{animation:skmIn .32s cubic-bezier(.34,1.45,.64,1) backwards}
html body .fbk-ov.fbk-closing{pointer-events:none;animation:skmOvOut .2s cubic-bezier(.55,.055,.675,.19) forwards}
html body .fbk-ov.fbk-closing .fbk-modal{animation:skmOut .2s cubic-bezier(.55,.055,.675,.19) forwards}

/* 4. confirm / alert card (assets/ui/confirm.js; .ccd-closing for 200ms) */
html body .ccd-bg{animation:skmOvIn .32s cubic-bezier(.32,.72,0,1) backwards}
html body .ccd-bg .ccd{animation:skmIn .32s cubic-bezier(.34,1.45,.64,1) backwards}
html body .ccd-bg.ccd-closing{pointer-events:none;animation:skmOvOut .2s cubic-bezier(.55,.055,.675,.19) forwards}
html body .ccd-bg.ccd-closing .ccd{animation:skmOut .2s cubic-bezier(.55,.055,.675,.19) forwards}

/* 5. Appointments modals (assets/vp: .vp-ov > .vp-md, close = .vp-closing for 200ms) + portal confirm card (.vpu-cc) */
html body .vp-ov{animation:skmOvIn .32s cubic-bezier(.32,.72,0,1) backwards}
html body .vp-ov .vp-md{animation:skmIn .32s cubic-bezier(.34,1.45,.64,1) backwards}
html body .vp-ov.vp-closing{pointer-events:none;animation:skmOvOut .2s cubic-bezier(.55,.055,.675,.19) forwards}
html body .vp-ov.vp-closing .vp-md{animation:skmOut .2s cubic-bezier(.55,.055,.675,.19) forwards}
html body .vpu-cc-bg{animation:skmOvIn .32s cubic-bezier(.32,.72,0,1) backwards}
html body .vpu-cc-bg .vpu-cc{animation:skmIn .32s cubic-bezier(.34,1.45,.64,1) backwards}
html body .vpu-cc-bg.vpu-cc-closing{pointer-events:none;animation:skmOvOut .2s cubic-bezier(.55,.055,.675,.19) forwards}
html body .vpu-cc-bg.vpu-cc-closing .vpu-cc{animation:skmOut .2s cubic-bezier(.55,.055,.675,.19) forwards}

/* 6. bottom-card popups (.bpop_o: Booking Details, Share, QR-Key, Contact, Document Type...) + their
   backdrops (.bpop2_bg, .bpop3_bg). They open by becoming display:block (CSS animations replay on
   every show) and close via assets/ui/modal_motion.js (.skm-out held 200ms). Phone portals (body.up)
   keep their slide-up sheets; POSERVA's Apply Discount (#giv_dis) + PIN (#enter_pin) and anything
   while POSERVA is open are excluded. */
html body:not(.up):not(.hs-74h0d6) .bpop_o:not(#giv_dis):not(#enter_pin){animation:skmIn .32s cubic-bezier(.34,1.45,.64,1) backwards}
html body:not(.up):not(.hs-74h0d6) :is(.bpop2_bg,.bpop3_bg){animation:skmOvIn .32s cubic-bezier(.32,.72,0,1) backwards}
html body .bpop_o.skm-out{display:block!important;pointer-events:none;animation:skmOut .2s cubic-bezier(.55,.055,.675,.19) forwards!important}
html body :is(.bpop2_bg,.bpop3_bg).skm-out{display:block!important;pointer-events:none;animation:skmOvOut .2s cubic-bezier(.55,.055,.675,.19) forwards!important}

/* 7. Platform "Curl requests" modal (#pfcl_o.on > #pfcl_m; close held by modal_motion.js) */
html body #pfcl_o{animation:skmOvIn .32s cubic-bezier(.32,.72,0,1) backwards}
html body #pfcl_o #pfcl_m{animation:skmIn .32s cubic-bezier(.34,1.45,.64,1) backwards}
html body #pfcl_o.skm-out{display:flex!important;pointer-events:none;animation:skmOvOut .2s cubic-bezier(.55,.055,.675,.19) forwards}
html body #pfcl_o.skm-out #pfcl_m{animation:skmOut .2s cubic-bezier(.55,.055,.675,.19) forwards}

/* 8. Bug Report screenshot viewer (.fbk-lb; closes through fbk.js closeOverlay -> .fbk-closing) */
html body .fbk-lb{animation:skmOvIn .32s cubic-bezier(.32,.72,0,1) backwards}
html body .fbk-lb img{animation:skmIn .32s cubic-bezier(.34,1.45,.64,1) backwards}
html body .fbk-lb.fbk-closing{pointer-events:none;animation:skmOvOut .2s cubic-bezier(.55,.055,.675,.19) forwards}
html body .fbk-lb.fbk-closing img{animation:skmOut .2s cubic-bezier(.55,.055,.675,.19) forwards}

@media (prefers-reduced-motion:reduce){
html body :is(.pop_bg,.bepop_o_e):not(#poserva):not(#add_ticket):not(#edit_ticket):not(#add_tk_face):not(#ps_pay_o),html body :is(.pop_bg,.bepop_o_e):not(#poserva):not(#add_ticket):not(#edit_ticket):not(#add_tk_face):not(#ps_pay_o) :is(.pop_o,.page_c),
html body :is(#ps_md,#pf_cf,#pf_va_cf),html body :is(#ps_md,#pf_cf,#pf_va_cf) .bx,html body .fbk-ov,html body .fbk-ov .fbk-modal,html body .ccd-bg,html body .ccd-bg .ccd,html body .vp-ov,html body .vp-ov .vp-md,html body .vpu-cc-bg,html body .vpu-cc-bg .vpu-cc,
html body .bpop_o,html body :is(.bpop2_bg,.bpop3_bg),html body :is(.bpop_o,.bpop2_bg,.bpop3_bg,#pfcl_o).skm-out:not(#_),html body #pfcl_o.skm-out #pfcl_m:not(#_),html body #pfcl_o,html body #pfcl_o #pfcl_m,html body .fbk-lb,html body .fbk-lb img{animation:none!important}
}

/* 9. Popups above the console shell (2026-11-19, D1): #content carries a view-transition-name (seamless page tabs), which makes it
   a stacking context - popups inside it painted UNDER the sticky top bar and the sidebar. While any popup is open
   (body.ss-modal-open, set by assets/ui/modal_keys.js) the name is dropped; page transitions are unaffected. */
html body.ss-modal-open #content,html body.ss-modal-open .page_c > .snav{view-transition-name:none}

/* 10. Notification panel (2026-11-23, assets/ui/noti_panel.css owns the layout): page dims, then the frosted panel slides in from the
   right like macOS Notification Center; cards follow with a short stagger. Independent `translate` (not transform), so legacy
   transform pins cannot block it. State: #noti_o.show / .hide (script.js + $.fn.hfea), body.ss-noti-open (noti_panel.js). */
#noti_dim{transition:background .38s cubic-bezier(.4,0,.2,1),backdrop-filter .38s cubic-bezier(.4,0,.2,1),-webkit-backdrop-filter .38s cubic-bezier(.4,0,.2,1)}
body #noti_o{translate:calc(100% + 24px) 0}
body #noti_o.show{animation:np_in .52s cubic-bezier(.32,.72,0,1) forwards}
body #noti_o.hide{animation:np_out .3s cubic-bezier(.4,0,1,1) forwards}
@keyframes np_in{from{translate:calc(100% + 24px) 0}to{translate:0 0}}
@keyframes np_out{from{translate:0 0}to{translate:calc(100% + 24px) 0}}
#noti_o .noti_c .anoti_r{animation:np_card .45s cubic-bezier(.32,.72,0,1) both}
#noti_o .noti_c .anoti_r:nth-child(2){animation-delay:.04s}
#noti_o .noti_c .anoti_r:nth-child(3){animation-delay:.08s}
#noti_o .noti_c .anoti_r:nth-child(n+4){animation-delay:.12s}
@keyframes np_card{from{opacity:0;translate:28px 0}to{opacity:1;translate:0 0}}
@media (prefers-reduced-motion:reduce){body #noti_o.show,body #noti_o.hide,#noti_o .noti_c .anoti_r{animation-duration:.01s}}

/* 11. Facility layout viewer (2026-11-23, assets/ui/layout_viewer.js/.css): fades in over New Booking, the image rises slightly;
   closing fades out (.flv-closing, removed after 220 ms). */
.flv{animation:flvIn .28s cubic-bezier(.32,.72,0,1) backwards}
.flv .flv-stage{animation:flvRise .36s cubic-bezier(.32,.72,0,1) backwards}
.flv.flv-closing{pointer-events:none;animation:flvOut .2s cubic-bezier(.4,0,1,1) forwards}
@keyframes flvIn{from{opacity:0}to{opacity:1}}
@keyframes flvOut{from{opacity:1}to{opacity:0}}
@keyframes flvRise{from{opacity:0;scale:.96;translate:0 12px}to{opacity:1;scale:1;translate:0 0}}
@media (prefers-reduced-motion:reduce){.flv,.flv .flv-stage,.flv.flv-closing{animation-duration:.01s}}
