/* Merchant checkout and funding filters. */
.cv-product-shell[data-theme] .cv-merchant-checkout > h1 {
  margin-bottom: 12px;
}
.cv-product-shell[data-theme] .cv-merchant-checkout .cv-checkout-back {
  display: inline-flex;
  align-items: center;
  min-height: 38px;
  padding: 7px 13px;
  border-radius: 999px;
  color: var(--color-muted);
}
.cv-product-shell[data-theme] .cv-checkout-elite {
  max-width: 560px;
  margin-top: 16px;
}
.cv-product-shell[data-theme] .cv-checkout-elite p {
  margin: 0;
  color: var(--color-muted);
  font-size: 14px;
  line-height: 1.6;
}
.cv-product-shell[data-theme] .cv-checkout-elite .c-btn {
  margin-top: 22px;
}
/* Invoice: amount, state, then transfer details, with a stable loading footprint. */
.cv-product-shell[data-theme] .cv-merchant-checkout {
  width: min(100%, 640px); max-width: 640px; box-sizing: border-box;
  padding-top: 36px; padding-bottom: 48px;
}
.cv-product-shell[data-theme] .cv-invoice-card {
  display: flex; flex-direction: column; gap: 22px;
  min-height: 500px; margin-top: 20px; padding: 28px;
}
.cv-product-shell[data-theme] .cv-invoice-card .cv-merchant-plan-heading {
  display: flex; align-items: center; justify-content: space-between; gap: 20px;
  margin: 0; padding-bottom: 22px; border-bottom: 1px solid var(--color-border-soft);
}
.cv-product-shell[data-theme] .cv-invoice-card .cv-merchant-plan-heading > div > span {
  color: var(--color-muted); font-size: 12px;
}
.cv-product-shell[data-theme] .cv-invoice-card h2 {
  margin: 6px 0 0; font-size: 30px; font-weight: 500; letter-spacing: -.03em;
}
.cv-product-shell[data-theme] .cv-invoice-card .cv-plan-price {
  margin: 0; text-align: right; flex: 0 0 auto;
}
.cv-product-shell[data-theme] .cv-invoice-card .cv-plan-price strong {
  font-size: clamp(24px, 4vw, 32px); font-weight: 500; line-height: 1.2;
}
.cv-product-shell[data-theme] .cv-invoice-card .cv-plan-price > div {
  margin-top: 5px; color: var(--color-muted); font-size: 12px;
}
.cv-product-shell[data-theme] .cv-invoice-card .cv-checkout-summary {
  display: grid; grid-template-columns: 1fr 1fr; gap: 14px; margin: 0;
}
.cv-product-shell[data-theme] .cv-invoice-card .cv-checkout-summary > div {
  display: flex; flex-direction: column; gap: 5px;
}
.cv-product-shell[data-theme] .cv-invoice-card dt { color: var(--color-muted); font-size: 12px; }
.cv-product-shell[data-theme] .cv-invoice-card dd { margin: 0; font-size: 14px; }
.cv-product-shell[data-theme] .cv-invoice-card .cv-checkout-status {
  display: flex; align-items: center; justify-content: space-between; gap: 12px;
  margin: 0; padding: 13px 15px; border: 1px solid var(--color-border-soft);
  border-radius: 16px; background: var(--material-nested);
}
.cv-product-shell[data-theme] .cv-invoice-card .cv-checkout-status strong { font-size: 13px; font-weight: 500; }
.cv-product-shell[data-theme] .cv-invoice-card .cv-checkout-status button { flex-shrink: 0; font-size: 12px; }
.cv-product-shell[data-theme] .cv-invoice-card .cv-inline-payment {
  display: grid; gap: 16px; margin: 0; padding: 20px;
  border: 1px solid var(--color-border-soft); border-radius: 18px;
}
.cv-product-shell[data-theme] .cv-invoice-card label {
  display: grid; gap: 8px; color: var(--color-muted); font-size: 12px;
}
.cv-product-shell[data-theme] .cv-invoice-card input {
  box-sizing: border-box; width: 100%; min-width: 0; height: 44px; padding: 10px 12px;
  border: 1px solid var(--color-border); border-radius: 10px;
  background: var(--material-nested); color: var(--color-text); font-size: 13px;
}
.cv-product-shell[data-theme] .cv-invoice-card p { margin: 0; font-size: 12px; line-height: 1.6; color: var(--color-muted); }
.cv-product-shell[data-theme] .cv-invoice-card .cv-checkout-form { display: grid; gap: 14px; margin: 0; }
.cv-product-shell[data-theme] .cv-invoice-card > .c-btn { width: 100%; min-height: 44px; }
.cv-product-shell[data-theme] .cv-invoice-card > .c-btn:last-child { margin-top: auto; }
.cv-invoice-skeleton { display: grid; gap: 20px; padding-top: 15px; }
.cv-invoice-skeleton i { display: block; height: 58px; border-radius: 12px; background: var(--material-nested); }
.cv-invoice-skeleton i:first-child { width: 65%; height: 72px; }
.cv-invoice-skeleton i:last-child { height: 90px; }
@media (max-width: 559px) {
  .cv-product-shell[data-theme] .cv-invoice-card { padding: 20px; gap: 18px; }
  .cv-product-shell[data-theme] .cv-invoice-card .cv-inline-payment { padding: 15px; }
  .cv-product-shell[data-theme] .cv-invoice-card .cv-checkout-status { align-items: flex-start; flex-direction: column; }
}
.cv-product-shell[data-theme] .cv-hosted-payment { display: grid; gap: 18px; padding-top: 2px; }
.cv-product-shell[data-theme] .cv-hosted-payment h3 { margin: 0; font-size: 16px; font-weight: 500; }
.cv-product-shell[data-theme] .cv-hosted-payment ol { display: grid; gap: 14px; margin: 0; padding-left: 21px; font-size: 13px; line-height: 1.65; color: var(--color-muted); }
.cv-product-shell[data-theme] .cv-hosted-payment li { padding-left: 5px; }
.cv-product-shell[data-theme] .cv-hosted-payment li::marker { color: var(--color-accent); }
.cv-product-shell[data-theme] .cv-hosted-payment > .c-btn { width: 100%; min-height: 46px; }
.cv-product-shell[data-theme] .cv-hosted-payment > .c-btn:disabled { opacity: .55; cursor: default; }
#funding-filter-trigger[data-filter-count]:not([data-filter-count=""])::after {
  content: attr(data-filter-count); min-width: 1.4em; padding: 1px 4px; border-radius: 999px;
  background: var(--material-selected); color: var(--color-text); font-size: 11px; text-align: center;
}
.c-funding-filter-min {display: grid; gap: 8px; align-items: center}
.c-funding-filter-hour {display: flex; align-items: center; gap: 8px}

