/**
 * Tailwind-native Add Contact modal — scoped classes only (no Bootstrap .modal).
 */

#bm-contact-modal-root,
.contact_modal .bm-contact-modal__layout {
  --bm-contact-panel: #ffffff;
  --bm-contact-surface: #f8fafc;
  --bm-contact-border: #e2e8f0;
  --bm-contact-border-strong: #cbd5e1;
  --bm-contact-text: #0f172a;
  --bm-contact-muted: #64748b;
  --bm-contact-label: #334155;
  --bm-contact-input-bg: #ffffff;
  --bm-contact-input-border: #cbd5e1;
  --bm-contact-addon-bg: #f8fafc;
  --bm-contact-addon-text: #475569;
  --bm-contact-close-bg: #f1f5f9;
  --bm-contact-shadow: 0 25px 50px -12px rgba(15, 23, 42, 0.35), 0 0 0 1px rgba(15, 23, 42, 0.06);
  --bm-contact-backdrop: rgba(15, 23, 42, 0.55);
  --bm-contact-create-as-bg: #ffffff;
  --bm-contact-create-as-hover: #f8fafc;
  --bm-contact-map-bg: #f1f5f9;
}

html[data-bm-theme='dark'] #bm-contact-modal-root,
html[data-bm-theme='dark'] .contact_modal .bm-contact-modal__layout,
html.dark #bm-contact-modal-root,
html.dark .contact_modal .bm-contact-modal__layout,
body.bm-theme-dark #bm-contact-modal-root,
body.bm-theme-dark .contact_modal .bm-contact-modal__layout {
  --bm-contact-panel: #0f172a;
  --bm-contact-surface: #1e293b;
  --bm-contact-border: #334155;
  --bm-contact-border-strong: #475569;
  --bm-contact-text: #f8fafc;
  --bm-contact-muted: #94a3b8;
  --bm-contact-label: #cbd5e1;
  --bm-contact-input-bg: #0f172a;
  --bm-contact-input-border: #475569;
  --bm-contact-addon-bg: #1e293b;
  --bm-contact-addon-text: #cbd5e1;
  --bm-contact-close-bg: #334155;
  --bm-contact-shadow: 0 25px 50px -12px rgba(0, 0, 0, 0.45), 0 0 0 1px #334155;
  --bm-contact-backdrop: rgba(2, 6, 23, 0.72);
  --bm-contact-create-as-bg: #0f172a;
  --bm-contact-create-as-hover: #1e293b;
  --bm-contact-map-bg: #1e293b;
}

#bm-contact-modal-root.bm-contact-modal-root {
  display: none;
  position: fixed;
  inset: 0;
  z-index: 11000;
  isolation: isolate;
}

#bm-contact-modal-root.bm-contact-modal-root:not(.hidden) {
  display: block;
}

#bm-contact-modal-root.bm-contact-modal-root.hidden {
  display: none !important;
}

/*
 * SweetAlert confirmation stacking + styling is now handled globally in
 * bizmodo-sweetalert.css (overlay/modal lifted above ALL modals, including POS
 * panels, and restyled to the Tailwind design). Do not redefine .swal-overlay /
 * .swal-modal z-index here — it would override the global fix.
 */

#bm-contact-modal-root .bm-contact-modal-root__backdrop {
  position: fixed;
  inset: 0;
  z-index: 1;
  background: var(--bm-contact-backdrop);
  backdrop-filter: blur(4px);
  -webkit-backdrop-filter: blur(4px);
}

#bm-contact-modal-root .bm-contact-modal-root__viewport {
  position: fixed;
  inset: 0;
  z-index: 2;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 16px;
  overflow: hidden;
  pointer-events: none;
}

#bm-contact-modal-root .bm-contact-modal-root__dialog {
  position: relative;
  display: flex;
  flex-direction: column;
  width: 100%;
  max-width: 1280px;
  max-height: calc(100vh - 32px);
  overflow: hidden;
  border-radius: 24px;
  background: var(--bm-contact-panel);
  box-shadow: var(--bm-contact-shadow);
  pointer-events: auto;
}

#bm-contact-modal-root #bm-contact-modal-content {
  display: flex;
  flex-direction: column;
  flex: 1 1 auto;
  min-height: 0;
  overflow: hidden;
}

body.bm-contact-modal-open {
  overflow: hidden !important;
}

.bm-contact-shell {
  --bm-contact-field-height: 36px;
  display: flex;
  flex-direction: column;
  flex: 1 1 auto;
  min-height: 0;
  max-height: calc(100vh - 32px);
  background: var(--bm-contact-panel);
}

.bm-contact-header {
  flex-shrink: 0;
  padding: 1rem 1.5rem;
  border-bottom: 1px solid var(--bm-contact-border);
}

.bm-contact-header__inner {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 1rem;
}

.bm-contact-header__title {
  margin: 0;
  font-size: 1.25rem;
  font-weight: 800;
  color: var(--bm-contact-text);
}

.bm-contact-header__subtitle {
  margin: 0.25rem 0 0;
  font-size: 0.875rem;
  color: var(--bm-contact-muted);
}

.bm-contact-header__close {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 2.5rem;
  height: 2.5rem;
  border: 0;
  border-radius: 9999px;
  background: var(--bm-contact-close-bg);
  color: var(--bm-contact-muted);
  font-size: 1.5rem;
  line-height: 1;
  cursor: pointer;
}

.bm-contact-form {
  display: flex;
  flex-direction: column;
  flex: 1 1 auto;
  min-height: 0;
}

.bm-contact-body {
  display: flex;
  flex-direction: column;
  flex: 1 1 auto;
  min-height: 0;
  overflow: hidden;
}

.bm-contact-layout {
  display: grid;
  gap: 0;
  flex: 1 1 auto;
  min-height: 0;
  overflow: hidden;
  align-items: stretch;
}

@media (min-width: 1024px) {
  .bm-contact-layout {
    grid-template-columns: 220px minmax(0, 1fr);
  }
}

.bm-contact-sidebar {
  padding: 1.25rem;
  display: flex;
  flex-direction: column;
  gap: 1rem;
  background: var(--bm-contact-surface);
  border-bottom: 1px solid var(--bm-contact-border);
  min-height: 0;
  height: 100%;
  align-self: stretch;
  overflow: hidden;
}

@media (min-width: 1024px) {
  .bm-contact-sidebar {
    border-bottom: 0;
    border-right: 1px solid var(--bm-contact-border);
  }
}

.bm-contact-sidebar__label {
  display: block;
  margin: 0 0 0.5rem;
  font-size: 0.75rem;
  font-weight: 700;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  color: var(--bm-contact-muted);
}

.bm-contact-create-as {
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
}

