/* The desktop footer keeps its collapse bar; responsive compose opens as a sheet. */
#newemail .onecup-email-mobile-header,.onecup-email-sheet-backdrop{display:none}
#newemail .onecup-email-compose-scroll{display:contents}
@media(min-width:1200px){
 #newemail .onecup-email-toolbar-field{order:1}
 #newemail .onecup-email-editor-field{order:2}
 #newemail .email-new-wrapper .attachements{order:3}
 #newemail.footer-email>.panel{border-radius:0!important}
 #newemail.footer-email>.panel>#email-new.panel-heading{
  background:#181a55;
  padding:5px;
  border-radius:0;
  height:35px;
  flex-shrink:0;
 }
}
@media(max-width:1199px){
 html body #newemail.footer-email,
 html body #newemail.footer-email:has(#collapseEmail.in),
 html body #newemail.footer-email:has(#collapseEmail.collapsing){
  position:fixed!important;left:0!important;right:0!important;
  top:var(--onecup-email-sheet-top,var(--onecup-sheet-start))!important;bottom:auto!important;
  width:100%!important;max-width:100%!important;
  height:var(--onecup-email-sheet-height,var(--onecup-sheet-limit))!important;
  max-height:var(--onecup-email-sheet-height,var(--onecup-sheet-limit))!important;
  margin:0!important;overflow:hidden;
 }
 html body #newemail.footer-email{visibility:hidden;pointer-events:none;transition:visibility 0s linear .2s}
 html body #newemail.footer-email.is-sheet-open{visibility:visible;pointer-events:auto;transition-delay:0s}
 html body #newemail.footer-email>.panel{
  display:flex!important;flex-direction:column!important;width:100%!important;height:100%!important;
  max-height:100%!important;min-height:0!important;overflow:hidden!important;
  border-radius:15px 15px 0 0!important;background:#fff!important;
  transform:translateY(100%);transition:transform .2s ease!important;
 }
 html body #newemail.footer-email.is-sheet-open>.panel{transform:translateY(0)}
 html body #newemail #email-new{display:none!important}
 html body #newemail .onecup-email-mobile-header{
  display:flex!important;position:relative;flex:0 0 auto!important;background:#fff!important;
 }
 html body #newemail .onecup-email-mobile-header>div>p{padding-right:62px}
 html body #newemail .onecup-email-mobile-header>.close{position:absolute;right:12px;top:7px;margin:0!important}
 html body #newemail.footer-email #collapseEmail{
  display:flex!important;flex-direction:column;flex:1 1 0!important;height:auto!important;max-height:none!important;
  min-height:0!important;overflow:hidden!important;
  overscroll-behavior:contain;-webkit-overflow-scrolling:touch;transition:none!important;
 }
 html body #newemail.footer-email #collapseEmail>.panel-body{
  display:flex!important;flex-direction:column;flex:1 1 0;min-height:0!important;height:100%!important;
  overflow:hidden!important;box-shadow:none!important;padding:0!important;
 }
 html body #newemail .email-new-wrapper{
  flex:1 1 0;flex-wrap:nowrap!important;align-items:stretch!important;
  height:100%!important;min-height:0;overflow:hidden;
 }
 html body #newemail .onecup-email-compose-scroll{
  display:flex;flex-direction:column;flex:1 1 0;min-height:0;width:100%;
  padding:15px 15px 0;overflow-y:auto;overflow-x:hidden;
  overscroll-behavior:contain;-webkit-overflow-scrolling:touch;
 }
 html body #newemail .onecup-email-compose-scroll>*,
 html body #newemail .onecup-email-toolbar-field{flex-shrink:0}
 html body #newemail .onecup-email-editor-field{
  display:flex;flex-direction:column;flex:1 0 auto;margin:0!important;padding:0!important;
 }
 html body #newemail .onecup-email-editor-field .new-email-text{
  display:flex;flex-direction:column;flex:1;flex-wrap:nowrap;align-items:stretch;
 }
 html body #newemail #email-text-message-element{
  flex:1;min-height:160px!important;border-bottom:1px solid #E5E5E5!important;
 }
 html body #newemail .onecup-email-toolbar-field{
  margin:0!important;padding:0 15px!important;background:#fff;
 }
 html body #newemail .onecup-email-toolbar-field>.info-group{
  width:100%;margin:0!important;padding:15px 0!important;border-bottom:1px solid #E5E5E5!important;
 }
 html body #newemail .onecup-email-compose-scroll>.attachements:not(:has(li)){margin:0;padding:0}
 html body #newemail .onecup-email-context-status{overflow:auto;padding:15px}
 body.onecup-email-sheet-open{overflow:hidden!important}
 html body .footer:has(#newemail.is-sheet-open){z-index:10010!important}
 html body .onecup-email-sheet-backdrop{
  display:block;position:fixed;left:0;right:0;top:var(--onecup-top-bound,55px);
  bottom:calc(var(--onecup-mobile-nav-height,64px) + var(--onecup-mobile-safe-bottom,0px));
  background:rgba(24,26,85,.28);z-index:9980;visibility:hidden;opacity:0;pointer-events:none;
  transition:opacity .2s ease,visibility 0s linear .2s;
 }
 html body .onecup-email-sheet-backdrop.is-open{visibility:visible;opacity:1;pointer-events:auto;transition-delay:0s}
 body.onecup-email-sheet-open .onecup-mail-compose-mobile{visibility:hidden!important;pointer-events:none!important}
}
@media(prefers-reduced-motion:reduce){
 html body #newemail.footer-email,html body #newemail.footer-email>.panel,
 html body .onecup-email-sheet-backdrop{transition:none!important}
}

