/* DOTY action buttons — campaign editor reference, 2026-10-21. */
html body :is(#doty-button-specificity, .doty-ui-action) {
  display: inline-flex !important;
  align-items: center !important;
  justify-content: center !important;
  gap: 6px !important;
  box-sizing: border-box !important;
  height: 28px !important;
  min-height: 28px !important;
  padding: 0 14px !important;
  border: 1px solid transparent !important;
  border-radius: 10px !important;
  background: var(--doty-button-bg, #475569) !important;
  color: #fff !important;
  font-family: 'Heebo', Arial, sans-serif !important;
  font-size: 13px !important;
  font-weight: 500 !important;
  line-height: 1 !important;
  text-decoration: none !important;
  white-space: nowrap !important;
  box-shadow: none !important;
  cursor: pointer;
  vertical-align: middle;
  transition: filter .15s ease, box-shadow .15s ease;
}
html body .doty-ui-action[data-doty-action='save'],
html body .doty-ui-action[data-doty-action='primary'] { --doty-button-bg: #007bff; }
html body .doty-ui-action[data-doty-action='delete'] { --doty-button-bg: #dc3545; }
html body .doty-ui-action[data-doty-action='clear'] { --doty-button-bg: #64748b; }
html body .doty-ui-action[data-doty-action='task'] { --doty-button-bg: #7c3aed; }
html body .doty-ui-action[data-doty-action='status'] { --doty-button-bg: #0f766e; }
html body .doty-ui-action[data-doty-action='send'] { --doty-button-bg: #2563eb; }
html body .doty-ui-action[data-doty-action='create'] { --doty-button-bg: #007bff; }
html body .doty-ui-action[data-doty-action='export'] { --doty-button-bg: #15803d; }
html body .doty-ui-action[data-doty-action='import'] { --doty-button-bg: #0e7490; }
html body .doty-ui-action.doty-button-icon { width: 28px !important; min-width: 28px !important; padding: 0 !important; }
html body .doty-ui-action.doty-save-mark::before { content: '✓'; font-size: 14px; font-weight: 500; }
html body .doty-ui-action:hover:not(:disabled):not([aria-disabled='true']) { filter: brightness(.92) !important; }
html body .doty-ui-action:focus-visible { outline: 2px solid #007bff !important; outline-offset: 3px !important; }
html body .doty-ui-action:disabled,
html body .doty-ui-action[aria-disabled='true'] { opacity: .5 !important; cursor: not-allowed !important; }
html body .doty-ui-action svg { flex-shrink: 0; max-width: 18px; max-height: 18px; }
@media (prefers-reduced-motion: reduce) { html body .doty-ui-action { transition: none; } }

/* v2: reset legacy vertical tiles as well as their enclosing action rows. */
html body :is(#doty-button-specificity, .doty-ui-action) {
  flex-direction: row !important;
  flex-wrap: nowrap !important;
  flex: 0 0 auto !important;
  width: auto !important;
  min-width: 0 !important;
  max-width: 100% !important;
  max-height: 28px !important;
  margin-block: 0 !important;
  letter-spacing: normal !important;
  text-indent: 0 !important;
  transform: none !important;
  overflow: visible !important;
}
html body :is(#doty-row-specificity, .contact-secondary-topbar, .settings-secondary-topbar, .activity-secondary-topbar) {
  display: flex !important;
  flex-direction: row !important;
  align-items: center !important;
  justify-content: flex-start !important;
  direction: rtl !important;
  box-sizing: border-box !important;
  height: auto !important;
  min-height: 54px !important;
  padding: 12px 24px !important;
  overflow: visible !important;
  background: #fff !important;
  border-bottom: 1px solid #e5e7eb !important;
}
html body :is(#doty-row-specificity, .contact-secondary-actions, .activity-secondary-actions, .topbar-profile-actions, .profile-action-row, .profile-action-row-topbar, .settings-top-actions, .settings-save-row) {
  display: flex !important;
  flex-direction: row !important;
  align-items: center !important;
  justify-content: flex-start !important;
  flex-wrap: wrap !important;
  gap: 8px !important;
  direction: rtl !important;
  height: auto !important;
  min-height: 28px !important;
  max-height: none !important;
  padding: 0 !important;
  margin-block: 0 !important;
  overflow: visible !important;
}
/* Only action-bar forms; never turn content forms or field grids into flex rows. */
html body :is(.contact-secondary-actions, .activity-secondary-actions, .topbar-profile-actions, .profile-action-row, .profile-action-row-topbar, .settings-top-actions, .settings-save-row) > form {
  display: inline-flex !important;
  align-items: center !important;
  gap: 8px !important;
  margin: 0 !important;
  padding: 0 !important;
}
html body :is(.contact-secondary-actions, .activity-secondary-actions, .profile-action-row, .profile-action-row-topbar) > .doty-ui-action {
  position: static !important;
  inset: auto !important;
  margin: 0 !important;
  order: 0 !important;
}
/* Legacy span:first-child rules used a red 20px icon above the label. */
html body :is(#doty-button-specificity, .doty-ui-action) > :is(span, i, .profile-action-icon) {
  display: inline-flex !important;
  align-items: center !important;
  justify-content: center !important;
  position: static !important;
  inset: auto !important;
  float: none !important;
  width: auto !important;
  min-width: 0 !important;
  height: auto !important;
  min-height: 0 !important;
  margin: 0 !important;
  padding: 0 !important;
  border: 0 !important;
  border-radius: 0 !important;
  color: inherit !important;
  background: transparent !important;
  font-size: 13px !important;
  font-weight: inherit !important;
  line-height: 1 !important;
  box-shadow: none !important;
  transform: none !important;
}
html body :is(#doty-button-specificity, .doty-ui-action) > [aria-hidden='true'] { font-size: 14px !important; }
html body :is(#doty-button-specificity, .doty-ui-action).doty-save-mark::before {
  display: inline-flex !important;
  align-items: center !important;
  position: static !important;
  color: inherit !important;
  background: transparent !important;
  margin: 0 !important;
  padding: 0 !important;
  width: auto !important;
  height: auto !important;
  line-height: 1 !important;
}
@media (max-width: 760px) {
  html body :is(#doty-row-specificity, .contact-secondary-topbar, .settings-secondary-topbar, .activity-secondary-topbar) { padding: 12px 14px !important; }
}

/* v3: only the paired Edit / Handled actions on /followup. Keep TD a table cell. */
html body table td.doty-followup-actions {
  display: table-cell !important;
  white-space: nowrap !important;
  vertical-align: middle !important;
  text-align: center !important;
  min-width: 152px !important;
}
html body .doty-followup-actions form {
  display: inline-flex !important;
  width: auto !important;
  margin: 0 !important;
  padding: 0 !important;
  vertical-align: middle !important;
}
html body .doty-followup-action-group {
  display: inline-flex !important;
  flex-direction: row !important;
  flex-wrap: nowrap !important;
  align-items: center !important;
  justify-content: center !important;
  gap: 8px !important;
  width: auto !important;
  direction: rtl !important;
}
html body .doty-followup-actions > a { margin-inline-end: 8px !important; }
html body .doty-followup-actions .doty-ui-action { vertical-align: middle !important; }