.bm-contact-create-as-btn {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 100%;
  padding: 1rem;
  border: 1px solid var(--bm-contact-border-strong);
  border-radius: 1rem;
  background: var(--bm-contact-create-as-bg);
  color: var(--bm-contact-text);
  font-size: 0.9375rem;
  font-weight: 800;
  cursor: pointer;
  transition: border-color 0.15s ease, box-shadow 0.15s ease, background 0.15s ease;
}

.bm-contact-create-as-btn:hover {
  border-color: var(--bm-contact-muted);
  background: var(--bm-contact-create-as-hover);
}

.bm-contact-create-as-btn.active {
  border-color: var(--bm-ui-accent, #6d28d9);
  box-shadow: 0 0 0 1px var(--bm-ui-accent, #6d28d9);
  background: color-mix(in srgb, var(--bm-ui-accent, #6d28d9) 12%, var(--bm-contact-create-as-bg));
  color: var(--bm-ui-accent, #6d28d9);
}

.bm-contact-preview {
  margin-top: 0;
  padding: 0.875rem;
  border-radius: 0.75rem;
  background: var(--bm-ui-accent, #6d28d9);
  color: var(--bm-ui-accent-text, #fff);
  flex-shrink: 0;
}

.bm-contact-sidebar__create-as {
  flex-shrink: 0;
}

.bm-contact-preview__details {
  margin: 0.625rem 0 0;
  padding: 0;
  display: grid;
  gap: 0.5rem;
}

.bm-contact-preview__row {
  display: grid;
  gap: 0.125rem;
}

.bm-contact-preview__row[hidden] {
  display: none !important;
}

.bm-contact-preview__row dt {
  margin: 0;
  font-size: 10px;
  font-weight: 700;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  opacity: 0.82;
}

.bm-contact-preview__row.is-required dt::after {
  content: ' *';
  opacity: 0.95;
}

.bm-contact-preview__row dd {
  margin: 0;
  font-size: 13px;
  font-weight: 600;
  line-height: 1.35;
  word-break: break-word;
}

.bm-contact-preview__row.is-missing dd {
  opacity: 0.7;
  font-weight: 500;
}

.bm-contact-main {
  padding: 1.25rem;
  display: flex;
  flex-direction: column;
  gap: 1rem;
  min-width: 0;
  min-height: 0;
  overflow-x: hidden;
  overflow-y: auto;
  -webkit-overflow-scrolling: touch;
}

.bm-contact-section {
  padding: 1rem;
  border: 1px solid var(--bm-contact-border);
  border-radius: 0.75rem;
  background: var(--bm-contact-panel);
}

.bm-contact-field-grid,
.bm-contact-field-grid.row,
.bm-contact-section .row.bm-contact-field-grid {
  display: grid !important;
  grid-template-columns: minmax(0, 1fr);
  gap: 0.875rem 1rem;
  margin-left: 0 !important;
  margin-right: 0 !important;
}

@media (min-width: 768px) {
  .bm-contact-field-grid,
  .bm-contact-field-grid.row,
  .bm-contact-section .row.bm-contact-field-grid {
    grid-template-columns: repeat(4, minmax(0, 1fr));
    column-gap: 1rem;
    row-gap: 0.875rem;
  }

  .bm-contact-field-grid--identity {
    grid-template-columns: 88px repeat(3, minmax(0, 1fr));
  }

  .bm-contact-field-grid--identity > .contact_tab_content.active > .bm-contact-col.bm-contact-col-business-name {
    grid-column: 1 / -1;
  }

  .bm-contact-field-grid--tax,
  .bm-contact-field-grid--financial {
    margin-top: 0.875rem;
  }
}

.bm-contact-preview__label {
  margin: 0;
  font-size: 0.75rem;
  opacity: 0.85;
}

.bm-contact-preview__name {
  margin: 0.25rem 0 0;
  font-size: 1.125rem;
  font-weight: 800;
  line-height: 1.3;
  word-break: break-word;
}

.bm-contact-preview__meta {
  margin: 0.25rem 0 0;
  font-size: 0.875rem;
  opacity: 0.9;
}

.bm-contact-section__title,
.bm-contact-section-title {
  margin: 0 0 0.875rem;
  font-size: 1rem;
  font-weight: 800;
  color: var(--bm-contact-text);
}

.bm-contact-field-grid > .clearfix {
  display: none;
}

.bm-contact-field-grid > .bm-contact-col,
.bm-contact-field-grid > .contact_tab_content.active > .bm-contact-col:not(.bm-contact-col-dob) {
  width: auto !important;
  max-width: none !important;
  flex: none !important;
  float: none !important;
  padding: 0 !important;
  margin: 0 !important;
  grid-column: span 1;
}

@media (min-width: 768px) {
  .bm-contact-field-grid.bm-contact-field-grid--identity
    > .contact_tab_content.active:not(.hidden)
    > .bm-contact-col.bm-contact-col-dob {
    grid-column: 2 / span 1 !important;
  }
}

.bm-contact-field-grid > .bm-contact-col--half,
.bm-contact-field-grid > .contact_tab_content.active > .bm-contact-col--half,
.bm-contact-field-grid > .bm-contact-col.bm-contact-col-business-name,
.bm-contact-field-grid > .contact_tab_content.active > .bm-contact-col.bm-contact-col-business-name {
  grid-column: span 2;
}

.bm-contact-field-grid > .bm-contact-col--full,
.bm-contact-field-grid > .contact_tab_content.active > .bm-contact-col--full {
  grid-column: 1 / -1;
}

.bm-contact-field-grid > .bm-contact-col.bm-contact-col-prefix,
.bm-contact-field-grid > .contact_tab_content.active > .bm-contact-col.bm-contact-col-prefix {
  grid-column: span 1;
}

.bm-contact-shell .contact_tab_content {
  display: none;
}

.bm-contact-shell .contact_tab_content.hidden {
  display: none !important;
}

.bm-contact-shell .hidden {
  display: none !important;
}

#bm-contact-modal-root .bm-contact-shell .contact_tab_content.active:not(.hidden),
.contact_modal .bm-contact-shell .contact_tab_content.active:not(.hidden),
.bm-contact-shell .contact_tab_content.active:not(.hidden) {
  display: contents;
}

.bm-contact-shell .contact_tab_content.active.hidden {
  display: none !important;
}

.bm-contact-shell div.bm-contact-field,
.bm-contact-col > .bm-contact-field {
  height: auto;
  min-height: 0;
  padding: 0;
  border: none;
  background: transparent;
  display: block;
  box-shadow: none;
}

.bm-contact-shell input.bm-contact-field,
.bm-contact-shell select.bm-contact-field,
.bm-contact-shell textarea.bm-contact-field,
#bm-contact-modal-root .bm-contact-shell .form-control {
  display: block;
  width: 100%;
  box-sizing: border-box;
  min-height: var(--bm-contact-field-height) !important;
  height: var(--bm-contact-field-height) !important;
  padding: 5px 10px !important;
  border-radius: 6px;
  border: 1px solid var(--bm-contact-input-border);
  font-size: 13px !important;
  line-height: 1.35 !important;
  color: var(--bm-contact-text);
  background: var(--bm-contact-input-bg);
  box-shadow: none;
}

#bm-contact-modal-root .bm-contact-shell textarea.bm-contact-field,
#bm-contact-modal-root .bm-contact-shell textarea.form-control {
  min-height: 88px !important;
  height: auto !important;
  resize: vertical;
}

#bm-contact-modal-root .bm-contact-shell select.form-control {
  height: var(--bm-contact-field-height) !important;
}

.bm-contact-shell .bm-contact-field > label,
.bm-contact-shell .form-group > label {
  display: inline;
  margin-bottom: 0;
  margin-right: 2px;
  font-size: 12px;
  font-weight: 600;
  letter-spacing: normal;
  text-transform: none;
  color: var(--bm-contact-label);
  vertical-align: middle;
}

.bm-contact-shell .bm-contact-field > .hover-q,
.bm-contact-shell .bm-contact-field > .fa-info-circle,
.bm-contact-shell .bm-contact-field > label + .fa-info-circle,
.bm-contact-shell .form-group > .hover-q,
.bm-contact-shell .form-group > .fa-info-circle,
.bm-contact-shell .form-group > label + .fa-info-circle {
  display: inline;
  margin: 0 0 4px 4px;
  font-size: 13px;
  line-height: 1;
  vertical-align: middle;
  color: var(--bm-contact-muted);
  cursor: help;
}

.bm-contact-shell .bm-contact-field > label + .hover-q,
.bm-contact-shell .bm-contact-field > label + .fa-info-circle,
.bm-contact-shell .form-group > label + .hover-q,
.bm-contact-shell .form-group > label + .fa-info-circle {
  position: relative;
  top: -1px;
}

.bm-contact-shell div.bm-contact-field > .bm-contact-input-group,
.bm-contact-shell div.bm-contact-field > .bm-contact-pay-term,
.bm-contact-shell div.bm-contact-field > .bm-contact-help,
.bm-contact-shell div.bm-contact-field > input.bm-contact-field,
.bm-contact-shell div.bm-contact-field > select.bm-contact-field,
.bm-contact-shell div.bm-contact-field > textarea.bm-contact-field {
  display: block;
  width: 100%;
  margin-top: 4px;
}

.bm-contact-shell .bm-contact-field,
.bm-contact-shell .form-group {
  margin-bottom: 0;
}

.bm-contact-shell .bm-contact-input-group,
.bm-contact-shell .input-group {
  display: flex !important;
  flex-wrap: wrap;
  width: 100%;
  align-items: stretch;
  height: auto;
  min-height: var(--bm-contact-field-height);
  max-height: none;
  margin: 0;
}

.bm-contact-shell .bm-contact-input-group > .bm-contact-input-addon,
.bm-contact-shell .bm-contact-input-group > .select2-container,
.bm-contact-shell .bm-contact-input-group > .bm-contact-field,
.bm-contact-shell .input-group > .input-group-addon,
.bm-contact-shell .input-group > .select2-container {
  flex-shrink: 0;
}

.bm-contact-shell .bm-contact-input-group > .select2-container,
.bm-contact-shell .input-group > .select2-container {
  flex: 1 1 0% !important;
  width: auto !important;
  min-width: 0 !important;
}

.bm-contact-shell .bm-contact-input-addon,
.bm-contact-shell .input-group-addon,
.bm-contact-shell .input-group-btn {
  display: flex !important;
  align-items: center;
  justify-content: center;
  flex: 0 0 40px;
  align-self: flex-start;
  width: 40px;
  min-width: 40px;
  height: var(--bm-contact-field-height);
  min-height: var(--bm-contact-field-height);
  max-height: var(--bm-contact-field-height);
  margin: 0 !important;
  padding: 0 !important;
  box-sizing: border-box;
  border: 1px solid var(--bm-contact-input-border);
  background: var(--bm-contact-addon-bg);
  color: var(--bm-contact-addon-text);
  font-size: 14px;
  line-height: 1 !important;
  vertical-align: top;
  white-space: nowrap;
}

.bm-contact-shell .bm-contact-input-group .bm-contact-field,
.bm-contact-shell .input-group .form-control {
  flex: 1 1 auto;
  align-self: flex-start;
  min-width: 0;
  width: 1%;
  height: var(--bm-contact-field-height) !important;
  min-height: var(--bm-contact-field-height) !important;
  max-height: var(--bm-contact-field-height) !important;
  margin: 0 !important;
  padding: 0 10px !important;
  line-height: calc(var(--bm-contact-field-height) - 2px) !important;
  box-sizing: border-box;
}

#bm-contact-modal-root .bm-contact-shell .input-group {
  display: flex !important;
  flex-wrap: wrap;
  height: auto !important;
  min-height: var(--bm-contact-field-height) !important;
  max-height: none !important;
}

#bm-contact-modal-root .bm-contact-shell .input-group-addon,
#bm-contact-modal-root .bm-contact-shell .input-group-btn {
  display: flex !important;
  align-self: flex-start;
  height: var(--bm-contact-field-height) !important;
  min-height: var(--bm-contact-field-height) !important;
  max-height: var(--bm-contact-field-height) !important;
  margin: 0 !important;
  padding: 0 !important;
  float: none !important;
  box-sizing: border-box;
}

#bm-contact-modal-root .bm-contact-shell .bm-contact-input-group .bm-contact-field,
.bm-contact-shell .input-group .form-control {
  align-self: flex-start;
  height: var(--bm-contact-field-height) !important;
  min-height: var(--bm-contact-field-height) !important;
  max-height: var(--bm-contact-field-height) !important;
  margin: 0 !important;
  padding: 0 10px !important;
  line-height: calc(var(--bm-contact-field-height) - 2px) !important;
  float: none !important;
  box-sizing: border-box;
}

.bm-contact-shell .input-group-addon:first-child,
#bm-contact-modal-root .bm-contact-shell .input-group-addon:first-child {
  border-right: 0;
  border-top-left-radius: 6px !important;
  border-bottom-left-radius: 6px !important;
  border-top-right-radius: 0 !important;
  border-bottom-right-radius: 0 !important;
}

.bm-contact-shell .input-group-addon:first-child + .form-control,
#bm-contact-modal-root .bm-contact-shell .input-group-addon:first-child + .form-control {
  border-left: 0;
  border-top-left-radius: 0 !important;
  border-bottom-left-radius: 0 !important;
  border-top-right-radius: 6px !important;
  border-bottom-right-radius: 6px !important;
}

