/* Media timing and message animations are independent. */
.iw-mobile-aida-video, .iw-mobile-aida-end, .iw-mobile-aida-chat { display: none; }
@media (max-width: 767px) {
  [data-mobile-aida-badges] > button {
    display: block;
    flex: 0 0 48px;
    width: 48px;
    height: 48px;
    margin: 0 -4px;
    padding: 0;
    border: 0;
    border-radius: 50%;
    background: transparent;
    cursor: pointer;
    touch-action: manipulation;
    -webkit-tap-highlight-color: transparent;
  }
  [data-mobile-aida-badges] > button > picture { margin: 0; translate: 0 0; }
  [data-mobile-aida-badges] > button[aria-pressed="true"] { position: relative; z-index: 1; }
  [data-mobile-aida-badges] > button[aria-pressed="true"] > picture { translate: 0 -6px; }
  [data-mobile-aida-badges] > button:focus-visible { outline: 2px solid #0875ff; outline-offset: 2px; }
  [data-mobile-aida-motion] > .iw-mobile-aida-video,
  [data-mobile-aida-motion] > .iw-mobile-aida-end {
    display: block;
    position: absolute;
    z-index: 0;
    left: 50%;
    bottom: -25%;
    width: auto;
    height: 125%;
    max-width: none;
    max-height: none;
    aspect-ratio: 1;
    transform: translateX(-50%);
    object-fit: contain;
    pointer-events: none;
    opacity: 0;
    filter: url("#iw-mobile-aida-white-key");
  }
  [data-mobile-aida-motion].iw-mobile-aida-video-visible > .iw-mobile-aida-video,
  [data-mobile-aida-motion].iw-mobile-aida-end-visible > .iw-mobile-aida-end { opacity: 1; }
  [data-mobile-aida-motion]:is(.iw-mobile-aida-video-visible, .iw-mobile-aida-end-visible) > .iw-aida-mobile-frontal { visibility: hidden; }
  [data-mobile-aida-motion] > .iw-mobile-aida-chat {
    display: flex;
    position: absolute;
    z-index: 2;
    top: 8%;
    right: 2px;
    width: 51%;
    max-width: 194px;
    flex-direction: column;
    gap: 9px;
    text-align: left;
    line-height: 1.4;
  }
  [data-mobile-aida-motion] > .iw-mobile-aida-chat[hidden] { display: none; }
  .iw-mobile-aida-close {
    align-self: flex-end;
    display: grid;
    place-items: center;
    width: 26px;
    height: 26px;
    margin: 0 0 -3px;
    padding: 0;
    border: 1px solid #e9e9ee;
    border-radius: 50%;
    background: #fff;
    color: #687282;
    cursor: pointer;
  }
  .iw-mobile-aida-close:focus-visible { outline: 2px solid #0875ff; outline-offset: 2px; }
  .iw-mobile-aida-question, .iw-mobile-aida-answer {
    margin: 0;
    padding: 11px 12px;
    border-radius: 16px;
    font-size: 13px;
    font-weight: 400;
    overflow-wrap: break-word;
  }
  .iw-mobile-aida-question {
    background: #fff;
    border: 1px solid #ededf1;
    color: #25272f;
    box-shadow: 0 4px 16px #1723400b;
  }
  .iw-mobile-aida-answer {
    background: #0875ff;
    color: #fff;
    box-shadow: 0 5px 18px #0875ff1c;
  }
  /* Keep the separate demo launcher from covering this conversation on narrow phones. */
  body:has([data-mobile-aida-motion][data-aida-mobile-chat="visible"]) :is(.local-chat, #iw-aida-widget) {
    visibility: hidden;
    pointer-events: none;
  }
}
@media (max-width: 767px) and (prefers-reduced-motion: no-preference) {
  [data-mobile-aida-badges] > button > picture { transition: translate .22s cubic-bezier(.2,.8,.2,1); }
  [data-mobile-aida-badges] > button[aria-pressed="true"] img { rotate: 15deg; }
}
