/* Wallet page: money first, bonus coins apart, history readable on desktops and phones. */
.wallet-page { display: grid; gap: 18px; color: #22332d; }
.wallet-page .ms-head { margin-bottom: 0; }
.wallet-title { margin: 0; font-size: 28px; font-weight: 800; color: #153e35; letter-spacing: -.01em; }
.wallet-notice { margin: 0; padding: 12px 14px; border: 1px solid #ecd9a8; border-radius: 12px; background: #fff8e6; color: #6b5214; font-size: 14px; }

.wallet-balances { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 12px; }
.wallet-tile { padding: 14px 16px; border: 1px solid #e5e7e3; border-radius: 16px; background: white; }
.wallet-tile-label { margin: 0; font-size: 12.5px; font-weight: 600; color: #64706c; }
.wallet-tile-amount { margin: 2px 0 0; font-size: 25px; line-height: 1.2; font-weight: 800; font-variant-numeric: tabular-nums; color: #145447; overflow-wrap: anywhere; }
.wallet-expiry { display: block; margin-top: 2px; font-size: 12px; color: #64706c; }
.wallet-expiry[hidden] { display: none; }
.wallet-bonus-rule { margin: 0; font-size: 12.5px; line-height: 1.5; color: #55605c; }

.wallet-section { display: grid; gap: 10px; }
.wallet-section h2 { margin: 0; font-size: 19px; font-weight: 750; color: #153e35; }
.wallet-secondary h2 { font-size: 16px; color: #3d5a50; }
.wallet-new { justify-self: start; padding: 8px 14px; border: 1px solid #b8daca; border-radius: 999px; background: #e4f3e9; color: #146244; font-size: 13px; font-weight: 700; cursor: pointer; }
.wallet-new:hover { background: #d6ecdf; }
.wallet-new[hidden] { display: none; }
.wallet-empty { margin: 0; color: #66766f; font-size: 14px; }

.wallet-history { width: 100%; border-collapse: separate; border-spacing: 0; background: white; border: 1px solid #e3e9e2; border-radius: 14px; overflow: hidden; font-size: 14px; }
.wallet-history th { padding: 10px 14px; text-align: left; font-size: 12px; font-weight: 650; color: #66766f; background: #f6f8f4; border-bottom: 1px solid #e3e9e2; }
.wallet-history td { padding: 12px 14px; border-bottom: 1px solid #eef2ec; vertical-align: top; }
.wallet-history tr:last-child td { border-bottom: 0; }
.wallet-history-date { white-space: nowrap; color: #66766f; font-variant-numeric: tabular-nums; }
.wallet-history-label small { display: block; margin-top: 2px; font-size: 12px; color: #7a8a82; }
.wallet-history .wallet-history-amount { text-align: right; white-space: nowrap; }
.wallet-move { display: block; font-weight: 700; font-variant-numeric: tabular-nums; color: #146244; }
.wallet-move.is-out { color: #8a3f33; }
.wallet-move-bonus { color: #7a5a08; }
.wallet-move-bonus.is-out { color: #8a6a3a; }
.wallet-pages { display: flex; align-items: center; justify-content: center; gap: 16px; font-size: 14px; color: #66766f; }
.wallet-pages a { color: #153e35; font-weight: 650; }

.wallet-list { margin: 0; padding: 0; list-style: none; background: white; border: 1px solid #e3e9e2; border-radius: 14px; overflow: hidden; }
.wallet-list li + li { border-top: 1px solid #eef2ec; }
.wallet-list li, .wallet-list li > a { display: flex; align-items: center; justify-content: space-between; gap: 12px; font-size: 14px; }
.wallet-list li { padding: 11px 14px; }
.wallet-list li > a { width: 100%; color: inherit; text-decoration: none; }
.wallet-list li > a:hover .wallet-list-main { text-decoration: underline; }
.wallet-list-main { display: flex; flex-direction: column; font-weight: 650; color: #22332d; }
.wallet-list-main small { font-weight: 400; font-size: 12px; color: #7a8a82; }
.wallet-list-side { display: flex; align-items: center; gap: 10px; font-variant-numeric: tabular-nums; white-space: nowrap; }
.wallet-state { font-style: normal; font-size: 12px; font-weight: 650; padding: 3px 8px; border-radius: 999px; background: #eef2ec; color: #4b5d55; }
.wallet-state-approved, .wallet-state-active { background: #e4f3e9; color: #146244; }
.wallet-state-rejected, .wallet-state-cancelled, .wallet-state-expired { background: #f6e7e4; color: #8a3f33; }
.wallet-state-submitted, .wallet-state-in_review, .wallet-state-needs_info, .wallet-state-pending_activation { background: #fff3d6; color: #6b5214; }

@media (max-width: 640px) {
  .wallet-title { font-size: 24px; }
  .wallet-balances { grid-template-columns: minmax(0, 1fr); }
  /* History as a list: the date and the label above, the amount on the right. */
  .wallet-history thead { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); }
  .wallet-history, .wallet-history tbody { display: block; }
  .wallet-history tr { display: grid; grid-template-columns: 1fr auto; column-gap: 12px; padding: 11px 14px; border-bottom: 1px solid #eef2ec; }
  .wallet-history tr:last-child { border-bottom: 0; }
  .wallet-history td { display: block; padding: 0; border: 0; }
  .wallet-history-date { grid-column: 1; grid-row: 2; font-size: 12px; }
  .wallet-history-label { grid-column: 1; grid-row: 1; font-weight: 600; }
  .wallet-history .wallet-history-amount { grid-column: 2; grid-row: 1 / span 2; align-self: center; }
  .wallet-list-side { flex-direction: column; align-items: flex-end; gap: 4px; }
}

/* Top-up pages inside the cabinet: the bank details and the request side by side, one column on phones. */
.topup-page { display: grid; gap: 18px; color: #22332d; }
.topup-page .ms-head { margin-bottom: 0; }
.topup-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 16px; align-items: start; }
.ms-card.topup-card { padding: 20px 22px; gap: 14px; }
.ms-card.topup-card::before { display: none; }
.topup-card h2 { margin: 0; font-size: 19px; font-weight: 750; color: #153e35; letter-spacing: -.01em; }
.topup-subtitle { margin: 4px 0 0; font-size: 15px; font-weight: 750; color: #153e35; }
.topup-details { display: grid; gap: 10px; margin: 0; }
.topup-details div { display: grid; gap: 1px; min-width: 0; }
.topup-details dt { font-size: 12.5px; font-weight: 600; color: var(--ms-muted); }
.topup-details dd { margin: 0; font-size: 15px; font-weight: 650; overflow-wrap: anywhere; }
.topup-iban, .topup-code { font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace; font-variant-numeric: tabular-nums; letter-spacing: .02em; }
.topup-iban { font-size: 16px; color: #153e35; }
.topup-copy, .topup-back { align-self: flex-start; }
.topup-steps { display: grid; gap: 6px; margin: 0; padding-left: 20px; font-size: 14px; line-height: 1.5; }
.topup-hint { margin: 0; font-size: 12.5px; line-height: 1.5; color: var(--ms-muted); }
.topup-page form.topup-form { display: grid; gap: 16px; }
.topup-field { display: grid; gap: 6px; min-width: 0; }
.topup-field label { font-size: 14px; font-weight: 650; color: #22332d; }
.topup-field input, .topup-field textarea { box-sizing: border-box; width: 100%; padding: 10px 12px; border: 1px solid #d6dcd8; border-radius: 10px; background: #fff; color: #22332d; font: inherit; font-size: 15px; }
.topup-field input[type="file"] { padding: 8px 10px; font-size: 14px; }
.topup-field textarea { resize: vertical; min-height: 76px; }
.topup-field input:focus-visible, .topup-field textarea:focus-visible { outline: 2px solid #153e35; outline-offset: 1px; border-color: #153e35; }
.topup-submit { justify-self: start; }
.topup-detail { max-width: 640px; }
.topup-summary { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 14px 20px; }
.topup-wide { grid-column: 1 / -1; }
.topup-details .topup-notes { font-weight: 500; white-space: pre-wrap; }
.topup-page .ms-note p { margin: 0; }
.topup-page .ms-note.is-ok { background: var(--ms-ok-bg); color: var(--ms-ok); border: 1px solid #cde3cf; }
/* Method switch: radios of the request form, labels styled like the cabinet menu. */
.topup-method-input { position: absolute; width: 1px; height: 1px; opacity: 0; pointer-events: none; }
.topup-switch { display: inline-flex; align-self: flex-start; gap: 4px; max-width: 100%; padding: 4px; border: 1px solid #e3e9e2; border-radius: 12px; background: #eef2ef; }
.topup-switch label { padding: 8px 14px; border-radius: 9px; font-size: 13.5px; font-weight: 650; line-height: 1.2; color: #3c4a46; text-align: center; white-space: nowrap; cursor: pointer; }
.topup-switch label:hover { background: #e4ebe6; }
#topup-method-iban:checked ~ .topup-switch label[for="topup-method-iban"],
#topup-method-express:checked ~ .topup-switch label[for="topup-method-express"] { background: #153e35; color: #fff; }
#topup-method-iban:focus-visible ~ .topup-switch label[for="topup-method-iban"],
#topup-method-express:focus-visible ~ .topup-switch label[for="topup-method-express"] { outline: 2px solid #153e35; outline-offset: 2px; }
.topup-panel { display: none; }
#topup-method-iban:checked ~ .topup-panel-iban,
#topup-method-express:checked ~ .topup-panel-express { display: flex; flex-direction: column; gap: 14px; }
.topup-files ul { display: grid; gap: 4px; margin: 6px 0 0; padding-left: 18px; font-size: 14px; }

@media (max-width: 1100px) {
  .topup-grid { grid-template-columns: minmax(0, 1fr); }
}
@media (max-width: 640px) {
  .ms-card.topup-card { padding: 16px; }
  .topup-copy { align-self: stretch; }
  .topup-switch { display: flex; align-self: stretch; }
  .topup-switch label { flex: 1; padding: 8px 6px; }
  .topup-submit { justify-self: stretch; }
  .topup-summary { grid-template-columns: minmax(0, 1fr); gap: 10px; }
}
.topup-old-form .topup-manual { margin-top: 8px; }