.bm-contact-shell .input-group > .form-control:last-child,
#bm-contact-modal-root .bm-contact-shell .input-group > .form-control:last-child {
  border-top-right-radius: 6px !important;
  border-bottom-right-radius: 6px !important;
}

.bm-contact-shell .input-group > .form-control:first-child:last-child,
#bm-contact-modal-root .bm-contact-shell .input-group > .form-control:first-child:last-child {
  border-radius: 6px !important;
}

#bm-contact-modal-root .bm-contact-shell .input-group-addon:first-child + .select2-container--default .select2-selection--single,
#bm-contact-modal-root .bm-contact-shell .input-group-addon:first-child + .select2-container--default .select2-selection--multiple {
  border-left: 0;
  border-top-left-radius: 0 !important;
  border-bottom-left-radius: 0 !important;
  border-top-right-radius: 6px !important;
  border-bottom-right-radius: 6px !important;
}

.bm-contact-shell .input-group-addon:last-child {
  border-left: 0;
  border-top-right-radius: 6px;
  border-bottom-right-radius: 6px;
}

.bm-contact-shell .input-group .select2-container {
  flex: 1 1 auto !important;
  width: 100% !important;
  min-width: 0 !important;
}

.bm-contact-shell .form-group .input-group:not(:has(select.select2)) {
  flex-wrap: nowrap;
  align-items: stretch;
}

