/* One order surface. On narrow screens it floats above the chart and keeps
   the review action within reach while the details scroll. */
#desk-ticket {
  --tx-accent:#ff84bc;
  --tx-ink:#270b19;
  --tx-muted:#b2b9cb;
  --tx-panel:#171924;
  --tx-gap:clamp(14px,2vw,23px);
  padding:var(--tx-gap);
  background:var(--tx-panel);
  color:#f6f7fc;
  min-width:0;
  align-self:start;
}
#desk-ticket:is([data-side=buy],[data-side=deposit]){--tx-accent:#51dfb4;--tx-ink:#06281e}
#desk-ticket:is([data-side=sell],[data-side=withdraw]){--tx-accent:#ff8898;--tx-ink:#320f19}
#desk-ticket [hidden]{display:none!important}
.tx-head,.tx-leg-head,.tx-pick-head,.tx-token,.tx-number,#desk-edit-unit,.tx-details summary{
  display:flex;align-items:center;justify-content:space-between;gap:10px;
}
.tx-head h2{flex:1;min-width:0;font-size:1.12rem}
.tx-practice{font-size:.77rem;color:#e8c99b;background:#e9b45912;padding:3px 9px;border-radius:20px}
#desk-ticket .ad-modes{margin:16px 0;background:#0d0f17;border:1px solid #ffffff0b}
#desk-ticket .ad-modes button[aria-pressed=true]{
  background:color-mix(in srgb,var(--tx-accent) 16%,#12131d);color:var(--tx-accent)
}
.tx-pair{position:relative}
.tx-leg{
  border:1px solid #ffffff17;border-radius:18px;padding:13px 16px;
  background:#212432;min-width:0;overflow-wrap:anywhere;
}
.tx-send{background:linear-gradient(120deg,#151825,#10121c)}
.tx-send:has(input:focus){border-color:var(--tx-accent);box-shadow:0 0 0 2px color-mix(in srgb,var(--tx-accent) 10%,transparent)}
.tx-send:has(input[aria-invalid=true]){border-color:#ff8898}
.tx-leg-head{font-size:.84rem;color:var(--tx-muted);flex-wrap:wrap;gap:4px 8px}
.tx-token{font-size:.92rem;color:#fff;font-weight:580;gap:6px;min-height:35px}
.tx-token img,.tx-picker img{object-fit:contain;flex:none}
button.tx-token{
  border-radius:12px;padding:4px 9px;min-height:44px;background:#333747;
  color:#ffe3f1;text-align:start
}
button.tx-token:hover{background:#414657}
.tx-number{direction:ltr;justify-content:flex-start;gap:8px;cursor:text}
#desk-unit{font-size:.92rem;color:var(--tx-muted);flex:none;white-space:nowrap}
#desk-ticket .ad-amount{
  font:inherit;font-weight:650;font-size:2rem;font-variant-numeric:tabular-nums;min-height:52px;
  padding:1px 0;background:transparent;border:0;border-radius:0;outline:0;box-shadow:none;caret-color:var(--tx-accent)
}
#desk-ticket .ad-amount.tx-long{font-size:1.35rem}
@supports(field-sizing:content){
  #desk-ticket .ad-amount{field-sizing:content;width:auto;min-width:1ch;max-width:calc(100% - 4rem)}
}
#desk-ticket .ad-amount::placeholder{color:#939bac}
#desk-free{display:block;color:var(--tx-muted);font-size:.81rem}
#desk-ticket .ad-presets{margin:9px 0 4px;gap:6px}
#desk-ticket .ad-presets button{
  border:1px solid #ffffff0e;background:#ffffff0c;color:#e4e7f1;
  min-height:41px;font-size:.86rem;padding:2px 4px
}
#desk-ticket .ad-presets button:disabled{opacity:.45;cursor:default}
#desk-ticket .ad-presets button:enabled:is(:hover,:focus-visible){color:var(--tx-accent);border-color:currentColor}
.tx-bridge{height:7px;display:grid;place-content:center;position:relative;pointer-events:none}
.tx-bridge svg{width:34px;height:34px;padding:6px;border-radius:50%;border:3px solid var(--tx-panel);color:var(--tx-accent);background:#323544}
.tx-bridge svg path{d:path("M12 4v15m-6-6 6 6 6-6")}
.tx-pair[data-reverse=true] .tx-bridge svg{transform:rotate(180deg)}
.tx-get{padding-top:17px}
#desk-estimate{display:block;text-align:left;font-size:1.38rem;font-weight:650;color:#fff;overflow-wrap:anywhere}
#desk-edit-unit{width:100%;min-height:44px;flex-direction:row-reverse;flex-wrap:wrap;gap:2px 12px}
#desk-edit-unit span{color:var(--tx-accent);font-size:.84rem;text-decoration:underline;text-underline-offset:4px}
#desk-ticket .ad-calc{padding:12px 1px 0;gap:6px}
#desk-ticket .ad-calc>div,#desk-ticket .ad-calc b{font-size:.84rem;overflow-wrap:anywhere}
#desk-ticket .ad-calc>div{display:flex;align-items:baseline;justify-content:space-between;gap:12px}
#desk-ticket .ad-calc #desk-change{display:grid}
#desk-ticket #desk-rounded b{color:#ffce8b}
.tx-details summary{cursor:pointer;list-style:none;color:#c4ccdc;min-height:44px;font-size:.86rem}
.tx-details summary::-webkit-details-marker{display:none}
.tx-details[open] summary svg{transform:rotate(180deg)}
.tx-details .ad-practice{margin:0;line-height:1.85}
.tx-footer{background:var(--tx-panel);padding:6px 0 0}
#desk-ticket .ad-error{font-size:.87rem;margin:0 0 9px}
#desk-ticket .ad-fundable{color:#ffce8b}
#desk-ticket .ad-submit{margin:0;min-height:51px;background:var(--tx-accent);color:var(--tx-ink);font-size:1rem}
#desk-ticket .ad-submit:disabled{background:#333746;color:#b8bfd0}
.tx-picker{
  width:min(430px,calc(100% - 26px));max-width:none;max-height:min(78dvh,640px);
  border:1px solid #ffffff1a;background:#171924;color:#fff;
  border-radius:22px;margin:auto;padding:18px;box-shadow:0 16px 80px #0008;
  font:inherit;overscroll-behavior:contain;
}
.tx-picker[open]{display:flex;flex-direction:column;gap:12px}
.tx-picker::backdrop{background:#050712b8;backdrop-filter:blur(6px)}
.tx-pick-head h2{font-size:1.12rem;margin:0}
.tx-pick-head button{font:24px Arial;width:44px;height:44px;border-radius:12px;background:#ffffff0d}
#desk-search{
  flex:none;width:100%;padding:10px 13px;min-height:46px;font:inherit;font-size:1rem;
  border:1px solid #555d72;background:#10121b;border-radius:12px;color:#fff
}
.tx-picker :is(button,input):focus-visible{outline:2px solid #ff87be;outline-offset:1px}
.tx-results{overflow:auto;overscroll-behavior:contain;padding:3px;min-height:64px}
.tx-results button{
  width:100%;display:flex;align-items:center;gap:12px;text-align:start;
  padding:10px;border-radius:12px;min-height:62px;color:#f6f7fb
}
.tx-results button[aria-current=true],.tx-results button:enabled:hover{background:#ffffff0d;color:#ff99c7}
.tx-results button:disabled{color:#a7afc0;cursor:default}
.tx-results button:disabled img{filter:grayscale(1);opacity:.6}
.tx-results span{flex:1}
.tx-results b,.tx-results small{display:block}
.tx-results small{font-size:.8rem;color:#b6bfd0;margin-top:2px}
.tx-results button:disabled small{color:#d8bc94}
html:has(.tx-picker[open]){overflow:hidden}
@media(max-width:760px){
  html:has(.desk-order-open #desk-ticket){overflow:hidden}
  .desk-order-open:has(#desk-ticket)::after{content:"";position:fixed;inset:0;z-index:109}
  body:has(.desk-order-open #desk-ticket) :is(.mast,.skip,.ad-top,.ad-market,.ad-context,.ad-quick){interactivity:inert}
  .ad-product.desk29.desk-order-open .ad-quick{display:none}
  .ad-product.desk29.desk-order-open #desk-ticket{
    position:fixed;z-index:110;inset:auto 0 0;margin:0 auto;
    width:100%;max-width:580px;max-height:calc(100dvh - 12px - env(safe-area-inset-top));
    border-radius:24px 24px 0 0;overflow-y:auto;overscroll-behavior:contain;
    box-shadow:0 0 0 150vmax #05060ecd,0 -18px 70px #0007;
    padding-block:0;scroll-padding:74px 0 100px;
  }
  .ad-product #desk-ticket :is(input,button){scroll-margin-block:6px}
  .tx-head{position:sticky;top:0;background:var(--tx-panel);z-index:3;padding:12px 0 5px}
  #desk-ticket .ad-modes{margin:7px 0 14px}
  .tx-footer{position:sticky;bottom:0;z-index:2;padding-bottom:max(16px,env(safe-area-inset-bottom))}
  .tx-picker{width:100%;margin:auto auto 0;border-radius:22px 22px 0 0;padding-bottom:max(16px,env(safe-area-inset-bottom))}
}
@media(max-width:355px),(max-height:600px){
  .tx-leg{padding:10px 12px}
  #desk-ticket .ad-modes button{gap:4px}
  #desk-ticket .ad-amount{font-size:1.55rem;min-height:43px}
}
@media(max-height:460px){
  .tx-head,.tx-footer{position:static}
  .ad-product.desk29.desk-order-open #desk-ticket{scroll-padding:10px}
}

/* Keep both legs in the same place, regardless of which amount is fixed. */
#desk-ticket .tx-pair{display:grid;gap:9px}
#desk-ticket .tx-leg{background:#111420;padding:10px 14px;min-width:0}
#desk-ticket .tx-fixed{background:linear-gradient(115deg,#191e2b,#10131d)}
#desk-ticket .tx-leg:focus-within{border-color:var(--tx-accent)}
#desk-ticket .tx-leg:has([aria-invalid=true]){border-color:#ff8898}
#desk-ticket .tx-leg-head label{cursor:text;color:#d7dbe7}
#desk-ticket .tx-fixed .tx-leg-head label{color:var(--tx-accent)}
#desk-ticket .tx-number{min-height:48px;justify-content:space-between;border-bottom:1px solid #ffffff18;margin:1px 0 6px;cursor:text}
#desk-ticket .tx-number span{font-size:.89rem;color:#c0c8d7}
#desk-ticket .tx-number input{flex:1;min-width:0;width:0;text-align:left;min-height:46px;font-size:1.78rem}
#desk-ticket .tx-number input.tx-long{font-size:1.24rem}
#desk-ticket .tx-get input{color:var(--tx-accent)}
#desk-ticket .tx-get small{color:#c5cbd8;font-size:.84rem;line-height:1.65}
#desk-ticket .tx-disclose{display:flex;align-items:center;color:var(--tx-accent);font:inherit;font-size:.86rem;background:none;border:0;padding:4px 0;min-height:37px;cursor:pointer}
#desk-ticket .tx-disclose:focus-visible,#desk-swap:focus-visible{outline:2px solid #ffc2de;outline-offset:2px}
#desk-ticket #desk-swap{position:relative;z-index:1;justify-self:center;margin:-25px 0;display:grid;place-items:center;width:43px;height:43px;border:3px solid var(--tx-panel);border-radius:50%;background:#453146;color:#ffb3d8}
#desk-swap svg{transform:rotate(90deg)}
#desk-swap:disabled{opacity:.65;cursor:not-allowed}
#desk-ticket #desk-change{display:flex;color:#79e5c7}
#desk-ticket #desk-after b{font-size:.96rem;color:#fff}
#desk-ticket #desk-fix{margin:auto;justify-content:center;min-height:42px}
#desk-ticket .ad-error:empty{display:none}
#desk-ticket .tx-footer{box-shadow:0 -5px 14px #17192444}
#desk-ticket .tx-rates:has(>div:not([hidden])){padding-top:11px}
#desk-ticket .tx-rates:not(:has(>div:not([hidden]))){padding-top:0}
#desk-ticket .ad-presets{margin-bottom:1px}
.tx-picker[open]{width:min(510px,calc(100% - 24px));max-height:min(87dvh,790px);gap:10px}
.tx-picker .tx-basis{display:flex;align-items:center;gap:8px;background:#11141f;border:1px solid #ffffff20;border-radius:14px;padding:5px 12px;font-size:.91rem}
.tx-picker .tx-basis input{font:inherit;font-size:1.2rem;min-width:50px;width:0;flex:1;color:#fff;background:transparent;border:0;padding:5px;text-align:left}
.tx-basis b{color:#bbc2d4;font-weight:400}
.tx-filters:not([hidden]){display:flex;gap:6px;overflow:auto;flex:none;scrollbar-width:thin;padding:3px}
.tx-filters button{white-space:nowrap;padding:7px 12px;color:#d9deeb;background:#232736;border-radius:30px;font:inherit;font-size:.86rem;min-height:39px}
.tx-filters button[aria-pressed=true]{background:#f8c2dd;color:#321525}
.tx-comparison-note{line-height:1.6;color:#c9cedc;font-size:.83rem}
.tx-picker .tx-results button{gap:8px;border-top:1px solid #ffffff0d;padding:10px 5px;overflow-wrap:anywhere}
.tx-picker .tx-results span{min-width:0}
.tx-results .tx-yield{text-align:left;flex:1.35;font-variant-numeric:tabular-nums;color:#8fe7d2}
.tx-results .tx-yield small{color:#e0ccaa}
.tx-results .tx-yield small:empty{display:none}
@media(max-width:760px){
 .tx-picker[open]{width:100%;max-height:92dvh;padding-inline:15px}
 #desk-ticket .tx-head h2{margin:0}
 #desk-ticket .ad-modes{margin:4px 0 10px}
 .ad-product.desk29.desk-order-open #desk-ticket{max-height:calc(var(--trade-height,100dvh) - 10px);bottom:var(--trade-bottom,0px)}
 .tx-picker[open]{max-height:calc(var(--trade-height,100dvh) - 10px);bottom:var(--trade-bottom,0px)}
}
@media(max-height:710px){
 #desk-ticket .tx-head{padding-block:2px}
 #desk-ticket .tx-leg{padding:6px 11px}
 #desk-ticket .tx-number,#desk-ticket .tx-number input{min-height:39px}
 #desk-ticket .tx-number input{font-size:1.4rem}
 #desk-ticket .tx-footer{padding-block:3px max(7px,env(safe-area-inset-bottom))}
 #desk-ticket .ad-presets{margin-top:4px}
 #desk-ticket .ad-presets button{min-height:37px}
 #desk-ticket .tx-disclose{min-height:32px}
 #desk-ticket .ad-submit{min-height:45px}
}
#desk-ticket.tx-keyboard :is(.tx-head,.tx-footer){position:static}
.tx-picker.tx-keyboard{display:block;overflow:auto}
.tx-picker.tx-keyboard>*{margin-block:5px}

.tx-picker .tx-option{display:flex;align-items:center;border-top:1px solid #ffffff0d}
.tx-picker .tx-option button{border-top:0;min-width:0}
.tx-picker .tx-option .tx-pin{flex:0 0 43px;justify-content:center;min-height:44px;color:#a6afc5}
.tx-picker .tx-pin[aria-pressed=true]{color:#ff95c6;background:#ff95c616}
.tx-picker .tx-pin[aria-pressed=true] svg{fill:currentColor}
.tx-filters button[hidden]{display:none}
.tx-picker .tx-filters{scrollbar-width:none}
.tx-pen{width:15px;height:15px;flex:none;stroke:#a9b2c6;stroke-width:1.6;fill:none;stroke-linejoin:round}
.tx-number:focus-within .tx-pen{stroke:var(--tx-accent)}
#desk-ticket .tx-get:has(#desk-to):not(:has(input)) .tx-leg-head>span{display:none}
#desk-ticket .tx-get:has(#desk-to):not(:has(input)) #desk-to{color:#231320;background:var(--tx-accent);width:100%;justify-content:center;margin-block:4px 9px}

#desk-ticket #desk-title[tabindex="-1"]:focus{outline:none}
