/* Receive station and shared live-code enlargement. Wallet and Pay layout stay inherited. */
#topupScreen .screen-header { padding-block: 14px; }
#topupScreen .screen-header__row { display: grid; grid-template-columns: 1fr auto 1fr; }
#topupScreen .screen-title { text-align: center; }
#topupScreen .mini-button--back { justify-self: start; }
.pos-receive-wordmark { justify-self: end; width: 126px; height: auto; }
#topupScreen .pos-receive-body { width: 500px; max-width: calc(100% - 40px); padding: 0; margin: 20px auto; }
.pos-receive-station { border: 1px solid #e6e6ee; border-radius: 28px; padding: 16px 24px 14px; box-shadow: 0 3px 8px #28283707, 0 15px 35px #28283704; background: #fff; }
.pos-receive-station svg, .pos-pay-code-reveal svg { fill: none; stroke: currentColor; stroke-width: 1.9; stroke-linecap: round; stroke-linejoin: round; }
.pos-receive-station button:focus-visible, .pos-pay-code-reveal:focus-visible { outline: 3px solid #6a75da; outline-offset: 4px; }
.pos-scan-heading { display: flex; align-items: center; justify-content: center; gap: 14px; margin-bottom: 14px; }
.pos-scan-heading > img { width: 40px; height: 38px; object-fit: contain; }
.pos-scan-heading h2 { margin: 0; font-size: 17px; font-weight: 700; }
.pos-scan-heading p { margin: 3px 0 0; font-size: 12px; color: var(--muted); }
.pos-receive-code { background: #fff; border: 1px solid #e1e1e9; border-radius: 16px; width: 320px; max-width: 100%; aspect-ratio: 1; display: flex; align-items: center; justify-content: center; overflow: hidden; padding: 16px; margin: 0 auto; box-shadow: 0 4px 16px #20203906; }
.pos-receive-code canvas { width: 100%; height: auto; max-height: 100%; aspect-ratio: 1; image-rendering: pixelated; }
.pos-empty-code { display: flex; align-items: center; justify-content: center; flex-direction: column; gap: 8px; color: #888895; text-align: center; }
.pos-empty-code svg { width: 64px; height: 64px; stroke: #b3b3c4; margin-bottom: 10px; }
.pos-empty-code svg .inside { fill: #b3b3c4; stroke: none; }
.pos-empty-code strong { font-size: 16px; font-weight: 600; }
.pos-empty-code > span { font-size: 12px; line-height: 1.6; }
.pos-receive-code:disabled { cursor: default; background: #fdfdff; border-style: dashed; box-shadow: none; }
/* The confirmation ring is outside the unchanged white barcode quiet zone. */
.pos-receive-code[data-payment-received='true'] { border-color: #187e54; box-shadow: 0 0 0 5px #187e54, 0 4px 16px #20203906; }
.pos-live-status[data-payment-received='true'] { color: #187e54; font-weight: 700; }
.pos-code-meta { width: 320px; max-width: 100%; margin: 11px auto 0; display: flex; align-items: center; justify-content: space-between; font-size: 10px; color: var(--muted); gap: 8px; }
.pos-live-status { color: var(--muted); display: flex; align-items: center; gap: 5px; }
.pos-live-status[data-ready='true'] { color: #187e54; }
.pos-live-status[data-ready='true']::before { content: ''; width: 6px; height: 6px; border-radius: 50%; background: #187e54; }
.pos-code-meta > span:last-child { display: flex; align-items: center; gap: 4px; }
.pos-code-meta svg { width: 12px; height: 12px; }
.pos-amount-block { text-align: center; margin: 15px 0 12px; }
.pos-amount-block label { font-size: 11px; color: var(--muted); display: block; margin-bottom: 4px; }
.pos-amount-value { display: flex; justify-content: center; align-items: baseline; font-weight: 800; color: var(--blue); gap: 1px; }
.pos-amount-value .pos-dollar { font-size: 40px; line-height: 1.2; }
.pos-amount-value input { width: 128px; max-width: 65%; padding: 0; border: 0; border-radius: 0; background: transparent; font: inherit; font-size: 43px; font-weight: 800; line-height: 1.2; color: var(--blue); outline: none; text-align: left; letter-spacing: -1.7px; caret-color: var(--blue); font-variant-numeric: tabular-nums; }
.pos-amount-value input:focus-visible { box-shadow: 0 2px 0 var(--blue); }
.pos-amount-value .pos-currency { font-size: 17px; font-weight: 600; color: var(--muted); margin-left: 7px; }
.pos-receive-totals { display: grid; grid-template-columns: 1fr 1.5fr; gap: 10px; padding: 10px 14px; border-radius: 13px; border: 1px solid #e7e7ef; background: #f8f8fc; margin: 0 0 12px; }
.pos-receive-totals > div { display: flex; flex-direction: column; gap: 3px; }
.pos-receive-totals span { font-size: 10px; color: var(--muted); }
.pos-receive-totals strong { font-size: 17px; font-weight: 700; color: var(--blue); }
.pos-receive-totals .pos-customer-total { text-align: right; }
.pos-receive-totals .pos-customer-total strong, #posReceiveTotalAmount { font-size: 22px; line-height: 1.3; color: var(--blue); font-weight: 700; overflow-wrap: anywhere; }
.pos-receive-totals small { font-size: 10px; font-weight: 600; color: var(--muted); }
.pos-receive-keypad { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 8px; }
.pos-receive-keypad button { height: 48px; border-radius: 14px; background: #fff; border: 1px solid #e6e6ee; font: inherit; font-weight: 700; font-size: 24px; box-shadow: 0 2px 4px #25252e04; display: grid; place-items: center; }
.pos-receive-keypad button:hover { background: #f7f7fa; }
.pos-receive-keypad button:active { background: #eeeef8; }
.pos-receive-keypad svg { width: 25px; height: 23px; stroke-width: 1.7; color: var(--blue); }
.pos-receive-clear { display: flex; justify-content: center; align-items: center; gap: 7px; width: 100%; min-height: 44px; margin-top: 10px; border: 1px solid #dddde8; border-radius: 13px; color: var(--blue); background: #f8f8fc; font: inherit; font-size: 13px; font-weight: 700; }
.pos-receive-clear:hover { background: #eeeef7; }
.pos-receive-clear svg { height: 15px; width: 15px; stroke-width: 2; }
.pos-operator-status { text-align: center; font-size: 11px; color: var(--muted); margin: 8px 0 0; }
.pos-payment-progress p { margin: 0; font-size: inherit; line-height: 1.5; }
.pos-payment-progress[data-payment-received='true'] #posReceiveStatus { color: #187e54; font-weight: 700; }
#posReceiveTipProgress { color: #187e54; margin-top: 3px; font-weight: 700; }
.pos-fee-note { font-size: 10px; line-height: 1.7; text-align: center; color: var(--muted); margin: 12px 0 0; }
.pos-pay-code-reveal { position: relative; display: grid; place-items: center; padding: 0; border: 0; border-radius: 12px; background: #fff; cursor: pointer; flex: 0 0 auto; }
.pos-pay-code-reveal .pay-header__matrix { display: block; image-rendering: pixelated; }
.pos-pay-code-reveal > svg { position: absolute; bottom: 3px; right: 3px; background: #fff; border-radius: 4px; box-shadow: 0 1px 4px #28283720; width: 18px; height: 18px; padding: 2px; color: var(--blue); }
/* Bound the public-code dialog to short/landscape screens; keep its close action reachable. */
.datamatrix-modal { width: min(90vw, 444px); max-height: calc(100dvh - 24px); overflow-y: auto; overscroll-behavior: contain; border-radius: 22px; }
.datamatrix-modal[open], .datamatrix-modal.is-open { display: block; }
.datamatrix-modal__card { width: 100%; padding: 22px 24px 17px; border: 1px solid #dfdfe9; border-radius: 22px; box-shadow: 0 24px 70px #18182e30; }
.pos-modal-heading { display: flex; align-items: center; gap: 11px; margin-bottom: 17px; }
.pos-modal-heading > img { width: 38px; height: 38px; object-fit: contain; }
.pos-modal-heading h2 { margin: 0; font-size: 16px; color: var(--blue); font-weight: 700; }
.pos-modal-heading p { margin: 3px 0 0; font-size: 11px; color: var(--muted); }
.datamatrix-modal__matrix { width: min(100%, 384px, calc(95dvh - 220px)); height: auto; aspect-ratio: 1; border-radius: 8px; padding: 12px; margin: auto; image-rendering: pixelated; }
.pos-modal-caption { display: flex; align-items: center; justify-content: center; gap: 10px; margin-top: 16px; color: var(--muted); font-size: 11px; }
.pos-modal-caption img { width: 28px; height: 26px; object-fit: contain; }
.datamatrix-modal__close { display: block; width: 132px; min-height: 44px; border-radius: 13px; font-size: 13px; font-weight: 700; margin: 14px auto 0; }
.datamatrix-modal__close:focus-visible { outline: 3px solid #6a75da; outline-offset: 4px; }
@media (max-width: 640px) {
  #topupScreen .screen-header { padding-block: 10px; }
  .pos-receive-wordmark { width: 83px; }
  #topupScreen .pos-receive-body { max-width: calc(100% - 32px); margin: 14px auto 12px; }
  .pos-receive-station { padding: 14px 18px 13px; border-radius: 24px; }
  .pos-scan-heading { gap: 10px; margin-bottom: 11px; }
  .pos-scan-heading h2 { font-size: 15px; }
  .pos-scan-heading > img { width: 35px; height: 32px; }
  .pos-scan-heading p { font-size: 10px; }
  .pos-receive-code { width: min(100%, 316px); padding: 13px; border-radius: 14px; }
  .pos-code-meta { font-size: 9px; margin-top: 10px; }
  .pos-amount-block { margin-top: 14px; }
  .pos-amount-block label { font-size: 10px; }
  .pos-amount-value input { font-size: 40px; width: 120px; }
  .pos-amount-value .pos-dollar { font-size: 36px; }
  .pos-amount-value .pos-currency { font-size: 15px; }
  .pos-receive-keypad { gap: 7px; }
  .pos-receive-keypad button { height: 44px; font-size: 22px; border-radius: 12px; }
  .pos-receive-clear { margin-top: 8px; }
  .pos-operator-status { font-size: 10px; }
  .pos-fee-note { font-size: 9px; margin-top: 9px; }
  .datamatrix-modal { border-radius: 19px; }
  .datamatrix-modal__card { padding: 18px 18px 14px; border-radius: 19px; }
  .pos-modal-heading h2 { font-size: 14px; }
  .pos-modal-heading > img { width: 32px; height: 32px; }
  .pos-modal-heading p, .pos-modal-caption { font-size: 10px; }
  .datamatrix-modal__close { margin-top: 13px; }
}

/* Home actions stay aligned in one row, including narrow phone screens. */
.wallet-actions.wallet-actions--primary {
  grid-template-columns: repeat(2, minmax(0, 1fr));
  width: min(100%, 480px);
  justify-self: center;
  gap: 12px;
}
.wallet-actions--primary .action-tile--home { min-width: 0; }
