/* A viewport-sized container for the unchanged compose document. */
body #corpmail-compose-modal {
  position: fixed;
  inset: 0;
  width: 90vw;
  height: 90vh;
  height: 90dvh;
  max-width: none;
  max-height: none;
  box-sizing: border-box;
  margin: auto;
  padding: 0;
  border: 1px solid rgba(90, 113, 130, .24);
  border-radius: 20px !important;
  background: #f4f8fb;
  color: #263a49;
  box-shadow: 0 18px 65px rgba(15, 31, 45, .25);
  overflow: hidden;
}
body #corpmail-compose-modal[open] { display: flex; flex-direction: column; }
body #corpmail-compose-modal::backdrop { background: rgba(24, 43, 57, .46); }
body #corpmail-compose-modal .corpmail-compose-heading {
  display: flex; align-items: center; justify-content: space-between;
  flex: 0 0 auto; gap: 12px; padding: 5px 14px;
  border-bottom: 1px solid #dbe5ec;
}
body #corpmail-compose-modal h2 { margin: 0; font-size: 18px; line-height: 1.4; }
body #corpmail-compose-modal .corpmail-compose-close {
  display: inline-flex; align-items: center; justify-content: center;
  width: 30px; height: 30px; padding: 0; flex: 0 0 30px;
  border: 0; border-radius: 50% !important;
  background: #e4edf3; color: #43667e; font-size: 26px;
  line-height: 1; cursor: pointer;
}
body #corpmail-compose-modal .corpmail-compose-close:hover { background: #d6e5ef; }
body #corpmail-compose-modal .corpmail-compose-close:focus-visible { outline: 2px solid #43667e; outline-offset: 2px; }
body #corpmail-compose-modal > iframe { display: block; flex: 1 1 0; min-height: 0; width: 100%; border: 0; background: #fff; }
html.corpmail-compose-frame #topline { display: none !important; }

/* The full message uses formatcontrols rather than preview countcontrols. */
#messageheader #formatcontrols .buttongroup {
  display: inline-flex;
  align-items: stretch;
  vertical-align: middle;
  padding: 0;
  border-width: 1px;
  border-style: solid;
  border-radius: 6px !important;
  overflow: hidden;
  isolation: isolate;
}
#messageheader #formatcontrols .buttongroup > a.button.changeformat {
  margin: 0 !important;
  border-radius: 0 !important;
  border-top: 0 !important;
  border-bottom: 0 !important;
  border-left: 0 !important;
}
#messageheader #formatcontrols .buttongroup > a.button.changeformat:last-child {
  border-right: 0 !important;
}
#messageheader #formatcontrols .buttongroup > a.button.changeformat:focus-visible {
  outline: 2px solid currentColor;
  outline-offset: -3px;
}


/* External reader layout: reserve real space for the complete action toolbar. */
html.corpmail-reader-frame #header {display:none!important}
html.corpmail-reader-frame #mainscreen {
  top:8px!important;bottom:8px!important;left:10px!important;right:10px!important;
  display:flex!important;flex-direction:column;gap:8px;
}
html.corpmail-reader-frame #mainscreen > #messagetoolbar {
  position:relative!important;top:auto!important;left:auto!important;right:auto!important;
  flex:0 0 auto;height:auto!important;min-height:52px;box-sizing:border-box;
  margin:0!important;padding:0 0 4px!important;white-space:nowrap;
  overflow-x:auto;
}
html.corpmail-reader-frame #mainscreen > #mailview-right {
  position:relative!important;top:auto!important;left:auto!important;right:auto!important;bottom:auto!important;
  flex:1 1 0;min-height:0;width:auto!important;height:auto!important;margin:0!important;
}

/* Remove the unused external-window header space in the compose iframe. */
html.corpmail-compose-frame:not(.corpmail-reader-frame) #header { display:none!important; }
html.corpmail-compose-frame:not(.corpmail-reader-frame) #mainscreen {
 top:6px!important;bottom:8px!important;
}
html.corpmail-compose-frame:not(.corpmail-reader-frame) #messagetoolbar {
 top:0!important;margin-top:0!important;
}
html.corpmail-compose-frame:not(.corpmail-reader-frame) #mainscreencontent {
 top:46px!important;
}
