/* JSV 2.0.371 — focus-first mobile post composer. Activity only; desktop and other dialogs untouched.
   The 2.0.370 mobile-dialog controller measures the real visible viewport above iOS keyboards.
   This layer allocates that same height to the member's writing canvas. */
@media (max-width:900px) {
  html body.jsv-dialog370-active #jsf-compose-modal[data-jsv370-dialog]:is(.jsv371-writing,.jsv371-details-open) .jsv371-post-details {
    display:block !important; order:-5 !important; flex:0 0 auto !important;
    width:100% !important; margin:0 !important; padding:0 !important;
  }
  html body.jsv-dialog370-active #jsf-compose-modal[data-jsv370-dialog] .jsv371-post-details-toggle {
    display:flex !important; align-items:center !important; justify-content:space-between !important; gap:12px !important;
    width:100% !important; min-height:40px !important; padding:7px 11px !important;
    background:#f5f8fc !important; border:1px solid #d0dbe7 !important; border-radius:10px !important;
    color:#123457 !important; font:700 13px/1.35 system-ui,-apple-system,sans-serif !important;
    cursor:pointer !important; text-align:left !important;
  }
  html body.jsv-dialog370-active #jsf-compose-modal[data-jsv370-dialog] .jsv371-post-details-toggle .jsv371-post-summary {
    font-size:11px !important; font-weight:500 !important; color:#4f647b !important;
    text-align:right !important; white-space:normal !important; overflow-wrap:anywhere !important;
  }
  html body.jsv-dialog370-active #jsf-compose-modal[data-jsv370-dialog] .jsv371-post-details-toggle:focus-visible {
    outline:2px solid #246fa5 !important; outline-offset:2px !important;
  }
  /* Writing focus: keep the existing navy header, name/audience and required-field access bar. */
  html body.jsv-dialog370-active #jsf-compose-modal[data-jsv370-dialog].jsv371-writing #jsf-main-composer > .jsv-compose-body {
    display:flex !important; flex-direction:column !important;
    overflow:hidden !important; gap:8px !important;
    padding:9px 12px 10px !important;
    min-height:0 !important; height:auto !important; flex:1 1 0 !important;
  }
  html body.jsv-dialog370-active #jsf-compose-modal[data-jsv370-dialog].jsv371-writing #jsf-main-composer .jsv-compose-body > .jsf-compose-person {
    order:-6 !important; margin:0 !important; padding:0 !important; flex:0 0 auto !important;
    min-height:40px !important;
  }
  html body.jsv-dialog370-active #jsf-compose-modal[data-jsv370-dialog].jsv371-writing #jsf-main-composer .jsv-compose-body > .jsv-topic-fields,
  html body.jsv-dialog370-active #jsf-compose-modal[data-jsv370-dialog].jsv371-writing #jsf-main-composer .jsv-compose-body > :is(.jsv-af-modal-actions,.jsv-writing-tools,.jsf-compose-feature-fields,.jsf-compose-add),
  html body.jsv-dialog370-active #jsf-compose-modal[data-jsv370-dialog].jsv371-writing #jsf-main-composer .jsv-compose-body > :is(.jsv-schedule-control,.jsv-schedule-fields,.jsv-upload-help,.jsv-upload-status,.jsv-photo-selection),
  html body.jsv-dialog370-active #jsf-compose-modal[data-jsv370-dialog].jsv371-writing #jsf-main-composer .jsv-compose-body > [data-jsc-affiliate-field] {
    display:none !important;
  }
  /* Hiding is visual only: required values and selected media remain in the original form. */
  html body.jsv-dialog370-active #jsf-compose-modal[data-jsv370-dialog].jsv371-writing #jsf-main-composer .jsv-compose-body > textarea[name="body"] {
    display:block !important; order:-4 !important;
    position:relative !important; inset:auto !important; box-sizing:border-box !important;
    flex:1 1 0 !important; flex-shrink:1 !important;
    width:100% !important; height:auto !important;
    min-height:90px !important; max-height:none !important;
    margin:0 !important; padding:14px 15px !important;
    border:1.5px solid #b7c9dc !important; border-radius:13px !important;
    background:#fff !important; color:#123253 !important;
    font:400 17px/1.55 system-ui,-apple-system,sans-serif !important;
    resize:none !important; overflow-y:auto !important; overscroll-behavior:contain !important;
    -webkit-overflow-scrolling:touch !important;
  }
  html body.jsv-dialog370-active #jsf-compose-modal[data-jsv370-dialog].jsv371-writing #jsf-main-composer .jsv-compose-body > textarea[name="body"]:focus {
    outline:2px solid #2272a9 !important; outline-offset:0 !important;
  }
  /* When fields are requested or native required-field validation fails, show them in the same sheet. */
  html body.jsv-dialog370-active #jsf-compose-modal[data-jsv370-dialog].jsv371-details-open #jsf-main-composer > .jsv-compose-body {
    overflow-y:auto !important; overscroll-behavior-y:contain !important;
    -webkit-overflow-scrolling:touch !important;
    gap:10px !important;
  }
  html body.jsv-dialog370-active #jsf-compose-modal[data-jsv370-dialog].jsv371-details-open #jsf-main-composer .jsv-compose-body > .jsv-topic-fields {
    display:grid !important; order:-4 !important; flex:0 0 auto !important;
    width:100% !important; min-width:0 !important;
  }
  html body.jsv-dialog370-active #jsf-compose-modal[data-jsv370-dialog].jsv371-details-open #jsf-main-composer .jsv-compose-body > textarea[name="body"] {
    order:-3 !important; min-height:120px !important; max-height:none !important; flex:0 0 auto !important;
  }
  html body.jsv-dialog370-active #jsf-compose-modal[data-jsv370-dialog].jsv371-details-open #jsf-main-composer .jsv-compose-body > .jsf-compose-person {order:-6 !important;}
  html body.jsv-dialog370-active #jsf-compose-modal[data-jsv370-dialog] .jsv371-post-details[hidden] {display:none !important;}
}
