/* "💷 Record payment in Xero" — shared by the diary and the contact card
   (xero-pay-ui.js). Self-contained under .cf-xero-pay: neither page's own modal
   styles are borrowed, so it renders the same in both. Above the diary's job
   modal and the sign-off / payment sheets (10001). */

.cf-xero-pay { position: fixed; inset: 0; z-index: 10002; display: flex; align-items: center; justify-content: center; padding: 12px; box-sizing: border-box; }
.cf-xero-pay .xp-backdrop { position: absolute; inset: 0; background: rgba(15, 23, 42, 0.45); }
.cf-xero-pay .xp-panel {
  position: relative; background: #fff; color: #111827; width: 440px; max-width: 100%;
  max-height: calc(100vh - 24px); overflow-y: auto; overscroll-behavior: contain;
  border-radius: 12px; padding: 16px; box-sizing: border-box;
  box-shadow: 0 12px 32px rgba(0, 0, 0, 0.2); font-family: inherit; font-size: 14px;
}
.cf-xero-pay .xp-head { display: flex; justify-content: space-between; align-items: flex-start; gap: 8px; margin-bottom: 10px; }
.cf-xero-pay .xp-title { margin: 0; font-size: 17px; font-weight: 700; line-height: 1.3; }
.cf-xero-pay .xp-close {
  min-width: 44px; min-height: 44px; margin: -8px -8px 0 0; padding: 0;
  background: none; border: 0; font-size: 26px; line-height: 1; color: #6b7280; cursor: pointer;
}
.cf-xero-pay .xp-alert {
  border: 1px solid #f59e0b; background: #fffbeb; border-radius: 7px; padding: 10px 12px;
  margin-bottom: 12px; font-size: 12.5px; color: #78350f; line-height: 1.45;
}
.cf-xero-pay .xp-into { margin-bottom: 10px; color: #334155; }
.cf-xero-pay .xp-org { display: inline-block; margin-top: 4px; font-weight: 600; color: #111827; }
.cf-xero-pay .xp-row { display: flex; gap: 12px; padding: 4px 0; }
.cf-xero-pay .xp-row__k { width: 92px; flex: none; color: #64748b; font-size: 12.5px; }
.cf-xero-pay .xp-row__v { font-size: 13.5px; }
.cf-xero-pay .xp-muted { font-weight: 400; color: #64748b; }
.cf-xero-pay .xp-field { margin-top: 14px; }
.cf-xero-pay .xp-label { font-size: 12.5px; font-weight: 600; color: #334155; margin-bottom: 4px; }
.cf-xero-pay .xp-hint { font-size: 11.5px; color: #64748b; margin: 0 0 8px; line-height: 1.4; }
/* 💷 A deposit, already decided — shown, not ticked (20 Oct 2026). */
.cf-xero-pay .xp-fixed { display: flex; gap: 8px 12px; align-items: center; justify-content: space-between; flex-wrap: wrap; min-height: 44px; padding: 6px 10px; margin-bottom: 6px;
  border: 1px solid #006aac; border-radius: 8px; background: #f8fbfd; font-size: 13.5px; color: #0f172a; }
.cf-xero-pay .xp-fixed-when { display: inline-flex; gap: 6px; align-items: center; font-size: 12px; color: #475569; }
/* 📱 Every box you type in is 16px. An iPhone zooms the whole page in on a
   smaller box and STAYS zoomed — and this panel is 14px, so ticking Cash (which
   puts the cursor in its amount box) left the sheet oversized (Allan, 28 Nov
   2026, on his iPhone). The deposit sheet has had the same rule since October. */
.cf-xero-pay .xp-fixed-date { min-height: 40px; padding: 0 8px; border: 1px solid #d9e0e6; border-radius: 6px; font: inherit; font-size: 16px; background: #fff; }
.cf-xero-pay .xp-date {
  width: 100%; min-height: 44px; padding: 0 10px; box-sizing: border-box;
  border: 1px solid #cbd5e1; border-radius: 7px; font: inherit; font-size: 16px; margin-bottom: 6px;
}
.cf-xero-pay .ps-amount { font-size: 16px; }
.cf-xero-pay .xp-actions { display: flex; justify-content: flex-end; gap: 8px; margin-top: 16px; }
/* The buttons are PINNED to the bottom on a phone (Allan, 25 Nov 2026): with a
   deposit, the ticks and the date the panel is taller than the screen, and
   Cancel / Record sat at the end of the scroll. Edge to edge across the
   panel's 16px padding, white, so nothing shows through underneath — the
   deposit sheet's bar (deposit-ui.css). 🪤 bottom is MINUS the panel's bottom
   padding: a sticky bar is held inside the panel's CONTENT box, so at 0 the
   fields scrolled past in a 16px strip below the buttons. This panel floats
   inside the screen's 12px edge, so there is no phone home bar to clear.
   💻 On the computer too (Allan, 25 Nov 2026, q29: "yes"): in the diary at
   1280x900 Record sat 19px below the screen when it opened. */
.cf-xero-pay .xp-actions {
  position: sticky; bottom: -16px; z-index: 1;
  background: #fff; border-top: 1px solid #e5e7eb;
  margin: 12px -16px -16px; padding: 12px 16px;
}
/* The computer's panel is a card with 12px rounded corners: the bar's own
   bottom corners match, so it never pokes past them. (The panel clips them as
   well; this keeps it so if that ever changes.) */
@media (min-width: 600px) and (min-height: 520.02px) {
  .cf-xero-pay .xp-actions { border-radius: 0 0 12px 12px; }
}
.cf-xero-pay .xp-btn {
  min-height: 44px; padding: 0 16px; border-radius: 8px; font: inherit; font-weight: 600; cursor: pointer;
  border: 1px solid #d9e0e6; background: #fff; color: #111827;
}
.cf-xero-pay .xp-ok { border-color: #006aac; background: #006aac; color: #fff; }
.cf-xero-pay .xp-ok:disabled { opacity: 0.5; cursor: not-allowed; }
