/* Recipient review is scoped to the bulk composer and its persistent receipt. */
.bec-review {
  --bec-surface: var(--ds-surface-raised, #fff);
  --bec-muted: var(--ds-surface-muted, #f8fafc);
  --bec-border: var(--ds-border-subtle, #e2e8f0);
  --bec-ink: var(--ds-text-primary, #172b3a);
  --bec-secondary: var(--ds-text-secondary, #526375);
  margin: 12px 0 16px; padding: 16px 20px 12px; border: 1px solid var(--bec-border);
  border-radius: 12px !important; background: var(--bec-surface); color: var(--bec-ink);
  font-size: 14px; line-height: 1.5; box-sizing: border-box;
}
.bec-review *, .bec-review *::before, .bec-review *::after { box-sizing: border-box; }
.bec-review .bec-heading { display: flex; align-items: center; gap: 14px; }
.bec-review .bec-icon { display: flex; align-items: center; justify-content: center; width: 42px; height: 42px; flex: 0 0 42px; border-radius: 12px !important; background: var(--ds-surface-table-head, #effaf8); color: #087f79; font-size: 18px; }
.bec-review .bec-heading-copy { min-width: 0; flex: 1; }
.bec-review h3 { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; margin: 0; font-size: 18px; font-weight: 600; line-height: 1.4; color: var(--bec-ink); }
.bec-review .bec-heading-copy p { margin: 3px 0 0; color: var(--bec-secondary); font-size: 13px; }
.bec-review .bec-pill { display: inline-flex; padding: 3px 9px; border: 1px solid var(--bec-border); border-radius: 20px !important; color: var(--bec-secondary); font-size: 11px; font-weight: 500; line-height: 1.4; }
.bec-review .bec-history { display: inline-flex; align-items: center; gap: 6px; flex-shrink: 0; color: var(--bec-secondary); font-size: 12px; text-decoration: none; }
.bec-review .bec-history:hover { color: #087f79; text-decoration: underline; }
.bec-review .bec-actions { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; margin-top: 16px; }
.bec-review .bec-button { display: inline-flex; align-items: center; justify-content: center; gap: 8px; min-height: 36px; margin: 0; padding: 7px 12px; border: 1px solid var(--bec-border); border-radius: 7px !important; background: var(--bec-surface); color: var(--bec-ink); font: inherit; font-size: 12px; font-weight: 600; line-height: 1.5; text-transform: none; box-shadow: none; cursor: pointer; }
.bec-review .bec-button:hover, .bec-review .bec-button[aria-expanded="true"] { border-color: #88c7c1; background: var(--ds-surface-hover, #f0fdfa); color: #087f79; }
.bec-review .bec-button--primary { background: #087f79; border-color: #087f79; color: #fff; }
.bec-review .bec-button--primary:hover { background: #076a65; border-color: #076a65; color: #fff; }
.bec-review .bec-button:disabled { opacity: .6; cursor: wait; }
.bec-review .bec-button:focus-visible, .bec-review a:focus-visible, .bec-review select:focus-visible { outline: 2px solid #08978e; outline-offset: 3px; }
.bec-review .bec-dedupe { margin-left: auto; color: var(--bec-secondary); font-size: 12px; }
.bec-review .bec-draft-note { margin: 12px 0 0; font-size: 11px; color: var(--bec-secondary); }
.bec-review .bec-excluded { margin: 14px 0 0; padding: 8px 12px; border-radius: 6px !important; background: #fffbeb; color: #854d0e; font-size: 12px; }
.bec-review .bec-panel { margin-top: 16px; padding-top: 18px; border-top: 1px solid var(--bec-border); }
.bec-review [hidden] { display: none !important; }
.bec-review .bec-panel-heading { display: flex; align-items: baseline; gap: 12px; flex-wrap: wrap; margin-bottom: 12px; }
.bec-review h4 { margin: 0; font-size: 13px; font-weight: 600; color: var(--bec-ink); }
.bec-review .bec-panel-heading > span { color: var(--bec-secondary); font-size: 12px; }
.bec-review .bec-recipients { max-height: 240px; overflow-y: auto; list-style: none; margin: 0; padding: 0; border: 1px solid var(--bec-border); border-radius: 8px !important; }
.bec-review .bec-person { display: flex; align-items: center; gap: 12px; margin: 0; padding: 12px 14px; border-bottom: 1px solid var(--bec-border); }
.bec-review .bec-person:last-child { border-bottom: 0; }
.bec-review .bec-avatar { display: flex; align-items: center; justify-content: center; width: 32px; height: 32px; flex: 0 0 32px; border-radius: 50% !important; background: var(--bec-muted); color: var(--bec-secondary); font-size: 13px; font-weight: 600; }
.bec-review .bec-person-copy { min-width: 0; flex: 1; }
.bec-review .bec-person-copy strong, .bec-review .bec-person-copy > span { display: block; overflow-wrap: anywhere; }
.bec-review .bec-person-copy strong { font-size: 13px; font-weight: 600; color: var(--bec-ink); }
.bec-review .bec-person-copy > span, .bec-review .bec-person-context { font-size: 12px; color: var(--bec-secondary); }
.bec-review .bec-person-context { max-width: 40%; text-align: right; overflow-wrap: anywhere; }
.bec-review .bec-person-context small { display: block; margin-top: 3px; color: #9a5b16; font-size: 11px; }
.bec-review .bec-preview-controls { display: flex; flex-wrap: wrap; gap: 10px; align-items: center; }
.bec-review .bec-preview-controls label { margin: 0; font-size: 12px; font-weight: 500; color: var(--bec-secondary); }
.bec-review select[data-bulk-preview-recipient] { width: auto; min-width: 180px; max-width: min(100%, 480px); flex: 1; height: 36px; margin: 0; padding: 6px 30px 6px 10px; border: 1px solid var(--bec-border); border-radius: 7px !important; background-color: var(--bec-surface); color: var(--bec-ink); font: inherit; font-size: 12px; line-height: 1.5; text-overflow: ellipsis; }
.bec-review .bec-preview-result:empty { display: none; }
.bec-review .bec-preview-result { margin-top: 14px; padding: 14px; border: 1px solid var(--bec-border); border-radius: 8px !important; background: var(--bec-muted); color: var(--bec-secondary); font-size: 13px; }
.bec-review .bec-preview-subject { margin: 0 0 12px; color: var(--bec-ink); font-weight: 600; overflow-wrap: anywhere; }
.bec-review .bec-preview-frame { display: block; width: 100%; height: 300px; border: 1px solid var(--bec-border); border-radius: 6px !important; background: #fff; }
.bec-review .bec-preview-dialog { width: min(760px, calc(100vw - 48px)); max-height: calc(100vh - 64px); margin: auto; padding: 24px; overflow: auto; border: 1px solid var(--bec-border); border-radius: 14px !important; background: var(--bec-surface); color: var(--bec-ink); box-shadow: 0 24px 80px #172b3a33; }
.bec-review .bec-preview-dialog::backdrop { background: #172b3a66; }
.bec-review .bec-preview-heading { display: flex; align-items: center; justify-content: space-between; gap: 16px; margin-bottom: 24px; }
.bec-review .bec-preview-heading h4 { font-size: 18px; }
.bec-review .bec-preview-heading p { margin: 4px 0 0; color: var(--bec-secondary); font-size: 12px; }
.bec-review .bec-preview-dialog .bec-preview-frame { height: min(420px, 50vh); }
.bulk-email-receipt { display: flex; align-items: center; gap: 14px; margin: 20px 24px; padding: 16px 20px; border: 1px solid #cce7df; border-radius: 10px !important; background: var(--ds-surface-raised, #fff); color: var(--ds-text-primary, #172b3a); box-shadow: 0 2px 6px rgba(23,43,58,.03); }
.bulk-email-receipt .bec-receipt-icon { display: flex; align-items: center; justify-content: center; flex: 0 0 36px; width: 36px; height: 36px; border-radius: 50% !important; background: #eaf7f2; color: #18735e; }
.bulk-email-receipt .bec-receipt-copy { flex: 1; min-width: 0; }
.bulk-email-receipt strong { display: block; font-size: 14px; font-weight: 600; }
.bulk-email-receipt p { margin: 3px 0 0; font-size: 12px; color: var(--ds-text-secondary, #526375); }
.bulk-email-receipt a { display: inline-flex; align-items: center; padding: 8px 12px; border: 1px solid #d2dfdf; border-radius: 7px !important; color: #087f79; font-size: 12px; font-weight: 600; text-decoration: none; white-space: nowrap; }
.bulk-email-receipt a:hover { background: var(--ds-surface-hover, #f0fdfa); }
.bulk-email-receipt .bec-receipt-hint { color: var(--ds-text-primary, #203b4c); }
.bulk-email-receipt .bec-receipt-links { display: flex; flex-wrap: wrap; gap: 8px; flex: 0 0 auto; }
.bulk-email-receipt a.bec-receipt-secondary { border-color: transparent; color: #4b5e69; }
.bulk-email-receipt--partial { border-color: #f4daa7; }
.bulk-email-receipt--partial .bec-receipt-icon { background: #fffbeb; color: #854d0e; }
@media (max-width: 640px) {
  .bec-review { padding: 16px; }
  .bec-review .bec-heading { flex-wrap: wrap; }
  .bec-review .bec-heading-copy { flex: 1 1 calc(100% - 56px); }
  .bec-review .bec-history { margin-left: 56px; }
  .bec-review .bec-dedupe { width: 100%; margin-left: 0; }
  .bec-review .bec-person { flex-wrap: wrap; }
  .bec-review .bec-person-context { width: 100%; max-width: 100%; margin-left: 44px; text-align: left; }
  .bec-review .bec-preview-controls label { width: 100%; }
  .bec-review select[data-bulk-preview-recipient] { flex: 1 1 100%; min-width: 0; width: 100%; max-width: 100%; }
  .bec-review .bec-preview-controls .bec-button { width: 100%; }
  .bec-review .bec-actions { gap: 6px; }
  .bec-review .bec-actions .bec-button { flex: 1 1 auto; gap: 5px; padding: 7px 8px; font-size: 11px; white-space: nowrap; }
  .bulk-email-receipt { margin: 16px; flex-wrap: wrap; }
  .bulk-email-receipt .bec-receipt-links { margin-left: 50px; }
}

.bec-review .bec-privacy { display: flex; align-items: flex-start; gap: 7px; margin: 14px 0 0; color: var(--bec-secondary); font-size: 12px; line-height: 1.5; }
.bec-review .bec-privacy svg { flex: 0 0 14px; margin-top: 2px; color: #087f79; }
.bec-legacy-recipient-fields[hidden] { display: none !important; }
.bec-copy-controls { clear: both; display: flex; align-items: center; flex-wrap: wrap; gap: 12px; padding: 10px 0 0; font-size: 12px; }
.bec-copy-controls a { color: #087f79; font-weight: 600; }
.bec-copy-controls span { color: var(--ds-text-secondary, #526375); font-size: 11px; }

.emailform .bec-footer { display: flex; flex-wrap: wrap; align-items: center; gap: 10px; padding: 0 24px 16px; border-top: 1px solid var(--ds-border-subtle, #e2e8f0); background: var(--ds-surface-raised, #fff); }
.emailform .bec-footer::before, .emailform .bec-footer::after { display: none; }
.emailform .bec-footer .bec-labeled-tool { display: inline-flex; align-items: center; justify-content: center; gap: 7px; width: auto; min-height: 36px; padding: 0 9px; margin: 0; border: 1px solid transparent; border-radius: 7px !important; color: var(--ds-text-primary, #172b3a); text-decoration: none; }
.emailform .bec-footer .bec-labeled-tool:hover { background: var(--ds-surface-hover, #effaf8); border-color: var(--ds-border-subtle, #e2e8f0); }
.emailform .bec-footer .bec-tool-label { position: static !important; display: inline !important; width: auto !important; height: auto !important; margin: 0 !important; padding: 0 !important; font-size: 12px; font-weight: 500; line-height: 1.5; white-space: nowrap; }
.emailform .bec-footer .bec-labeled-tool i { margin: 0; }
.emailform .bec-footer #tracking_div .bec-labeled-tool { cursor: pointer; }
.emailform .bec-footer .act_sch_holder { display: flex; align-items: center; gap: 7px; }
.emailform .bec-footer .clear { margin-left: auto; }
.emailform .bec-compose-tools { display: flex; align-items: center; flex-wrap: wrap; gap: 6px; flex: 1 0 100%; order: -1; padding: 10px 0; border-bottom: 1px solid var(--ds-border-subtle, #e2e8f0); }
.emailform .bec-compose-tools #tracking_div { margin-left: auto; order: 10; }
.emailform .bec-footer .bec-tracking-control { display: inline-flex; align-items: center; gap: 9px; width: auto; min-height: 36px; margin: 0; padding: 0 8px; cursor: pointer; }
.emailform .bec-footer .bec-tracking-copy { position: static !important; width: auto !important; height: auto !important; margin: 0 !important; padding: 0 !important; font-size: 12px; line-height: 1.5; white-space: nowrap; }
.emailform .bec-footer .bec-switch-wrap { position: relative !important; display: inline-block; flex: 0 0 32px; width: 32px !important; height: 20px !important; margin: 0 !important; padding: 0 !important; }
.emailform .bec-footer .bec-switch-track { position: absolute !important; inset: 0; width: 32px !important; height: 20px !important; margin: 0 !important; padding: 0 !important; border-radius: 999px !important; background: #94a3b8; pointer-events: none; }
.emailform .bec-footer .bec-switch-track::after { content: ''; position: absolute; top: 2px; left: 2px; width: 16px; height: 16px; border-radius: 50% !important; background: #fff; transition: transform .15s ease; }
.emailform .bec-footer .bec-switch-wrap:has(input:checked) .bec-switch-track { background: var(--ds-button-action-bg, #087f79); }
.emailform .bec-footer .bec-switch-wrap:has(input:checked) .bec-switch-track::after { transform: translateX(12px); }
.emailform .bec-footer .bec-switch-wrap input, .emailform .bec-footer .bec-switch-wrap .checker { position: absolute !important; inset: 0; z-index: 1; width: 32px !important; height: 20px !important; margin: 0 !important; opacity: 0; cursor: pointer; }
.emailform .bec-footer .bec-tracking-control:has(input:focus-visible) .bec-switch-track { outline: 2px solid var(--ds-button-action-bg, #087f79); outline-offset: 3px; }
.emailform .bec-footer .bec-tracking-control::after { content: 'Off'; width: 18px; font-size: 11px; color: var(--ds-text-secondary, #526375); }
.emailform .bec-footer .bec-tracking-control:has(input:checked)::after { content: 'On'; }
.emailform .bec-compose-tools [id^="saveres_side"] { order: -2; }
.emailform .bec-compose-tools .atc_editor_opt { order: -1; }
.emailform .bec-compose-tools > .pop_footer_btn, .emailform .bec-compose-tools > .new_act_attach { flex-shrink: 0; margin: 0; }
.emailform .bec-footer .crm-email-groupbtn, .emailform .bec-footer > .sch-mail { margin: 0; }
.emailform .bec-footer .mails { min-height: 40px; padding: 8px 20px; border: 1px solid var(--ds-button-action-border, #087f79); border-radius: 7px !important; background: var(--ds-button-action-bg, #087f79); color: #fff; font-size: 13px; font-weight: 600; text-transform: none; box-shadow: none; }
.emailform.bec-composer .fr-box.fr-bottom { display: flex; flex-direction: column; }
.emailform.bec-composer .fr-wrapper { height: clamp(160px, 26vh, 280px) !important; min-height: 160px !important; }
.emailform.bec-composer .fr-toolbar { order: -1; flex: 0 0 auto; position: relative !important; top: auto; bottom: auto; border: 1px solid var(--ds-border-subtle, #e2e8f0); border-radius: 7px !important; background: var(--ds-surface-muted, #f8fafc); padding: 4px 8px; box-shadow: none; }
.emailform.bec-composer .fr-toolbar .fr-btn { border-radius: 5px !important; }
#activity-pop.bulk-compose { top: 24px !important; left: 50% !important; margin: 0 !important; transform: translateX(-50%) !important; width: min(1100px, calc(100% - 64px)); box-sizing: border-box; border: 1px solid var(--ds-border-subtle, #e2e8f0); border-radius: 14px !important; }
#activity-pop.bulk-compose [data-role="activity-tab"] { margin: 0; padding: 10px 24px; border-bottom: 1px solid var(--ds-border-subtle, #e2e8f0); background: var(--ds-surface-raised, #fff); border-radius: 14px 14px 0 0 !important; }
#activity-pop.bulk-compose [data-role="activity-tab"] > li > a { padding: 10px 0; border: 0; background: transparent; color: var(--ds-text-primary, #172b3a); font-size: 16px; font-weight: 600; text-transform: none; }
#activity-pop.bulk-compose .modal-window-btn { top: 12px !important; left: auto !important; right: 14px !important; z-index: 10; display: flex; width: 32px !important; height: 32px; margin: 0; padding: 0; }
#activity-pop.bulk-compose .modal-window-btn a { display: flex; align-items: center; justify-content: center; width: 32px !important; min-width: 32px; height: 32px !important; margin: 0; padding: 0; border-radius: 7px !important; color: var(--ds-text-secondary, #526375); }
#activity-pop.bulk-compose .modal-window-btn a:hover { background: var(--ds-surface-muted, #f8fafc); }
#activity-pop.bulk-compose .modal-window-btn i { font-size: 22px !important; color: var(--ds-text-secondary, #526375) !important; }
#activity-pop.bulk-compose .bec-composer { display: flex; flex-direction: column; max-height: calc(100vh - 112px); margin: 0; }
#activity-pop.bulk-compose:has(.bec-composer) .modal-body { max-height: none !important; overflow: visible !important; }
#activity-pop.bulk-compose #activitytemp .bec-composer > .act_body_cntnt { min-height: 0; overflow-x: hidden !important; overflow-y: auto !important; }
#activity-pop.bulk-compose .bec-footer { flex: 0 0 auto; }
.bec-composer .bec-sender-field, .bec-composer .bec-subject-field { display: flex; align-items: center; gap: 16px; padding: 10px 0; border-bottom: 1px solid var(--ds-border-subtle, #e2e8f0); }
.bec-composer .bec-field-label { position: static !important; flex: 0 0 56px; width: 56px !important; margin: 0 !important; color: var(--ds-text-secondary, #526375); font-size: 13px; font-weight: 400; }
.bec-composer .bec-sender-field > div, .bec-composer .bec-subject-field > input { flex: 1; min-width: 0; width: auto !important; }
.bec-composer .bec-subject-field > input { margin: 0 !important; padding: 0 !important; border: 0 !important; box-shadow: none !important; }
@media (max-width: 640px) {
  #activity-pop.bulk-compose { top: 12px !important; width: calc(100% - 24px); }
  #activity-pop.bulk-compose .bec-composer { max-height: calc(100vh - 88px); }
  .emailform .bec-footer { padding: 0 12px 12px; gap: 5px; }
  .emailform .bec-footer .act_sch_holder { flex-wrap: wrap; }
  .emailform .bec-compose-tools #tracking_div { width: 100%; margin-left: 0; }
  .bec-review .bec-preview-heading { align-items: flex-start; flex-wrap: wrap; }
}
