/* Withdrawal-only layout. Existing registration, deposit and brand tokens stay intact. */
.withdraw-flow {
  display: grid;
  gap: 8px;
  min-width: 0;
}

.withdraw-flow .recipient-heading,
.withdraw-flow .field-label-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  min-width: 0;
}

.withdraw-flow .recipient-heading > label,
.withdraw-flow .recipient-heading > span,
.withdraw-flow .field-label-row > label {
  color: var(--brand-text);
  font: 700 11px/1.4 Arial, sans-serif;
}

.withdraw-flow .text-action,
.withdraw-flow .withdraw-max,
.withdraw-dialog .text-action {
  flex: 0 0 auto;
  min-width: 40px;
  min-height: 40px;
  padding: 0 3px;
  border: 0;
  background: transparent;
  color: var(--brand-cyan);
  font: 700 11px/1.4 Arial, sans-serif;
  cursor: pointer;
}

.withdraw-flow .recipient-card,
.withdraw-dialog .recipient-option {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  align-items: center;
  column-gap: 12px;
  row-gap: 4px;
  width: 100%;
  min-width: 0;
  min-height: 64px;
  padding: 12px;
  border: 1px solid transparent;
  border-radius: 5px;
  background: var(--brand-field);
  color: var(--brand-text);
  text-align: left;
  cursor: pointer;
}

.withdraw-flow .recipient-card:hover,
.withdraw-dialog .recipient-option:hover {
  border-color: var(--brand-muted);
}

.withdraw-flow .recipient-card > :not(.recipient-hint),
.withdraw-dialog .recipient-option > :not(.recipient-hint) {
  min-width: 0;
  grid-column: 1;
}

.withdraw-flow .recipient-name,
.withdraw-dialog .recipient-name {
  display: block;
  color: var(--brand-text);
  font-size: 16px;
  font-weight: 600;
  line-height: 1.2;
  overflow-wrap: anywhere;
}

.withdraw-flow .recipient-detail,
.withdraw-dialog .recipient-detail {
  display: block;
  margin-top: 3px;
  color: var(--brand-muted);
  font: 400 11px/1.4 Arial, sans-serif;
  overflow-wrap: anywhere;
}

.withdraw-flow .recipient-hint,
.withdraw-dialog .recipient-hint {
  grid-column: 2;
  grid-row: 1 / span 2;
  align-self: center;
  color: var(--brand-cyan);
  font: 700 11px/1.4 Arial, sans-serif;
  white-space: nowrap;
}

.withdraw-flow .withdraw-amount-block {
  display: grid;
  gap: 0;
  min-width: 0;
}

.withdraw-flow .withdraw-amount-surface {
  overflow: hidden;
  min-width: 0;
  border-radius: 5px;
  background: var(--brand-field);
}

.withdraw-flow .withdraw-amount-surface .input-shell {
  min-height: 80px;
  gap: 12px;
  padding: 0 14px;
  border: 0;
  border-radius: 5px 5px 0 0;
  box-shadow: none;
  background: transparent;
}

.withdraw-flow .withdraw-amount-surface .input-shell:focus-within {
  box-shadow: inset 0 0 0 1px var(--brand-cyan);
}

.withdraw-flow .withdraw-amount-surface .currency-prefix {
  flex: 0 0 auto;
  color: var(--brand-cyan);
  font: 700 12px/1.4 Arial, sans-serif;
}

.withdraw-flow #legalWithdrawAmount,
.withdraw-flow #cryptoWithdrawAmount {
  height: 80px;
  min-width: 0;
  padding: 0;
  font-family: "Geogrotesque", "Arial Narrow", Arial, sans-serif;
  font-size: 32px;
  font-weight: 600;
  line-height: normal;
  font-variant-numeric: tabular-nums;
}

.withdraw-flow .withdraw-quote-band {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 12px;
  padding: 11px 14px;
  background: var(--brand-panel-dark);
}

