body:is([data-suite-product='bulk-mail'], [data-suite-product='bulk-sms'])
  #workspace
  #templates.bmt-page {
  display: flex;
  flex-direction: column;
  height: calc(100dvh - 214px);
  min-height: 420px;
  padding: 0;
  border: 0;
  border-radius: 0;
  background: transparent;
  box-shadow: none;
}
body:is([data-suite-product='bulk-mail'], [data-suite-product='bulk-sms']) .bmt-toolbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 16px;
  flex: none;
}
body:is([data-suite-product='bulk-mail'], [data-suite-product='bulk-sms']) .bmt-tabs {
  display: flex;
  gap: 4px;
  padding: 4px;
  border: 1px solid var(--border);
  border-radius: 8px;
  background: var(--subtle);
}
body:is([data-suite-product='bulk-mail'], [data-suite-product='bulk-sms']) .bmt-tabs button {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 7px;
  min-width: 80px;
  min-height: 40px;
  margin: 0;
  padding: 8px 13px;
  border: 1px solid transparent;
  border-radius: 6px;
  background: transparent;
  color: var(--muted);
  font-size: 13px;
  box-shadow: none;
}
body:is([data-suite-product='bulk-mail'], [data-suite-product='bulk-sms'])
  .bmt-tabs
  button[aria-selected='true'] {
  border-color: var(--border);
  background: var(--surface);
  color: var(--accent);
  font-weight: 600;
  box-shadow: 0 1px 3px #15234108;
}
body:is([data-suite-product='bulk-mail'], [data-suite-product='bulk-sms']) .bmt-tabs small {
  font-size: 10px;
  font-variant-numeric: tabular-nums;
}
body:is([data-suite-product='bulk-mail'], [data-suite-product='bulk-sms']) .bmt-tools {
  gap: 8px;
  display: flex;
  align-items: center;
}
body:is([data-suite-product='bulk-mail'], [data-suite-product='bulk-sms'])
  #bulk-mail-template-panel {
  position: relative;
  display: flex;
  flex: 1;
  flex-direction: column;
  min-height: 0;
  min-width: 0;
  overflow: hidden;
  padding: 0;
  border: 1px solid var(--border);
  border-radius: 12px;
  background: var(--surface);
}
body:is([data-suite-product='bulk-mail'], [data-suite-product='bulk-sms']) #bulk-mail-template-new {
  flex: none;
  display: inline-flex;
  align-items: center;
  gap: 9px;
  min-height: 44px;
  padding: 10px 14px;
  border-radius: 8px;
  box-shadow: none;
  font-size: 13px;
}
body:is([data-suite-product='bulk-mail'], [data-suite-product='bulk-sms'])
  #bulk-mail-template-new
  svg {
  width: 18px;
  height: 18px;
}
body:is([data-suite-product='bulk-mail'], [data-suite-product='bulk-sms']) .bmt-meta {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  min-height: 52px;
  flex: none;
  padding: 0 14px;
  border-bottom: 1px solid var(--border);
  font-size: 12px;
  color: var(--muted);
}
body:is([data-suite-product='bulk-mail'], [data-suite-product='bulk-sms']) .bmt-paging {
  display: flex;
  align-items: center;
  gap: 6px;
  font-size: 11px;
  font-variant-numeric: tabular-nums;
}
body:is([data-suite-product='bulk-mail'], [data-suite-product='bulk-sms']) .bmt-paging button {
  width: 32px;
  height: 36px;
  min-height: 36px;
  border: 0;
  background: transparent;
}
body:is([data-suite-product='bulk-mail'], [data-suite-product='bulk-sms']) .bmt-list {
  flex: 1;
  min-height: 0;
  overflow: auto;
  overscroll-behavior: contain;
  padding-bottom: 0;
}
body:is([data-suite-product='bulk-mail'], [data-suite-product='bulk-sms']) .bmt-list-head {
  display: none;
}
body:is([data-suite-product='bulk-mail'], [data-suite-product='bulk-sms']) .bmt-row {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  align-items: center;
  gap: 12px;
  min-height: 52px;
  padding: 0 14px;
  margin: 0;
  border: 0;
  border-bottom: 1px solid var(--border);
  border-radius: 0;
  background: var(--surface);
  box-shadow: none;
}
body:is([data-suite-product='bulk-mail'], [data-suite-product='bulk-sms']) .bmt-row:hover {
  background: var(--subtle);
}
body:is([data-suite-product='bulk-mail'], [data-suite-product='bulk-sms']) .bmt-row-open {
  display: grid;
  grid-template-columns: minmax(0, 32%) minmax(0, 1fr) 110px;
  align-items: center;
  gap: 18px;
  width: 100%;
  min-width: 0;
  min-height: 51px;
  margin: 0;
  padding: 8px 0;
  border: 0;
  border-radius: 0;
  background: transparent;
  box-shadow: none;
  color: var(--text);
  text-align: left;
  font-weight: 400;
}
body:is([data-suite-product='bulk-mail'], [data-suite-product='bulk-sms']) .bmt-name {
  display: flex;
  align-items: center;
  gap: 10px;
  min-width: 0;
}
body:is([data-suite-product='bulk-mail'], [data-suite-product='bulk-sms']) .bmt-name svg {
  flex: none;
  width: 16px;
  height: 16px;
  color: var(--accent);
}
body:is([data-suite-product='bulk-mail'], [data-suite-product='bulk-sms']) .bmt-name strong {
  font-size: 13px;
  font-weight: 600;
  min-width: 0;
  overflow: hidden;
  white-space: nowrap;
  text-overflow: ellipsis;
}
body:is([data-suite-product='bulk-mail'], [data-suite-product='bulk-sms']) .bmt-subject,
body:is([data-suite-product='bulk-mail'], [data-suite-product='bulk-sms']) .bmt-scope {
  display: block;
  min-width: 0;
  overflow: hidden;
  white-space: nowrap;
  text-overflow: ellipsis;
  color: var(--muted);
  font-size: 12px;
}
body:is([data-suite-product='bulk-mail'], [data-suite-product='bulk-sms']) .bmt-scope {
  font-size: 11px;
}
body:is([data-suite-product='bulk-mail'], [data-suite-product='bulk-sms']) .bmt-row-actions {
  display: flex;
  align-items: center;
  gap: 2px;
}
body:is([data-suite-product='bulk-mail'], [data-suite-product='bulk-sms']) .bmt-row-actions button {
  width: 32px;
  height: 36px;
  min-height: 36px;
  padding: 6px;
  border: 0;
  border-radius: 6px;
  background: transparent;
  color: var(--muted);
}
body:is([data-suite-product='bulk-mail'], [data-suite-product='bulk-sms'])
  .bmt-row-actions
  .bm-popover
  button {
  width: 100%;
  height: auto;
  min-height: 40px;
  text-align: left;
}
body:is([data-suite-product='bulk-mail'], [data-suite-product='bulk-sms'])
  .bmt-row-actions
  button:hover {
  background: var(--selected);
  color: var(--accent);
}
body:is([data-suite-product='bulk-mail'], [data-suite-product='bulk-sms']) dialog.bmt-dialog {
  width: min(520px, calc(100vw - 32px));
  max-width: none;
  max-height: calc(100dvh - 32px);
  padding: 0;
  border: 1px solid var(--border);
  border-radius: 14px;
  background: var(--surface);
  color: var(--text);
}
body:is([data-suite-product='bulk-mail'], [data-suite-product='bulk-sms'])
  dialog.bmt-dialog::backdrop {
  background: #17203366;
  backdrop-filter: blur(3px);
}
body:is([data-suite-product='bulk-mail'], [data-suite-product='bulk-sms']) .bmt-dialog header {
  display: flex;
  flex-direction: row;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 20px;
  border-bottom: 1px solid var(--border);
}
body:is([data-suite-product='bulk-mail'], [data-suite-product='bulk-sms']) .bmt-dialog h2 {
  margin: 0;
  font-size: 17px;
  overflow-wrap: anywhere;
}
body:is([data-suite-product='bulk-mail'], [data-suite-product='bulk-sms']) .bmt-dialog h3 {
  margin: 18px 0 10px;
  font-size: 18px;
  line-height: 1.5;
  overflow-wrap: anywhere;
}
body:is([data-suite-product='bulk-mail'], [data-suite-product='bulk-sms']) .bmt-dialog-body {
  padding: 20px;
  overflow-wrap: anywhere;
}
body:is([data-suite-product='bulk-mail'], [data-suite-product='bulk-sms']) .bmt-dialog footer {
  display: flex;
  flex-wrap: wrap;
  justify-content: flex-end;
  align-items: center;
  gap: 8px;
  padding: 16px 20px;
  border-top: 1px solid var(--border);
}
body:is([data-suite-product='bulk-mail'], [data-suite-product='bulk-sms'])
  .bmt-dialog
  footer
  button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  min-height: 40px;
}
body:is([data-suite-product='bulk-mail'], [data-suite-product='bulk-sms'])
  .bmt-dialog
  footer
  .primary {
  margin-left: auto;
}
body:is([data-suite-product='bulk-mail'], [data-suite-product='bulk-sms']) .bmt-create-options {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 14px;
}
body:is([data-suite-product='bulk-mail'], [data-suite-product='bulk-sms'])
  .bmt-create-options
  button {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 14px;
  min-height: 130px;
  border: 1px solid var(--border);
  background: var(--surface);
  border-radius: 10px;
  font-size: 14px;
}
body:is([data-suite-product='bulk-mail'], [data-suite-product='bulk-sms'])
  .bmt-create-options
  button:hover {
  border-color: var(--accent);
  background: var(--selected);
}
body:is([data-suite-product='bulk-mail'], [data-suite-product='bulk-sms']) .bmt-create-options svg {
  width: 26px;
  height: 26px;
  color: var(--accent);
}
body:is([data-suite-product='bulk-mail'], [data-suite-product='bulk-sms']) .bmt-note {
  font-size: 12px;
  line-height: 1.65;
  color: var(--muted);
  margin: 0;
}
body:is([data-suite-product='bulk-mail'], [data-suite-product='bulk-sms']) .bmt-error {
  font-size: 13px;
  color: var(--danger, #a62b2b);
}
body:is([data-suite-product='bulk-mail'], [data-suite-product='bulk-sms']) dialog.bmt-drawer {
  position: fixed;
  inset: 0 0 0 auto;
  margin: 0;
  width: min(760px, 100vw);
  height: 100dvh;
  max-height: none;
  border: 0;
  border-left: 1px solid var(--border);
  border-radius: 16px 0 0 16px;
}
body:is([data-suite-product='bulk-mail'], [data-suite-product='bulk-sms']) dialog.bmt-drawer[open] {
  display: flex;
  flex-direction: column;
}
body:is([data-suite-product='bulk-mail'], [data-suite-product='bulk-sms']) .bmt-drawer header,
body:is([data-suite-product='bulk-mail'], [data-suite-product='bulk-sms']) .bmt-drawer footer {
  flex: none;
}
body:is([data-suite-product='bulk-mail'], [data-suite-product='bulk-sms'])
  .bmt-drawer
  .bmt-dialog-body {
  flex: 1;
  min-height: 0;
  overflow: auto;
}
body:is([data-suite-product='bulk-mail'], [data-suite-product='bulk-sms']) .bmt-preview-info {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  font-size: 11px;
  color: var(--muted);
}
body:is([data-suite-product='bulk-mail'], [data-suite-product='bulk-sms']) .bmt-preview-info span {
  padding: 4px 8px;
  border-radius: 5px;
  background: var(--subtle);
}
body:is([data-suite-product='bulk-mail'], [data-suite-product='bulk-sms']) .bmt-preview-mode {
  display: flex;
  gap: 6px;
  margin: 18px 0 12px;
}
body:is([data-suite-product='bulk-mail'], [data-suite-product='bulk-sms'])
  .bmt-preview-mode
  button {
  display: flex;
  align-items: center;
  gap: 7px;
  padding: 6px 10px;
  min-height: 36px;
  font-size: 12px;
  background: transparent;
  color: var(--muted);
  border: 1px solid var(--border);
}
body:is([data-suite-product='bulk-mail'], [data-suite-product='bulk-sms'])
  .bmt-preview-mode
  button[aria-pressed='true'] {
  background: var(--selected);
  color: var(--accent);
}
body:is([data-suite-product='bulk-mail'], [data-suite-product='bulk-sms']) .bmt-canvas {
  margin-top: 18px;
  min-width: 0;
}
body:is([data-suite-product='bulk-mail'], [data-suite-product='bulk-sms']) .bmt-canvas iframe {
  display: block;
  width: 100%;
  height: 500px;
  border: 1px solid var(--border);
  border-radius: 8px;
  background: #fff;
}
body:is([data-suite-product='bulk-mail'], [data-suite-product='bulk-sms']) .bmt-text-preview {
  min-height: 260px;
  margin: 0;
  padding: 24px;
  border: 1px solid var(--border);
  border-radius: 8px;
  background: var(--surface);
  color: var(--text);
  white-space: pre-wrap;
  overflow-wrap: anywhere;
  font: 14px/1.8 inherit;
}
body:is([data-suite-product='bulk-mail'], [data-suite-product='bulk-sms'])
  #bulk-mail-template-editing {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  padding: 10px 14px;
  margin: 10px 0;
  border: 1px solid var(--border);
  border-radius: 8px;
  background: var(--selected);
  color: var(--accent);
  font-size: 12px;
}
@media (max-width: 900px) {
  body:is([data-suite-product='bulk-mail'], [data-suite-product='bulk-sms']) .bmt-row {
    min-height: 72px;
    gap: 8px;
    padding: 0 12px;
  }
  body:is([data-suite-product='bulk-mail'], [data-suite-product='bulk-sms']) .bmt-row-open {
    grid-template-columns: minmax(0, 1fr);
    gap: 4px;
    min-height: 71px;
    padding: 12px 0;
  }
  body:is([data-suite-product='bulk-mail'], [data-suite-product='bulk-sms']) .bmt-scope {
    display: none;
  }
  body:is([data-suite-product='bulk-mail'], [data-suite-product='bulk-sms']) .bmt-subject {
    padding-left: 26px;
    font-size: 11px;
  }
}
@media (max-width: 600px) {
  body:is([data-suite-product='bulk-mail'], [data-suite-product='bulk-sms'])
    #workspace
    #templates.bmt-page {
    height: calc(100dvh - 228px);
    min-height: 400px;
  }
  body:is([data-suite-product='bulk-mail'], [data-suite-product='bulk-sms']) .bmt-toolbar {
    flex-wrap: wrap;
    gap: 8px;
    margin-bottom: 12px;
  }
  body:is([data-suite-product='bulk-mail'], [data-suite-product='bulk-sms']) .bmt-tabs {
    flex: 1 0 100%;
    gap: 2px;
    padding: 3px;
  }
  body:is([data-suite-product='bulk-mail'], [data-suite-product='bulk-sms']) .bmt-tabs button {
    flex: 1;
    min-width: 0;
    gap: 5px;
    padding: 8px 6px;
    font-size: 12px;
  }
  body:is([data-suite-product='bulk-mail'], [data-suite-product='bulk-sms']) .bmt-tools {
    margin-left: auto;
    flex: none;
  }
  body:is([data-suite-product='bulk-mail'], [data-suite-product='bulk-sms'])
    .bmt-tools
    .bm-icon-button {
    width: 30px;
    min-width: 30px;
  }
  body:is([data-suite-product='bulk-mail'], [data-suite-product='bulk-sms']) .bmt-meta {
    padding: 0 10px;
    gap: 8px;
    font-size: 11px;
  }
  body:is([data-suite-product='bulk-mail'], [data-suite-product='bulk-sms']) .bmt-paging {
    gap: 2px;
    font-size: 10px;
  }
  body:is([data-suite-product='bulk-mail'], [data-suite-product='bulk-sms'])
    #bulk-mail-template-new {
    min-height: 44px;
    padding: 10px 12px;
    font-size: 12px;
  }
  body:is([data-suite-product='bulk-mail'], [data-suite-product='bulk-sms']) .bmt-dialog header,
  body:is([data-suite-product='bulk-mail'], [data-suite-product='bulk-sms']) .bmt-dialog-body {
    padding: 16px;
  }
  body:is([data-suite-product='bulk-mail'], [data-suite-product='bulk-sms']) .bmt-dialog footer {
    padding: 12px 16px;
  }
  body:is([data-suite-product='bulk-mail'], [data-suite-product='bulk-sms']) dialog.bmt-drawer {
    border-radius: 0;
  }
  body:is([data-suite-product='bulk-mail'], [data-suite-product='bulk-sms']) .bmt-dialog h2 {
    font-size: 16px;
  }
  body:is([data-suite-product='bulk-mail'], [data-suite-product='bulk-sms'])
    .bmt-dialog
    footer
    button {
    font-size: 12px;
  }
  body:is([data-suite-product='bulk-mail'], [data-suite-product='bulk-sms']) .bmt-text-preview {
    padding: 16px;
  }
}
body:is([data-suite-product='bulk-mail'], [data-suite-product='bulk-sms']).bmt-working
  :is(
    #send-steps,
    #campaign-back,
    .bx-compose-submit,
    #bulk-mail-send-info,
    .send-identity,
    #save-compose-template
  ) {
  display: none !important;
}
body:is([data-suite-product='bulk-mail'], [data-suite-product='bulk-sms'])
  #bulk-mail-template-editing {
  margin: 0 0 16px;
  background: var(--surface);
  color: var(--text);
}
body:is([data-suite-product='bulk-mail'], [data-suite-product='bulk-sms'])
  #bulk-mail-template-editing
  > span {
  flex: 1;
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
body:is([data-suite-product='bulk-mail'], [data-suite-product='bulk-sms'])
  #bulk-mail-template-save {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  min-height: 40px;
  flex: none;
  font-size: 13px;
}
@media (max-width: 600px) {
  body:is([data-suite-product='bulk-mail'], [data-suite-product='bulk-sms'])
    #bulk-mail-template-editing {
    padding: 10px;
    flex-wrap: wrap;
  }
  body:is([data-suite-product='bulk-mail'], [data-suite-product='bulk-sms'])
    #bulk-mail-template-save {
    margin-left: auto;
    font-size: 12px;
  }
}
/* Template content is a mail canvas; the surrounding application keeps its theme. */
body:is([data-suite-product='bulk-mail'], [data-suite-product='bulk-sms']).bmt-working
  #workspace
  #compose
  #visual-editor {
  --text: #222;
  --muted: #526079;
  --surface: #fff;
  --subtle: #f5f7fb;
  color: var(--text);
  background: var(--surface);
  color-scheme: light;
}

body[data-suite-product='bulk-sms'] .bmt-image-preview {
  display: block;
  max-width: 100%;
  max-height: 360px;
  margin: 0 auto 16px;
  object-fit: contain;
}
