/* Home and record views share the existing composer, including its motion. */
@media (max-width:1199px) {
  /* Keep the closing slide visible until the controller restores the draft DOM. */
  .onecup-mobile-feed-composer.is-closing { visibility:visible; pointer-events:none; }
  /* The + menu includes the same record creation action; avoid overlapping FABs. */
  html body.onecup-feed-composer-page:has(.side-2:not([style*="display: none"]):not([style*="display:none"]) #tab-1.active #tab-b.active) :is(.onecup-view-create,.onecup-record-actions) { display:none!important; }
  .onecup-mobile-feed-composer__body .feed-menu-fields { overflow-y:auto!important; }
  .onecup-mobile-feed-composer__body .feed-menu-fields textarea { min-height:96px!important; }
}

/* Keep the publishing actions inside the visible sheet on iOS, including after
   the native date/time picker or software keyboard changes the viewport. */
@media(max-width:1199px){
 html body.onecup-mobile-composer-open .onecup-mobile-nav{visibility:hidden;pointer-events:none;}
 html body .onecup-mobile-feed-composer{z-index:10030;}
 html body .onecup-mobile-feed-composer__surface{box-sizing:border-box;overflow:hidden;}
 html body .onecup-mobile-feed-composer__body{flex:1 1 0;min-height:0;}
 html body .onecup-mobile-feed-composer__body>.onecup-feed-publisher{height:100%;max-height:100%;box-sizing:border-box;}
 html body .onecup-mobile-feed-composer__body>.onecup-feed-publisher>.media-body{height:100%;min-height:0;overflow:hidden;}
 html body .onecup-mobile-feed-composer__body .feed-menu-fields{flex:1 1 0!important;min-height:0!important;overflow-y:auto!important;overscroll-behavior:contain;-webkit-overflow-scrolling:touch;}
 html body .onecup-mobile-feed-composer__body .feed-menu-fields :is(textarea,.onecup-feed-rich-editor){flex:0 0 auto;}
 html body .onecup-mobile-feed-composer__body :is(.feed-menu-btn,.feed-menu-count,.onecup-home-upload-progress){flex:0 0 auto!important;}
 html body .onecup-mobile-feed-composer__body .feed-menu-count{max-height:20%;overflow-y:auto;}
 html body .onecup-mobile-feed-composer__body .onecup-feed-scheduled-summary{flex:0 1 auto;min-height:0;max-height:25%;overflow-y:auto;overscroll-behavior:contain;}
}

@media(max-width:1199px){
 html body.onecup-mobile-composer-open>.onecup-mobile-dropdown-sheet{z-index:10040;}
}

/* The help action stays separate from the attachment group, at the start of the row. */
html body .onecup-feed-publisher .onecup-feed-publisher__attach{display:flex!important;align-items:center!important;gap:10px!important;flex:0 0 auto;}
html body .onecup-feed-publisher .onecup-help-button{
 display:inline-flex!important;align-items:center!important;justify-content:center!important;
 flex:0 0 25px;width:25px!important;height:25px!important;padding:0!important;margin:0!important;
 border:1px solid transparent!important;border-radius:50%!important;
 background:transparent!important;color:var(--onecup-primary,#1a73e8)!important;
 cursor:pointer;box-shadow:none!important;
}
html body .onecup-feed-publisher .onecup-help-button:is(:hover,:focus-visible,:active){background:var(--onecup-primary-soft,#e0eeff)!important;color:var(--onecup-primary,#1a73e8)!important;border-color:transparent!important;transform:none!important;}
html body .onecup-feed-publisher .onecup-help-button:focus-visible{outline:2px solid var(--onecup-primary,#1a73e8);outline-offset:2px;}
html body .onecup-feed-publisher .onecup-help-button:disabled{opacity:.6;cursor:wait;}
html body .onecup-feed-publisher .onecup-help-button>.onecup-help-question{display:block;width:16px!important;height:16px!important;flex:0 0 16px;margin:0!important;color:inherit!important;stroke:currentColor;}

/* Contextual help is a nested preview above the mobile publication sheet. */
@media(max-width:1199px){
 html body.onecup-mobile-composer-open>.onecup-help-overlay{position:relative;z-index:10050;}
}

/* A single end-of-feed treatment for Home, records, Social and previews. */
html body .feed-more.onecup-feed-tail{display:flex!important;flex-direction:column!important;align-items:center;justify-content:center;width:100%;gap:5px;margin:15px 0 0;padding:0;}
html body .onecup-feed-tail>.onecup-feed-tail__circle,html body .onecup-feed-tail>a{box-sizing:border-box;display:flex!important;align-items:center;justify-content:center;flex:0 0 25px;width:25px;height:25px;margin:0;padding:0;border:1px solid #4b4f56;border-radius:50%;background:transparent;color:#4b4f56;font-size:18px;line-height:1;text-decoration:none;}
html body .onecup-feed-tail>.onecup-feed-tail__complete{display:block;margin:0;padding:0;font-size:8px!important;line-height:1.4;text-align:center;color:#91949b;}
html body .feed .onecup-feed-loading{flex:0 0 100%;margin-bottom:15px;}
@media(max-width:1199px){
 /* The textarea consumes the remaining height; media and dates never push the action bar offscreen. */
 html body .onecup-social-composer .onecup-mobile-feed-composer__body>.meta-composer{height:100%;max-height:100%;box-sizing:border-box;}
 html body .onecup-social-composer .meta-composer>.media-body{height:100%;min-height:0!important;}
 html body .onecup-social-composer .feed-menu-fields{overflow:hidden!important;}
 html body .onecup-social-composer .feed-menu-fields textarea{flex:1 1 0!important;height:0!important;min-height:36px!important;max-height:none!important;overflow-y:auto!important;margin:0;padding:0;}
 html body .onecup-social-composer .feed-menu-fields>.meta-upload-preview{flex:0 1 auto!important;min-height:0;max-height:35%;overflow:auto;align-content:flex-start;margin:10px 0 0;gap:10px;}
 html body .onecup-social-composer .meta-upload-preview__item{flex-shrink:0;}
 html body .onecup-social-composer .feed-menu-fields>.social-schedule{flex:0 0 auto!important;}
 html body .onecup-social-composer .feed-menu-fields>.social-publication-notice{flex:0 1 auto;min-height:0;max-height:25%;overflow:auto;}
}
