/* The deposit chooser (/dashboard/deposit/), the deposits paid through our payment processor (ltc/, usdt/,
   pay-with-crypto/), their status page (crypto/) and the XMR deposit page (xmr/). Builds on /css/dash.css. */

.ycp .f-err:empty, .ycp .hint:empty { display: none; }
.visually-hidden { position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden; clip: rect(0, 0, 0, 0); white-space: nowrap; border: 0; }

/* Page head with the coin */
.cd-title { display: flex; align-items: center; gap: 16px; min-width: 0; }
.cd-title > img { flex: none; width: 52px; height: 52px; border-radius: 50%; }

/* The chooser */
.dh-group + .dh-group { margin-top: 24px; }
.dh-group > .kicker { margin: 0 0 10px 2px; }
.dh-coins { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 12px; }
.ycp .dh-coin { display: flex; align-items: center; gap: 14px; min-height: 78px; padding: 16px 16px 16px 18px; border-radius: 18px; border: 1px solid var(--line); background: var(--surface); min-width: 0; transition: border-color .15s, background .15s; }
.ycp a.dh-coin[href]:hover { border-color: #3A4257; background: var(--surface-2); }
.dh-coin > img { flex: none; width: 42px; height: 42px; border-radius: 50%; }
/* A row the server adds for some customers has a drawn icon where a coin has its picture. */
.dh-coin-ic { flex: none; width: 42px; height: 42px; border-radius: 50%; display: grid; place-items: center; background: rgba(61, 214, 140, .14); color: #3DD68C; }
.dh-coin-t { flex: 1; min-width: 0; display: flex; flex-direction: column; align-items: flex-start; gap: 3px; }
.dh-coin-t b { font-size: 15.5px; font-weight: 600; color: var(--text); }
.dh-coin-t b small { margin-left: 6px; font-size: 12px; font-weight: 500; color: var(--muted-2); }
.dh-coin-t > span { font-size: 12.5px; line-height: 1.4; color: var(--muted); }
.dh-coin > .go, .cd-link > .go { flex: none; display: flex; color: var(--muted-2); }
/* Switched off right now (deposit.js): greyed, not a link, the note in place of the method. */
.ycp .dh-coin.unavailable { cursor: not-allowed; background: rgba(21, 25, 34, .6); }
.dh-coin.unavailable > img { opacity: .45; filter: grayscale(1); }
.dh-coin.unavailable .dh-coin-t b { color: var(--muted); }
.dh-coin.unavailable .dh-coin-t > span:not(.button-note), .dh-coin.unavailable > .go { display: none; }
.ycp .button-note { display: inline-flex; align-items: center; height: 22px; padding: 0 9px; border-radius: 999px; font-size: 11.5px; font-weight: 500; color: var(--hold); background: rgba(245, 185, 74, .12); }

/* A row that links to another page */
.ycp .cd-link { display: flex; align-items: center; gap: 14px; padding: 16px 18px; border-radius: 18px; border: 1px solid var(--line); background: var(--surface); min-width: 0; transition: border-color .15s, background .15s; }
.ycp .cd-link:hover { border-color: #3A4257; background: var(--surface-2); }
.cd-link-ic { flex: none; width: 42px; height: 42px; border-radius: 13px; display: flex; align-items: center; justify-content: center; color: #C9B8FF; background: rgba(155, 123, 255, .14); }
.cd-link-t { flex: 1; min-width: 0; display: flex; flex-direction: column; gap: 2px; }
.cd-link-t b { font-size: 14.5px; font-weight: 600; color: var(--text); }
.cd-link-t span { font-size: 12.5px; line-height: 1.45; color: var(--muted); }

/* Can't be deposited right now (the script writes the reason) */
.ycp .cd-off { position: relative; margin: 0; padding: 30px 22px 30px 78px; border-radius: 18px; border: 1px solid var(--line); background: var(--surface); font-size: 14.5px; line-height: 1.55; color: var(--text); }
.cd-off::before { content: ""; position: absolute; left: 22px; top: 20px; width: 42px; height: 42px; border-radius: 12px; background: rgba(245, 185, 74, .12) url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='20' height='20' viewBox='0 0 24 24' fill='none' stroke='%23F5B94A' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Ccircle cx='12' cy='12' r='10'/%3E%3Cpath d='M10 15V9'/%3E%3Cpath d='M14 15V9'/%3E%3C/svg%3E") center / 20px no-repeat; }
.ycp .cd-off a { color: var(--link); }
.ycp .cd-off a:hover { text-decoration: underline; }

/* The amount */
.cd-amt { display: flex; align-items: center; gap: 12px; height: 64px; padding: 0 10px 0 18px; border-radius: 14px; border: 1px solid var(--line-2); background: var(--bg); cursor: text; }
.cd-amt:focus-within { border-color: #6B6BFF; box-shadow: 0 0 0 3px rgba(107, 107, 255, .18); }
.cd-amt:has(input[aria-invalid="true"]) { border-color: rgba(255, 122, 122, .6); box-shadow: none; }
.ycp .cd-amt input { flex: 1; min-width: 0; height: 100%; padding: 0; border: 0; outline: 0; background: none; font-size: 26px; font-weight: 600; color: var(--text); font-variant-numeric: tabular-nums; }
.ycp .cd-amt input:focus-visible { outline: 0; }
.cd-amt input::placeholder { color: var(--muted-2); font-weight: 500; }
.cd-unit { flex: none; display: flex; align-items: center; gap: 8px; height: 42px; padding: 0 13px 0 9px; border-radius: 11px; background: var(--surface-2); border: 1px solid var(--line-2); font-size: 14px; font-weight: 600; color: var(--text); }
.cd-unit img { width: 24px; height: 24px; border-radius: 50%; }
.cd-unit img[hidden] + span { margin-left: 4px; }
.cd-amt + .hint { margin-top: 9px; }
.cd-card > .note { margin-top: 16px; }

/* The cryptos and networks to pay with (drawn by js/crypto-deposit.js) */
.network-list { display: grid; grid-template-columns: repeat(auto-fill, minmax(230px, 1fr)); gap: 12px; }
.cd-loading { margin: 0; font-size: 13.5px; color: var(--muted); }
.ycp .network-option { position: relative; display: flex; align-items: center; gap: 12px; padding: 14px; border-radius: 16px; border: 1px solid var(--line-2); background: var(--bg); color: var(--text); text-align: left; min-width: 0; transition: border-color .15s, background .15s; }
.ycp .network-option:hover:not(:disabled) { border-color: #3A4257; background: var(--surface-2); }
.ycp .network-option.selected, .ycp .network-option.selected:hover { border-color: transparent; background: linear-gradient(var(--surface-2), var(--surface-2)) padding-box, var(--grad) border-box; }
.ycp .network-option:disabled { opacity: .5; cursor: not-allowed; }
.network-ic { flex: none; width: 38px; height: 38px; border-radius: 50%; display: flex; align-items: center; justify-content: center; font-size: 13px; font-weight: 700; color: #fff; background: #3A4257; }
.network-ic img { width: 38px; height: 38px; border-radius: 50%; display: block; }
.network-t { flex: 1; min-width: 0; display: flex; flex-direction: column; gap: 2px; }
.network-name { font-size: 15px; font-weight: 600; color: var(--text); }
.network-detail { font-size: 12.5px; line-height: 1.4; color: var(--muted); }
.network-detail:empty { display: none; }
.network-check { flex: none; width: 22px; height: 22px; border-radius: 50%; border: 1.5px solid #4A5370; display: flex; align-items: center; justify-content: center; color: transparent; }
.network-option.selected .network-check { border-color: transparent; background: var(--grad); color: #fff; }
.network-list + .f-err { margin-top: 10px; }

/* Summary and Continue */
.cd-sum h3 { margin: 0 0 4px; font-size: 16px; font-weight: 600; color: var(--text); }
.cd-sum .rows .total dd { font-size: 18px; }
.cd-sum > .note { margin-top: 12px; }
.cd-window { display: flex; align-items: flex-start; gap: 8px; margin: 12px 0 0; font-size: 12.5px; line-height: 1.45; color: var(--muted); }
.cd-window > .i { flex: none; margin-top: 1px; }
.cd-window:has(> #window-note:empty) { display: none; }
.cd-ferr { margin: 14px 0 0; padding: 11px 13px; border-radius: 12px; font-size: 13px; line-height: 1.5; color: #FFC9C9; background: rgba(255, 122, 122, .08); border: 1px solid rgba(255, 122, 122, .25); }
.cd-ferr:empty { display: none; }
.ycp .cd-ferr a { color: inherit; text-decoration: underline; text-underline-offset: 2px; }
.cd-sum .btn.big { margin-top: 16px; }
.ycp .btn[aria-busy="true"] { cursor: progress; }

/* How it works */
.cd-how .card-ic { color: #C9B8FF; background: rgba(155, 123, 255, .14); }
.cd-how > .note { margin-top: 16px; }

/* The status page */
.cs-err:has(> #deposit-error:empty) { display: none; }
.cs-err { margin-bottom: 16px; }
.cs-card { margin-bottom: 8px; }
.cs-head { display: flex; align-items: center; gap: 14px; min-width: 0; }
.cs-head > img { flex: none; width: 44px; height: 44px; border-radius: 50%; }
.cs-head-t { flex: 1; min-width: 0; }
.cs-head h2 { margin: 0; font-size: 18px; font-weight: 600; color: var(--text); overflow-wrap: anywhere; }
.cs-head-t span { display: block; margin-top: 2px; font-size: 12.5px; color: var(--muted); }
.cs-head .tag { flex: none; white-space: normal; height: auto; min-height: 26px; padding: 4px 11px; font-size: 12.5px; text-align: center; }
.cs-steps { list-style: none; display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); margin: 24px 0 20px; padding: 0; }
.cs-step { position: relative; display: flex; flex-direction: column; align-items: center; gap: 8px; padding: 0 4px; text-align: center; font-size: 13px; font-weight: 500; color: var(--muted); }
.cs-step:not(:last-child)::after { content: ""; position: absolute; top: 15px; left: calc(50% + 24px); right: calc(-50% + 24px); height: 2px; border-radius: 2px; background: var(--line-2); }
.cs-step.done:not(:last-child)::after { background: rgba(61, 214, 140, .45); }
.cs-dot { width: 32px; height: 32px; border-radius: 50%; display: flex; align-items: center; justify-content: center; font-size: 13px; font-weight: 600; color: var(--muted); background: var(--bg); border: 2px solid var(--line-2); }
.cs-step.done .cs-dot { color: #0B0E12; background: var(--in); border-color: var(--in); }
.cs-step.current .cs-dot { color: #fff; background: var(--grad); border: 0; box-shadow: 0 0 0 5px rgba(126, 123, 255, .18); }
.cs-step.attention .cs-dot { color: #0B0E12; background: var(--hold); border-color: var(--hold); }
.cs-step.failed .cs-dot { color: #FF9A9A; background: rgba(255, 122, 122, .14); border-color: rgba(255, 122, 122, .45); }
.cs-step.done, .cs-step.current, .cs-step.attention, .cs-step.failed { color: var(--text); }
.cs-note:empty { display: none; }
.cs-rows { margin-top: 14px; }
.cs-rows dd.mono { font-size: 12.5px; }
.ycp .cs-rows dd a { color: var(--link); }
.ycp .cs-rows dd a:hover { text-decoration: underline; }
.cs-acts { display: flex; align-items: center; gap: 10px 16px; flex-wrap: wrap; margin-top: 16px; }
.cs-acts:not(:has(> :not([hidden]))) { display: none; }
.cs-poll { display: flex; align-items: center; gap: 7px; margin: 0; font-size: 12.5px; color: var(--muted); }
.ycp .cs-list { list-style: none; margin: 0; padding: 0; }
.cs-list > li + li { border-top: 1px solid var(--line); }
.ycp .cs-list .lst-r + .lst-r { border-top: 0; }
.cs-list .lst-r > img { flex: none; width: 38px; height: 38px; border-radius: 50%; }
.ycp .cs-list a.lst-r[aria-current="page"] { background: rgba(155, 123, 255, .08); box-shadow: inset 3px 0 0 #9B7BFF; }
.cs-list .tag { flex: none; }
.cs-empty { padding: 34px 20px; text-align: center; font-size: 13.5px; line-height: 1.5; color: var(--muted); }
.cs-empty .empty-ic { width: 46px; height: 46px; margin: 0 auto 12px; border-radius: 14px; display: flex; align-items: center; justify-content: center; color: var(--muted); background: var(--surface-2); }
.cs-empty b { display: block; margin-bottom: 3px; font-size: 14.5px; font-weight: 600; color: var(--text-2); }
/* No row to tap yet, so the line about tapping one goes. */
.dp-sec:has(.cs-empty) .dp-sec-h p { display: none; }
.cs-sk { display: flex; align-items: center; gap: 14px; padding: 15px 20px; }
.cs-sk + .cs-sk { border-top: 1px solid var(--line); }
.cs-sk .sk { margin: 0; }

/* XMR */
.xm-addr .kicker { margin-bottom: 10px; }
.xm-none { display: flex; align-items: center; gap: 12px; padding: 14px 16px; border-radius: 14px; border: 1px dashed var(--line-2); font-size: 13.5px; line-height: 1.5; color: var(--muted); }
.xm-none > .i { flex: none; color: var(--muted-2); }
.xm-addr .copy code { font-size: 13px; line-height: 1.55; }
.xm-acts { display: flex; gap: 10px; flex-wrap: wrap; margin-top: 16px; }
.ycp .xm-acts .btn { height: 46px; padding: 0 18px; font-size: 14.5px; font-weight: 600; border-radius: 12px; }
.xm-acts + .hint { margin-top: 12px; }
.xm-pend { display: flex; align-items: flex-start; justify-content: space-between; gap: 16px; }
.xm-pend .big { margin-top: 6px; font-size: 32px; }
.xm-pend .card-ic { color: var(--hold); background: rgba(245, 185, 74, .12); }
.card .xm-pend ~ p.txt { margin-top: 12px; }
.xm-poll { margin-top: 12px; }
.cs-list .lst-r > .tag { flex: none; }

@media (max-width: 1100px) {
  .dh-coins { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}
@media (max-width: 750px) {
  .cd-title { flex-direction: column; gap: 12px; }
  .cd-title > img { width: 48px; height: 48px; }
  /* One card with a row per currency, like the Wallet page */
  .dh-coins { grid-template-columns: minmax(0, 1fr); gap: 0; border: 1px solid var(--line); border-radius: 16px; background: var(--surface); overflow: hidden; }
  .ycp .dh-coin { min-height: 68px; padding: 13px 14px 13px 16px; border: 0; border-radius: 0; }
  .ycp .dh-coin + .dh-coin { border-top: 1px solid var(--line); }
  .dh-coin > img, .dh-coin-ic { width: 38px; height: 38px; }
  .dh-group + .dh-group { margin-top: 20px; }
  .ycp .cd-link { padding: 14px 16px; border-radius: 16px; }
  .ycp .cd-off { padding: 22px 16px 22px 70px; border-radius: 16px; }
  .cd-off::before { left: 16px; top: 16px; }
  .network-list { grid-template-columns: minmax(0, 1fr); gap: 10px; }
  .cd-amt { height: 60px; padding-left: 16px; }
  .ycp .cd-amt input { font-size: 24px; }
  /* The status goes on its own line under the title. */
  .cs-head { flex-wrap: wrap; row-gap: 8px; }
  .cs-head-t { flex-basis: calc(100% - 58px); }
  .cs-head .tag { margin-left: 58px; }
  .cs-step { font-size: 12.5px; }
  /* The address and the transaction are long: their value goes under the label. */
  .cs-rows > #row-address, .cs-rows > #row-tx { flex-direction: column; gap: 3px; }
  .cs-rows > #row-address dd, .cs-rows > #row-tx dd { text-align: left; }
  .ycp .cs-acts .btn { width: 100%; height: 48px; }
  .xm-acts .btn { flex: 1; }
  .xm-pend .big { font-size: 28px; }
  /* A payment's line says what happens next, so it wraps instead of being cut. */
  .xm-list .lst-t span { white-space: normal; line-height: 1.4; }
}