.bm-contact-shell .help-block {
  margin: 4px 0 0;
  font-size: 11px;
  color: var(--bm-contact-muted);
}

.bm-contact-shell .bm-contact-input-group > label.error,
.bm-contact-shell .bm-contact-input-group > span.error,
.bm-contact-shell .input-group > label.error,
.bm-contact-shell .input-group > span.error,
.bm-contact-shell .bm-contact-field > label.error,
.bm-contact-shell .bm-contact-field > span.error,
#bm-contact-modal-root .bm-contact-input-group > label.error,
#bm-contact-modal-root .bm-contact-input-group > span.error,
#bm-contact-modal-root .input-group > label.error {
  flex: 1 0 100%;
  order: 10;
  display: block;
  width: 100%;
  max-width: 100%;
  height: auto !important;
  min-height: 0 !important;
  max-height: none !important;
  margin: 6px 0 0;
  padding: 0;
  border: 0;
  background: transparent;
  box-shadow: none;
  line-height: 1.35 !important;
  white-space: normal;
  color: #dc2626 !important;
  font-size: 12px;
  font-weight: 600;
}

.bm-contact-shell .multi-input > label {
  grid-column: 1 / -1;
  margin-bottom: 0;
}

.bm-contact-shell .multi-input > br {
  display: none;
}

.bm-contact-shell .multi-input .pull-left,
.bm-contact-shell .multi-input .width-40,
.bm-contact-shell .multi-input .width-60 {
  float: none !important;
  width: 100% !important;
}

.bm-contact-more-toggle-wrap {
  margin-top: 0.25rem;
}

.bm-contact-loading {
  padding: 2rem;
  text-align: center;
  font-size: 13px;
  font-weight: 600;
  color: var(--bm-contact-muted);
}

.bm-contact-loading--error {
  color: #dc2626;
}

.bm-contact-more-toggle {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  width: 100%;
  padding: 0.875rem 1rem;
  border: 1px dashed var(--bm-contact-border-strong);
  border-radius: 0.75rem;
  background: var(--bm-contact-surface);
  color: var(--bm-contact-label);
  font-size: 0.9375rem;
  font-weight: 700;
  cursor: pointer;
}

.bm-contact-more-toggle[aria-expanded='true'] .fa-chevron-down {
  transform: rotate(180deg);
}

.bm-contact-more-toggle .fa-chevron-down {
  transition: transform 0.15s ease;
}

.bm-contact-section[data-bm-contact-more].hidden {
  display: none !important;
}

.bm-contact-footer {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 0.75rem;
  flex-shrink: 0;
  padding: 1rem 1.5rem;
  border-top: 1px solid var(--bm-contact-border);
  background: var(--bm-contact-panel);
}

.bm-contact-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: var(--bm-contact-field-height);
  padding: 0 1.25rem;
  border-radius: 6px;
  font-size: 13px;
  font-weight: 700;
  cursor: pointer;
  border: 1px solid transparent;
}

.bm-contact-btn--ghost {
  border-color: var(--bm-contact-input-border);
  background: var(--bm-contact-panel);
  color: var(--bm-contact-label);
}

.bm-contact-btn--ghost:hover {
  background: var(--bm-contact-surface);
  border-color: var(--bm-contact-border-strong);
}

