.xbw-dialog {
  font:
    13px/1.6 Manrope,
    Arial,
    sans-serif;
  color: var(--xb-text, #19314b);
  padding: 12px 8px;
  max-height: 75vh;
  overflow: auto;
}
.xbw-help {
  font-size: 12px;
  line-height: 1.8;
  color: var(--xb-muted, #687c93);
  margin: 5px 0 18px;
}
.xbw-field {
  display: flex;
  flex-direction: column;
  gap: 7px;
  margin: 14px 0;
  font-size: 12px;
  font-weight: 700;
}
.xbw-field input,
.xbw-field select,
.xbw-field textarea {
  font:
    13px/1.5 Manrope,
    Arial,
    sans-serif;
  background: var(--xb-soft, #f6f9fc);
  border: 1px solid var(--xb-line, #cedae6);
  color: var(--xb-text, #19314b);
  border-radius: 8px;
  padding: 10px;
  min-width: 0;
  width: 100%;
}
.xbw-field input[type='checkbox'] {
  width: 18px;
  height: 18px;
  align-self: flex-start;
}
.xbw-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 0 18px;
}
.xbw-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin: 15px 0 5px;
}
.xbw-dialog .btn {
  font-size: 12px;
  margin-right: 5px;
  margin-bottom: 5px;
}
.xbw-rule,
.xbw-signature-item {
  padding: 15px;
  border: 1px solid var(--xb-line, #dbe4ef);
  border-radius: 10px;
  margin: 12px 0;
  background: var(--xb-soft, #f8fafc);
}
.xbw-rule p {
  font-size: 12px;
  color: var(--xb-muted, #687c93);
  margin: 5px 0;
}
.xbw-signature-item strong {
  margin-right: 12px;
  display: inline-block;
  min-width: 120px;
}
.xbw-badge {
  font-size: 10px;
  background: var(--xb-selected, #e1f3ff);
  color: var(--xb-blue, #087cce);
  border-radius: 5px;
  padding: 3px 5px;
  margin-right: 15px;
}
.xbw-badge:empty {
  display: none;
}
.xbw-signature-toolbar {
  display: flex;
  gap: 5px;
  flex-wrap: wrap;
  background: var(--xb-soft, #f6f9fc);
  border: 1px solid var(--xb-line, #dbe4ef);
  border-radius: 10px 10px 0 0;
  padding: 8px;
}
.xbw-signature-toolbar .btn {
  padding: 5px 8px;
  margin: 0;
  font-size: 11px;
}
.xbw-signature-editor {
  background: white;
  color: #172e4c;
  min-height: 150px;
  padding: 18px;
  line-height: 1.7;
  border: 1px solid var(--xb-line, #dbe4ef);
  border-top: 0;
  border-radius: 0 0 10px 10px;
  overflow-wrap: anywhere;
}
.xbw-signature-editor img {
  max-width: 100%;
  height: auto;
}
.xbw-search-filters,
.xbw-view-button,
.xbw-signatures-button {
  border: 1px solid var(--xb-line, #dbe4ef);
  background: var(--xb-surface, #fff);
  color: var(--xb-text, #19314b);
  font:
    600 11px/1.5 Manrope,
    Arial,
    sans-serif;
  padding: 6px 10px;
  border-radius: 7px;
  cursor: pointer;
  white-space: nowrap;
}
.xbw-search-filters {
  height: 29px;
  align-self: center;
  margin-left: 4px;
  line-height: 16px;
  flex-shrink: 0;
}
.xbw-view-button {
  margin-left: auto;
}
.xbw-signatures-button {
  height: 37px;
  margin: 0 4px;
}
.xbw-settings-link {
  background: transparent;
  border: 0;
  color: var(--xb-blue, #087cce);
  padding: 10px 14px;
  font:
    600 12px Manrope,
    Arial,
    sans-serif;
  cursor: pointer;
}
.xbw-sender-address {
  font-size: 12px;
  color: var(--xb-muted, #657b92);
  margin: 0 0 5px;
  overflow-wrap: anywhere;
}
.xbw-sender-notice {
  border: 1px solid #cb9d43;
  border-radius: 8px;
  padding: 12px;
  background: var(--xb-soft);
  color: var(--xb-text);
  font-size: 12px;
  line-height: 1.7;
  clear: both;
}
.xbw-sender-avatar {
  width: 44px;
  height: 44px;
  min-width: 44px;
  border-radius: 15px;
  background: #dff4f2;
  color: #187e78;
  display: grid;
  place-items: center;
  font:
    800 14px Manrope,
    Arial,
    sans-serif;
  margin-right: 16px;
  float: left;
}
#message-header .header-links {
  display: flex;
  gap: 12px;
  flex-wrap: wrap;
  margin-top: 10px;
}
#message-header .header-links a {
  font-size: 12px !important;
  line-height: 22px;
  padding: 3px 0;
}
.xbw-quick-reply {
  border: 1px solid var(--xb-line, #dbe4ef);
  border-radius: 13px;
  margin: 30px 0 12px;
  padding: 20px;
  background: var(--xb-soft, #f7f9fc);
  clear: both;
}
.xbw-quick-reply h3 {
  font-size: 15px;
  font-weight: 800;
  margin: 0 0 5px;
  color: var(--xb-text, #19314b);
}
.xbw-quick-compose {
  border: 1px solid var(--xb-line, #dbe4ef);
  background: var(--xb-surface, #fff);
  width: 100%;
  height: 560px;
  border-radius: 10px;
  margin-top: 16px;
}
/* Only the native compose document owned by our quick-reply frame. The marker
   survives Roundcube's compose-ID redirect; ordinary compose stays unchanged. */
html.xb-inline-reply,
html.xb-inline-reply body.action-compose {
  height: auto !important;
  min-height: 0 !important;
  min-width: 0 !important;
  overflow: hidden !important;
  background: var(--xb-surface) !important;
}
html.xb-inline-reply body.action-compose > .xb-topbar,
html.xb-inline-reply #layout-menu,
html.xb-inline-reply #layout-sidebar,
html.xb-inline-reply .xb-compose-title,
html.xb-inline-reply #layout-content > .header > .header-title,
html.xb-inline-reply #layout-content > .header > .task-menu-button,
html.xb-inline-reply #layout-content > .header > .toolbar-menu-button,
html.xb-inline-reply #layout-content > .footer,
html.xb-inline-reply :is(#messagetoolbar, #toolbar-menu) .options,
html.xb-inline-reply #toolbar-menu > li:has(> .options),
html.xb-inline-reply #toolbar-menu > .spacer,
html.xb-inline-reply .xbm-navigation {
  display: none !important;
}
html.xb-inline-reply body.action-compose #layout {
  display: block !important;
  height: auto !important;
  min-height: 0 !important;
  padding: 0 !important;
  margin: 0 !important;
  overflow: visible !important;
}
html.xb-inline-reply body.action-compose #layout-content {
  display: block !important;
  width: 100% !important;
  height: auto !important;
  min-height: 0 !important;
  max-height: none !important;
  margin: 0 !important;
  border: 0 !important;
  border-radius: 0 !important;
  overflow: visible !important;
}
html.xb-inline-reply body.action-compose #layout-content > .header {
  display: flex !important;
  flex-wrap: wrap;
  align-items: center;
  justify-content: flex-start !important;
  height: auto !important;
  min-height: 52px !important;
  padding: 8px 14px !important;
  background: var(--xb-soft);
}
html.xb-inline-reply body :is(#messagetoolbar, #toolbar-menu) {
  display: flex !important;
  flex-wrap: wrap;
  align-items: center;
  justify-content: flex-start !important;
  gap: 4px;
  width: 100% !important;
  margin: 0 !important;
  padding: 0 !important;
  position: static !important;
  border: 0;
  box-shadow: none;
  background: transparent;
}
html.xb-inline-reply #toolbar-menu > li {
  height: auto !important;
  min-height: 0 !important;
  margin: 0 !important;
  padding: 0 !important;
}
html.xb-inline-reply #toolbar-menu > li:has(> a.attach) {
  display: block !important;
}
html.xb-inline-reply body :is(#messagetoolbar, #toolbar-menu) :is(a:not([hidden]):not(.options), .xbw-signatures-button) {
  display: inline-flex !important;
  flex-direction: row !important;
  align-items: center;
  justify-content: center;
  gap: 6px;
  min-height: 40px !important;
  height: auto !important;
  padding: 6px 9px !important;
  margin: 0;
  width: auto !important;
  max-width: none !important;
  line-height: 20px;
  font-size: 13px;
}
html.xb-inline-reply :is(#messagetoolbar, #toolbar-menu) a:before {
  display: inline-block !important;
  float: none !important;
  width: 18px !important;
  height: auto;
  line-height: 1;
  font-size: 16px;
}
html.xb-inline-reply :is(#messagetoolbar, #toolbar-menu) .inner {
  display: inline !important;
  height: auto !important;
  width: auto !important;
  font-size: 13px;
  line-height: 20px;
  overflow: visible !important;
  text-overflow: clip;
}
html.xb-inline-reply body.action-compose #compose-content,
html.xb-inline-reply body.action-compose #compose-content > form {
  display: block !important;
  height: auto !important;
  min-height: 0 !important;
  max-height: none !important;
  overflow: visible !important;
}
html.xb-inline-reply body.action-compose #compose-content {
  padding: 14px !important;
}
html.xb-inline-reply #compose-content > form {
  padding: 0 !important;
}
html.xb-inline-reply #compose-headers {
  padding: 0 !important;
  margin: 0 0 12px !important;
}
html.xb-inline-reply #compose-headers .form-group {
  margin: 0;
  padding: 6px 0;
}
html.xb-inline-reply #compose-headers .col-form-label {
  flex: 0 0 64px;
  max-width: 64px;
  padding: 8px 4px 8px 0;
}
html.xb-inline-reply #compose-headers .col-10 {
  flex: 1;
  min-width: 0;
  max-width: none;
  padding: 0;
}
html.xb-inline-reply body .xb-compose-body-heading {
  margin: 10px 0 8px !important;
  padding: 0 !important;
}
html.xb-inline-reply body #composebodycontainer {
  flex: none !important;
  height: 300px !important;
  min-height: 300px !important;
  max-height: 300px !important;
}
html.xb-inline-reply body #composebodycontainer :is(.tox-tinymce, textarea#composebody) {
  height: 300px !important;
  min-height: 300px !important;
  max-height: 300px !important;
}
html.xb-inline-reply .xb-inline-attachments #compose-attachments {
  margin: 0;
  padding: 0;
  border: 0;
  background: transparent;
}
html.xb-inline-reply .xb-inline-attachments .upload-form {
  display: none;
}
html.xb-inline-reply .xb-inline-attachments .attachmentslist {
  margin: 0;
}
html.xb-inline-reply .xb-inline-options {
  margin: 8px 0 0;
  padding: 0;
}
html.xb-inline-reply .xb-inline-options #compose-options {
  padding: 12px 0;
}
html.xb-inline-reply .xb-inline-options summary {
  padding: 8px 0;
}
html.xb-inline-reply #compose-content .formbuttons {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  margin: 12px 0 0;
  padding: 12px 0 0 !important;
  height: auto !important;
  min-height: 56px !important;
}
html.xb-inline-reply #compose-content .formbuttons .send {
  min-height: 42px;
}
html.xb-inline-reply #compose-content .formbuttons a.extwin {
  display: inline-flex !important;
  align-items: center;
  gap: 6px;
  min-height: 40px;
  padding: 6px;
  font-size: 12px;
}
html.xb-inline-reply #composestatusbar {
  position: static !important;
  width: 100%;
  order: 1;
}
html.xb-inline-reply #composestatusbar:empty {
  display: none;
}
.xbw-quick-reply.xbw-reply-open {
  padding: 16px;
}
.xbw-quick-reply.xbw-reply-open .xbw-quick-compose {
  margin-top: 8px;
  display: block;
}
@media (max-width: 480px) {
  html.xb-inline-reply body.action-compose #compose-content {
    padding: 10px !important;
  }
  html.xb-inline-reply #compose-headers .col-form-label {
    flex-basis: 52px;
    max-width: 52px;
    font-size: 12px;
  }
  html.xb-inline-reply #compose-headers .xb-recipient-shortcuts {
    display: none;
  }
  html.xb-inline-reply body.action-compose #layout-content > .header {
    padding: 6px !important;
  }
  .xbw-quick-reply.xbw-reply-open {
    padding: 10px;
  }
}
html.iframe .action-compose #layout-sidebar {
  display: none !important;
}
html.iframe .action-compose #compose-content {
  padding: 14px !important;
}
html.iframe .action-compose .xb-compose-title {
  display: none;
}
html.iframe .action-compose #layout-content {
  border: 0 !important;
  border-radius: 0 !important;
}
html.iframe .action-compose #composebodycontainer {
  min-height: 210px;
}
html.iframe .action-compose #composebody_ifr {
  min-height: 180px !important;
}
html.iframe .action-compose .mce-edit-area {
  min-height: 180px !important;
}
@media (max-width: 600px) {
  .xbw-grid {
    grid-template-columns: 1fr;
  }
  .xbw-dialog {
    padding: 8px 0;
  }
  .xbw-quick-reply {
    padding: 14px;
    margin-top: 20px;
  }
  .xbw-quick-compose {
    height: 620px;
  }
  .xbw-signature-item .btn {
    padding: 5px 8px;
  }
  .xbw-search-filters {
    padding: 5px;
    font-size: 10px;
  }
  .xbw-signature-item strong {
    display: block;
    margin-bottom: 8px;
  }
}
