/* Compact writing surface; native recipient widgets and editor remain intact. */
.xb-compose-dock { display:flex; flex-direction:column; flex:1; width:100%; height:100%; min-height:0; min-width:0; overflow:hidden; color:var(--xb-text); background:var(--xb-surface); border:0; border-top:2px solid var(--xb-blue-edge); border-radius:12px; }
body #layout-content.xb-composing { display:flex !important; flex-direction:column; min-height:0; overflow:hidden; }
body #layout-content.xb-composing > :not(.xb-compose-dock) { display:none !important; }
body.xb-composer-expanded #layout-content.xb-composing, .xb-compose-fallback { position:fixed !important; inset:20px 4vw !important; width:auto !important; height:auto !important; max-width:none !important; margin:0 !important; z-index:1100; box-shadow:0 12px 55px #0f294b33; }
.xb-compose-dock-header { min-height:48px; display:flex; align-items:center; justify-content:space-between; gap:8px; padding:5px 14px; background:linear-gradient(180deg,var(--xb-read-toolbar-start),var(--xb-blue-wash) 35%,var(--xb-surface) 90%); }
.xb-compose-dock-header strong { display:block; font-size:15px; }
.xb-compose-dock-status { display:block; font-size:11px; color:var(--xb-muted,#526780); }
.xb-compose-dock-header nav { display:flex; gap:3px; }
.xb-compose-dock-header button { display:grid; place-items:center; width:34px; height:34px; padding:7px; border:0; border-radius:6px; color:inherit; background:transparent; cursor:pointer; }
.xb-compose-dock-header button:hover { background:#008e9e18; }
.xb-compose-dock-header button:focus-visible { outline:2px solid var(--xb-accent-strong,#0b6cb8); outline-offset:1px; }
.xb-compose-dock-header svg { width:19px; height:19px; }
.xb-compose-dock-header [data-dock="close"] { width:auto; gap:5px; display:flex; font-size:12px; font-weight:600; }
.xb-compose-dock-header [data-dock="retry"] { width:auto; padding:6px 10px; color:var(--xb-accent-strong,#0b6cb8); }
.xb-compose-dock-header [hidden] { display:none !important; }
.xb-compose-dock-header [data-dock="discard"]:hover { color:#b42318; background:#b4231812; }
.xb-compose-frame { display:block; width:100%; min-height:0; flex:1; border:0; background:var(--xb-surface); }
.dark-mode body.xb-composer-expanded #layout-content.xb-composing { box-shadow:0 12px 60px #0008; }
html.xb-docked-compose, html.xb-docked-compose body { height:100%; min-height:0; overflow:hidden; }
html.xb-docked-compose .xb-topbar, html.xb-docked-compose #layout-menu, html.xb-docked-compose #layout-sidebar,
html.xb-docked-compose .xb-compose-title, html.xb-docked-compose .header-title,
html.xb-docked-compose .task-menu-button, html.xb-docked-compose .header > a,
html.xb-docked-compose .formbuttons .extwin { display:none !important; }
html.xb-docked-compose #layout { position:absolute !important; inset:0 !important; display:flex !important; padding:0 !important; margin:0 !important; width:100% !important; height:100% !important; min-height:0 !important; }
html.xb-docked-compose #layout-content { margin:0 !important; width:100% !important; max-width:none !important; min-width:0 !important; border:0 !important; border-radius:0 !important; height:100% !important; flex:1 !important; }
.xb-compact-compose #layout-sidebar { display:none !important; }
.xb-compact-compose #layout-content { min-width:0; }
.xb-compact-compose #toolbar-menu, .xb-compact-compose #messagetoolbar,
.xb-compact-compose #layout-content > .footer, .xb-compact-compose .toolbar-menu-button { display:none !important; }
.xb-compact-actions { display:flex; align-items:center; justify-content:flex-start; flex:1; gap:2px; min-width:0; flex-wrap:wrap; }
.xb-compact-actions > a, .xb-compact-actions > button { display:inline-flex !important; align-items:center; justify-content:center; gap:6px; padding:6px 9px !important; height:32px !important; min-height:32px !important; border:1px solid transparent; border-radius:6px; background:transparent; font-size:12px !important; line-height:18px !important; color:var(--xb-text) !important; white-space:nowrap; }
.xb-compact-actions > a:before { font-size:14px !important; margin:0 !important; width:auto !important; height:auto !important; float:none !important; }
.xb-compact-actions > a:before { font-family:Icons; font-weight:900; }
.xb-compact-actions > a.save:before { content:'\f0c7'; }
.xb-compact-actions > a.attach:before { content:'\f0c6'; }
.xb-compact-actions > a.responses:before { content:'\f075'; }
.xb-compact-actions > .xbw-signatures-button:before { content:'\f5ad'; font-family:Icons; font-weight:900; font-size:14px; }
.xb-compact-actions > a:hover, .xb-compact-actions > button:hover { background:var(--xb-soft); border-color:var(--xb-border); }
.xb-compact-actions > a:focus-visible, .xb-compact-actions > button:focus-visible { outline:2px solid var(--xb-accent-strong,#0b6cb8); outline-offset:1px; }
.xb-compact-compose #layout-content > .header { min-height:48px !important; height:auto !important; padding:6px 14px !important; flex-shrink:0; }
html.xb-docked-compose .xb-compact-compose #layout-content > .header { display:none !important; }
.xb-compact-compose .xb-compose-title h2 { font-size:18px; }
.xb-compact-compose #messagetoolbar { margin-left:auto !important; }
.xb-compact-compose #messagetoolbar a, .xb-compact-compose #toolbar-menu a { font-size:12px !important; }
.xb-compact-compose #compose-content { display:flex !important; flex-direction:column; min-height:0; padding:0 16px !important; flex:1; }
.xb-compact-compose #compose-content > form { display:flex; flex-direction:column; padding:2px 0 !important; margin:0 !important; overflow:auto !important; min-height:0; flex:1; }
.xb-compact-compose #compose-content > form > :not(#composebodycontainer) { flex-shrink:0; }
.xb-compact-compose #compose-headers .form-group { margin:0 !important; padding:2px 0 !important; display:flex !important; flex-wrap:nowrap; }
.xb-compact-compose #compose-headers .form-group.hidden { display:none !important; }
.xb-compact-compose #compose-headers .col-form-label { flex:0 0 52px !important; width:52px !important; max-width:52px !important; padding:5px 0 !important; font-size:12px !important; }
.xb-compact-compose #compose-headers .col-10 { flex:1 !important; max-width:none !important; width:auto !important; min-width:0; padding:0 !important; }
.xb-compact-compose #compose-headers .xf-control, .xb-compact-compose #compose-headers .xf-group { min-height:32px !important; height:auto; }
.xb-compact-compose #compose-headers input.form-control, .xb-compact-compose #compose-headers select.form-control { height:32px !important; min-height:32px !important; padding:3px 9px !important; font-size:14px !important; }
.xb-compact-compose #compose-headers .recipient-input { min-height:30px !important; padding:0 7px !important; }
.xb-compact-compose #compose-headers .recipient-input input { min-height:28px !important; height:28px !important; padding:2px 0 !important; line-height:24px !important; font-size:14px !important; }
.xb-compact-compose #compose-headers .input-group-text, .xb-compact-compose #compose-headers .input-group-append a { min-height:30px !important; height:30px !important; padding-block:3px !important; }
.xb-compact-compose .xb-recipient-shortcuts button { min-height:30px !important; padding:3px 7px !important; }
.xb-compact-compose .xb-compose-body-heading { margin:4px 0 !important; padding:0 !important; min-height:26px !important; }
.xb-compact-compose #xb-compose-mode select { min-height:26px !important; height:26px !important; min-width:92px; font-size:12px !important; padding:1px 8px !important; }
.xb-compact-compose #composebodycontainer { flex:1 0 220px; min-height:220px !important; height:auto !important; margin:0 !important; }
.xb-compact-compose #composebody, .xb-compact-compose #composebodycontainer .tox-tinymce { height:100% !important; min-height:220px !important; }
.xb-compact-compose .tox .tox-toolbar__group { padding:0 2px !important; }
.xb-compact-compose .tox .tox-tbtn { height:30px !important; width:30px; }
.xb-compact-compose .tox .tox-tbtn--select { width:auto; }
.xb-compact-compose .formbuttons { min-height:54px !important; flex-shrink:0; padding:7px 0 !important; margin:0 !important; display:flex !important; align-items:center; gap:8px; flex-wrap:wrap; justify-content:space-between; }
.xb-compact-compose .formbuttons .send { display:inline-flex !important; align-items:center; gap:6px; min-height:36px !important; padding:7px 18px !important; }
html.xb-docked-compose .formbuttons > .float-right { display:none; }
.xb-compose-extras { margin:4px 0 0; padding:0; border:0; font-size:12px; }
.xb-compose-extras > summary { min-height:30px; padding:5px 2px; cursor:pointer; font-weight:600; color:var(--xb-text); }
.xb-compose-extras > summary span { margin-left:8px; font-size:11px; font-weight:400; color:var(--xb-muted); }
.xb-compose-extras > summary:focus-visible { outline:2px solid var(--xb-accent-strong); outline-offset:-2px; border-radius:5px; }
.xb-compact-compose .xb-compose-files, .xb-compact-compose .xb-compose-options, .xb-compact-compose .xb-send-options { border:0 !important; border-top:1px solid var(--xb-border) !important; background:transparent !important; margin:8px 0 0 !important; padding:8px 0 !important; border-radius:0 !important; font-size:12px; }
.xb-compose-files summary, .xb-compact-compose .xb-compose-options summary { cursor:pointer; font-size:12px; font-weight:600; }
.xb-compose-files summary span { margin-left:8px; font-weight:400; color:var(--xb-muted,#526780); }
.xb-compact-compose #compose-attachments { padding:8px !important; margin:8px 0 0 !important; min-height:0 !important; }
.xb-compact-compose #compose-attachments .upload-form { min-height:0 !important; padding:8px !important; display:flex; align-items:center; flex-wrap:wrap; gap:8px; }
.xb-compact-compose .xb-upload-symbol, .xb-compact-compose .xb-upload-title, .xb-compact-compose .xb-upload-help { display:none !important; }
.xb-compact-compose #compose-attachments .hint { flex:1; margin:0 !important; font-size:11px; }
.xb-compact-compose #compose-attachments .attach { padding:6px 10px !important; font-size:12px; }
.xb-compact-compose #compose-options { padding:10px 0 0 !important; }
@media(min-width:769px) {
  html:not(.xb-docked-compose) .xb-compact-compose #layout-content { max-width:1120px; margin-inline:auto !important; }
}
@media(min-width:1025px) {
  body.xb-composer-open.xb-mail-workspace #layout { grid-template-columns:var(--xb-nav-width) minmax(290px,.9fr) minmax(340px,1.2fr) !important; grid-template-rows:minmax(0,1fr) !important; grid-template-areas:'nav list read' !important; }
  body.xb-composer-open.xb-mail-workspace #layout-list { display:flex !important; grid-area:list !important; }
  body.xb-composer-open.xb-mail-workspace #layout-content { grid-area:read !important; }
}
@media(max-width:1024px) {
  body #layout-content.xb-composing, body.xb-composer-expanded #layout-content.xb-composing, .xb-compose-fallback { position:fixed !important; inset:0 !important; width:100% !important; height:100dvh !important; max-width:none !important; margin:0 !important; z-index:1100; border:0 !important; border-radius:0 !important; }
  .xb-compose-dock { border-radius:0; }
  .xb-compose-dock-header [data-dock="expand"] { display:none; }
}
@media(max-width:600px) {
  html:not(.xb-docked-compose) .xb-compact-compose #layout-content > .header { display:flex !important; flex-wrap:wrap; height:auto !important; padding:6px 12px !important; }
  html:not(.xb-docked-compose) .xb-compact-compose .xb-compose-title { position:static !important; display:flex; flex:0 0 100%; height:40px; }
  html:not(.xb-docked-compose) .xb-compact-compose .xb-compact-actions { flex:0 0 100%; }
  .xb-compact-compose.xbm-phone #compose_to .input-group { flex-wrap:nowrap; }
  .xb-compact-compose.xbm-phone #compose_to .recipient-input { flex:1; min-width:0; }
  .xb-compact-compose.xbm-phone .xb-recipient-shortcuts { flex-basis:auto; padding-top:0; }
  .xb-compact-compose.xbm-phone #composebodycontainer .tox-tinymce { height:100% !important; min-height:220px !important; }
  .xb-compact-actions { justify-content:flex-start; gap:0; }
  .xb-compact-actions > a, .xb-compact-actions > button { padding:6px !important; font-size:11px !important; gap:4px; }
  .xb-compact-compose .xb-compact-actions > a, .xb-compact-compose .xb-compact-actions > button { font-size:0 !important; width:40px !important; min-width:40px !important; max-width:40px; height:40px !important; min-height:40px !important; gap:0; }
  .xb-compact-actions > a .inner { font-size:0 !important; }
  .xb-compact-actions > a:before, .xb-compact-actions > .xbw-signatures-button:before { font-size:16px !important; }
  .xb-compose-dock-header button { height:40px; width:40px; }
  .xb-compose-dock-header [data-dock="expand"] { display:none; }
  .xb-compact-compose #compose-content { padding:0 12px !important; }
  .xb-compact-compose #compose-headers input.form-control, .xb-compact-compose #compose-headers select.form-control { font-size:16px !important; min-height:38px !important; height:38px !important; }
  .xb-compact-compose #compose-headers .recipient-input input { font-size:16px !important; min-height:36px !important; height:36px !important; }
  .xb-compact-compose #compose-headers .input-group-text, .xb-compact-compose #compose-headers .input-group-append a, .xb-compact-compose .xb-recipient-shortcuts button { min-height:38px !important; height:38px !important; }
  .xb-compact-compose #compose-headers .col-form-label { flex-basis:48px !important; width:48px !important; max-width:48px !important; }
  .xb-compact-compose .formbuttons .send { min-width:88px !important; min-height:40px !important; padding:8px 14px !important; }
  .xb-compose-extras > summary { min-height:36px; padding-block:8px; }
  .xb-compose-extras > summary span { display:none; }
  .xb-compact-compose .formbuttons { padding-bottom:max(10px,env(safe-area-inset-bottom)) !important; }
  .xb-compact-compose .xb-recipient-shortcuts button { padding:4px !important; min-width:30px !important; }
}
