/* A room can grow with translated controls, text zoom and the keyboard.
   Only message history scrolls inside a bounded region; never clip the form. */
.v3-main .live-chat-layout {
  border: 1px solid #aab6bd;
  min-height: 0;
  max-height: none;
  overflow: visible;
  grid-template-columns: minmax(180px, 260px) minmax(0, 1fr);
}
.v3-main .live-chat-layout.has-thread .chat-panel {
  height: auto;
  min-height: 0;
  max-height: none;
  min-width: 0;
  overflow: visible;
  background: #fff;
  border-radius: 14px;
}
.live-chat-layout .chat-panel > * { flex-shrink: 0; }
.live-chat-layout .live-chat-head {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 10px 12px;
}
.live-chat-head > div { min-width: 0; overflow-wrap: anywhere; }
.live-chat-head > button { flex: none; min-height: 44px; }
.live-chat-layout .chat-product {
  white-space: normal;
  overflow-wrap: anywhere;
  line-height: 1.6;
}
.live-chat-layout .chat-panel .messages {
  flex: none;
  height: 32vh;
  height: clamp(120px, 32dvh, 400px);
  min-height: 0;
  max-height: none;
  padding: 12px;
  overflow-y: auto;
}
.live-chat-layout .messages > * { flex-shrink: 0; }
.live-chat-layout .empty-small { min-height: 0; padding: 16px 8px; line-height: 1.8; }
.live-chat-layout .chat-compose {
  position: static;
  align-items: flex-end;
  flex: none;
  padding: 10px;
  background: #fff;
  scroll-margin-block: 16px;
}
.live-chat-layout .chat-compose textarea {
  box-sizing: border-box;
  min-height: 48px;
  max-height: 140px;
  padding: 10px 12px;
  font-size: 16px;
  line-height: 1.6;
}
.live-chat-layout .chat-compose button {
  width: auto;
  min-width: 64px;
  height: auto;
  min-height: 48px;
  max-width: 34%;
  padding: 10px 12px;
  border-radius: 12px;
  line-height: 1.6;
  overflow-wrap: anywhere;
}
.live-chat-layout button:disabled { opacity: .55; }
.live-chat-layout .quick-phrases { margin: 0; padding: 6px 10px 10px; }
.live-chat-layout .chat-extras { padding: 0 10px 10px; }
.chat-extras > summary { padding: 12px 2px; cursor: pointer; color: #53616b; line-height: 1.8; }
.live-chat-layout .chat-photo-compose { padding: 8px 0; }
.chat-load-error { color: #ae3434; line-height: 1.8; }
.live-chat-layout #live-chat-error:empty { display: none; }
.live-chat-layout #live-chat-error { margin: 0; padding: 6px 12px; }
@media (max-width: 640px) {
  .v3-main .live-chat-layout.has-thread { display: block; }
  .live-chat-layout.has-thread .threads { display: none; }
}

.live-chat-head > button[data-live="back"] { display: inline-flex; align-items: center; gap: 7px; }
.chat-back-arrow { font-size: 22px; line-height: 1; }
