/* Withdrawal interface. State changes remain local until real token management is connected. */
dialog.payment-dialog.mb-withdraw-dialog {
  box-sizing: border-box;
  width: min(440px, calc(100vw - 32px));
  max-width: none;
  max-height: calc(100dvh - 32px);
  margin: auto;
  padding: 28px;
  overflow-x: hidden;
  overflow-y: auto;
  color: #f3f2ef;
  background: radial-gradient(ellipse at 0 0, #e280a810, transparent 60%), #101012;
  border: 1px solid #48434a;
  border-top-color: #b97795;
  border-radius: 16px;
  box-shadow: 0 24px 80px #0009, 0 0 0 1px #ffffff04 inset;
  font-family: var(--sm-app-mono, monospace);
}
.mb-withdraw-dialog[open] { animation: mb-withdraw-enter .24s cubic-bezier(.2,.8,.2,1) both; }
.mb-withdraw-dialog *, .mb-withdraw-dialog *::before, .mb-withdraw-dialog *::after { box-sizing: border-box; }
.mb-withdraw-dialog .payment-close {
  position: absolute;
  top: 13px;
  right: 13px;
  display: grid;
  place-items: center;
  width: 32px;
  height: 32px;
  padding: 0;
  border: 1px solid transparent;
  border-radius: 8px;
  background: transparent;
  font: 24px/1 sans-serif;
  transition: color .16s ease, background .16s ease, border-color .16s ease;
}
.mb-withdraw-dialog .payment-close:hover { color: #fff; background: #ffffff08; border-color: #ffffff18; }
.mb-withdraw-kicker { display: flex; flex-wrap: wrap; gap: 10px; align-items: center; margin: 0 22px 24px 0; font-size: 9px; line-height: 1.4; letter-spacing: .1em; color: #95939c; }
.mb-withdraw-simulation { border: 1px solid #b977954b; border-radius: 20px; padding: 3px 7px; color: #e0a7c0; letter-spacing: .015em; font-size: 10px; }
.mb-withdraw-dialog .mb-withdraw-heading { margin-bottom: 24px; }
.mb-withdraw-dialog .mb-withdraw-heading h2 { margin: 0; padding: 0; font: 550 clamp(21px, 5vw, 26px)/1.25 var(--sm-app-mono, monospace); letter-spacing: -.045em; }
.mb-withdraw-dialog .mb-withdraw-heading p { margin: 10px 0 0; color: #aaa6b0; font-size: 11px; line-height: 1.7; }
.mb-withdraw-dialog .mb-withdraw-form, .mb-withdraw-dialog .mb-withdraw-result { display: grid; gap: 22px; margin: 0; text-align: left; }
.mb-withdraw-amount-card { min-width: 0; padding: 18px; border: 1px solid #ffffff12; border-radius: 10px; background: linear-gradient(135deg, #ffffff05, transparent); }
.mb-withdraw-label { display: block; color: #a49faa; font-size: 10px; line-height: 1.5; letter-spacing: .015em; }
.mb-withdraw-dialog .mb-withdraw-amount { display: flex; flex-wrap: wrap; align-items: baseline; gap: 8px; margin: 10px 0 15px; min-width: 0; line-height: 1.2; }
.mb-withdraw-amount strong { min-width: 0; max-width: 100%; overflow-wrap: anywhere; color: #f3f2ef; font-size: clamp(26px, 8vw, 36px); font-weight: 500; letter-spacing: -.055em; font-variant-numeric: tabular-nums; }
.mb-withdraw-amount > span { color: #b4aebb; font-size: 14px; letter-spacing: -.015em; }
.mb-withdraw-network { display: flex; justify-content: space-between; gap: 10px; padding-top: 12px; border-top: 1px solid #ffffff0d; color: #8f8997; font-size: 10px; }
.mb-withdraw-network b { display: flex; gap: 6px; align-items: center; color: #d4ceda; font-weight: 400; }
.mb-withdraw-network b::before { content: ''; width: 4px; height: 4px; border-radius: 50%; background: #ce87a7; }
.mb-withdraw-dialog .mb-withdraw-field label { display: block; margin-bottom: 9px; color: #ddd8e1; font-size: 11px; }
.mb-withdraw-dialog .mb-withdraw-field input { width: 100%; min-width: 0; height: 46px; margin: 0; padding: 12px; border: 1px solid #3b3641; border-radius: 8px; background: #0d0c0f; color: #eeeaf1; font: 12px/1.5 var(--sm-app-mono, monospace); }
.mb-withdraw-dialog .mb-withdraw-field input::placeholder { color: #79727f; opacity: 1; font-size: 11px; }
.mb-withdraw-dialog .mb-withdraw-field input:focus { outline: 2px solid #e6a0c042; outline-offset: 2px; border-color: #c583a2; box-shadow: none; }
.mb-withdraw-dialog .mb-withdraw-field input[aria-invalid="true"] { border-color: #db9cae; }
.mb-withdraw-dialog .mb-withdraw-input-note, .mb-withdraw-dialog .mb-withdraw-error { margin: 8px 0 0; font-size: 10px; line-height: 1.6; }
.mb-withdraw-input-note { color: #8c8593; }
.mb-withdraw-error { color: #efb1c2; }
.mb-withdraw-dialog .payment-primary { width: 100%; min-height: 46px; margin: 0; padding: 12px 16px; border-radius: 8px; font: 600 12px/1.4 var(--sm-app-mono, monospace); letter-spacing: .02em; }
.mb-withdraw-dialog .mb-withdraw-submit { display: flex; align-items: center; justify-content: space-between; }
.mb-withdraw-dialog .mb-withdraw-submit:disabled { opacity: .4; }
.mb-withdraw-destination { min-width: 0; }
.mb-withdraw-destination code { display: block; margin-top: 8px; color: #c3bccb; font: 11px/1.75 var(--sm-app-mono, monospace); overflow-wrap: anywhere; }
.mb-withdraw-dialog[data-withdrawal-state="processing"] .mb-withdraw-heading,
.mb-withdraw-dialog[data-withdrawal-state="success"] .mb-withdraw-heading { text-align: center; }
.mb-withdraw-spinner { width: 48px; height: 48px; margin: 6px auto 23px; border: 1px solid #ffffff15; border-top: 2px solid #e6a0c0; border-radius: 50%; animation: mb-withdraw-spin 1s linear infinite; }
.mb-withdraw-progress { height: 3px; overflow: hidden; border-radius: 3px; background: #ffffff0a; }
.mb-withdraw-progress span { display: block; height: 100%; width: 100%; background: #d58aad; transform-origin: left; animation: mb-withdraw-progress 5s linear both; }
.mb-withdraw-success-mark { display: grid; place-items: center; width: 58px; height: 58px; margin: 4px auto 22px; color: #85dfb0; border: 1px solid #85dfb03a; border-radius: 50%; background: #85dfb00a; box-shadow: 0 0 30px #85dfb008; animation: mb-withdraw-success .32s ease-out both; }
.mb-withdraw-success-mark svg { width: 32px; height: 32px; }
.mb-withdraw-success-mark path { stroke-dasharray: 28; stroke-dashoffset: 0; animation: mb-withdraw-check .36s .1s ease-out both; }
.mb-withdraw-dialog :focus-visible { outline: 2px solid #e6a0c0; outline-offset: 3px; }
@keyframes mb-withdraw-enter { from { opacity: 0; transform: translateY(8px) scale(.985); } to { opacity: 1; transform: none; } }
@keyframes mb-withdraw-spin { to { transform: rotate(360deg); } }
@keyframes mb-withdraw-progress { from { transform: scaleX(0); } to { transform: scaleX(1); } }
@keyframes mb-withdraw-success { from { opacity: 0; transform: scale(.8); } to { opacity: 1; transform: scale(1); } }
@keyframes mb-withdraw-check { from { stroke-dashoffset: 28; } to { stroke-dashoffset: 0; } }
@media (max-width: 640px) {
  .mb-withdraw-dialog .mb-withdraw-field input { font-size: 16px; }
}
@media (max-width: 380px) {
  dialog.payment-dialog.mb-withdraw-dialog { padding: 22px 18px; }
  .mb-withdraw-kicker { gap: 7px; font-size: 8px; }
  .mb-withdraw-amount-card { padding: 15px; }
}
@media (prefers-reduced-motion: reduce) {
  .mb-withdraw-dialog[open], .mb-withdraw-dialog .mb-withdraw-spinner,
  .mb-withdraw-dialog .mb-withdraw-progress span, .mb-withdraw-dialog .mb-withdraw-success-mark,
  .mb-withdraw-dialog .mb-withdraw-success-mark path { animation: none !important; }
  .mb-withdraw-dialog *, .mb-withdraw-dialog *::before, .mb-withdraw-dialog *::after { transition: none !important; }
  .mb-withdraw-dialog .mb-withdraw-progress span { transform: scaleX(1); opacity: .5; }
}

/* A terminal scenario cannot complete a withdrawal from a zero demo balance. */
.mb-withdraw-liquidated-mark{display:grid;place-items:center;width:60px;height:60px;margin:0 auto 18px;border:1px solid #fa89b14d;border-radius:50%;background:#fa89b10a;color:#ff9fc1;font-size:30px;line-height:1}
.mb-withdraw-dialog[data-withdrawal-state="liquidated"] .mb-withdraw-amount strong{color:#a6a6ad}
