/*
 * "Other crypto" at the checkout: the payment route, the currency grid and the payment screen of the gateway.
 * Same family as the trader space (bluish graphite, brand accent, amber at the limits, green and red for direction
 * only): the tokens of style.css, nothing hard-coded except the QR code, which stays dark on light (drawn on its canvas).
 * Mobile first (320 px up); hover effects only under (hover: hover); motion off under prefers-reduced-motion.
 */

/* ---------- step 2: route, currency, e-mail ---------- */
.co-routes { display: grid; gap: 10px; margin-bottom: 16px; }
.co-route, .co-coin {
  position: relative; display: grid; gap: 3px; align-content: start; width: 100%; text-align: left; cursor: pointer;
  color: var(--text); font: inherit; background: var(--surface-2); border: 1px solid var(--line-2); border-radius: var(--r);
  transition: border-color var(--t-fast), background-color var(--t-fast), box-shadow var(--t);
}
.co-route { min-height: 72px; padding: 14px 44px 14px 16px; }
.co-route-name { font-size: 14.5px; font-weight: 650; letter-spacing: -0.01em; }
.co-route-hint { font-size: 12px; line-height: 1.4; color: var(--mute); }
.co-route[aria-checked="true"], .co-coin[aria-checked="true"] {
  border-color: color-mix(in srgb, var(--acc) 62%, transparent);
  background: linear-gradient(160deg, var(--acc-soft), var(--surface-2) 70%);
  box-shadow: inset 0 1px 0 rgb(255 255 255 / 0.05), 0 14px 30px -24px var(--acc);
}
/* the radio mark of a card: an empty ring, filled with the accent when chosen */
.co-route::after, .co-coin::after {
  content: ""; position: absolute; top: 14px; right: 14px; width: 16px; height: 16px; border-radius: 50%;
  border: 1.5px solid var(--line-strong); background: transparent;
  transition: border-color var(--t-fast), background-color var(--t-fast), box-shadow var(--t-fast);
}
.co-coin::after { top: 10px; right: 10px; width: 12px; height: 12px; }
.co-route[aria-checked="true"]::after, .co-coin[aria-checked="true"]::after {
  border-color: var(--acc); background: var(--acc); box-shadow: inset 0 0 0 3px var(--surface-2);
}
@media (hover: hover) {
  .co-route:hover, .co-coin:hover { border-color: var(--line-strong); background-color: var(--surface-3); }
  .co-route[aria-checked="true"]:hover, .co-coin[aria-checked="true"]:hover { border-color: var(--acc); }
}

.co-gw { display: grid; gap: 4px; }
.co-gw-lead { margin: 0 0 10px; max-width: 62ch; font-size: 12.5px; line-height: 1.5; }
.co-coins { display: grid; grid-template-columns: repeat(auto-fill, minmax(148px, 1fr)); gap: 8px; margin: 6px 0 6px; }
.co-coin { min-height: 62px; padding: 11px 28px 11px 12px; }
.co-coin-symbol { font-size: 14px; font-weight: 700; overflow-wrap: anywhere; }
.co-coin-name { font-size: 11.5px; line-height: 1.3; color: var(--mute); }
.co-testtag {
  justify-self: start; padding: 2px 8px; font-size: 10px; font-weight: 700; letter-spacing: 0.08em; text-transform: uppercase;
  color: var(--warn); background: var(--warn-soft); border-radius: var(--r-pill); white-space: nowrap;
}
.co-coin .co-testtag { font-size: 9.5px; letter-spacing: 0.05em; }
.co-email { max-width: 460px; margin-top: 16px; }
.co-email .text-input { font-family: var(--font-sans); font-weight: 500; font-size: 15px; min-height: 44px; }
.co-email .text-input[aria-invalid="true"] { border-color: var(--down); box-shadow: 0 0 0 3px var(--down-soft); }
.co-email .form-msg { min-height: 0; }

/* ---------- step 3: the payment ---------- */
.co-gwpay .panel-head { margin-bottom: 14px; }
#gwStepTitle:focus { outline: none; }
#gwCountdown[data-kind="warn"] { color: var(--warn); background: var(--warn-soft); border-color: transparent; }

