/* Small sign-in animations for the Olympus and Employee Portal sign-in pages
   (2026-12-02, owner: "little ones" when you sign in, type, press).
   Look only: nothing here changes what a form sends or where it goes.
   Paired with signin_motion.js; both pages work the same without either. */
@keyframes smIn { from { opacity: 0; transform: translateY(12px) scale(.985); } to { opacity: 1; transform: none; } }
@keyframes smIconIn { 0% { opacity: 0; transform: scale(.6) rotate(-8deg); } 60% { opacity: 1; transform: scale(1.06) rotate(2deg); } 100% { transform: none; } }
@keyframes smBreathe { 0%,100% { box-shadow: 0 12px 36px rgba(0,0,0,.55), 0 0 0 1px rgba(255,255,255,.18), 0 0 0 0 rgba(196,124,255,0); }
                       50%     { box-shadow: 0 12px 36px rgba(0,0,0,.55), 0 0 0 1px rgba(255,255,255,.22), 0 0 26px 2px rgba(196,124,255,.28); } }
@keyframes smTick { 0% { transform: scale(1); } 40% { transform: scale(1.018); } 100% { transform: scale(1); } }
@keyframes smShine { from { transform: translateX(-120%) skewX(-20deg); } to { transform: translateX(220%) skewX(-20deg); } }
@keyframes smRipple { from { transform: scale(0); opacity: .45; } to { transform: scale(1); opacity: 0; } }
@keyframes smSpin { to { transform: rotate(360deg); } }
@keyframes smShake { 0%,100% { transform: none; } 20% { transform: translateX(-7px); } 40% { transform: translateX(6px); } 60% { transform: translateX(-4px); } 80% { transform: translateX(2px); } }
@keyframes smStep { from { opacity: 0; transform: translateX(18px); } to { opacity: 1; transform: none; } }

/* Entrance: icon pops, then title, subtitle, card, links follow one by one */
.sm .container, .sm .wrap { animation: none !important; }
.sm .brand-icon, .sm .header .mark { animation: smIconIn .7s cubic-bezier(.22,1,.36,1) both, smBreathe 4.5s ease-in-out 1.2s infinite; }
.sm .logo, .sm .header h1     { animation: smIn .55s cubic-bezier(.22,1,.36,1) .12s both; }
.sm .subtitle, .sm .header p  { animation: smIn .55s cubic-bezier(.22,1,.36,1) .20s both; }
.sm .notice                   { animation: smIn .55s cubic-bezier(.22,1,.36,1) .26s both; }
.sm .container > .card, .sm #step-phone.active .card { animation: smIn .6s cubic-bezier(.22,1,.36,1) .30s both; }
.sm .employee-link a:nth-child(1) { animation: smIn .5s cubic-bezier(.22,1,.36,1) .42s both; }
.sm .employee-link a:nth-child(2) { animation: smIn .5s cubic-bezier(.22,1,.36,1) .50s both; }
.sm .lang-toggle              { animation: smIn .5s cubic-bezier(.22,1,.36,1) .45s both; }

/* Moving to the code screen slides in from the right */
.sm .step.sm-entered.active { animation: smStep .38s cubic-bezier(.22,1,.36,1) both; }

/* Typing: each key gives the box a tiny pulse */
.sm input.sm-tick { animation: smTick .16s ease-out; }
.sm input { transition: border-color .2s, box-shadow .25s, transform .2s; }

/* Buttons: press-in, ripple from the finger, shine once when the entry is complete */
.sm button.sm-fx { position: relative; overflow: hidden; -webkit-tap-highlight-color: transparent;
                   transition: transform .15s cubic-bezier(.22,1,.36,1), filter .2s, box-shadow .3s, opacity .2s; }
.sm button.sm-fx:active { transform: scale(.97); }
.sm .sm-ripple { position: absolute; border-radius: 50%; background: #fff; pointer-events: none;
                 animation: smRipple .55s ease-out forwards; }
.sm button.sm-ready { box-shadow: 0 12px 34px rgba(196,124,255,.48); }
.sm button.sm-ready::before { content: ""; position: absolute; top: 0; bottom: 0; left: 0; width: 45%;
                 background: linear-gradient(90deg, transparent, rgba(255,255,255,.38), transparent);
                 animation: smShine .9s ease-out both; pointer-events: none; }

/* Working: a small spinner beside the words while the sign-in goes through */
.sm button.sm-busy::after { content: ""; display: inline-block; width: 15px; height: 15px; margin-left: 10px;
                 vertical-align: -2px; border: 2px solid rgba(255,255,255,.45); border-top-color: #fff;
                 border-radius: 50%; animation: smSpin .7s linear infinite; }
.sm button.sm-busy:disabled { opacity: .8; }

/* Something went wrong: the card gives a short shake */
.sm .sm-shake { animation: smShake .42s cubic-bezier(.36,.07,.19,.97) both !important; }

/* Links: the arrow nudges forward */
.sm .employee-link a .sm-arrow { display: inline-block; transition: transform .25s cubic-bezier(.22,1,.36,1); }
.sm .employee-link a:hover .sm-arrow, .sm .employee-link a:active .sm-arrow { transform: translateX(4px); }

@media (prefers-reduced-motion: reduce) {
  .sm *, .sm *::before, .sm *::after { animation: none !important; transition: none !important; }
}
.sm .step.sm-entered .card { animation: none !important; }
/* Error bubble at the bottom: one line, springs up */
.sm .toast { white-space: nowrap; border-radius: 12px; box-shadow: 0 10px 30px rgba(0,0,0,.4);
             transition: opacity .25s ease, transform .45s cubic-bezier(.34,1.56,.64,1) !important; }