/* A defined bottom edge for the composer, separate from the system footer. */
#newemail .onecup-email-desktop-footer{display:none;}
html body #newemail #email-text-message-element{border-bottom:1px solid #e5e5e5!important;box-sizing:border-box;}
@media(min-width:1200px){
 html body #newemail.footer-email>.panel{max-height:var(--onecup-email-desktop-height,calc(100vh - 70px))!important;}
 html body #newemail.footer-email #collapseEmail>.panel-body{height:calc(var(--onecup-email-desktop-height,calc(100vh - 70px)) - 70px)!important;max-height:none!important;padding:15px!important;box-sizing:border-box;overflow:auto!important;}
 html body #newemail.footer-email #collapseEmail>.onecup-email-desktop-footer{display:block;flex:none;width:100%;height:35px;min-height:35px;padding:0;margin:0;background:#181a55;}
 html body #newemail .email-new-wrapper{display:flex!important;flex-direction:column!important;flex-wrap:nowrap!important;align-items:stretch!important;height:100%!important;min-height:0;}
 html body #newemail .email-new-wrapper .form-group{flex-shrink:0;}
 html body #newemail .onecup-email-editor-field{display:flex;flex-direction:column;flex:1 0 100px!important;width:100%;min-height:100px;margin:0!important;padding:0!important;}
 html body #newemail .onecup-email-editor-field .new-email-text{display:flex;flex-direction:column;flex:1;min-height:0;width:100%;height:100%!important;}
 html body #newemail #email-text-message-element{flex:1;min-height:100px!important;height:100%!important;overflow:auto!important;}
 html body #newemail .attachements:not(:has(li)){display:none;}
}

@media(max-width:1199px){
 html body #newemail.footer-email #collapseEmail>.panel-body{padding-bottom:15px!important;box-sizing:border-box;}
}

/* Reuse the preview backdrop; keep the footer and its navigation above it. */
html body .onecup-email-sheet-backdrop{
 display:block;position:fixed;inset:0;width:auto;height:auto;
 background:rgba(24,26,85,.18);z-index:9980;opacity:0;visibility:hidden;pointer-events:none;
}
html body .onecup-email-sheet-backdrop.is-open{opacity:1;visibility:visible;pointer-events:auto;}
html body.onecup-email-compose-open .footer{z-index:10010!important;}
html body.onecup-email-compose-open .onecup-mobile-nav{z-index:10011!important;}
html body #newemail.is-panel-switching #collapseEmail{display:none!important;}
@media(min-width:1200px){
 html body #newemail.is-compose-open #collapseEmail>.onecup-email-desktop-footer{background:#282b6c!important;}
}
@media(max-width:1199px){
 html body .onecup-email-sheet-backdrop{top:var(--onecup-top-bound,55px);bottom:calc(var(--onecup-mobile-nav-height,65px) + env(safe-area-inset-bottom));}
}
