/*
 * AQUILA_POS_TXN_CANONICAL_R3
 * Native transaction set-up only — hide deleted fields; no parallel cards.
 */

html[data-ubz-txn-native="1"] .pos-transaction-setup-section > .section-heading,
html[data-ubz-txn-native="1"] .pos-transaction-setup-section > header,
html[data-ubz-txn-native="1"] .pos-transaction-setup-section > .eyebrow,
html[data-ubz-txn-native="1"] #ubz-pos-txn-canonical {
  display: none !important;
}

html[data-ubz-txn-native="1"] .pos-transaction-setup-section [data-ubz-txn-hide="1"],
html[data-ubz-txn-native="1"] .pos-transaction-setup-section [data-aquila-sales-phone-help],
html[data-ubz-txn-native="1"] .pos-transaction-setup-section small[data-aquila-sales-phone-help="1"] {
  display: none !important;
}

html[data-ubz-txn-native="1"] .pos-transaction-setup-section,
html[data-ubz-ops-rail][data-ubz-txn-native="1"] .pos-transaction-setup-section {
  overflow: visible !important;
  max-height: none !important;
  border: 0 !important;
  background: transparent !important;
  box-shadow: none !important;
  padding: 6px 8px !important;
}

html[data-ubz-txn-native="1"] .pos-transaction-setup-section .pos-field-grid,
html[data-ubz-txn-native="1"] .pos-transaction-setup-section .pos-field-grid--two,
html[data-ubz-txn-native="1"] .pos-transaction-setup-section [data-ubz-txn-grid="1"] {
  display: grid !important;
  grid-template-columns: repeat(2, minmax(0, 1fr)) !important;
  grid-column: 1 / -1 !important;
  gap: 6px !important;
  width: 100% !important;
  max-width: none !important;
  min-width: 0 !important;
  align-items: stretch !important;
  margin: 0 !important;
  padding: 0 !important;
}

/* Strict 2×2 equal cards — never span full row */
html[data-ubz-txn-native="1"] .pos-transaction-setup-section .pos-field-grid > label[data-ubz-txn-slot],
html[data-ubz-txn-native="1"] .pos-transaction-setup-section [data-ubz-txn-slot],
html[data-ubz-txn-native="1"] .pos-transaction-setup-section .pos-field-grid > label[data-ubz-txn-card="1"],
html[data-ubz-txn-native="1"] .pos-transaction-setup-section [data-ubz-txn-card="1"] {
  grid-column: auto !important;
}

html[data-ubz-txn-native="1"] .pos-transaction-setup-section .pos-field-grid > label[data-ubz-txn-card="1"],
html[data-ubz-txn-native="1"] .pos-transaction-setup-section [data-ubz-txn-card="1"] {
  display: flex !important;
  flex-direction: column !important;
  gap: 3px !important;
  box-sizing: border-box !important;
  min-width: 0 !important;
  width: 100% !important;
  min-height: 0 !important;
  height: auto !important;
  margin: 0 !important;
  padding: 6px 8px !important;
  border: 1px solid #dce4ef !important;
  border-radius: 6px !important;
  background: #fff !important;
  box-shadow: none !important;
  overflow: visible !important;
}

html[data-ubz-txn-native="1"] .pos-transaction-setup-section .pos-field-grid > label[data-ubz-txn-card="1"] > span,
html[data-ubz-txn-native="1"] #ubz-pos-insurance-partner-card > span,
html[data-ubz-txn-native="1"] #ubz-pos-payment-ratio-card > span {
  display: block !important;
  overflow: visible !important;
  text-overflow: clip !important;
  white-space: normal !important;
  font-size: 0.55rem !important;
  font-weight: 700 !important;
  line-height: 1.15 !important;
  letter-spacing: 0.02em !important;
  text-transform: uppercase !important;
  color: #43516a !important;
}

html[data-ubz-txn-native="1"] .pos-transaction-setup-section .pos-field-grid > label[data-ubz-txn-card="1"] :is(input, select, textarea),
html[data-ubz-txn-native="1"] #ubz-pos-insurance-partner-card select,
html[data-ubz-txn-native="1"] #ubz-pos-payment-ratio-card select,
html[data-ubz-txn-native="1"] #ubz-pos-insurance-partner-card label :is(input, select) {
  width: 100% !important;
  max-width: 100% !important;
  min-width: 0 !important;
  min-height: 28px !important;
  height: 28px !important;
  margin: 0 !important;
  padding: 2px 6px !important;
  box-sizing: border-box !important;
  border: 1px solid #dce4ef !important;
  border-radius: 5px !important;
  background: #fff !important;
  font-size: 0.62rem !important;
  line-height: 1.2 !important;
}

html[data-ubz-txn-native="1"] .ubz-partner-ratios,
html[data-ubz-pos-work="1"] .ubz-partner-ratios,
html[data-ubz-txn-native="1"] .pos-transaction-setup-section [data-ubz-partner-ratios],
html[data-ubz-pos-work="1"] .pos-transaction-setup-section .ubz-partner-ratios {
  display: none !important;
}

html[data-ubz-txn-native="1"] #ubz-pos-insurance-partner-card[hidden],
html[data-ubz-txn-native="1"] #ubz-pos-payment-ratio-card[hidden] {
  display: none !important;
}

html[data-ubz-txn-native="1"] #ubz-pos-insurance-partner-card label,
html[data-ubz-txn-native="1"] #ubz-pos-insurance-partner-card small,
html[data-ubz-txn-native="1"] #ubz-pos-insurance-partner-card [data-aquila-sales-phone-help] {
  display: none !important;
}

html[data-ubz-txn-native="1"] #ubz-pos-insurance-partner-card select[data-ubz-pos-partner] {
  display: block !important;
}

html[data-ubz-txn-native="1"] #ubz-pos-payment-ratio-card [data-ubz-native-ratio-hint] {
  font-size: 0.52rem !important;
  line-height: 1.25 !important;
  color: #5a6a63 !important;
}

/* Hide any native contribution chip under insurance fields on POS */
html[data-ubz-txn-native="1"] .pos-transaction-setup-section label small,
html[data-ubz-txn-native="1"] .pos-transaction-setup-section .pos-field-grid small {
  display: none !important;
}

html[data-ubz-ops-rail][data-ubz-pos-work="1"] .pos-recent-transactions-bottom table {
  table-layout: fixed !important;
  width: 100% !important;
}

html[data-ubz-ops-rail][data-ubz-pos-work="1"] .pos-recent-transactions-bottom th[data-ubz-pay-col="1"],
html[data-ubz-ops-rail][data-ubz-pos-work="1"] .pos-recent-transactions-bottom td[data-ubz-pay-col="1"] {
  width: 72px !important;
  max-width: 72px !important;
  white-space: nowrap !important;
  overflow: hidden !important;
  text-overflow: ellipsis !important;
  font-size: 11px !important;
  padding-left: 4px !important;
  padding-right: 4px !important;
}

html[data-ubz-ops-rail][data-ubz-pos-work="1"] .pos-sale-transaction-section {
  overflow-y: auto !important;
  align-content: start !important;
}
