/* Swap token picker (fixed to the viewport) and quote status. Uses the site's own colour variables. */
html.tk-lock{overflow:hidden}

/* token icon (selector button + list rows) */
.tk-icon{position:relative;display:inline-block;flex:none;border-radius:9999px;background:var(--bg-surface-primary,#f1f5f9)}
.tk-icon-letter{position:absolute;inset:1px;display:flex;align-items:center;justify-content:center;border-radius:9999px;
  background:var(--stroke-subtle,#e1e8f1);color:var(--fg-secondary,#61748e);font-weight:800}
.tk-icon-img{position:absolute;inset:0;width:100%;height:100%;border-radius:9999px;object-fit:cover}
.tk-badge{position:absolute;right:-2px;bottom:-2px;display:flex;align-items:center;justify-content:center;overflow:hidden;border-radius:9999px;
  background:var(--stroke-strong,#cbd5e1);color:var(--fg-primary,#0b172d);font-weight:800;line-height:1;box-shadow:0 0 0 1.5px var(--btn-secondary-bg,#fff)}
.tk-badge-img{width:100%;height:100%;object-fit:cover}

/* quote status under the two amount boxes */
.quote-status{display:flex;flex-direction:column;gap:2px;margin-top:10px;padding:0 4px;font-size:13px;font-weight:700;line-height:1.35;color:var(--fg-secondary,#61748e)}
.quote-status[hidden]{display:none}
.quote-status-detail{font-weight:600;color:var(--fg-tertiary,#8ca3bb)}
.quote-status[data-state="loading"] .quote-status-main::after{content:"";display:inline-block;width:10px;height:10px;margin-left:8px;border-radius:9999px;
  border:2px solid currentColor;border-right-color:transparent;vertical-align:-1px;animation:tk-spin .8s linear infinite}
.quote-status[data-state="success"] .quote-status-main{color:var(--fg-primary,#0b172d)}
.quote-status[data-state="under-min"] .quote-status-main,.quote-status[data-state="invalid"] .quote-status-main{color:#b45309}
.quote-status[data-state="error"] .quote-status-main{color:#dc2626}
@keyframes tk-spin{to{transform:rotate(360deg)}}

/* picker overlay + panel */
.tk-overlay{position:fixed;inset:0;z-index:1000;display:flex;align-items:center;justify-content:center;padding:16px;
  background:rgba(11,23,45,.55);-webkit-backdrop-filter:blur(6px);backdrop-filter:blur(6px)}
.tk-overlay[hidden]{display:none}
.tk-panel{display:flex;flex-direction:column;width:min(440px,100%);max-height:min(640px,calc(100vh - 32px));max-height:min(640px,calc(100dvh - 32px));
  border-radius:24px;background:var(--btn-secondary-bg,#fff);color:var(--fg-primary,#0b172d);box-shadow:0 24px 70px rgba(11,23,45,.35);overflow:hidden}
.tk-head,.tk-search,.tk-chains,.tk-note{flex:none}
.tk-head{display:flex;align-items:center;justify-content:space-between;padding:18px 20px 8px}
.tk-title{margin:0;font-size:20px;font-weight:900;letter-spacing:-.01em}
.tk-close{display:inline-flex;align-items:center;justify-content:center;width:36px;height:36px;border-radius:9999px;border:0;background:var(--bg-surface-primary,#f1f5f9);color:var(--fg-secondary,#61748e)}
.tk-close:hover{background:var(--btn-secondary-bg-hover,#e1e8f1)}
.tk-search{position:relative;padding:8px 20px 4px}
.tk-search-icon{position:absolute;left:34px;top:50%;transform:translateY(-35%);color:var(--fg-tertiary,#8ca3bb);pointer-events:none}
.tk-search-input{width:100%;height:44px;padding:0 14px 0 42px;border:1.5px solid var(--input-stroke-default,#e1e8f1);border-radius:9999px;
  background:var(--input-bg-default,#f1f5f9);color:var(--fg-primary,#0b172d);font:inherit;font-size:16px;font-weight:700;outline:none}
.tk-search-input::placeholder{color:var(--fg-tertiary,#8ca3bb);font-weight:700}
.tk-search-input:focus{border-color:var(--input-stroke-focus,#0081ff);background:var(--input-bg-hover,#fff)}
.tk-chains{display:flex;gap:8px;padding:10px 20px 6px;overflow-x:auto;scrollbar-width:none;-webkit-overflow-scrolling:touch}
.tk-chains::-webkit-scrollbar{display:none}
.tk-chip{flex:none;height:32px;padding:0 12px;border-radius:9999px;border:1.5px solid var(--stroke-subtle,#e1e8f1);background:transparent;
  color:var(--fg-secondary,#61748e);font:inherit;font-size:13px;font-weight:800;white-space:nowrap}
.tk-chip:hover{background:var(--bg-surface-primary,#f1f5f9)}
.tk-chip[aria-pressed="true"]{background:var(--action-primary-alpha-10,#0081ff1a);border-color:var(--action-primary,#0081ff);color:var(--action-primary,#0081ff)}
.tk-list{flex:1 1 auto;min-height:120px;overflow-y:auto;overscroll-behavior:contain;padding:6px 10px 10px;-webkit-overflow-scrolling:touch}
.tk-row{display:flex;align-items:center;gap:12px;width:100%;min-height:58px;padding:8px 10px;border:0;border-radius:16px;background:transparent;
  color:inherit;font:inherit;text-align:left}
.tk-row:hover,.tk-row:focus-visible{background:var(--bg-surface-primary,#f1f5f9);outline:none}
.tk-row[aria-selected="true"]{background:var(--action-primary-alpha-10,#0081ff1a)}
.tk-row-main{display:flex;flex:1 1 auto;min-width:0;flex-direction:column;gap:1px}
.tk-row-symbol{font-size:16px;font-weight:900;line-height:1.2;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}
.tk-row-name{font-size:13px;font-weight:700;color:var(--fg-secondary,#61748e);overflow:hidden;text-overflow:ellipsis;white-space:nowrap}
.tk-net{flex:none;max-width:42%;padding:3px 9px;border-radius:9999px;background:var(--bg-surface-primary,#f1f5f9);color:var(--fg-secondary,#61748e);
  font-size:12px;font-weight:800;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}
.tk-net-dup{background:var(--action-primary-alpha-10,#0081ff1a);color:var(--action-primary,#0081ff)}
.tk-check{flex:none;display:inline-flex;color:var(--action-primary,#0081ff)}
.tk-note{min-height:0;padding:0 20px 14px;font-size:13px;font-weight:700;color:var(--fg-secondary,#61748e);text-align:center}
.tk-note:empty{padding:0}
.tk-retry{border:0;background:none;color:var(--action-primary,#0081ff);font:inherit;font-weight:900;text-decoration:underline}

html.dark .tk-panel{background:#1e293b;color:#fff}
html.dark .tk-search-input,html.dark .tk-close,html.dark .tk-net{background:#2a3950;color:#e2e8f0}

/* narrow screens: bottom sheet */
@media (max-width:640px){
  .tk-overlay{align-items:flex-end;padding:0}
  .tk-panel{width:100%;max-height:88vh;max-height:88dvh;border-radius:24px 24px 0 0;padding-bottom:env(safe-area-inset-bottom,0px);animation:tk-sheet .22s ease-out}
  .tk-head{padding:16px 16px 6px}
  .tk-search{padding:6px 16px 2px}
  .tk-search-icon{left:30px}
  .tk-chains{padding:10px 16px 6px}
}
@keyframes tk-sheet{from{transform:translateY(24px);opacity:0}to{transform:none;opacity:1}}
@media (prefers-reduced-motion:reduce){.tk-panel{animation:none}.quote-status[data-state="loading"] .quote-status-main::after{animation:none}}