/* Keep the scanner surface and row dimensions when rates reorder. */
.cv-product-shell[data-theme] .c-funding-workspace .c-scanner-toolbar {
  align-items: center;
}
.cv-product-shell[data-theme] .c-funding-workspace .c-search {
  flex: 0 1 280px;
  min-width: 130px;
}
.c-funding-workspace .c-search input {width: 100%}
.c-funding-workspace .c-scanner-quote-count {margin-inline-start: auto}
.c-funding-mode-track > a {min-width: 68px; text-decoration: none}
.c-funding-workspace .c-funding-live-table {
  overflow-x: auto;
  overflow-anchor: none;
}
.c-funding-live-table[hidden] {display: none !important}
.cv-product-shell[data-theme] .c-funding-workspace .c-funding-table {
  min-width: 750px;
  width: 100%;
  table-layout: fixed;
  text-align: left;
}
.cv-product-shell[data-theme] .c-funding-workspace[data-funding-mode=pairs] .c-funding-table {
  min-width: 855px;
}
.c-funding-table th, .c-funding-table td {padding: 10px 12px; vertical-align: middle}
.c-funding-table tbody tr {height: 72px}
.c-funding-table td {overflow: hidden; text-overflow: ellipsis}
.c-funding-table .c-funding-clock {display: inline-flex; min-width: 8ch; justify-content: flex-end}
.c-funding-table th {height: 48px; text-align: left; line-height: 1.2}
.c-funding-table .c-sort-button {gap: 4px; white-space: normal; text-align: inherit}
.c-funding-table :is(th,td):is([data-column=rate],[data-column=interval],[data-column=next],[data-column=normalized],[data-column=spread],[data-column=volume],[data-column=net],[data-column=schedule],[data-column=funding]) {
  text-align: right;
}
.c-funding-table th .c-sort-button {justify-content: flex-end}
.c-funding-table .c-sort-arrows {display: inline-flex; flex: 0 0 14px}
.c-funding-table .c-sort-arrows svg {opacity: .35}
.c-funding-table .c-sort-arrows:not([data-direction=none]) svg {opacity: 1}
.c-funding-table .c-sort-arrows[data-direction=up] svg {transform: rotate(180deg)}
.c-funding-table tr[data-funding-href] {cursor: pointer}
.c-funding-table td > small, .c-funding-table .c-scanner-spread small, .c-funding-apr {
  display: block;
  margin-top: 3px;
  color: var(--color-muted);
  font-size: 11px;
  line-height: 1.25;
}
.c-funding-table .c-num {white-space: nowrap; font-variant-numeric: tabular-nums}
.c-funding-table .c-coin-name {
  display: block;
  overflow: hidden;
  color: var(--color-text);
  font-weight: 650;
  text-overflow: ellipsis;
}
.c-funding-table a:is(.c-coin-name,.c-funding-exchange):focus-visible {
  outline: 1px solid var(--color-accent);
  outline-offset: 2px;
}
.c-funding-value {font-size: 14px; font-weight: 650}
.c-funding-muted {color: var(--color-muted)}
.c-funding-exchange {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  min-width: 0;
  white-space: nowrap;
}
.c-funding-exchange .c-venue-logo {width: 22px; height: 22px; flex: 0 0 22px}
.c-funding-exchange strong {font-weight: 550}
.c-funding-table td[data-column=venue] > small {
  overflow: hidden;
  padding-inline-start: 28px;
  text-overflow: ellipsis;
}
.c-funding-table .c-funding-legs {
  display: grid;
  grid-template-rows: repeat(2,36px);
  gap: 4px;
}
.c-funding-table .c-funding-leg {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 6px;
  min-width: 0;
}
.c-funding-table td[data-column=route] .c-funding-leg {justify-content: flex-start}
.c-funding-table .c-funding-leg .c-funding-value {font-size: 12px}
.c-funding-table .c-funding-leg .c-funding-tag {white-space: nowrap}
.c-funding-table .c-funding-leg .c-funding-interval {white-space: nowrap}
.c-funding-table .c-funding-leg .c-funding-muted {min-width: 8ch}
.c-funding-table .c-funding-leg .c-funding-exchange {
  width: 100%;
  overflow: visible;
}
.c-funding-tag, .c-funding-interval {color: var(--color-muted); font-size: 11px}
.c-funding-table [data-funding-tone=long], .c-funding-table [data-funding-tone=gain],
.c-funding-table .c-funding-tag[data-tone=positive] {color: var(--color-long)}
.c-funding-table [data-funding-tone=short], .c-funding-table [data-funding-tone=loss],
.c-funding-table .c-funding-tag[data-tone=negative] {color: var(--color-short)}
.c-funding-favorite[aria-pressed=true] svg {fill: currentColor}
.c-funding-mobile-sort {display: none}

