/* A consistent, one-time double throb for the next action in this demo. */
#demo button.menu-action-cue{transform-origin:center;animation:menu-welcome-nudge 2.8s ease-in-out 1}
@keyframes menu-welcome-nudge{0%,100%{transform:scale(1)}30%{transform:scale(1.045)}53%{transform:scale(1.008)}73%{transform:scale(1.025)}}
@media(prefers-reduced-motion:reduce){#demo button.menu-action-cue{animation:none;transform:none}}
/* The small add control gets a clear invitation instead of scaling. */
#demo #add.menu-action-cue{position:relative;overflow:visible;animation:menu-add-invite 2.8s ease-in-out 1}
@keyframes menu-add-invite{0%,100%{transform:none}20%,75%{transform:none;background:#ef4823;color:#fffaf1;border-color:#ef4823}}
@media(prefers-reduced-motion:reduce){#demo #add.menu-action-cue{animation:none}}

#demo #remove.menu-remove-cue{animation:menu-add-invite 2.8s ease-in-out 1}
@media(prefers-reduced-motion:reduce){#demo #remove.menu-remove-cue{animation:none}}

/* Invite a choice without favouring a split or tip amount. */
#demo .pay-options button.menu-action-cue,#demo .tip-options button.menu-action-cue{animation:menu-add-invite 2.8s ease-in-out 1;transform:none}
@media(prefers-reduced-motion:reduce){#demo .pay-options button.menu-action-cue,#demo .tip-options button.menu-action-cue{animation:none}}
/* Quick, sequential split-choice cue. */
#demo .pay-options button.menu-action-cue{animation:menu-split-flash .48s ease-in-out 1}
#demo .pay-options button.menu-action-cue:nth-child(2){animation-delay:.48s}
@keyframes menu-split-flash{40%,60%{background:#ef4823;color:#fffaf1;border-color:#ef4823}}
@media(prefers-reduced-motion:reduce){#demo .pay-options button.menu-action-cue{animation:none}}
/* Match the approved split-second fill across tips and quantities. */
#demo .tip-options button.menu-action-cue,#demo #add.menu-action-cue,#demo #remove.menu-remove-cue{animation:menu-split-flash .48s ease-in-out 1}
#demo .tip-options button.menu-action-cue:nth-child(2){animation-delay:.48s}
#demo .tip-options button.menu-action-cue:nth-child(3){animation-delay:.96s}
#demo .tip-options button.menu-action-cue:nth-child(4){animation-delay:1.44s}
@media(prefers-reduced-motion:reduce){#demo .tip-options button.menu-action-cue,#demo #add.menu-action-cue,#demo #remove.menu-remove-cue{animation:none}}

#demo #remove.menu-remove-cue.menu-remove-follow{animation-delay:.48s}

#demo .tip-options button[data-tip="5"]{position:relative;overflow:visible}
.menu-heart-burst{position:absolute;left:50%;top:30%;pointer-events:none;z-index:4}
.menu-heart-burst i{position:absolute;left:-6px;top:0;font:16px/1 Georgia,serif;color:#ef4823;text-shadow:0 1px #ffe0bf;opacity:0;animation:menu-happy-heart 1.1s ease-out var(--heart-delay) both}
@keyframes menu-happy-heart{0%{opacity:0;transform:translate(0,0) scale(.4) rotate(0)}18%{opacity:1;transform:translate(calc(var(--heart-x)*.3),-12px) scale(1.1) rotate(var(--heart-turn))}45%{opacity:1;transform:translate(calc(var(--heart-x)*.7),-30px) scale(.85) rotate(calc(var(--heart-turn)*-1))}100%{opacity:0;transform:translate(var(--heart-x),-65px) scale(.6) rotate(var(--heart-turn))}}
@media(prefers-reduced-motion:reduce){.menu-heart-burst{display:none}}

#demo .tip-options button[data-tip]{position:relative;overflow:visible}
#demo .product{position:relative;isolation:isolate}
.menu-love-wash{position:absolute;inset:0;border-radius:inherit;pointer-events:none;z-index:10;overflow:hidden;background:#ec382b;animation:menu-love-wash 2.2s ease-in-out both}
.menu-love-wash i{position:absolute;color:#fff2e3;font-family:Georgia,serif;font-style:normal;opacity:0;animation:menu-doodle 1.45s ease-in-out var(--heart-delay) both}
@keyframes menu-love-wash{0%{opacity:0}18%{opacity:.94}40%{opacity:.88}55%{opacity:.96}100%{opacity:0}}
@keyframes menu-doodle{0%{opacity:0;transform:translateY(12px) scale(.6) rotate(var(--heart-turn))}30%,60%{opacity:.95;transform:translateY(0) scale(1) rotate(0)}100%{opacity:0;transform:translateY(-20px) scale(1.15) rotate(var(--heart-turn))}}
@media(prefers-reduced-motion:reduce){.menu-love-wash{display:none}}

/* The card material changes colour; doodles live behind its content. */
#demo .product.menu-love-active{animation:menu-card-love 2.6s ease-in-out both}
#demo .product>.menu-love-wash{background:transparent;z-index:-1;animation:none}
#demo .product.menu-love-active .menu-love-wash i{color:#fff0d9;animation-duration:1.8s}
@keyframes menu-card-love{0%,100%{background-color:var(--paper)}20%,58%{background-color:#ed492d}40%{background-color:#f35c3f}}
@media(prefers-reduced-motion:reduce){#demo .product.menu-love-active{animation:none}}

.menu-sad-face{position:absolute;width:30px;height:30px;left:calc(50% - 15px);top:-25px;pointer-events:none;z-index:3;animation:menu-sad-bob 1.3s ease-in-out both}
.menu-sad-face svg{width:100%;height:100%}
@keyframes menu-sad-bob{0%,100%{opacity:0;transform:translateY(5px) scale(.85)}25%,65%{opacity:1;transform:translateY(-4px) scale(1)}}
@media(prefers-reduced-motion:reduce){.menu-sad-face{display:none}}
/* Signature line: a calm, continuous PayOn-orange pulse. */
#demo .demo-under{color:#ef4823;animation:menu-signature-pulse 3s ease-in-out infinite}
@keyframes menu-signature-pulse{0%,100%{color:#ef4823;opacity:1;text-shadow:none}50%{color:#fff;opacity:1;text-shadow:0 0 10px #ffffff25}}
@media(prefers-reduced-motion:reduce){#demo .demo-under{animation:none;opacity:1;text-shadow:none}}

/* Keep the celebration in the card margins, away from all copy. */
#demo .product.menu-love-active{animation:menu-card-warmth 2.6s ease-in-out both}
@keyframes menu-card-warmth{0%,100%{background-color:var(--paper)}25%,60%{background-color:#ffe4d8}}
#demo .product.menu-love-active .menu-love-wash i{font-size:0!important;filter:drop-shadow(0 2px 2px #a6392225);animation:menu-heart-rise 2s ease-out var(--heart-delay) both}
.menu-love-wash i svg{display:block;width:100%;height:100%}
@keyframes menu-heart-rise{0%{opacity:0;transform:translateY(15px) scale(.6)}20%,65%{opacity:1}100%{opacity:0;transform:translateY(-25px) scale(1) rotate(var(--heart-turn))}}
.menu-confetti{position:absolute;width:5px;height:9px;border-radius:1px;opacity:0;animation:menu-confetti-fall 2s ease-out var(--heart-delay) both}
@keyframes menu-confetti-fall{0%{opacity:0;transform:translateY(-14px) rotate(0)}15%,65%{opacity:.9}100%{opacity:0;transform:translateY(30px) rotate(var(--twist))}}

#demo .product.menu-love-active .menu-love-wash{opacity:.45}

/* PayOn concierge: transparent CGI artwork with gentle ambient motion. */
#demo .demo-robot-brand{display:inline-block;position:relative;width:120px;height:100px;flex:0 0 120px;overflow:visible;isolation:isolate}
.demo-robot-brand img{position:absolute;width:120px;height:180px;object-fit:contain;left:0;top:-42px;filter:drop-shadow(0 8px 9px #0004);animation:payon-concierge-float 5.8s cubic-bezier(.45,0,.55,1) infinite;transform-origin:50% 70%}
.demo-robot-shadow{position:absolute;width:58px;height:8px;bottom:-27px;left:31px;border-radius:50%;background:#0005;filter:blur(5px);animation:payon-concierge-shadow 5.8s ease-in-out infinite;z-index:-1}
@keyframes payon-concierge-float{0%,100%{transform:translateY(0) rotate(-2deg)}50%{transform:translateY(-9px) rotate(2deg)}}
@keyframes payon-concierge-shadow{0%,100%{transform:scaleX(1);opacity:.6}50%{transform:scaleX(.8);opacity:.3}}
@media(max-width:720px){#demo .demo-robot-brand{width:90px;height:74px;flex-basis:90px}.demo-robot-brand img{width:90px;height:135px;top:-29px}.demo-robot-shadow{left:23px;width:44px;bottom:-21px}}
@media(prefers-reduced-motion:reduce){.demo-robot-brand img,.demo-robot-shadow{animation:none}}
