/* =========================================================
   ECR // RC8.9I // READER ONE-SCROLL WORKSPACES

   Desktop full workspaces:
   - one primary vertical scroll
   - no nested center-content scroll boxes
   - no zoom / geometric scaling
   - manuscript reading controls untouched
   - mobile/tablet untouched
   ========================================================= */

@media (min-width:981px) {

  /*
   * The full workspace panel becomes the sole scrolling surface.
   */
  body.ecr-full-workspace
  .workspace-panel:not(.hidden) {
    overflow-x:hidden !important;
    overflow-y:auto !important;

    overscroll-behavior:contain;
    scrollbar-gutter:stable;
  }


  /*
   * Remove artificial internal viewport heights.
   */
  body.ecr-full-workspace
  .workspace-panel:not(.hidden)
  :is(
    .workspace-frame,
    .marks-workspace,
    .board-workspace,
    .query-workspace,
    .messages-workspace,
    .final-workspace
  ) {
    height:auto !important;
    min-height:0 !important;
    max-height:none !important;

    overflow:visible !important;
  }


  /*
   * Primary content flows naturally with the parent workspace.
   */
  body.ecr-full-workspace
  .workspace-panel:not(.hidden)
  .workspace-primary {
    height:auto !important;
    min-height:0 !important;
    max-height:none !important;

    overflow:visible !important;
  }


  /*
   * Kill the repeated nested content scroll boxes.
   */
  body.ecr-full-workspace
  .workspace-panel:not(.hidden)
  :is(
    .panel-scroll,
    #boardFeed,
    #marksList,
    #messageFeed
  ) {
    height:auto !important;
    min-height:0 !important;
    max-height:none !important;

    overflow:visible !important;
  }


  /*
   * Messages / Reader Desk conversation structure becomes natural
   * document flow instead of a constrained internal viewport.
   */
  body.ecr-full-workspace
  .workspace-panel:not(.hidden)
  :is(
    .message-conversation,
    .query-conversation
  ) {
    height:auto !important;
    min-height:0 !important;
    max-height:none !important;

    grid-template-rows:auto auto !important;

    overflow:visible !important;
  }


  /*
   * Compose areas belong in the normal flow.
   */
  body.ecr-full-workspace
  .workspace-panel:not(.hidden)
  :is(
    .message-compose,
    .query-conversation .message-compose,
    .panel-compose
  ) {
    position:static !important;
    inset:auto !important;
    bottom:auto !important;
  }


  /*
   * Footer belongs at the actual end of the workspace instead of
   * becoming another floating/scrolling layer.
   */
  body.ecr-full-workspace
  .workspace-panel:not(.hidden)
  .panel-foot {
    position:static !important;

    inset:auto !important;
    top:auto !important;
    right:auto !important;
    bottom:auto !important;
    left:auto !important;

    width:auto !important;

    margin-top:0;
  }


  /*
   * Prevent internal columns from manufacturing their own vertical
   * scroll tracks.
   */
  body.ecr-full-workspace
  .workspace-panel:not(.hidden)
  :is(
    .workspace-index,
    .workspace-context
  ) {
    max-height:none !important;
    overflow:visible !important;
  }
}


/*
 * Do not modify the manuscript's fixed bottom page controls.
 * Do not modify mobile/tablet workspace behavior.
 */