.withdraw-flow .withdraw-estimate {
  display: grid;
  align-content: start;
  gap: 4px;
  min-width: 0;
}

.withdraw-flow .withdraw-estimate > span,
.withdraw-flow .withdraw-meta-item > label,
.withdraw-flow .withdraw-meta-item > span {
  color: var(--brand-muted);
  font: 400 10px/1.4 Arial, sans-serif;
}

.withdraw-flow .withdraw-estimate > strong {
  color: var(--brand-text);
  font-size: 16px;
  line-height: 1.25;
  font-variant-numeric: tabular-nums;
  overflow-wrap: anywhere;
}

.withdraw-flow .withdraw-estimate:last-child > strong {
  color: #d9bd80;
}

.withdraw-flow .withdraw-meta-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 9px 12px;
  padding: 10px 14px;
  border-bottom: 1px solid var(--brand-line);
}

.withdraw-flow .withdraw-meta-item {
  display: grid;
  align-content: start;
  gap: 3px;
  min-width: 0;
}

.withdraw-flow .withdraw-meta-item > strong {
  color: var(--brand-text);
  font-size: 12px;
  line-height: 1.3;
  font-variant-numeric: tabular-nums;
  overflow-wrap: anywhere;
}

.withdraw-flow .withdraw-turnover {
  display: flex;
  flex-wrap: wrap;
  align-items: baseline;
  justify-content: space-between;
  gap: 4px 12px;
  min-width: 0;
  color: var(--brand-muted);
  font: 400 10px/1.4 Arial, sans-serif;
}

.withdraw-flow .withdraw-turnover strong {
  color: var(--brand-text);
  font-size: 11px;
  font-weight: 600;
  overflow-wrap: anywhere;
}

.withdraw-flow .withdraw-hint,
.withdraw-flow .withdraw-demo-note,
.withdraw-dialog .withdraw-hint,
.withdraw-dialog .withdraw-demo-note {
  margin: 0;
  color: var(--brand-muted);
  font: 400 10px/1.45 Arial, sans-serif;
  overflow-wrap: anywhere;
}

.withdraw-flow .withdraw-hint {
  color: #d9bd80;
}

.withdraw-flow > .primary-cta {
  margin-top: 2px;
  min-height: 48px;
}

.withdraw-flow .primary-cta:disabled,
.withdraw-dialog button:disabled,
.withdraw-dialog button[aria-disabled="true"] {
  opacity: 0.55;
  cursor: not-allowed;
}

dialog.withdraw-dialog {
  box-sizing: border-box;
  width: calc(100% - 32px);
  max-width: 358px;
  max-height: calc(100vh - 32px);
  max-height: calc(100dvh - 32px);
  margin: auto;
  padding: 0;
  overflow-x: hidden;
  overflow-y: auto;
  overscroll-behavior: contain;
  border: 1px solid var(--brand-line);
  border-radius: 8px;
  background: var(--brand-screen);
  color: var(--brand-text);
  box-shadow: 0 16px 48px var(--brand-shadow);
  font-family: "Geogrotesque", "Arial Narrow", Arial, sans-serif;
}

dialog.withdraw-dialog::backdrop {
  background: rgba(2, 5, 25, 0.78);
}

.withdraw-dialog .withdraw-dialog-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  min-height: 56px;
  padding: 8px 16px;
  border-bottom: 1px solid var(--brand-line);
}

.withdraw-dialog-header h2,
.withdraw-dialog-header h3 {
  margin: 0;
  color: var(--brand-text);
  font-size: 19px;
  font-weight: 600;
  line-height: 1.25;
}

.withdraw-dialog .withdraw-dialog-header > button {
  flex: 0 0 auto;
  min-width: 40px;
  min-height: 40px;
  padding: 0 2px;
  border: 0;
  background: transparent;
  color: var(--brand-cyan);
  font: 700 11px/1.4 Arial, sans-serif;
  cursor: pointer;
}

.withdraw-dialog .withdraw-dialog-body {
  display: grid;
  gap: 14px;
  min-width: 0;
  padding: 16px;
}

