/* Moffice button rule v1 (owner 2026-12-04, from "10 button styles" reel):
   main CTA = 3D Press (+ Shimmer while waiting) · submit = Morph to spinner · every tap = Ripple
   correct answer = Morph to green check · reward/certificate/payment success = Confetti Pop (js) */
:is(.lms-cta-btn:not(.outline),.checkpoint-primary,.certificate-primary,.success-primary,.sp-primary,.activation-primary,.portal-primary,.replay-primary,.btn-primary,.sales-mobile-buy,.checkpoint-submit){
  box-shadow:inset 0 -4px 0 rgba(0,0,0,.2);
  transition:transform .12s ease,box-shadow .12s ease,filter .12s ease,background-color .2s,color .2s}
:is(.lms-cta-btn:not(.outline),.checkpoint-primary,.certificate-primary,.success-primary,.sp-primary,.activation-primary,.portal-primary,.replay-primary,.btn-primary,.sales-mobile-buy,.checkpoint-submit):hover{
  box-shadow:inset 0 -4px 0 rgba(0,0,0,.2),0 10px 24px rgba(0,0,0,.13)}
:is(.lms-cta-btn:not(.outline),.checkpoint-primary,.certificate-primary,.success-primary,.sp-primary,.activation-primary,.portal-primary,.replay-primary,.btn-primary,.sales-mobile-buy,.checkpoint-submit):active{
  transform:translateY(3px)!important;box-shadow:inset 0 -1px 0 rgba(0,0,0,.2)!important;filter:brightness(.96)}

/* Shimmer: a soft light sweep every few seconds on the page's main call-to-action only (js adds .mf-shimmer) */
.mf-shimmer{background-image:linear-gradient(110deg,transparent 0 38%,rgba(255,255,255,.6) 50%,transparent 62% 100%);
  background-size:300% 100%;background-repeat:no-repeat;background-position:150% 0;animation:mf-shine 5s ease-in-out 1.2s infinite}
@keyframes mf-shine{0%,62%{background-position:150% 0}88%,100%{background-position:-50% 0}}

/* Ripple: drawn in a layer over the button, so the button's own styles are untouched */
.mf-ripple{position:absolute;z-index:2147483000;overflow:hidden;pointer-events:none}
.mf-ripple>i{position:absolute;border-radius:50%;background:var(--mf-rc,rgba(255,255,255,.45));transform:scale(0);animation:mf-ripple .6s cubic-bezier(.2,.7,.3,1) forwards}
@keyframes mf-ripple{to{transform:scale(1);opacity:0}}

/* Morph: the pressed submit button folds into a round spinner while the next page loads */
.mf-morph{pointer-events:none;color:transparent!important;transition:clip-path .38s cubic-bezier(.6,0,.2,1)}
.mf-morph>*{visibility:hidden}
.mf-morph::after{content:"";position:absolute;left:50%;top:50%;width:22px;height:22px;margin:-11px 0 0 -11px;box-sizing:border-box;
  border:3px solid var(--mf-fg,#fff);border-right-color:transparent;border-radius:50%;opacity:0;
  animation:mf-fade .2s .25s forwards,mf-spin .7s linear infinite}
@keyframes mf-spin{to{transform:rotate(360deg)}}
@keyframes mf-fade{to{opacity:1}}

/* Correct answer: dark dot grows, then turns into a green check */
.checkpoint-answer.correct{position:relative}
.checkpoint-answer.correct h3{padding-right:46px}
.checkpoint-answer.correct::after{content:"";position:absolute;top:14px;right:14px;width:34px;height:34px;border-radius:50%;
  background:#20a66f url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3E%3Cpath d='M5 12.5l4.5 4.5L19 7.5' fill='none' stroke='%23fff' stroke-width='3.2' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E") center/20px no-repeat;
  animation:mf-check .75s cubic-bezier(.3,1.5,.5,1) both;animation-delay:calc(.25s + var(--mf-i,0) * .18s)}
@keyframes mf-check{0%{transform:scale(0);background-color:#173f57;background-size:0}
  45%{transform:scale(1.15);background-color:#173f57;background-size:0}70%{background-color:#20a66f;background-size:0}
  100%{transform:scale(1);background-color:#20a66f;background-size:20px}}

/* Confetti pieces (js) */
.mf-confetti{position:fixed;z-index:2147483001;pointer-events:none;width:10px;height:16px;border-radius:2px;will-change:transform,opacity}

@media (prefers-reduced-motion:reduce){
  .mf-shimmer{animation:none;background-image:none}
  .checkpoint-answer.correct::after{animation:none}
  .mf-morph::after{animation:mf-fade .01s forwards}}
