/* Mobile conversations must grow instead of clipping their messages/composer. */
@media (max-width:800px), (max-width:1000px) and (max-height:500px) {
  body,body.q-delivery-active { padding-bottom:var(--qs-keyboard-inset,0px); }
  #qd-order .preview-toolbar { height:auto; min-height:54px; flex-wrap:wrap; padding:8px 0; }
  #qd-order .breadcrumb { min-width:0; max-width:100%; white-space:normal; overflow-wrap:anywhere; }
  #qd-order .preview-tools { min-width:0; flex:1 1 160px; }
  #qd-order #kdSelect { flex:1; width:auto; min-width:0; max-width:100%; }
  #qd-order .workspace,
  #qd-order.has-notice .workspace { height:auto; min-height:0; max-height:none; }
  #qd-order .workspace-body { flex:none; min-height:0; }
  #qd-order .conversation { display:flex; flex-direction:column; flex:none; min-height:0; }
  #qd-order .conversation-heading,
  #qd-order .composer,
  #qd-order .closed-chat { flex:none; }
  #qd-order .messages {
    flex:none; height:clamp(180px,calc(var(--qs-viewport-height,100dvh) - 480px),520px);
    min-height:180px; max-height:none; overflow-y:auto;
  }
  #qd-order .delivery { flex:none; min-height:0; max-height:none; }
  #qd-order .delivery-content { flex:none; min-height:0; max-height:min(320px,45svh); overflow-y:auto; }
  #qd-order .mobile-details-toggle { min-height:44px; }
  #qd-order .composer { scroll-margin-block:12px; }
  #qd-order .composer textarea { max-height:100px; }
  #qd-order .preview-tools .icon-button,
  #qd-order .conversation-tools .icon-button { width:40px; height:40px; }
  #qd-order .order-header { min-width:0; }
  #qd-order .payment-status { white-space:normal; text-align:right; }
  #qd-order .progress p { white-space:normal; }
  #qd-order .delivery-notice { overflow-wrap:anywhere; }
  .qti-list { flex-wrap:wrap; max-width:100%; }
  dialog.qo-dialog[open] {
    box-sizing:border-box; position:fixed; top:calc(var(--qs-viewport-top,0px) + 12px);
    bottom:auto; margin:0 auto; width:calc(100% - 24px);
    max-height:calc(var(--qs-viewport-height,100dvh) - 24px);
    overflow-y:auto; overscroll-behavior:contain;
  }
}
@media (max-width:760px) {
  .qd-shell[data-support-view="chatPanel"] .qo-chat { height:auto; min-height:0; }
  .qd-shell[data-support-view="chatPanel"] .qo-chat .qo-chat-scroll {
    flex:none; height:clamp(180px,calc(var(--qs-viewport-height,100dvh) - 320px),420px);
    min-height:180px; max-height:none;
  }
  .qo-compose { scroll-margin-block:12px; }
  .qo-product-title,.qo-order-number,#referenceText { min-width:0; overflow-wrap:anywhere; }
}
@media (max-width:800px) and (max-height:620px) {
  #qd-order .preview-toolbar { min-height:42px; }
  #qd-order .conversation-heading { flex-wrap:wrap; }
}