@media (max-width: 767px) {
  .cv-product-shell[data-theme] .c-funding-workspace .c-scanner-toolbar {
    grid-template-columns: minmax(0,1fr) minmax(0,auto);
  }
  .c-funding-workspace .c-scanner-toolbar .c-search {grid-column: 1; grid-row: 1; min-width: 0}
  .c-funding-workspace .c-scanner-toolbar #funding-filter-trigger {grid-column: 2; grid-row: 1}
  .c-funding-workspace .c-scanner-toolbar [data-workspace-action=funding_favorites_only] {grid-column: 1; grid-row: 2}
  .c-funding-workspace .c-scanner-toolbar [data-funding-pages] {grid-column: 2; grid-row: 2}
  .c-funding-workspace .c-funding-mode-track {grid-column: 1 / -1; grid-row: 3}
  .c-funding-mode-track > a {flex: 1 1 0}
  .c-funding-mobile-sort {
    display: block;
    grid-column: 1 / -1;
    grid-row: 4;
    min-width: 0;
    width: 100%;
    min-height: 38px;
    padding: 0 12px;
    border: 1px solid var(--material-rim);
    border-radius: 999px;
    background: var(--control-surface);
    color: var(--color-text);
    font: inherit;
    font-size: 12px;
  }
  .cv-product-shell[data-theme] .c-funding-workspace .c-funding-live-table {
    padding: 0;
    overflow: visible;
    border: 0;
    background: transparent;
    box-shadow: none;
  }
  .cv-product-shell.cv-product-shell[data-theme] .c-funding-workspace .c-funding-table {
    display: grid;
    min-width: 0;
  }
  .c-funding-table colgroup {display: none}
  .cv-product-shell[data-theme] .c-funding-workspace .c-funding-table thead {
    position: absolute !important;
    width: 1px;
    height: 1px;
    overflow: hidden;
    clip-path: inset(50%);
  }
  .c-funding-table thead button {display: none}
  .c-funding-workspace .c-funding-table tbody {display: grid; gap: 8px}
  .c-funding-workspace .c-funding-table tbody tr {
    height: auto;
    display: grid;
    grid-template-columns: 32px minmax(0,1fr) minmax(0,1fr);
    grid-template-rows: 38px 36px 42px 32px;
    align-items: center;
    gap: 7px 9px;
    padding: 10px;
    border: 1px solid var(--material-rim);
    border-radius: 15px;
    background: var(--material-nested);
  }
  .cv-product-shell[data-theme] .c-funding-workspace .c-funding-table .c-scanner-row > td {
    display: block;
    min-width: 0;
    width: auto;
    height: auto;
    padding: 0;
    border: 0;
    background: transparent;
  }
  .c-funding-table td[data-column=star] {grid-column: 1; grid-row: 1}
  .c-funding-table td[data-column=coin] {grid-column: 2; grid-row: 1}
  .c-funding-table td:is([data-column=rate],[data-column=net]) {grid-column: 3; grid-row: 1}
  .c-funding-table td[data-column=venue] {grid-column: 1 / 3; grid-row: 2}
  .c-funding-table td[data-column=volume] {grid-column: 3; grid-row: 2}
  .c-funding-table td[data-column=next] {grid-column: 3; grid-row: 3}
  .c-funding-table td[data-column=interval] {grid-column: 1 / 3; grid-row: 3}
  .c-funding-table td[data-column=normalized] {grid-column: 1 / 3; grid-row: 4}
  .c-funding-workspace .c-funding-table td:is([data-column=interval],[data-column=normalized],[data-column=spread]) {text-align: left}
  .c-funding-table td:is([data-column=interval],[data-column=next],[data-column=normalized],[data-column=volume],[data-column=net],[data-column=spread])::before {
    content: attr(data-label);
    display: block;
    margin-bottom: 2px;
    color: var(--color-muted);
    font-size: 11px;
    line-height: 1.2;
  }
  .c-funding-table td[data-column=net] .c-funding-apr,
  .c-funding-table td[data-column=spread] .c-scanner-spread small {display: none}
}

