/* Midnight Snack cookie. Every animation moves the original single pose. */
.ms-cookie {
  --cookie-size: 128px;
  --cookie-focus: #bb7628;
  position: relative;
  display: inline-flex;
  flex-direction: column;
  align-items: center;
  width: var(--cookie-size);
  max-width: 100%;
  isolation: isolate;
  box-sizing: border-box;
}
.ms-cookie--fixed {
  position: fixed;
  right: calc(16px + env(safe-area-inset-right, 0px) + var(--cookie-offset-right, 0px));
  bottom: calc(12px + env(safe-area-inset-bottom, 0px) + var(--cookie-offset-bottom, 0px));
  z-index: var(--cookie-z-index, 30);
}
.ms-cookie .ms-cookie__button {
  appearance: none;
  -webkit-appearance: none;
  position: relative;
  display: block;
  width: 100%;
  aspect-ratio: 1;
  min-width: 44px;
  min-height: 44px;
  padding: 0;
  margin: 0;
  border: 0;
  border-radius: 12px;
  background: transparent;
  color: inherit;
  line-height: 0;
  cursor: pointer;
  touch-action: manipulation;
  -webkit-tap-highlight-color: transparent;
}
.ms-cookie .ms-cookie__button:focus-visible,
.ms-cookie .ms-cookie__motion:focus-visible {
  outline: 3px solid var(--cookie-focus);
  outline-offset: 4px;
}
.ms-cookie__visual {
  display: block;
  width: 100%;
  height: 100%;
  transform-origin: 52% 90%;
  pointer-events: none;
}
.ms-cookie__visual picture,
.ms-cookie__visual img {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: contain;
  user-select: none;
}
.ms-cookie .ms-cookie__motion {
  appearance: none;
  -webkit-appearance: none;
  display: inline-flex;
  justify-content: center;
  align-items: center;
  min-height: 44px;
  min-width: 44px;
  max-width: 100%;
  margin: 0;
  padding: 4px 8px;
  border: 0;
  border-radius: 6px;
  background: transparent;
  color: inherit;
  font: 500 11px/1.3 system-ui, sans-serif;
  text-decoration: underline;
  text-underline-offset: 3px;
  cursor: pointer;
}
.ms-cookie .ms-cookie__motion:disabled { cursor: default; text-decoration: none; }
.ms-cookie[data-state="idle"] .ms-cookie__visual { animation: ms-cookie-idle 2.8s ease-in-out infinite; }
.ms-cookie[data-state="greet"] .ms-cookie__visual { animation: ms-cookie-greet 1.2s ease-in-out 1; }
.ms-cookie[data-state="thinking"] .ms-cookie__visual { animation: ms-cookie-thinking 1.9s ease-in-out infinite; }
.ms-cookie[data-state="speaking"] .ms-cookie__visual { animation: ms-cookie-speaking 0.8s ease-in-out infinite; }
.ms-cookie[data-state="success"] .ms-cookie__visual { animation: ms-cookie-success 1s ease-in-out 1; }
.ms-cookie[data-state="error"] .ms-cookie__visual { animation: ms-cookie-error 0.6s ease-in-out 1; }
.ms-cookie[data-state="still"] .ms-cookie__visual { animation: none; transform: none; }
.ms-cookie[data-paused="true"] .ms-cookie__visual { animation-play-state: paused; }
.ms-cookie[data-motion="off"] .ms-cookie__visual { animation: none; transform: none; }
@keyframes ms-cookie-idle {
  0%, 100% { transform: translateY(0) rotate(-0.55deg); }
  50% { transform: translateY(-2.5%) rotate(0.55deg); }
}
@keyframes ms-cookie-greet {
  0%, 100% { transform: translateY(0) rotate(0); }
  20% { transform: translateY(-3%) rotate(-3deg); }
  45% { transform: translateY(-1%) rotate(3deg); }
  70% { transform: translateY(-2%) rotate(-2deg); }
}
@keyframes ms-cookie-thinking {
  0%, 100% { transform: rotate(-2deg); }
  50% { transform: translateY(-1.2%) rotate(2deg); }
}
@keyframes ms-cookie-speaking {
  0%, 100% { transform: translateY(0) scale(1); }
  50% { transform: translateY(-1.8%) scale(1.008, 0.994); }
}
@keyframes ms-cookie-success {
  0%, 100% { transform: translateY(0) scale(1); }
  20% { transform: scale(1.03, 0.97); }
  48% { transform: translateY(-7%) rotate(-2deg) scale(0.99, 1.01); }
  78% { transform: scale(1.02, 0.98); }
}
@keyframes ms-cookie-error {
  0%, 100% { transform: translateX(0); }
  20%, 60% { transform: translateX(-2%); }
  40%, 80% { transform: translateX(2%); }
}
@media (max-width: 600px) {
  .ms-cookie--fixed { --cookie-size: 96px; }
}
@media (prefers-reduced-motion: reduce) {
  .ms-cookie .ms-cookie__visual { animation: none !important; transform: none !important; }
}
