/* Use the transparent 4 × 6 pose sheet. Each row contains four drawings. */
#mybyd-home-assistant {
  display: flex;
  align-items: center;
  box-sizing: border-box;
  width: fit-content;
  max-width: 100%;
  margin: .85rem 0;
  padding: 0 .15rem 0 0;
  border: 1px solid #5c6440;
  border-radius: 1rem;
  background: #20231c;
  color: #f8faf1;
}
#mybyd-home-assistant .mybyd-assistant-link {
  display: flex;
  align-items: center;
  min-width: 0;
  gap: .3rem;
  padding: .1rem .25rem;
  border-radius: .9rem;
  color: inherit;
  text-decoration: none;
}
#mybyd-home-assistant .mybyd-assistant-link:hover strong {
  text-decoration: underline;
  text-underline-offset: .18em;
}
#mybyd-home-assistant .mybyd-assistant-stage {
  display: block;
  flex: none;
  width: 78px;
  height: 74px;
  overflow: hidden;
}
#mybyd-home-assistant .mybyd-assistant-sprite,
.evhub-chat .evhub-waiting::before {
  background-image: url("poses.webp");
  background-size: 400% 600%;
  background-repeat: no-repeat;
}
#mybyd-home-assistant .mybyd-assistant-sprite {
  display: block;
  width: 74px;
  height: 74px;
  background-position: 0 40%;
  animation:
    mybyd-assistant-walk .8s step-end 3,
    mybyd-assistant-arrive 2.4s ease-out both,
    mybyd-assistant-wave 1.2s step-end 2.4s;
}
#mybyd-home-assistant .mybyd-assistant-copy {
  display: grid;
  gap: 1px;
  min-width: 0;
  padding-block: 5px;
  font-size: .91rem;
  line-height: 1.35;
}
#mybyd-home-assistant .mybyd-assistant-copy strong {
  color: #d4ec57;
  font-size: 1rem;
  font-weight: 750;
}
#mybyd-home-assistant .mybyd-assistant-dismiss {
  align-self: flex-start;
  flex: none;
  width: 44px;
  height: 44px;
  padding: 0;
  margin: 0;
  border: 0;
  border-radius: 50%;
  background: transparent;
  color: #c6cabc;
  font: 1.45rem/1 system-ui,sans-serif;
  cursor: pointer;
}
#mybyd-home-assistant :is(a,button):focus-visible {
  outline: 3px solid #d4ec57;
  outline-offset: 2px;
}
#mybyd-home-assistant.mybyd-assistant-paused .mybyd-assistant-sprite {
  animation-play-state: paused;
}

.evhub-chat .evhub-waiting::before {
  content: "";
  width: 64px;
  height: 64px;
  flex: none;
  background-position: 0 80%;
  animation: mybyd-assistant-search 1.14s step-end infinite;
}
.evhub-chat .evhub-waiting > img { display: none; }

@keyframes mybyd-assistant-arrive {
  from { transform: translateX(-65%); }
  to { transform: translateX(0); }
}
@keyframes mybyd-assistant-walk {
  0%   { background-position: 0 0; }
  12.5% { background-position: 33.3333% 0; }
  25%   { background-position: 66.6667% 0; }
  37.5% { background-position: 100% 0; }
  50%   { background-position: 0 20%; }
  62.5% { background-position: 33.3333% 20%; }
  75%   { background-position: 66.6667% 20%; }
  87.5%, 100% { background-position: 100% 20%; }
}
@keyframes mybyd-assistant-wave {
  0%   { background-position: 0 40%; }
  12.5% { background-position: 33.3333% 40%; }
  25%   { background-position: 66.6667% 40%; }
  37.5% { background-position: 100% 40%; }
  50%   { background-position: 0 60%; }
  62.5% { background-position: 33.3333% 60%; }
  75%   { background-position: 66.6667% 60%; }
  87.5%, 100% { background-position: 100% 60%; }
}
@keyframes mybyd-assistant-search {
  0%   { background-position: 0 80%; }
  12.5% { background-position: 33.3333% 80%; }
  25%   { background-position: 66.6667% 80%; }
  37.5% { background-position: 100% 80%; }
  50%   { background-position: 0 100%; }
  62.5% { background-position: 33.3333% 100%; }
  75%   { background-position: 66.6667% 100%; }
  87.5%, 100% { background-position: 100% 100%; }
}
@media (max-width: 600px) {
  #mybyd-home-assistant .mybyd-assistant-stage,
  #mybyd-home-assistant .mybyd-assistant-sprite { width: 58px; height: 58px; }
  #mybyd-home-assistant .mybyd-assistant-sprite { animation: mybyd-assistant-wave 1.2s step-end; }
  .evhub-chat .evhub-waiting::before { width: 48px; height: 48px; }
}
@media (prefers-reduced-motion: reduce) {
  #mybyd-home-assistant .mybyd-assistant-sprite,
  .evhub-chat .evhub-waiting::before { animation: none; }
}
