.str-chat__channel .str-chat__container {
  flex-direction: column;
}

/** Optional theme bridge wrapper — same flex host when it wraps the engine. */
.unified-conversation-theme-bridge {
  display: flex;
  flex-direction: column;
  flex: 1 1;
  min-height: 0;
  height: 100%;
}

/**
* Stream ships `overscroll-behavior: none` on its scroll containers, which
* traps wheel events inside the chat. We restore the browser default so the
* page keeps scrolling once the chat hits its scroll boundary.
*/
.chat--dialogue .str-chat__message-list {
  overscroll-behavior: auto;
}

/* Horizontal inset on virtualized message rows */
.unified-conversation-theme-bridge .str-chat__virtual-list-message-wrapper {
  box-sizing: border-box;
  padding-inline: 16px;
}

/*
 * Row spacing lives only above a row. A row's top spacing depends on whether
 * it groups with the row above it, which appending a message never changes.
 * Stream's default splits it across both edges, so a new message resized the
 * row above it (e.g. `single` → `top`) while the new row was growing in.
 */
.unified-conversation-theme-bridge
  .str-chat__virtual-list-message-wrapper.str-chat__li--single,
.unified-conversation-theme-bridge
  .str-chat__virtual-list-message-wrapper.str-chat__li--top {
  padding-block: 16px 0;
}

.unified-conversation-theme-bridge
  .str-chat__virtual-list-message-wrapper.str-chat__li--middle,
.unified-conversation-theme-bridge
  .str-chat__virtual-list-message-wrapper.str-chat__li--bottom {
  padding-block: 4px 0;
}

/* Design: 20px between the last message (incl. CTAs) and the composer. */
.uc-message-list-composer-gap {
  height: var(--uc-message-list-composer-gap, 20px);
}

/**
 * Pre-stream optimistic row — mirror the real Stream row exactly: the
 * `.str-chat__li--single` top spacing plus the list's composer-gap footer.
 */
.uc-pre-stream-message-row {
  padding-top: 16px;
  padding-bottom: var(--uc-message-list-composer-gap, 20px);
}

.unified-conversation-theme-bridge
  .str-chat__virtual-list-message-wrapper:empty {
  height: 0;
  padding-block: 0;
  overflow: hidden;
}

/**
 * Disable browser scroll anchoring on the streaming AI bubble. Without this,
 * height changes during typewriter streaming fight manual scroll.
 */
[data-test-locator='AiMessageBubble'] {
  overflow-anchor: none;
}

/*
 * Enter / exit height pattern (handoff §3). All animated rows use `.chat-motion-item`
 * from `ChatMotionEnter`; duration is `--chat-motion-duration` (set in TS).
 * Curves and tick timing come from `getChatMotionThemeStyle()` on the theme bridge.
 */
@keyframes chat-delivery-tick-in {
  from {
    opacity: 0;
  }

  to {
    opacity: 1;
  }
}

.chat-motion-item {
  display: grid;
  grid-template-rows: 0fr;
  min-width: 0;
}

.chat-motion-item__inner {
  overflow: hidden;
  min-height: 0;
}

.chat-motion-item__content {
  padding-top: var(--chat-motion-gap, 8px);
  opacity: 0;
  transform: translateY(12px) scale(0.96);
}

.chat-motion-item--ai .chat-motion-item__content {
  transform-origin: bottom left;
}

.chat-motion-item--tenant .chat-motion-item__content {
  transform-origin: bottom right;
}

.chat-motion-item--in {
  grid-template-rows: 1fr;
  transition: grid-template-rows var(--chat-motion-duration, 360ms)
    var(--chat-motion-ease-out, cubic-bezier(0.33, 1, 0.68, 1));
}

.chat-motion-item--in .chat-motion-item__content {
  opacity: 1;
  transform: none;
  transition:
    opacity calc(var(--chat-motion-duration, 360ms) * 0.8)
      var(--chat-motion-ease-out, cubic-bezier(0.33, 1, 0.68, 1))
      calc(var(--chat-motion-duration, 360ms) * 0.2),
    transform var(--chat-motion-duration, 360ms)
      var(--chat-motion-ease-out, cubic-bezier(0.33, 1, 0.68, 1));
}

/*
 * Terminal state once the enter transition has genuinely finished (or the
 * row never animated at all, e.g. backfilled history). No `transition` here
 * on purpose: later content changes (streamed text, CTAs, a delivery tick)
 * must resize this row instantly, not replay the enter animation.
 */
.chat-motion-item--rest {
  grid-template-rows: auto;
}

.chat-motion-item--rest .chat-motion-item__content {
  opacity: 1;
  transform: none;
}

/*
 * First frame of an exit. `--rest` is `auto`, which `--out`'s `0fr` can't be
 * tweened from — the height would hold, then flip at the halfway point. A
 * plain `1fr` with no transition gives `--out` a value it can shrink from.
 */
.chat-motion-item--leaving {
  grid-template-rows: 1fr;
}

.chat-motion-item--leaving .chat-motion-item__content {
  opacity: 1;
  transform: none;
}

.chat-motion-item--out {
  grid-template-rows: 0fr;
  transition: grid-template-rows var(--chat-motion-duration, 240ms)
    var(--chat-motion-ease-in-out, cubic-bezier(0.65, 0, 0.35, 1));
}

.chat-motion-item--out .chat-motion-item__content {
  opacity: 0;
  transform: none;
  transition: opacity calc(var(--chat-motion-duration, 240ms) * 0.7) linear;
}