.withdraw-dialog .withdraw-dialog-form {
  display: grid;
  gap: 12px;
  min-width: 0;
  margin: 0;
}

.withdraw-dialog .field-block {
  display: grid;
  gap: 6px;
  min-width: 0;
  color: var(--brand-text);
  font: 700 11px/1.4 Arial, sans-serif;
}

.withdraw-dialog .field-block > input,
.withdraw-dialog .field-block > select,
.withdraw-dialog .field-block > textarea {
  box-sizing: border-box;
  width: 100%;
  min-width: 0;
  min-height: 46px;
  padding: 11px 12px;
  border: 1px solid transparent;
  border-radius: 5px;
  background: var(--brand-field);
  color: var(--brand-text);
  font: 600 14px/1.4 Arial, sans-serif;
}

.withdraw-dialog .field-block > textarea {
  min-height: 76px;
  resize: vertical;
}

.withdraw-dialog input::placeholder,
.withdraw-dialog textarea::placeholder {
  color: var(--brand-muted);
  font-weight: 400;
}

.withdraw-dialog select option {
  background: var(--brand-field);
  color: var(--brand-text);
}

.withdraw-dialog .withdraw-dialog-actions {
  display: flex;
  align-items: stretch;
  gap: 10px;
  min-width: 0;
  margin-top: 2px;
}

.withdraw-dialog-actions > button {
  flex: 1 1 0;
  min-width: 0;
  min-height: 46px;
  padding: 10px 12px;
  font-size: 14px;
  line-height: 1.3;
}

.withdraw-dialog .secondary-action {
  min-height: 46px;
  padding: 10px 12px;
  border: 1px solid var(--brand-line);
  border-radius: 5px;
  background: var(--brand-field);
  color: var(--brand-text);
  cursor: pointer;
}

.withdraw-flow .withdraw-hint.is-error { color: #ffadb5; }

.withdraw-dialog .recipient-list {
  display: grid;
  gap: 8px;
  min-width: 0;
}

.withdraw-dialog .recipient-option[aria-pressed="true"] {
  border-color: var(--brand-cyan);
  background: #252d4e;
}

.withdraw-dialog .withdraw-confirm-list {
  display: grid;
  grid-template-columns: minmax(72px, 0.8fr) minmax(0, 1.6fr);
  align-items: baseline;
  gap: 12px;
  min-width: 0;
  margin: 0;
  padding: 0;
}

.withdraw-confirm-list dt {
  margin: 0;
  color: var(--brand-muted);
  font: 400 11px/1.45 Arial, sans-serif;
}

.withdraw-confirm-list dd {
  min-width: 0;
  margin: 0;
  color: var(--brand-text);
  font-size: 14px;
  line-height: 1.4;
  text-align: right;
  font-variant-numeric: tabular-nums;
  overflow-wrap: anywhere;
}

.recipient-confirm-line { display: block; }
.recipient-confirm-line + .recipient-confirm-line { margin-top: 3px; }

.withdraw-dialog .withdraw-success {
  display: grid;
  gap: 10px;
  padding: 8px 0;
  text-align: center;
}

.withdraw-success h2,
.withdraw-success h3,
.withdraw-success strong {
  margin: 0;
  color: var(--brand-cyan);
  font-size: 20px;
  line-height: 1.25;
}

.withdraw-success p {
  margin: 0;
  color: var(--brand-muted);
  font: 400 12px/1.5 Arial, sans-serif;
}

.withdraw-flow :is(button, input):focus-visible,
.withdraw-dialog :is(button, input, select, textarea):focus-visible {
  outline: 2px solid var(--brand-cyan);
  outline-offset: 2px;
}

@media (max-width: 374px) {
  .withdraw-flow .withdraw-quote-band {
    gap: 8px;
    padding-right: 12px;
    padding-left: 12px;
  }

  .withdraw-flow .withdraw-estimate > strong {
    font-size: 15px;
  }
}
