/* One-page customer master form. All selectors require its explicit enhancement marker. */
:is(#rpFormModal,#rpQuickCustomerModal).fp-customer-modal {
  padding:16px!important;
  align-items:center!important;
  overflow:hidden!important;
}
:is(#rpFormModal,#rpQuickCustomerModal)>.rp-modal-card.fp-customer-workspace {
  position:relative;
  width:min(1680px,100%)!important;
  height:min(880px,calc(100dvh - 32px))!important;
  max-height:calc(100dvh - 32px)!important;
  min-height:0!important;
  box-sizing:border-box;
  padding:0!important;
  overflow:hidden!important;
  border-radius:16px;
  background:var(--panel,#fff);
}
:is(#rpFormModal,#rpQuickCustomerModal) .fp-customer-workspace :is(#rpFormPanel,#rpQuickCustomerPanel) {
  display:flex;
  flex-direction:column;
  height:100%;
  min-height:0;
}
:is(#rpFormModal,#rpQuickCustomerModal) .fp-customer-workspace :is(#rpForm,#rpQuickCustomerForm)>.rp-panel-head {
  position:static!important;
  display:flex;
  flex:none;
  align-items:center;
  justify-content:space-between;
  gap:16px;
  min-height:78px;
  margin:0!important;
  padding:14px 20px!important;
  border-bottom:1px solid var(--border,#dce3ed);
  background:var(--panel,#fff);
}
:is(#rpFormModal,#rpQuickCustomerModal) .fp-customer-workspace .rp-panel-head>div:first-child {flex:1;min-width:0}
:is(#rpFormModal,#rpQuickCustomerModal) .fp-customer-workspace .rp-panel-head h3 {margin:0 0 3px;font-size:18px;line-height:1.3}
:is(#rpFormModal,#rpQuickCustomerModal) .fp-customer-workspace .rp-panel-head .rp-sub {display:none}
:is(#rpFormModal,#rpQuickCustomerModal) .fp-customer-workspace .fp-customer-name {display:block;color:var(--muted,#64748b);font-size:13px;line-height:1.4;overflow-wrap:anywhere}
:is(#rpFormModal,#rpQuickCustomerModal) .fp-customer-workspace .fp-customer-name:empty {display:none}
:is(#rpFormModal,#rpQuickCustomerModal) .fp-customer-workspace :is(#rpForm,#rpQuickCustomerForm).fp-customer-form {
  display:flex;
  flex-direction:column;
  flex:1 1 auto;
  min-height:0;
  overflow:hidden;
  gap:0;
}
:is(#rpFormModal,#rpQuickCustomerModal) .fp-customer-workspace .fp-customer-header-right {display:flex;align-items:center;gap:18px;flex:none}
:is(#rpFormModal,#rpQuickCustomerModal) .fp-customer-workspace .fp-customer-status {width:130px}
:is(#rpFormModal,#rpQuickCustomerModal) .fp-customer-workspace .fp-customer-status .rp-field {gap:3px}
:is(#rpFormModal,#rpQuickCustomerModal) .fp-customer-workspace .fp-customer-status .rp-field select {min-height:32px;padding:5px 9px}
:is(#rpFormModal,#rpQuickCustomerModal) .fp-customer-workspace .fp-customer-body {
  flex:1 1 auto;
  min-height:0;
  padding:16px;
  overflow:auto;
  overscroll-behavior:contain;
  background:var(--bg,#f4f7fb);
}
:is(#rpFormModal,#rpQuickCustomerModal) .fp-customer-workspace .fp-customer-columns {
  display:grid;
  grid-template-columns:1fr 1fr 1.08fr;
  gap:14px;
  align-items:stretch;
  min-width:0;
}
:is(#rpFormModal,#rpQuickCustomerModal) .fp-customer-workspace .fp-customer-section {
  min-width:0;
  padding:15px;
  border:1px solid var(--border,#dce3ed);
  border-radius:12px;
  background:var(--panel,#fff);
}
:is(#rpFormModal,#rpQuickCustomerModal) .fp-customer-workspace .fp-customer-section-title {margin:0 0 15px;font-size:14px;font-weight:800;line-height:1.35;color:var(--text,#172b45)}
:is(#rpFormModal,#rpQuickCustomerModal) .fp-customer-workspace .fp-customer-fields {grid-template-columns:repeat(2,minmax(0,1fr));gap:11px 12px;min-width:0}
:is(#rpFormModal,#rpQuickCustomerModal) .fp-customer-workspace .rp-field {min-width:0}
:is(#rpFormModal,#rpQuickCustomerModal) .fp-customer-workspace .rp-field label {font-size:12px;line-height:1.35}
:is(#rpFormModal,#rpQuickCustomerModal) .fp-customer-workspace .rp-field input:not([type="checkbox"]),
:is(#rpFormModal,#rpQuickCustomerModal) .fp-customer-workspace .rp-field select,
:is(#rpFormModal,#rpQuickCustomerModal) .fp-customer-workspace .rp-field textarea {
  box-sizing:border-box;
  width:100%;
  min-height:36px;
  padding:8px 10px;
  border:1px solid var(--border,#d2dce9);
  border-radius:8px;
  background:var(--panel,#fff);
  color:inherit;
  font-size:13px;
}
:is(#rpFormModal,#rpQuickCustomerModal) .fp-customer-workspace .rp-field textarea {height:112px;min-height:82px;max-height:200px;resize:vertical;line-height:1.4}
:is(#rpFormModal,#rpQuickCustomerModal) .fp-customer-workspace .rp-field:has(>[name="mobilityType"]) {grid-column:1/-1}
:is(#rpFormModal,#rpQuickCustomerModal) .fp-customer-workspace .rp-checkline {line-height:1.4;font-size:12px}
:is(#rpFormModal,#rpQuickCustomerModal) .fp-customer-workspace .rp-mini-note {font-size:11px;line-height:1.35}
:is(#rpFormModal,#rpQuickCustomerModal) .fp-customer-workspace .rp-customer-category-dropdown {position:relative;overflow:visible}
:is(#rpFormModal,#rpQuickCustomerModal) .fp-customer-workspace .rp-customer-category-dropdown>summary {min-height:36px;padding:7px 10px;font-size:12px}
:is(#rpFormModal,#rpQuickCustomerModal) .fp-customer-workspace .rp-customer-category-picker {
  position:absolute;
  z-index:6;
  top:calc(100% + 4px);
  left:0;
  right:0;
  grid-template-columns:repeat(2,minmax(0,1fr));
  max-height:190px;
  overflow:auto;
  overscroll-behavior:contain;
  border:1px solid var(--border,#d2dce9);
  border-radius:10px;
  background:var(--panel,#fff);
  box-shadow:0 8px 22px rgba(15,23,42,.15);
}
:is(#rpFormModal,#rpQuickCustomerModal) .fp-customer-workspace .rp-customer-category-selected {gap:5px}
:is(#rpFormModal,#rpQuickCustomerModal) .fp-customer-workspace .rp-customer-category-option {min-height:34px}
:is(#rpFormModal,#rpQuickCustomerModal) .fp-customer-workspace .rp-customer-tp-distance-list {max-height:160px;overflow:auto;overscroll-behavior:contain}
:is(#rpFormModal,#rpQuickCustomerModal) .fp-customer-workspace .rp-customer-tp-distance-card {grid-template-columns:minmax(0,1fr) 84px auto;gap:6px 9px;padding:8px;align-items:end}
:is(#rpFormModal,#rpQuickCustomerModal) .fp-customer-workspace .rp-customer-tp-distance-info strong {font-size:12px}
:is(#rpFormModal,#rpQuickCustomerModal) .fp-customer-workspace .rp-customer-tp-distance-info span {font-size:11px;line-height:1.3}
:is(#rpFormModal,#rpQuickCustomerModal) .fp-customer-workspace [data-rp-tp-distance-calc] {min-height:34px;padding:7px 9px;font-size:11px;white-space:normal;max-width:116px}
:is(#rpFormModal,#rpQuickCustomerModal) .fp-customer-workspace .rp-customer-tp-distance-status {grid-column:1/-1;font-size:11px;line-height:1.3}
:is(#rpFormModal,#rpQuickCustomerModal) .fp-customer-workspace .fp-customer-notes,
:is(#rpFormModal,#rpQuickCustomerModal) .fp-customer-workspace .fp-customer-other {margin-top:14px}
:is(#rpFormModal,#rpQuickCustomerModal) .fp-customer-workspace .fp-customer-notes>.fp-customer-fields {grid-template-columns:repeat(3,minmax(0,1fr))}
:is(#rpFormModal,#rpQuickCustomerModal) .fp-customer-workspace .fp-customer-notes .rp-field {grid-column:auto}
:is(#rpFormModal,#rpQuickCustomerModal) .fp-customer-workspace .fp-customer-notes textarea {height:100px;min-height:80px}
:is(#rpFormModal,#rpQuickCustomerModal) .fp-customer-workspace :is(#rpForm,#rpQuickCustomerForm)>.rp-actions {
  display:flex;
  flex:none;
  align-items:center;
  justify-content:flex-end;
  flex-wrap:wrap;
  gap:10px;
  margin:0;
  padding:12px 20px;
  border-top:1px solid var(--border,#dce3ed);
  background:var(--panel,#fff);
}
:is(#rpFormModal,#rpQuickCustomerModal) .fp-customer-workspace .fp-customer-cancel {margin-left:auto}
:is(#rpFormModal,#rpQuickCustomerModal) .fp-customer-workspace .rp-actions .btn {min-height:38px;padding:9px 16px;border-radius:9px}
@media(max-width:1200px) {
  :is(#rpFormModal,#rpQuickCustomerModal) .fp-customer-workspace .fp-customer-fields {gap:9px}
  :is(#rpFormModal,#rpQuickCustomerModal) .fp-customer-workspace .fp-customer-columns {gap:10px}
  :is(#rpFormModal,#rpQuickCustomerModal) .fp-customer-workspace .fp-customer-section {padding:12px}
  :is(#rpFormModal,#rpQuickCustomerModal) .fp-customer-workspace .rp-customer-category-picker {grid-template-columns:1fr}
  :is(#rpFormModal,#rpQuickCustomerModal) .fp-customer-workspace .rp-customer-tp-distance-card {grid-template-columns:minmax(0,1fr) 80px}
  :is(#rpFormModal,#rpQuickCustomerModal) .fp-customer-workspace [data-rp-tp-distance-calc] {grid-column:1/-1;max-width:none}
}
@media(max-width:1000px) {
  :is(#rpFormModal,#rpQuickCustomerModal).fp-customer-modal {padding:8px!important}
  :is(#rpFormModal,#rpQuickCustomerModal)>.rp-modal-card.fp-customer-workspace {height:calc(100dvh - 16px)!important;max-height:calc(100dvh - 16px)!important;border-radius:12px}
  :is(#rpFormModal,#rpQuickCustomerModal) .fp-customer-workspace .fp-customer-columns {grid-template-columns:repeat(2,minmax(0,1fr))}
  :is(#rpFormModal,#rpQuickCustomerModal) .fp-customer-workspace .fp-customer-billing {grid-column:1/-1}
  :is(#rpFormModal,#rpQuickCustomerModal) .fp-customer-workspace .fp-customer-billing>.fp-customer-fields {grid-template-columns:repeat(2,minmax(0,1fr))}
  :is(#rpFormModal,#rpQuickCustomerModal) .fp-customer-workspace .fp-customer-notes>.fp-customer-fields {grid-template-columns:1fr}
}
@media(max-width:650px) {
  :is(#rpFormModal,#rpQuickCustomerModal) .fp-customer-workspace :is(#rpForm,#rpQuickCustomerForm)>.rp-panel-head {min-height:68px;padding:12px!important;flex-wrap:wrap}
  :is(#rpFormModal,#rpQuickCustomerModal) .fp-customer-workspace .fp-customer-header-right {gap:10px}
  :is(#rpFormModal,#rpQuickCustomerModal) .fp-customer-workspace .fp-customer-status {width:100px}
  :is(#rpFormModal,#rpQuickCustomerModal) .fp-customer-workspace .fp-customer-body {padding:10px}
  :is(#rpFormModal,#rpQuickCustomerModal) .fp-customer-workspace .fp-customer-columns {grid-template-columns:1fr}
  :is(#rpFormModal,#rpQuickCustomerModal) .fp-customer-workspace .fp-customer-billing {grid-column:auto}
  :is(#rpFormModal,#rpQuickCustomerModal) .fp-customer-workspace .fp-customer-billing>.fp-customer-fields {grid-template-columns:1fr}
  :is(#rpFormModal,#rpQuickCustomerModal) .fp-customer-workspace :is(#rpForm,#rpQuickCustomerForm)>.rp-actions {padding:11px 12px;gap:7px}
  :is(#rpFormModal,#rpQuickCustomerModal) .fp-customer-workspace .rp-actions .btn {padding:8px 11px}
}

/* Preserve native hidden fields in customer forms. */
.rp-field[hidden] { display:none!important; }