.bm-contact-btn--primary {
  border-color: var(--bm-ui-accent, #6d28d9);
  background: var(--bm-ui-accent, #6d28d9);
  color: var(--bm-ui-accent-text, #fff);
  font-weight: 800;
}

.bm-contact-pay-term {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
  gap: 0.5rem;
}

.bm-contact-shipping-grid {
  display: grid;
  gap: 1rem;
  grid-template-columns: minmax(0, 1fr);
  margin-bottom: 1rem;
}

@media (min-width: 992px) {
  .bm-contact-shipping-grid {
    grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
    align-items: start;
  }
}

.bm-contact-map-wrap {
  min-width: 0;
}

.bm-contact-section--persons .bm-contact-person-legacy-toggle,
.bm-contact-section--persons .add_contact_person_btn {
  display: none !important;
}

.bm-contact-person-tabs {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
  margin-bottom: 0.875rem;
}

.bm-contact-person-tab {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 32px;
  padding: 0 0.875rem;
  border: 1px solid var(--bm-contact-input-border);
  border-radius: 9999px;
  background: var(--bm-contact-panel);
  color: var(--bm-contact-label);
  font-size: 12px;
  font-weight: 700;
  cursor: pointer;
}

.bm-contact-person-tab:hover {
  background: var(--bm-contact-surface);
  border-color: var(--bm-contact-border-strong);
}

.bm-contact-person-tab.is-active {
  border-color: var(--bm-ui-accent, #6d28d9);
  background: color-mix(in srgb, var(--bm-ui-accent, #6d28d9) 10%, var(--bm-contact-panel));
  color: var(--bm-ui-accent, #6d28d9);
}

.bm-contact-section--persons .bm-contact-person-panel {
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  gap: 0.875rem 1rem;
  margin: 0;
}

@media (min-width: 768px) {
  .bm-contact-section--persons .bm-contact-person-panel {
    grid-template-columns: repeat(12, minmax(0, 1fr));
    column-gap: 1rem;
    row-gap: 0.875rem;
  }
}

.bm-contact-section--persons .bm-contact-person-panel > [class*='col-'],
.bm-contact-section--persons .bm-contact-person-panel.hide + .row > [class*='col-'] {
  width: auto !important;
  max-width: none !important;
  padding: 0 !important;
  margin: 0 !important;
  float: none !important;
}

.bm-contact-section--persons .bm-contact-person-panel .col-md-2 {
  grid-column: span 2;
}

.bm-contact-section--persons .bm-contact-person-panel .col-md-4 {
  grid-column: span 4;
}

.bm-contact-section--persons .bm-contact-person-panel .col-md-5 {
  grid-column: span 5;
}

.bm-contact-section--persons .bm-contact-person-panel .col-md-6 {
  grid-column: span 6;
}

.bm-contact-section--persons .bm-contact-person-panel .col-md-12 {
  grid-column: 1 / -1;
}

.bm-contact-section--persons .bm-contact-person-panel > .clearfix {
  display: none;
}

.bm-contact-section--persons .bm-contact-person-panel.hide,
.bm-contact-section--persons .bm-contact-person-panel.hidden,
#bm-contact-modal-root .bm-contact-shell .hide {
  display: none !important;
}

.bm-contact-section--persons #loginDiv0,
.bm-contact-section--persons #loginDiv1,
.bm-contact-section--persons #loginDiv2 {
  display: grid;
  grid-template-columns: repeat(12, minmax(0, 1fr));
  gap: 0.875rem 1rem;
  margin: 0.875rem 0 0;
}

.bm-contact-section--persons #loginDiv0 > [class*='col-'],
.bm-contact-section--persons #loginDiv1 > [class*='col-'],
.bm-contact-section--persons #loginDiv2 > [class*='col-'] {
  width: auto !important;
  max-width: none !important;
  padding: 0 !important;
  margin: 0 !important;
  float: none !important;
}

.bm-contact-section--persons #loginDiv0 .col-md-6,
.bm-contact-section--persons #loginDiv1 .col-md-6,
.bm-contact-section--persons #loginDiv2 .col-md-6 {
  grid-column: span 6;
}

.bm-contact-section--persons #loginDiv0 .col-md-4,
.bm-contact-section--persons #loginDiv1 .col-md-4,
.bm-contact-section--persons #loginDiv2 .col-md-4 {
  grid-column: span 4;
}

.bm-contact-shipping-fields {
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
}

.bm-contact-map {
  width: 100%;
  height: 320px;
  min-height: 18rem;
  border-radius: 1rem;
  border: 1px solid var(--bm-contact-input-border);
  background: var(--bm-contact-map-bg);
  overflow: hidden;
}

#bm-contact-modal-root .select2-container {
  width: 100% !important;
}

#bm-contact-modal-root .bm-contact-shell .bm-contact-input-group > .select2-container,
.contact_modal .bm-contact-shell .bm-contact-input-group > .select2-container {
  flex: 1 1 0% !important;
  width: auto !important;
  min-width: 0 !important;
  max-width: none !important;
}

#bm-contact-modal-root .select2-container--default .select2-selection--single,
#bm-contact-modal-root .select2-container--default .select2-selection--multiple {
  min-height: var(--bm-contact-field-height);
  border-radius: 6px;
  border-color: var(--bm-contact-input-border);
  background-color: var(--bm-contact-input-bg);
}

#bm-contact-modal-root .select2-container--default .select2-selection--single {
  height: var(--bm-contact-field-height) !important;
  min-height: var(--bm-contact-field-height) !important;
}

#bm-contact-modal-root .select2-container--default .select2-selection--multiple {
  min-height: var(--bm-contact-field-height) !important;
  height: auto !important;
}

#bm-contact-modal-root .select2-container--default .select2-selection--single .select2-selection__rendered {
  padding-left: 10px;
  padding-right: 28px;
  line-height: calc(var(--bm-contact-field-height) - 2px) !important;
  font-size: 13px;
  color: var(--bm-contact-text);
}

#bm-contact-modal-root .select2-container--default .select2-selection--single .select2-selection__arrow {
  height: calc(var(--bm-contact-field-height) - 2px) !important;
}

#bm-contact-modal-root .select2-container--default .select2-selection--multiple .select2-selection__rendered {
  padding: 2px 8px;
  line-height: 1.35;
}

#bm-contact-modal-root .select2-container--default .select2-selection--multiple .select2-selection__choice {
  margin-top: 3px;
  font-size: 12px;
  background: var(--bm-contact-surface);
  border-color: var(--bm-contact-input-border);
  color: var(--bm-contact-text);
}

.bm-contact-shell input.bm-contact-field:focus,
.bm-contact-shell select.bm-contact-field:focus,
.bm-contact-shell textarea.bm-contact-field:focus,
#bm-contact-modal-root .bm-contact-shell .form-control:focus,
#bm-contact-modal-root .bm-contact-shell select.form-control:focus,
#bm-contact-modal-root .bm-contact-shell textarea.form-control:focus {
  border-color: var(--bm-contact-border-strong);
  outline: 2px solid color-mix(in srgb, var(--bm-ui-accent, #6d28d9) 25%, transparent);
  outline-offset: 1px;
  box-shadow: none;
}

.bm-contact-shell input.bm-contact-field::placeholder,
.bm-contact-shell textarea.bm-contact-field::placeholder,
#bm-contact-modal-root .bm-contact-shell .form-control::placeholder {
  color: var(--bm-contact-muted);
  opacity: 1;
}

#bm-contact-modal-root .select2-container--default .select2-selection--single .select2-selection__placeholder,
#bm-contact-modal-root .select2-container--default .select2-selection--multiple .select2-selection__placeholder {
  color: var(--bm-contact-muted);
}

.bm-contact-section--persons [id^='loginDiv']:not(.hide) {
  display: grid !important;
}

.pac-container {
  z-index: 10050 !important;
}

#bm-contact-modal-root .bootstrap-datetimepicker-widget,
#bm-contact-modal-root .bootstrap-datetimepicker-widget.dropdown-menu,
body.bm-contact-modal-open > .bootstrap-datetimepicker-widget.dropdown-menu,
body.bm-contact-modal-open .bootstrap-datetimepicker-widget.dropdown-menu.bm-dtp-widget-open {
  z-index: 12100 !important;
  background: #ffffff !important;
  opacity: 1 !important;
  visibility: visible !important;
  border: 1px solid #e2e8f0 !important;
  border-radius: 12px !important;
  box-shadow: 0 16px 40px rgba(15, 23, 42, 0.14) !important;
  color: #0f172a !important;
  pointer-events: auto !important;
}

