/* Top up: amount picker (Deposit page + popup). Desktop: centered popup. Phones: bottom sheet that slides up. */

/* ── Amount picker ── */
.pm-topup-balance {
    display: flex; align-items: center; justify-content: space-between; padding: 12px 14px; margin-bottom: 18px;
    border-radius: 12px; background: var(--px-surface-2); font-size: 14px; color: var(--px-muted);
}
.pm-topup-balance strong { color: var(--px-text); font-size: 16px; font-variant-numeric: tabular-nums; }
.pm-topup-label { display: block; font-size: 13px; font-weight: 600; color: var(--px-text-2); margin: 0 0 8px; }
.pm-topup-amounts { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 8px; margin-bottom: 18px; }
.pm-topup-amount {
    display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 2px; height: 64px;
    border-radius: 12px; background: var(--px-surface-2); border: 1px solid var(--px-border-strong); color: var(--px-text);
    transition: border-color .12s, background .12s, transform .12s;
}
.pm-topup-amount strong { font-size: 18px; font-weight: 700; font-variant-numeric: tabular-nums; }
.pm-topup-amount span { font-size: 11.5px; color: var(--px-muted); font-weight: 500; }
.pm-topup-amount:hover, .pm-topup-amount:focus-visible { border-color: var(--px-brand); background: rgba(46, 92, 255, .1); color: var(--px-text); }
.pm-topup-amount:active { transform: scale(.97); }
.pm-topup-input {
    display: flex; align-items: center; gap: 8px; height: 54px; padding: 0 6px 0 14px; border-radius: 12px;
    background: var(--px-surface-2); border: 1px solid var(--px-border-strong); transition: border-color .12s, box-shadow .12s;
}
.pm-topup-input:focus-within { border-color: var(--px-brand); box-shadow: 0 0 0 3px rgba(46, 92, 255, .22); }
.pm-topup-input.invalid { border-color: var(--px-no); }
.pm-topup-input > span { font-size: 20px; font-weight: 600; color: var(--px-muted); }
.pm-topup-input input {
    flex: 1; min-width: 0; border: 0; outline: 0; background: transparent; color: var(--px-text);
    font-size: 20px; font-weight: 700; font-variant-numeric: tabular-nums;
}
.pm-topup-input input::placeholder { color: var(--px-faint); }
.pm-topup-input .btn { height: 42px; padding: 0 18px; flex: none; }
.pm-topup-help { margin-top: 8px; font-size: 13px; color: var(--px-muted); }
.pm-topup-help strong { color: var(--px-yes); }
.pm-topup-input.invalid + .pm-topup-help { color: var(--px-no); }
.pm-topup-error { margin-bottom: 8px; padding: 8px 12px; border-radius: 10px; background: var(--px-no-soft); color: var(--px-no); font-size: 13px; }
.pm-topup-coins {
    display: flex; align-items: center; gap: 10px; margin-top: 18px; padding-top: 14px; border-top: 1px solid var(--px-border);
    font-size: 12.5px; color: var(--px-muted); line-height: 1.4;
}
.pm-topup-coins-logos { display: flex; flex: none; }
.pm-topup-coins-logos > * { margin-left: -5px; box-shadow: 0 0 0 2px var(--px-surface); border-radius: 50%; }
.pm-topup-coins-logos > :first-child { margin-left: 0; }
.pm-topup-closed { text-align: center; padding: 20px 8px; color: var(--px-muted); }
.pm-topup-closed i { font-size: 30px; display: block; margin-bottom: 8px; }

/* ── Popup ── */
.pm-topup-modal .modal-dialog { max-width: 440px; }
.pm-topup-modal .modal-content {
    background: var(--px-surface); color: var(--px-text); border: 1px solid var(--px-border-strong); border-radius: 20px;
    box-shadow: 0 24px 64px rgba(0, 0, 0, .55);
}
.pm-topup-modal .modal-header { border: 0; padding: 18px 20px 6px; }
.pm-topup-modal .modal-title { display: flex; align-items: center; gap: 10px; font-size: 19px; font-weight: 700; }
.pm-topup-icon { display: grid; place-items: center; width: 34px; height: 34px; border-radius: 10px; background: rgba(46, 92, 255, .16); color: #6B8CFF; font-size: 17px; }
.pm-topup-modal .modal-body { padding: 10px 20px 4px; }
.pm-topup-modal .modal-footer { border: 0; padding: 4px 20px 16px; justify-content: center; }
.pm-topup-modal .modal-footer a { font-size: 13px; font-weight: 600; color: var(--px-muted); }
.pm-topup-modal .modal-footer a:hover { color: var(--px-text); }
.pm-sheet-grip { display: none; }
.modal-backdrop.show { opacity: .65; }

/* ── Phones: bottom sheet sliding up ── */
@media (max-width: 767.98px) {
    .pm-topup-modal .modal-dialog {
        position: fixed; left: 0; right: 0; bottom: 0; margin: 0; max-width: none; width: 100%;
        min-height: 0; align-items: flex-end;
    }
    .pm-topup-modal.fade .modal-dialog { transform: translateY(100%); transition: transform .3s cubic-bezier(.2, .8, .2, 1); }
    .pm-topup-modal.show .modal-dialog { transform: none; }
    .pm-topup-modal .modal-content {
        border-radius: 22px 22px 0 0; border-bottom: 0; max-height: 92vh; overflow-y: auto;
        padding-bottom: env(safe-area-inset-bottom);
    }
    .pm-sheet-grip { display: block; width: 40px; height: 4px; border-radius: 4px; background: var(--px-border-strong); margin: 10px auto 0; }
    .pm-topup-modal .modal-header { padding-top: 8px; }
    .pm-topup-amount { height: 60px; }
}
@media (prefers-reduced-motion: reduce) { .pm-topup-modal.fade .modal-dialog { transition: none; } }

/* Deposit page */
.px-deposit .pm-topup-coins { margin-bottom: -4px; }
