/* The active conversation occupies the space above a mobile software keyboard. */
@media (max-width: 900px), (pointer: coarse) {
  .chatgpt .chatgpt__composer textarea {
    /* Prevent iOS focus zoom before the viewport resize event arrives. */
    font-size: 16px !important;
  }
}

.has-keyboard-chat {
  /* Transformed/filtered integration panels otherwise contain fixed children. */
  transform: none !important;
  filter: none !important;
  backdrop-filter: none !important;
  -webkit-backdrop-filter: none !important;
  perspective: none !important;
  contain: none !important;
  will-change: auto !important;
}

.chatgpt.is-keyboard-chat {
  position: fixed !important;
  z-index: 1000;
  inset: auto !important;
  top: var(--chat-visible-top) !important;
  left: var(--chat-visible-left) !important;
  width: var(--chat-visible-width) !important;
  height: var(--chat-visible-height) !important;
  min-height: 0 !important;
  max-height: none !important;
  margin: 0 !important;
  box-sizing: border-box;
  display: flex !important;
  flex-direction: column;
  gap: 0;
  overflow: hidden;
  background: #101113 !important;
  border-radius: 14px;
}

.chatgpt.is-keyboard-chat > .chatgpt__messages {
  flex: 1 1 0 !important;
  min-height: 0 !important;
  height: auto !important;
  max-height: none !important;
  overflow-y: auto;
  padding: 10px 12px;
}

.chatgpt.is-keyboard-chat > .chatgpt__composer {
  flex: 0 0 auto;
  margin: 4px 6px 6px;
  padding: 6px 8px;
}

.chatgpt.is-keyboard-chat .chatgpt__composer textarea {
  font-size: 16px !important;
  min-height: 32px;
  max-height: min(84px, calc(var(--chat-visible-height) * .22)) !important;
  overflow-y: auto !important;
}

.chatgpt.is-keyboard-chat > .bom-chat-image-panel {
  flex: 0 1 auto;
  max-height: calc(var(--chat-visible-height) * .25);
  overflow-y: auto;
}