[data-delivery-status='sent'],
[data-delivery-status='read'] {
  animation: chat-delivery-tick-in var(--chat-motion-tick-ms, 250ms)
    var(--chat-motion-ease-out, cubic-bezier(0.33, 1, 0.68, 1)) both;
}

/* Thinking label swap (handoff §7) */
.ai-thinking-label {
  position: relative;
  height: 24px;
  overflow: hidden;
}

.ai-thinking-label__text {
  display: block;
  white-space: nowrap;
  color: inherit;
  transition:
    opacity var(--chat-motion-thinking-label-swap-ms, 200ms)
      var(--chat-motion-ease-out, cubic-bezier(0.33, 1, 0.68, 1)),
    transform var(--chat-motion-thinking-label-swap-ms, 200ms)
      var(--chat-motion-ease-out, cubic-bezier(0.33, 1, 0.68, 1));
}

.ai-thinking-label__text--out {
  opacity: 0;
  transform: translateY(
    calc(-1 * var(--chat-motion-thinking-label-out-px, 18px))
  );
}

.ai-thinking-label__text--in-from {
  opacity: 0;
  transform: translateY(var(--chat-motion-thinking-label-out-px, 18px));
}

.ai-thinking-label__text--in {
  opacity: 1;
  transform: translateY(0);
}

@media (prefers-reduced-motion: reduce) {
  .ai-thinking-label__text {
    transition: opacity var(--chat-motion-reduced-ms, 150ms) linear;
    transform: none !important;
  }
}

/* Embedded panel expand/collapse */
.uc-panel-motion {
  transition:
    flex-basis var(--chat-motion-panel-open-ms, 460ms)
      var(--chat-motion-ease-out, cubic-bezier(0.33, 1, 0.68, 1)),
    max-height var(--chat-motion-panel-open-ms, 460ms)
      var(--chat-motion-ease-out, cubic-bezier(0.33, 1, 0.68, 1));
}

.uc-panel-skeleton-fade {
  flex: 1 1;
  min-height: 0;
  display: flex;
  flex-direction: column;
  animation: uc-panel-skeleton-in
    var(--chat-motion-skeleton-crossfade-ms, 350ms) linear both;
}

.uc-panel-skeleton-fade--content {
  animation-name: uc-panel-content-in;
}

.uc-panel-chat-content {
  position: relative;
  flex: 1 1;
  min-height: 0;
  display: flex;
  flex-direction: column;
}

.uc-panel-stream-connecting {
  position: absolute;
  inset: 0;
  overflow: hidden;
  opacity: 0;
  pointer-events: none;
  z-index: 0;
}

.uc-panel-skeleton-fade--stream-connect {
  position: relative;
  z-index: 1;
  animation: none;
}

.uc-panel-chat-content--embedded-mini {
  flex: 0 0 auto;
}

@keyframes uc-panel-skeleton-in {
  from {
    opacity: 0;
  }

  to {
    opacity: 1;
  }
}

@keyframes uc-panel-content-in {
  from {
    opacity: 0;
  }

  to {
    opacity: 1;
  }
}

@media (prefers-reduced-motion: reduce) {
  .uc-panel-motion {
    transition: none !important;
  }

  .chat-motion-item,
  .chat-motion-item__content {
    animation: none !important;
    transform: none !important;
  }

  .chat-motion-item {
    grid-template-rows: 1fr !important;
    transition: none !important;
  }

  .chat-motion-item--out {
    grid-template-rows: 0fr !important;
  }

  .chat-motion-item__content {
    transition: opacity var(--chat-motion-reduced-ms, 150ms) linear !important;
  }

  .chat-motion-item--idle .chat-motion-item__content,
  .chat-motion-item--out .chat-motion-item__content {
    opacity: 0;
  }

  .chat-motion-item--in .chat-motion-item__content,
  .chat-motion-item--rest .chat-motion-item__content,
  .chat-motion-item--leaving .chat-motion-item__content {
    opacity: 1;
  }
}

.unified-conversation-theme-bridge .str-chat__main-panel-inner {
  position: relative;
}

.unified-conversation-theme-bridge [data-virtuoso-scroller] {
  scroll-padding-bottom: var(--uc-message-list-composer-gap, 20px);
  overflow-x: hidden;
  scroll-behavior: auto;

  /* macOS paints an overlay bar on any scroll, including the one that follows
     a new message. Keep it hidden until the tenant scrolls. */
  scrollbar-width: none;
}

.unified-conversation-theme-bridge [data-virtuoso-scroller]::-webkit-scrollbar {
  display: none;
  width: 0;
  height: 0;
}

.unified-conversation-theme-bridge
  [data-virtuoso-scroller].uc-message-list--show-scrollbar {
  scrollbar-width: thin;
}

.unified-conversation-theme-bridge
  [data-virtuoso-scroller].uc-message-list--show-scrollbar::-webkit-scrollbar {
  display: block;
  width: 8px;
  height: 8px;
}

.chat-composer-text--fade-out {
  opacity: 0;
  transition: opacity var(--chat-motion-input-fade-ms, 140ms) linear;
}

.chat-composer-send--press {
  transform: scale(0.92);
  transition: transform var(--chat-motion-send-press-ms, 160ms)
    var(--chat-motion-pop, cubic-bezier(0.34, 1.4, 0.64, 1));
}

@media (prefers-reduced-motion: reduce) {
  .chat-composer-text--fade-out {
    transition: opacity var(--chat-motion-reduced-ms, 150ms) linear;
  }

  .chat-composer-send--press {
    transform: none;
    transition: none;
  }
}


/*# sourceMappingURL=/sourcemaps/ha-pages-Listing-index-ts-9d407d76e5b9eab7b185.bundle.css.map*/