#bm-contact-modal-root .bootstrap-datetimepicker-widget table,
#bm-contact-modal-root .bootstrap-datetimepicker-widget td,
#bm-contact-modal-root .bootstrap-datetimepicker-widget th,
body.bm-contact-modal-open > .bootstrap-datetimepicker-widget.dropdown-menu table td,
body.bm-contact-modal-open > .bootstrap-datetimepicker-widget.dropdown-menu table th {
  background: #ffffff;
  color: #0f172a;
}

#bm-contact-modal-root .bootstrap-datetimepicker-widget table td.active,
#bm-contact-modal-root .bootstrap-datetimepicker-widget table td.active:hover,
#bm-contact-modal-root .bootstrap-datetimepicker-widget table td span.active,
body.bm-contact-modal-open > .bootstrap-datetimepicker-widget.dropdown-menu table td.active,
body.bm-contact-modal-open > .bootstrap-datetimepicker-widget.dropdown-menu table td.active:hover,
body.bm-contact-modal-open > .bootstrap-datetimepicker-widget.dropdown-menu table td span.active {
  background: var(--bm-ui-accent, #591cd3) !important;
  color: var(--bm-ui-accent-text, #ffffff) !important;
}

#bm-contact-modal-root .bm-contact-input-group.date.bm-dtp-anchor,
#bm-contact-modal-root .bm-dtp-anchor-open {
  position: relative;
  z-index: 12200;
  overflow: visible;
}

.contact_modal .bm-contact-input-group.date.bm-dtp-anchor,
.contact_modal .bm-dtp-anchor-open {
  position: relative;
  z-index: 12200;
  overflow: visible;
}

html[data-bm-theme='dark'] #bm-contact-modal-root .bootstrap-datetimepicker-widget,
html[data-bm-theme='dark'] body.bm-contact-modal-open > .bootstrap-datetimepicker-widget.dropdown-menu,
html.dark #bm-contact-modal-root .bootstrap-datetimepicker-widget,
html.dark body.bm-contact-modal-open > .bootstrap-datetimepicker-widget.dropdown-menu {
  background: #0f172a !important;
  border-color: #334155 !important;
  color: #e2e8f0 !important;
  box-shadow: 0 16px 40px rgba(0, 0, 0, 0.45) !important;
}

html[data-bm-theme='dark'] #bm-contact-modal-root .bootstrap-datetimepicker-widget table,
html[data-bm-theme='dark'] #bm-contact-modal-root .bootstrap-datetimepicker-widget td,
html[data-bm-theme='dark'] #bm-contact-modal-root .bootstrap-datetimepicker-widget th,
html.dark #bm-contact-modal-root .bootstrap-datetimepicker-widget table,
html.dark #bm-contact-modal-root .bootstrap-datetimepicker-widget td,
html.dark #bm-contact-modal-root .bootstrap-datetimepicker-widget th,
body.bm-theme-dark #bm-contact-modal-root .bootstrap-datetimepicker-widget table,
body.bm-theme-dark #bm-contact-modal-root .bootstrap-datetimepicker-widget td,
body.bm-theme-dark #bm-contact-modal-root .bootstrap-datetimepicker-widget th {
  background: #0f172a;
  color: #e2e8f0;
}

html[data-bm-theme='dark'] #bm-contact-modal-root .bootstrap-datetimepicker-widget table td.day:hover,
html[data-bm-theme='dark'] #bm-contact-modal-root .bootstrap-datetimepicker-widget table td span:hover,
html[data-bm-theme='dark'] body.bm-contact-modal-open > .bootstrap-datetimepicker-widget.dropdown-menu table td.day:hover,
html[data-bm-theme='dark'] body.bm-contact-modal-open > .bootstrap-datetimepicker-widget.dropdown-menu table td span:hover,
html.dark #bm-contact-modal-root .bootstrap-datetimepicker-widget table td.day:hover,
html.dark #bm-contact-modal-root .bootstrap-datetimepicker-widget table td span:hover,
html.dark body.bm-contact-modal-open > .bootstrap-datetimepicker-widget.dropdown-menu table td.day:hover,
html.dark body.bm-contact-modal-open > .bootstrap-datetimepicker-widget.dropdown-menu table td span:hover,
body.bm-theme-dark #bm-contact-modal-root .bootstrap-datetimepicker-widget table td.day:hover,
body.bm-theme-dark #bm-contact-modal-root .bootstrap-datetimepicker-widget table td span:hover,
body.bm-theme-dark body.bm-contact-modal-open > .bootstrap-datetimepicker-widget.dropdown-menu table td.day:hover,
body.bm-theme-dark body.bm-contact-modal-open > .bootstrap-datetimepicker-widget.dropdown-menu table td span:hover {
  background: #334155 !important;
  color: #f8fafc !important;
}

html[data-bm-theme='dark'] #bm-contact-modal-root .bootstrap-datetimepicker-widget table td.active,
html[data-bm-theme='dark'] #bm-contact-modal-root .bootstrap-datetimepicker-widget table td.active:hover,
html[data-bm-theme='dark'] #bm-contact-modal-root .bootstrap-datetimepicker-widget table td span.active,
html[data-bm-theme='dark'] body.bm-contact-modal-open > .bootstrap-datetimepicker-widget.dropdown-menu table td.active,
html[data-bm-theme='dark'] body.bm-contact-modal-open > .bootstrap-datetimepicker-widget.dropdown-menu table td.active:hover,
html[data-bm-theme='dark'] body.bm-contact-modal-open > .bootstrap-datetimepicker-widget.dropdown-menu table td span.active,
html.dark #bm-contact-modal-root .bootstrap-datetimepicker-widget table td.active,
html.dark #bm-contact-modal-root .bootstrap-datetimepicker-widget table td.active:hover,
html.dark #bm-contact-modal-root .bootstrap-datetimepicker-widget table td span.active,
html.dark body.bm-contact-modal-open > .bootstrap-datetimepicker-widget.dropdown-menu table td.active,
html.dark body.bm-contact-modal-open > .bootstrap-datetimepicker-widget.dropdown-menu table td.active:hover,
html.dark body.bm-contact-modal-open > .bootstrap-datetimepicker-widget.dropdown-menu table td span.active,
body.bm-theme-dark #bm-contact-modal-root .bootstrap-datetimepicker-widget table td.active,
body.bm-theme-dark #bm-contact-modal-root .bootstrap-datetimepicker-widget table td.active:hover,
body.bm-theme-dark #bm-contact-modal-root .bootstrap-datetimepicker-widget table td span.active,
body.bm-theme-dark body.bm-contact-modal-open > .bootstrap-datetimepicker-widget.dropdown-menu table td.active,
body.bm-theme-dark body.bm-contact-modal-open > .bootstrap-datetimepicker-widget.dropdown-menu table td.active:hover,
body.bm-theme-dark body.bm-contact-modal-open > .bootstrap-datetimepicker-widget.dropdown-menu table td span.active {
  background: var(--bm-ui-accent, #591cd3) !important;
  color: #ffffff !important;
}

.bm-contact-shell .bm-contact-input-group .bm-contact-input-addon {
  cursor: pointer;
}

html[data-bm-theme='dark'] .pac-container,
html.dark .pac-container {
  background: #0f172a;
  border-color: #334155;
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.45);
}

