/* ==========================================================================
   transaction.css — deposit / withdraw modals (views/modals/deposit.ejs, withdraw.ejs)
   ========================================================================== */

/* === shared === */
.tx-body, .wd-body { color: #fff; }
.tx-body [hidden], .wd-body [hidden], #sendSlipModal [hidden], #sendSlipAutopeerModal [hidden] { display: none !important; }
.tx-label { font-size: 16px; }
.tx-muted { color: #9a9a9a; }
.tx-title-row { margin: 26px 0 14px; }
.tx-title { color: #fff; font-size: 18px; font-weight: 600; margin: 0; }
.button-history.n-button { --n-height: 34px; --n-padding: 0 12px; --n-font-size: 15px; }
.button-history svg { width: 16px; height: 16px; }
.tx-scroll { max-height: min(480px, 62vh); overflow-y: auto; padding: 4px 4px 6px 0; scrollbar-width: thin; scrollbar-color: var(--accent-1, #e9b033) #222; }
.tx-note { font-size: 13px; color: #ff4d4d; text-align: center; margin-top: 8px; }
.tx-footnote { text-align: center; font-size: 13px; color: #bbb; margin-top: 16px; }
.tx-footnote a { color: var(--accent-1, #e9b033); text-decoration: underline; cursor: pointer; }
.tx-loading { text-align: center; padding: 30px 0; color: #bbb; }
.tx-loading .spin { width: 34px; height: 34px; border-radius: 50%; border: 4px solid rgba(255,255,255,.2); border-top-color: var(--accent-1, #e9b033); margin: 0 auto 10px; animation: tx-spin .8s linear infinite; }
@keyframes tx-spin { to { transform: rotate(360deg); } }
@keyframes tx-blink { 0%, 100% { opacity: 1; } 50% { opacity: .45; } }

/* === custom select (.tx-select) — promotion toggle / withdraw bank / withdraw type === */
.tx-select { position: relative; }
.tx-select .tx-select-label { display: flex; align-items: center; gap: 10px; min-height: 44px; background: #000; border: 1px solid #fff; border-radius: 12px; padding: 4px 12px; cursor: pointer; color: #fff; font-size: 16px; }
.tx-select.open .tx-select-label { border-color: var(--accent-1, #e9b033); }
.tx-select .ico { width: 30px; height: 30px; border-radius: 50%; object-fit: cover; flex-shrink: 0; }
.tx-select .txt { flex: 1; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.tx-select .sub { color: #ddd; font-size: 15px; font-weight: 600; white-space: nowrap; }
.tx-select .arrow { color: #c2c2c2; display: flex; margin-left: 4px; transition: transform .2s; }
.tx-select.open .arrow { transform: rotate(180deg); }
.tx-select-menu { position: absolute; left: 0; right: 0; top: calc(100% + 4px); background: #111; border: 1px solid #444; border-radius: 10px; z-index: 30; overflow: hidden; box-shadow: 0 8px 20px rgba(0,0,0,.55); max-height: 240px; overflow-y: auto; }
.tx-select-item { display: flex; align-items: center; gap: 10px; padding: 10px 12px; cursor: pointer; font-size: 15px; color: #fff; }
.tx-select-item + .tx-select-item { border-top: 1px solid rgba(255,255,255,.08); }
.tx-select-item:hover { background: rgba(233,176,51,.18); }
.tx-select-item.active { background: var(--accent-1, #e9b033); color: #000; }
.tx-select-item.active .sub { color: #333; }

/* === step 1: big method chooser === */
.tx-chooser { display: flex; flex-wrap: wrap; justify-content: center; gap: 30px 15px; padding: 1.75rem 0 1.25rem; }
.tx-chooser:empty { display: none; }
.tx-chooser .tx-choice { width: calc(50% - 8px); background: linear-gradient(to right, #8e8f95 0%, #fff 14%, #8e8f95 50%, #fff 85%, #8e8f95 100%); border-radius: 8px; padding: 1px; box-shadow: 0 4px 4px rgba(0,0,0,.25); cursor: pointer; }
.tx-chooser .tx-choice:nth-child(n+3) { width: calc(33.333% - 10px); }
.tx-chooser .tx-choice .inner { position: relative; border-radius: 8px; background: linear-gradient(180deg, var(--theme-color-1, #3e3e3e), var(--theme-color-2, #0a0a0a)); text-align: center; padding: 3rem 0 .35rem; }
.tx-chooser .tx-choice .inner .lb { color: #fff; font-size: 18px; font-weight: 600; white-space: nowrap; }
.tx-chooser .tx-choice:nth-child(n+3) .inner .lb { font-size: 15px; }
.tx-chooser .tx-choice .inner img { position: absolute; top: -25px; left: 0; right: 0; margin: 0 auto; width: 80px; height: 80px; object-fit: contain; }
.tx-chooser .tx-choice .inner img.round { width: 66px; height: 66px; top: -18px; border-radius: 50%; object-fit: cover; box-shadow: 0 2px 6px rgba(0,0,0,.5); }
.tx-chooser .tx-choice .inner .badge { position: absolute; bottom: -15px; left: 0; right: 0; margin: 0 auto; background: #ff1a1a; width: 90px; border-radius: 8px; color: #fff; font-size: 11px; font-weight: 600; padding: 3px 0; white-space: nowrap; animation: tx-blink 2s infinite; }
.tx-chooser .tx-choice .inner .badge.bonus { background: linear-gradient(135deg, #ff6a00, #ff3d00); width: 70px; }
.tx-chooser .tx-loading { width: 100%; }

/* === step 2: small method bar (overrides style.css .choice-card) === */
#depositModal .tx-method-bar { gap: 10px; padding: 8px .5rem 14px 2px; margin-bottom: 14px; }
#depositModal .tx-method-bar .choice-card { width: 82px; height: 82px; border-radius: 8px; border: 1px solid #6a6a6a; background: linear-gradient(180deg, var(--theme-color-1, #3e3e3e), var(--theme-color-2, #0a0a0a)); gap: 4px; font-size: .72rem; font-weight: 500; box-shadow: 0 4px 4px rgba(0,0,0,.25); overflow: visible; }
#depositModal .tx-method-bar .choice-card img { width: 46px; height: 46px; }
#depositModal .tx-method-bar .choice-card img.round { width: 40px; height: 40px; border-radius: 50%; object-fit: cover; }
#depositModal .tx-method-bar .choice-card.active { background: linear-gradient(180deg, var(--primary-color-1, var(--accent-2, #f2d638)) 0%, var(--primary-color-2, #e9b003) 100%); border-color: #fff; color: #fff; font-weight: 600; box-shadow: 0 4px 4px rgba(0,0,0,.25), 0 0 10px rgba(255,231,146,.46); }
#depositModal .tx-method-bar .choice-card .badge-bonus { position: absolute; top: -8px; right: -6px; background: linear-gradient(135deg, #ff6a00, #ff3d00); color: #fff; font-size: 10px; font-weight: 700; padding: 1px 6px; border-radius: 999px; box-shadow: 0 0 8px rgba(255,106,0,.6); }

/* === user bank cards (gold when selected) === */
.tx-bank-scroll { border-bottom: 0; padding: 8px 0 8px 2px; gap: 10px; }
.tx-bank-scroll .bank-select-card { width: 158px; height: auto; min-height: 124px; padding: 12px 10px; border-radius: 8px; background: linear-gradient(180deg, var(--theme-color-1, #3e3e3e), var(--theme-color-2, #0a0a0a)); border: 1px solid #6a6a6a; display: flex; flex-direction: column; align-items: flex-start; gap: 2px; font-size: 14px; font-weight: 600; box-shadow: 0 4px 4px rgba(0,0,0,.25); }
.tx-bank-scroll .bank-select-card img { width: 38px; height: 38px; margin-bottom: 8px; border-radius: 50%; }
.tx-bank-scroll .bank-select-card img.check { position: absolute; right: -9px; top: -9px; width: 24px; height: 24px; margin: 0; border-radius: 0; display: none; }
.tx-bank-scroll .bank-select-card .cd { font-weight: 700; }
.tx-bank-scroll .bank-select-card .no { font-weight: 800; font-size: 15px; letter-spacing: .3px; }
.tx-bank-scroll .bank-select-card.active { background: linear-gradient(180deg, var(--primary-color-1, var(--accent-2, #f2d638)) 0%, var(--primary-color-2, #e9b003) 100%); border-color: #fff; color: #fff; }
.tx-bank-scroll .bank-select-card.active img.check { display: block; }
.tx-empty-bank { background: rgba(0,0,0,.4); border: 1px dashed #666; border-radius: 12px; padding: 12px; text-align: center; font-size: 14px; color: #ccc; }
.tx-empty-bank a { color: var(--accent-1, #e9b033); text-decoration: underline; }

/* === amount form === */
#depositModal .tx-amount-input { --n-height: 52px; margin-top: 12px; }
#depositModal .tx-amount-input .n-input__input-el { font-size: 18px; }
#depositModal .amount-presets { gap: 12px; margin: 16px 0; }
#depositModal .amount-presets button { height: 50px; border-radius: 6px; border: 1px solid #bdbdbd; background: linear-gradient(180deg, #3e3e3e 0%, #0a0a0a 100%); font-size: 20px; font-weight: 700; box-shadow: 0 2px 2px rgba(0,0,0,.5); font-family: "Noto Sans Thai", "Kanit", sans-serif; }
#depositModal .amount-presets button.active { background: linear-gradient(180deg, var(--primary-color-1, var(--accent-2, #f2d638)), var(--primary-color-2, #e9b003)); color: #fff; border-color: #fff; }
#depositModal .n-button.btn-gold { font-size: 16px; }
#depositModal .n-button.btn-outline { --n-height: 44px; font-size: 16px; }

/* === white bank card (target account / P2P source) === */
.bank-card.tx-card { background: #fff; padding: 14px 16px; margin-bottom: 4px; text-align: left; }
.bank-card.tx-card::after { content: ""; position: absolute; right: -30px; bottom: -40px; width: 150px; height: 150px; border-radius: 50%; background: rgba(233,176,51,.18); pointer-events: none; }
.bank-card.tx-card .bank-logo { width: 50px; height: 50px; }
.bank-card.tx-card .bank-name { font-size: 18px; line-height: 1.2; }
.bank-card.tx-card .bank-sub { font-size: 12px; color: #555; }
.bank-card.tx-card .bank-acc { font-size: 14px; color: #333; margin-top: 8px; }
.bank-card.tx-card .bank-number { font-size: 24px; }
.bank-card.tx-card .tx-copy { position: absolute; right: 14px; top: 14px; display: flex; flex-direction: column; align-items: center; gap: 2px; font-size: 11px; color: #333; cursor: pointer; }
.bank-card.tx-card .tx-copy svg { width: 24px; height: 24px; }

/* === results (P2P / QR / decimal) === */
.tx-result { text-align: center; }
.tx-result .pink-text, .tx-result .tx-label { text-align: left; }
.tx-arrow { width: 44px; height: 44px; border-radius: 50%; background: linear-gradient(180deg, var(--primary-color-1, #ffb711), var(--primary-color-2, #e6a91c)); display: inline-flex; align-items: center; justify-content: center; margin: 6px auto 10px; box-shadow: 0 0 14px rgba(255,183,17,.45); }
.tx-amount-big { font-size: 26px; font-weight: 800; color: #ff4d4d; }
.tx-result .countdown { font-variant-numeric: tabular-nums; display: inline-block; min-width: 3.5em; }
.tx-result .qr-image { margin-top: 8px; }

/* === decimal entry + back === */
.btn-open-decimal { display: flex; align-items: center; gap: 12px; width: 100%; padding: 10px 14px; text-align: left; border-radius: 12px; border: 1px solid var(--primary-color-1, #ffb711); background: linear-gradient(90deg, rgba(255,183,17,.16), rgba(255,183,17,.04)); color: #fff; cursor: pointer; font-family: inherit; }
.btn-open-decimal .decimal-ic { flex: 0 0 auto; width: 40px; height: 40px; border-radius: 50%; display: flex; align-items: center; justify-content: center; font-weight: 700; font-size: 13px; color: #fff; background: linear-gradient(180deg, var(--primary-color-1, #ffb711), var(--primary-color-2, #e6a91c)); box-shadow: 0 0 10px rgba(255,183,17,.45); }
.btn-open-decimal .decimal-t { display: block; font-weight: 700; font-size: 15px; }
.btn-open-decimal .decimal-s { display: block; font-size: 12px; opacity: .75; margin-top: 2px; }
.btn-open-decimal .decimal-arrow { margin-left: auto; opacity: .7; }
.btn-back-decimal { background: none; border: 0; padding: 0; color: var(--accent-1, #e9b033); font-size: 14px; cursor: pointer; font-family: inherit; display: inline-flex; align-items: center; gap: 4px; }

/* === truemoney bonus box === */
.tx-bonus-box { display: flex; gap: 10px; align-items: center; border: 1px solid var(--primary-color-1, #ffb711); background: linear-gradient(90deg, rgba(255,183,17,.16), rgba(255,183,17,.04)); border-radius: 12px; padding: 10px 12px; margin-bottom: 12px; text-align: left; }
.tx-bonus-box .ic { width: 40px; height: 40px; border-radius: 50%; background: linear-gradient(180deg, var(--primary-color-1, #ffb711), var(--primary-color-2, #e6a91c)); display: flex; align-items: center; justify-content: center; flex-shrink: 0; }
.tx-bonus-box .ic svg { width: 22px; height: 22px; fill: #fff; }
.tx-bonus-box .t { font-weight: 700; font-size: 14px; }
.tx-bonus-box .s { font-size: 12px; opacity: .8; }

/* === current promotion box === */
.tx-promo-box { display: flex; gap: 12px; border: 1px solid var(--accent-1, #e9b033); border-radius: 12px; padding: 10px; background: rgba(0,0,0,.4); margin-top: 12px; }
.tx-promo-box img { width: 96px; height: 96px; object-fit: cover; border-radius: 8px; flex-shrink: 0; }
.tx-promo-box .nm { color: var(--accent-1, #e9b033); font-weight: 700; font-size: 16px; }
.tx-promo-box .dt { font-size: 13px; color: #ddd; }
.tx-promo-box .actions { display: flex; gap: 8px; margin-top: 8px; }
.tx-promo-box .actions .n-button { flex: 1; --n-height: 34px; font-size: 13px; }

/* === not active === */
.tx-not-active { text-align: center; padding: 30px 10px 10px; }

/* === slip upload === */
.tx-file-drop { display: block; }
.tx-file-hint { color: #bbb; font-size: 14px; display: flex; flex-direction: column; align-items: center; gap: 6px; padding: 10px 0; }
.tx-file-hint svg { width: 40px; height: 40px; fill: #bbb; }
.tx-file-drop img.preview { display: block; max-width: 100%; }

/* === withdraw === */
.wd-body > * + * { margin-top: 12px; }
.wd-head { margin-top: 28px; }
.wd-head p { font-size: 16px; }
.wd-balance-box { position: relative; border: 2px solid #fff; border-radius: 12px; background: rgba(0,0,0,.4); padding: 20px 20px 16px; }
.wd-balance-box .lb { font-size: 16px; }
.wd-balance { font-size: 30px; font-weight: 800; margin-top: 10px; line-height: 1.2; }
.wd-turn-text { margin-top: 14px; font-size: 15px; font-weight: 600; }
.wd-wallet-img { position: absolute; right: 14px; top: 24px; width: 80px; }
.wd-turn-row { display: flex; gap: 12px; }
.wd-turn { flex: 1; display: flex; justify-content: space-between; align-items: center; background: rgba(0,0,0,.4); border-radius: 8px; padding: 12px 14px; font-size: 18px; }
.wd-turn p:last-child { font-weight: 600; }
.wd-min { font-size: 14px; color: #ddd; }
.wd-alert { background: #ef4444; border-radius: 8px; text-align: center; padding: 12px; font-size: 16px; color: #fff; }
.wd-rules-link { cursor: pointer; gap: 6px; color: #d99a9a; font-size: 16px; padding-top: 4px; }
.wd-rules-link p { text-decoration: underline; }
.wd-rules ol { list-style: decimal; padding-left: 22px; line-height: 1.7; font-size: 14px; color: #eee; }
.wd-rules ol li { padding-left: 4px; margin-bottom: 4px; }
#withdrawModal .n-button.btn-gold { font-size: 16px; }

@media (max-width: 480px) {
  .tx-chooser .tx-choice:nth-child(n+3) { width: calc(50% - 8px); }
  .tx-chooser .tx-choice:nth-child(n+3) .inner .lb { font-size: 16px; }
  .tx-scroll { max-height: min(520px, 60vh); }
}
/* keep the decorative circle inside the card (it caused a horizontal scrollbar in the modal on PC) */
.bank-card.tx-card { overflow: hidden; }