.cv-product-shell.cv-product-shell[data-theme] .c-funding-workspace .c-funding-table .c-sort-button:focus-visible {
  outline: 1px solid var(--color-accent) !important;
  outline-offset: 3px;
}

.c-funding-filter-dialog .c-funding-filter-min input {
  width: 100%;
  min-width: 0;
  min-height: 35px;
  padding: 6px 8px;
  border-radius: 10px;
  border: 1px solid var(--material-rim);
  background: var(--material-nested);
  color: var(--color-text);
}
.c-funding-filter-dialog #scanner-filter-panel-conditions {display:block}
.c-funding-filter-dialog #funding-conditions {
  display: grid;
  grid-template-columns: minmax(0,1fr) minmax(0,2fr);
  gap: 12px;
  max-width: none;
}
.c-funding-filter-dialog #funding-conditions .c-funding-filter-min {
  grid-template-columns: 1fr;
  padding: 12px;
  border-radius: 12px;
  background: var(--material-nested);
}
.c-funding-filter-dialog .c-funding-interval-options {
  display:grid;
  grid-template-columns:minmax(0,1.45fr) repeat(4,minmax(0,1fr));
}
.c-funding-filter-dialog .c-funding-interval-options > button {
  min-width:0;
  min-height:36px;
  padding-inline:2px;
  white-space:nowrap;
}
.c-funding-filter-dialog .c-funding-interval-options:not([data-active-lens=true]) > button[aria-pressed=true] {
  background:var(--material-selected);
}
.c-funding-table .c-scanner-row-actions {display:flex;gap:3px;align-items:center}
.cv-product-shell.cv-product-shell[data-theme] .c-funding-workspace .c-funding-table .c-scanner-row-actions button:is([data-funding-favorite],[data-funding-pin],[data-funding-hide]) {
  width: 30px !important;
  height: 30px !important;
  min-height: 30px !important;
  flex-basis: 30px !important;
}
.c-funding-table .cv-funding-coin, .cv-scanner-coin {display:flex;align-items:center;gap:7px}
.cv-funding-coin-icon {
  position:relative;display:grid;place-items:center;flex:0 0 24px;height:24px;
  border-radius:50%;background:var(--material-selected);font-size:9px;overflow:hidden;
}
.cv-funding-coin-icon img {position:absolute;inset:0;background:var(--color-panel)}
.c-funding-table .c-funding-exchange {
  flex: 0 1 auto;
}
.c-funding-table .c-funding-exchange .c-venue-logo {
  width: 26px;
  height: 26px;
  flex: 0 0 26px;
}
.c-funding-table .c-funding-exchange img {width: 100%;height: 100%}
.c-funding-table .c-funding-exchange strong {
  white-space: normal;
}
.c-funding-table .c-funding-settlement-time {
  display: block;
  color: var(--color-muted);
  font-size: 11px;
  font-variant-numeric: tabular-nums;
}
.c-funding-table .c-funding-clock {
  color: var(--color-accent);
}
.c-funding-table .c-funding-clock {
  min-width: 8ch;
  white-space: nowrap;
  display: inline-block;
  text-align: right;
}
@media (max-width: 767px) {
  .c-funding-filter-dialog #funding-conditions {grid-template-columns:1fr}
  .c-funding-workspace .c-funding-table tbody tr {grid-template-columns:91px minmax(0,1fr) minmax(0,1fr)}
  .cv-product-shell[data-theme] .c-funding-workspace .c-funding-table .c-scanner-row > td[data-column=star] {
    position:static;width:auto;height:auto;overflow:visible;
  }
  .c-funding-table .c-scanner-row-actions {position:relative;z-index:1;justify-content:flex-start}
  .c-funding-workspace[data-funding-mode=pairs] .c-funding-table tbody tr {
    grid-template-columns: repeat(12,minmax(0,1fr));
    grid-template-rows: 38px auto auto;
    column-gap: 3px;
  }
  .c-funding-workspace[data-funding-mode=pairs] .c-funding-table td[data-column=star] {grid-area: 1 / 1 / 2 / 6}
  .c-funding-workspace[data-funding-mode=pairs] .c-funding-table td[data-column=coin] {grid-area: 1 / 6 / 2 / 10}
  .c-funding-workspace[data-funding-mode=pairs] .c-funding-table td[data-column=net] {grid-area: 1 / 10 / 2 / -1}
  .c-funding-table td[data-column=route] {grid-area: 2 / 1 / 3 / 4}
  .c-funding-table td[data-column=funding] {grid-area: 2 / 4 / 3 / 7}
  .c-funding-table td[data-column=schedule] {grid-area: 2 / 7 / 3 / 10}
  .c-funding-workspace[data-funding-mode=pairs] .c-funding-table td[data-column=volume] {grid-area: 2 / 10 / 3 / -1}
  .c-funding-table td[data-column=spread] {grid-area: 3 / 1 / 4 / 7}
  .c-funding-workspace[data-funding-mode=pairs] .c-funding-table td[data-column=net] .c-funding-value {font-size: 12px}
  .c-funding-workspace[data-funding-mode=pairs] .c-funding-table td:is([data-column=route],[data-column=funding],[data-column=schedule],[data-column=volume])::before {
    content: attr(data-label);
    display: block;
    min-height: 22px;
    margin-bottom: 4px;
    color: var(--color-muted);
    font-size: 9px;
    line-height: 11px;
    white-space: normal;
  }
  .c-funding-table .c-funding-legs {grid-template-rows: repeat(2,43px)}
  .c-funding-table td:is([data-column=funding],[data-column=schedule]) .c-funding-leg {
    flex-direction: column;
    align-items: flex-end;
    justify-content: center;
    gap: 2px;
  }
  .c-funding-table .c-funding-leg .c-funding-exchange {gap: 3px; font-size: 10px}
  .c-funding-table .c-funding-leg .c-funding-exchange .c-venue-logo {width: 15px; height: 15px; flex-basis: 15px}
  .c-funding-table .c-funding-leg .c-funding-exchange strong {overflow-wrap: anywhere}
  .c-funding-table .c-funding-leg .c-funding-exchange::after {display: none}
  .c-funding-table .c-funding-leg :is(.c-funding-value,.c-funding-clock,.c-funding-interval) {font-size: 11px}
  .c-funding-table .c-funding-leg .c-funding-tag {font-size: 10px}
  .c-funding-table td[data-column=volume] .c-funding-leg .c-num {font-size: 10px}
}

