/* Let the desktop chat widget shrink inside its dock instead of growing with history. */
@media (min-width: 1201px) {
  .desk .column.center-column.has-single-widget > .chat-panel[data-widget="chat"]:not([hidden]) {
    flex: 1 1 0 !important;
    min-height: 300px !important;
  }
}

/* Keep the responsive Stream Chat panel bounded so its composer stays visible. */
@media (max-width: 1200px) {
  .center-column > .chat-panel {
    height: clamp(320px, 72dvh, 720px);
    min-height: 320px;
    max-height: 720px;
    flex: 0 0 auto;
  }

  .center-column > .chat-panel > .chat-messages {
    min-height: 0;
    flex: 1 1 0;
    overflow-y: auto;
    overscroll-behavior: contain;
    overflow-anchor: none;
  }

  .center-column > .chat-panel > .composer {
    flex: 0 0 auto;
    margin-top: 0;
  }
}