/* four segments, like the gauges of an instrument: done in green, the current one in the accent */
.co-rail { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 6px; margin: 0 0 14px; padding: 0; list-style: none; }
.co-rail li { display: grid; gap: 8px; min-width: 0; font-size: 10.5px; font-weight: 650; letter-spacing: 0.07em; text-transform: uppercase; color: var(--dim); }
.co-rail-bar { height: 4px; border-radius: 4px; background: var(--line-2); }
.co-rail li[data-status="done"] { color: var(--mute); }
.co-rail li[data-status="done"] .co-rail-bar { background: var(--up); }
.co-rail li[data-status="current"] { color: var(--text); }
.co-rail li[data-status="current"] .co-rail-bar { background: var(--acc); box-shadow: 0 0 12px var(--acc); animation: co-glow 1.8s ease-in-out infinite; }
@keyframes co-glow { 50% { opacity: 0.55; } }

.co-gwpay .co-state { display: flex; align-items: center; gap: 10px; margin: 0 0 4px; font-size: 16px; font-weight: 650; letter-spacing: -0.01em; }
.co-gwpay .co-state::before { content: ""; flex: 0 0 auto; width: 9px; height: 9px; border-radius: 50%; background: var(--acc); box-shadow: 0 0 10px var(--acc); }
.co-gwpay .co-state[data-tone="live"]::before { animation: co-glow 1.8s ease-in-out infinite; }
.co-gwpay .co-state[data-tone="ready"] { color: var(--up); }
.co-gwpay .co-state[data-tone="ready"]::before { background: var(--up); box-shadow: 0 0 10px var(--up); }
.co-gwpay .co-state[data-tone="closed"] { color: var(--down); }
.co-gwpay .co-state[data-tone="closed"]::before { background: var(--down); box-shadow: 0 0 10px var(--down); }
.co-gwpay .co-state[data-tone="review"] { color: var(--warn); }
.co-gwpay .co-state[data-tone="review"]::before { background: var(--warn); box-shadow: 0 0 10px var(--warn); }

.co-gwgrid { display: grid; gap: 14px; margin-top: 14px; }
.co-due .note { margin-top: 2px; }
.co-due, .co-gwpayblock {
  display: grid; gap: 6px; align-content: start; min-width: 0; padding: 18px;
  background: var(--surface-2); border: 1px solid var(--line-2); border-radius: var(--r);
  box-shadow: inset 0 1px 0 rgb(255 255 255 / 0.04);
}
.co-due { position: relative; overflow: hidden; }
.co-due::before { content: ""; position: absolute; inset: 0 0 auto; height: 2px; background: linear-gradient(90deg, var(--acc), transparent 80%); }
.co-due-amount {
  font-size: clamp(22px, 7.4vw, 36px); font-weight: 700; line-height: 1.15; letter-spacing: -0.02em; color: var(--text);
  overflow-wrap: anywhere; word-break: break-all;
}
.co-due-amount[data-void="true"] { color: var(--dim); text-decoration: line-through; }
.co-due-coin { display: flex; flex-wrap: wrap; align-items: center; gap: 8px 10px; margin-top: 2px; }
.co-due-token { padding: 3px 11px; font-size: 17px; font-weight: 700; color: var(--acc); background: var(--acc-soft); border-radius: var(--r-pill); overflow-wrap: anywhere; }
.co-due .actions { margin-top: 8px; }

.co-gwpayblock { justify-items: center; gap: 16px; }
.co-gwpayblock .co-qr { width: min(100%, 232px); box-shadow: 0 0 0 1px var(--line-strong), 0 22px 44px -26px var(--acc); }
.co-gwpayblock .co-addr { width: 100%; }
.co-warn {
  margin: 14px 0 0; padding: 12px 14px 12px 16px; max-width: 70ch; font-size: 13px; font-weight: 550; line-height: 1.5; color: var(--text);
  background: var(--warn-soft); border-left: 3px solid var(--warn); border-radius: 0 var(--r-sm) var(--r-sm) 0;
}
.co-gwpay .note { max-width: 70ch; }
.co-gwpay #gwMsg { margin-top: 8px; }
.co-gwpay #gwAgain, .co-gwpay #gwDone { margin-top: 16px; }

@media (min-width: 761px) {
  .co-routes { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .co-gwgrid { grid-template-columns: minmax(0, 1.15fr) minmax(0, 1fr); gap: 18px; align-items: stretch; }
  .co-gwpayblock { grid-template-columns: minmax(0, 1fr); }
}
@media (prefers-reduced-motion: reduce) {
  .co-rail li[data-status="current"] .co-rail-bar, .co-gwpay .co-state[data-tone="live"]::before { animation: none; }
}