/* Keep the table headers and cells on the same grid, with persistent paging icons. */
.cv-product-shell.cv-product-shell[data-theme] [data-funding-pages] > button {
  display:grid;
  place-items:center;
  padding:0;
}
.cv-product-shell.cv-product-shell[data-theme] [data-funding-pages] > button > svg {
  position:relative;
  display:block;
  flex:none;
  width:18px;
  height:18px;
}
.cv-product-shell.cv-product-shell[data-theme] [data-funding-pages] > button:disabled {opacity:.45}
.cv-product-shell.cv-product-shell[data-theme] .c-funding-workspace .c-funding-table :is(th,td):is([data-column=rate],[data-column=interval],[data-column=next],[data-column=normalized],[data-column=spread],[data-column=volume],[data-column=net],[data-column=schedule],[data-column=funding]) {
  text-align:center;
}
.cv-product-shell.cv-product-shell[data-theme] .c-funding-workspace .c-funding-table .c-sort-button {justify-content:center}
.c-funding-table .cv-funding-coin-icon {flex-basis:30px;height:30px}
.c-funding-table .cv-funding-coin-icon img {width:100%;height:100%}
.c-funding-table .c-funding-exchange .c-venue-logo {width:30px;height:30px;flex-basis:30px}
:root[data-theme] dialog#funding-filters.cv-native-scanner-modal,
:root[data-theme] dialog#funding-filters.cv-native-scanner-modal::backdrop,
:root[data-theme] #funding-filters .c-scanner-filter-backdrop {background:transparent!important}
:root[data-theme] dialog#funding-filters.cv-native-scanner-modal {
  box-shadow:none!important;
  -webkit-backdrop-filter:none!important;
  backdrop-filter:none!important;
}
:root[data-theme] .cv-product-shell.cv-product-shell[data-theme] #funding-filters .c-scanner-filter-dialog {
  background:linear-gradient(145deg,var(--cv-interface-highlight),transparent 65%),
    color-mix(in srgb,var(--cv-interface-popup) 57%,transparent)!important;
  -webkit-backdrop-filter:blur(20px) saturate(1.08);
  backdrop-filter:blur(20px) saturate(1.08);
}
@media(max-width:767px) {
  .c-funding-table .cv-funding-coin-icon {flex-basis:26px;height:26px}
  .c-funding-table .c-funding-exchange .c-venue-logo {width:24px;height:24px;flex-basis:24px}
}