html[data-bm-theme='dark'] .pac-item,
html.dark .pac-item {
  color: #e2e8f0;
  border-top-color: #334155;
}

html[data-bm-theme='dark'] .pac-item:hover,
html.dark .pac-item:hover,
html[data-bm-theme='dark'] .pac-item-selected,
html.dark .pac-item-selected {
  background: #1e293b;
}

html[data-bm-theme='dark'] .pac-item-query,
html.dark .pac-item-query {
  color: #f8fafc;
}

/* Reinforce dark theme on form controls (modal is mounted on body, outside .bm-tailwind-page) */
html[data-bm-theme='dark'] #bm-contact-modal-root .bm-contact-shell .form-control,
html[data-bm-theme='dark'] #bm-contact-modal-root .bm-contact-shell input.bm-contact-field,
html[data-bm-theme='dark'] #bm-contact-modal-root .bm-contact-shell select.bm-contact-field,
html[data-bm-theme='dark'] #bm-contact-modal-root .bm-contact-shell textarea.bm-contact-field,
html.dark #bm-contact-modal-root .bm-contact-shell .form-control,
html.dark #bm-contact-modal-root .bm-contact-shell input.bm-contact-field,
html.dark #bm-contact-modal-root .bm-contact-shell select.bm-contact-field,
html.dark #bm-contact-modal-root .bm-contact-shell textarea.bm-contact-field {
  background-color: var(--bm-contact-input-bg);
  border-color: var(--bm-contact-input-border);
  color: var(--bm-contact-text);
}

html[data-bm-theme='dark'] #bm-contact-modal-root .bm-contact-shell .input-group-addon,
html[data-bm-theme='dark'] #bm-contact-modal-root .bm-contact-shell .input-group-btn,
html.dark #bm-contact-modal-root .bm-contact-shell .input-group-addon,
html.dark #bm-contact-modal-root .bm-contact-shell .input-group-btn {
  background: var(--bm-contact-addon-bg);
  border-color: var(--bm-contact-input-border);
  color: var(--bm-contact-addon-text);
}

html[data-bm-theme='dark'] #bm-contact-modal-root .select2-container--default .select2-selection--single,
html[data-bm-theme='dark'] #bm-contact-modal-root .select2-container--default .select2-selection--multiple,
html.dark #bm-contact-modal-root .select2-container--default .select2-selection--single,
html.dark #bm-contact-modal-root .select2-container--default .select2-selection--multiple {
  background-color: var(--bm-contact-input-bg);
  border-color: var(--bm-contact-input-border);
}

html[data-bm-theme='dark'] #bm-contact-modal-root .select2-container--default .select2-selection--single .select2-selection__rendered,
html[data-bm-theme='dark'] #bm-contact-modal-root .select2-container--default .select2-selection--multiple .select2-selection__rendered,
html.dark #bm-contact-modal-root .select2-container--default .select2-selection--single .select2-selection__rendered,
html.dark #bm-contact-modal-root .select2-container--default .select2-selection--multiple .select2-selection__rendered {
  color: var(--bm-contact-text);
}

/* Bootstrap edit contact modal — same shell as add contact */
.bm-tailwind-app .contact_modal .modal-dialog.bm-contact-modal-dialog {
  width: 100%;
  max-width: min(80rem, calc(100vw - 2rem));
  margin: 1rem auto;
}

.bm-tailwind-app .contact_modal .bm-contact-shell {
  display: flex;
  flex-direction: column;
  min-height: 0;
  max-height: calc(100vh - 3rem);
  background: var(--bm-contact-panel);
}

.contact_modal .bm-contact-shell .bm-contact-layout {
  flex: 1 1 auto;
  min-height: 0;
  overflow: hidden;
}

.contact_modal .bm-contact-shell .bm-contact-main {
  overflow-x: hidden;
  overflow-y: auto;
  -webkit-overflow-scrolling: touch;
}

.contact_modal .bm-contact-shell div.bm-contact-field {
  height: auto;
  min-height: 0;
  padding: 0;
  border: none;
  background: transparent;
  display: block;
  box-shadow: none;
}

.contact_modal .bm-contact-shell .form-control,
.contact_modal .bm-contact-shell input.bm-contact-field,
.contact_modal .bm-contact-shell select.bm-contact-field,
.contact_modal .bm-contact-shell textarea.bm-contact-field {
  display: block;
  width: 100%;
  box-sizing: border-box;
  min-height: var(--bm-contact-field-height, 36px) !important;
  height: var(--bm-contact-field-height, 36px) !important;
  padding: 5px 10px !important;
  border-radius: 6px;
  border: 1px solid var(--bm-contact-input-border);
  font-size: 13px !important;
  line-height: 1.35 !important;
  color: var(--bm-contact-text);
  background: var(--bm-contact-input-bg);
  box-shadow: none;
}

.contact_modal .bm-contact-shell textarea.form-control,
.contact_modal .bm-contact-shell textarea.bm-contact-field {
  min-height: 88px !important;
  height: auto !important;
  resize: vertical;
}

.contact_modal .bm-contact-shell .bm-contact-field > label,
.bm-contact-shell .form-group > label {
  display: inline;
  margin-bottom: 0;
  font-size: 12px;
  font-weight: 600;
  color: var(--bm-contact-label);
  vertical-align: middle;
}

.contact_modal .bm-contact-shell .bm-contact-field > .hover-q,
.contact_modal .bm-contact-shell .bm-contact-field > .fa-info-circle {
  display: inline;
  margin: 0 0 4px 4px;
  vertical-align: middle;
}

.contact_modal .bm-contact-shell div.bm-contact-field > .bm-contact-input-group,
.contact_modal .bm-contact-shell div.bm-contact-field > .bm-contact-pay-term,
.contact_modal .bm-contact-shell div.bm-contact-field > .bm-contact-help,
.contact_modal .bm-contact-shell div.bm-contact-field > input.bm-contact-field,
.contact_modal .bm-contact-shell div.bm-contact-field > select.bm-contact-field,
.contact_modal .bm-contact-shell div.bm-contact-field > textarea.bm-contact-field {
  display: block;
  width: 100%;
  margin-top: 4px;
}

.contact_modal .bm-contact-shell .input-group {
  display: flex !important;
  align-items: stretch;
  height: var(--bm-contact-field-height, 36px);
}

.contact_modal .bm-contact-shell .input-group-addon {
  display: flex !important;
  align-items: center;
  justify-content: center;
  flex: 0 0 40px;
  border: 1px solid var(--bm-contact-input-border);
  background: var(--bm-contact-addon-bg);
  color: var(--bm-contact-addon-text);
}

.contact_modal .bm-contact-shell .bm-contact-input-group .bm-contact-field,
.bm-contact-shell .input-group .form-control {
  flex: 1 1 auto;
  min-width: 0;
  height: 100% !important;
  border-top-left-radius: 0 !important;
  border-bottom-left-radius: 0 !important;
}

.contact_modal .bm-contact-shell .input-group-addon:first-child {
  border-right: 0;
  border-top-left-radius: 6px !important;
  border-bottom-left-radius: 6px !important;
  border-top-right-radius: 0 !important;
  border-bottom-right-radius: 0 !important;
}

.contact_modal .select2-container--default .select2-selection--single,
.contact_modal .select2-container--default .select2-selection--multiple {
  min-height: var(--bm-contact-field-height, 36px);
  border-color: var(--bm-contact-input-border);
  background-color: var(--bm-contact-input-bg);
}

html[data-bm-theme='dark'] .contact_modal .bm-contact-shell .form-control,
html[data-bm-theme='dark'] .contact_modal .bm-contact-shell input.bm-contact-field,
html[data-bm-theme='dark'] .contact_modal .bm-contact-shell select.bm-contact-field,
html[data-bm-theme='dark'] .contact_modal .bm-contact-shell textarea.bm-contact-field,
html.dark .contact_modal .bm-contact-shell .form-control,
html.dark .contact_modal .bm-contact-shell input.bm-contact-field,
html.dark .contact_modal .bm-contact-shell select.bm-contact-field,
html.dark .contact_modal .bm-contact-shell textarea.bm-contact-field {
  background-color: var(--bm-contact-input-bg);
  border-color: var(--bm-contact-input-border);
  color: var(--bm-contact-text);
}

.bm-contact-financial-slot {
  width: 100%;
}

.bm-contact-financial-slot [data-bm-financial-fields] {
  width: 100%;
}

.contact_modal .bm-contact-map,
.contact_modal #map.bm-contact-map {
  width: 100%;
  height: 320px;
  min-height: 18rem;
}

/* Override legacy Bootstrap modal flex rules for v2 contact sections */
.bm-tailwind-app .contact_modal .bm-contact-shell #more_div.bm-contact-section[data-bm-contact-more]:not(.hidden),
.bm-tailwind-app .contact_modal .bm-contact-shell .bm-contact-section--persons #contact_person_div:not(.hide):not(.hidden) {
  display: block !important;
  width: 100%;
  flex-wrap: unset !important;
}

.bm-tailwind-app .contact_modal .bm-contact-shell #more_div.bm-contact-section[data-bm-contact-more].hidden {
  display: none !important;
}

.bm-contact-shell .bm-contact-section--persons #contact_person_div .bm-contact-person-panel:not(.hide):not(.hidden) {
  display: grid !important;
}

.bm-contact-shell .bm-contact-section--persons #contact_person_div .bm-contact-person-legacy-toggle {
  display: none !important;
}

/* Native field wrappers (no Bootstrap class names in markup) */
.bm-contact-shell .bm-contact-help {
  margin: 4px 0 0;
  font-size: 12px;
  color: var(--bm-contact-muted);
}

.bm-contact-shell .bm-contact-check {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  margin: 0;
}

.bm-contact-shell .bm-contact-check__input {
  width: 16px;
  height: 16px;
  margin: 0;
  accent-color: var(--bm-ui-accent, #591cd3);
}

#bm-contact-modal-root .bm-contact-shell .bm-contact-input-group,
#bm-contact-modal-root .bm-contact-shell .input-group {
  display: flex !important;
  flex-wrap: wrap;
  align-items: stretch;
  height: auto !important;
  min-height: var(--bm-contact-field-height) !important;
  max-height: none !important;
}

#bm-contact-modal-root .bm-contact-shell .bm-contact-input-group > .select2-container .select2-selection--single,
#bm-contact-modal-root .bm-contact-shell .bm-contact-input-group > .select2-container .select2-selection--multiple,
.contact_modal .bm-contact-shell .bm-contact-input-group > .select2-container .select2-selection--single,
.contact_modal .bm-contact-shell .bm-contact-input-group > .select2-container .select2-selection--multiple {
  border-top-left-radius: 0;
  border-bottom-left-radius: 0;
}

#bm-contact-modal-root .bm-contact-shell .bm-contact-input-addon,
#bm-contact-modal-root .bm-contact-shell .input-group-addon {
  display: flex !important;
  align-self: flex-start;
  height: var(--bm-contact-field-height) !important;
  min-height: var(--bm-contact-field-height) !important;
  max-height: var(--bm-contact-field-height) !important;
}

#bm-contact-modal-root .bm-contact-shell .bm-contact-input-group .bm-contact-field:not(.select2-hidden-accessible),
#bm-contact-modal-root .bm-contact-shell .input-group .form-control:not(.select2-hidden-accessible),
#bm-contact-modal-root .bm-contact-shell .input-group .bm-contact-field:not(.select2-hidden-accessible) {
  align-self: flex-start;
  height: var(--bm-contact-field-height) !important;
  min-height: var(--bm-contact-field-height) !important;
  max-height: var(--bm-contact-field-height) !important;
}

#bm-contact-modal-root .bm-contact-shell .bm-contact-input-group > select.select2-hidden-accessible,
.contact_modal .bm-contact-shell .bm-contact-input-group > select.select2-hidden-accessible,
.bm-contact-shell .bm-contact-input-group > select.select2-hidden-accessible {
  position: absolute !important;
  left: 0;
  width: 1px !important;
  height: 1px !important;
  min-height: 0 !important;
  max-height: none !important;
  margin: 0 !important;
  padding: 0 !important;
  overflow: hidden !important;
  clip: rect(0 0 0 0) !important;
  border: 0 !important;
  flex: 0 0 0 !important;
}

.bm-contact-shell .bm-contact-input-addon:first-child + .bm-contact-field,
.bm-contact-shell .input-group-addon:first-child + .form-control,
.bm-contact-shell .input-group-addon:first-child + .bm-contact-field {
  border-top-left-radius: 0;
  border-bottom-left-radius: 0;
}

.bm-contact-shell .bm-contact-input-addon:first-child,
.bm-contact-shell .input-group-addon:first-child {
  border-top-right-radius: 0;
  border-bottom-right-radius: 0;
}
