/* ==========================================================================
   Global Markets — UMDropdown (deposit / withdraw / bots / country picker)
   public/js/dropdown.js generates this markup, so every class name below is
   load-bearing: .um-dd, .um-dd-toggle, .um-dd-label, .um-dd-arrow, .um-dd-menu,
   .um-dd-search-wrap, .um-dd-search, .um-dd-list, .um-dd-empty, .um-dd-item,
   .nm / .ttl / .sub, .check, .icon, .cur-icon. Renamed = broken component.

   Toned to the shared tokens: sunk input, elevated menu, hairline borders,
   quiet green for the selected row. The generated <svg> icons carry a heavy
   stroke-width attribute, so the CSS `stroke-width` property thins them here
   rather than in the script.
   ========================================================================== */

.um-dd{position:relative;width:100%;font-family:inherit}

/* ---- Toggle: reads as the same control as a .field input ---- */
.um-dd-toggle{
  display:flex;align-items:center;gap:10px;
  width:100%;text-align:left;cursor:pointer;
  background:var(--surface-sunk);border:1px solid var(--border-2);
  color:var(--text);font-family:inherit;font-size:14px;
  padding:10px 13px;border-radius:var(--r-btn);
  transition:border-color var(--t-fast),background var(--t-fast),box-shadow var(--t-fast);
}
.um-dd-toggle:hover{border-color:var(--border-3)}
.um-dd-toggle:focus,
.um-dd.open .um-dd-toggle{
  outline:none;border-color:rgba(32,216,137,0.5);
  box-shadow:0 0 0 3px var(--green-glow);background:var(--surface-2);
}
.um-dd-toggle .um-dd-label{
  flex:1;min-width:0;display:flex;align-items:center;gap:10px;
  color:var(--text);font-weight:540;
}
.um-dd-toggle .um-dd-label.placeholder{color:var(--text-mute);font-weight:400}
.um-dd-toggle .um-dd-arrow{
  flex-shrink:0;color:var(--text-mute);stroke-width:1.75;
  transition:transform var(--t-fast),color var(--t-fast);
}
.um-dd.open .um-dd-arrow{transform:rotate(180deg);color:var(--text-dim)}

/* ---- Menu: one step above the page, hairline, minimal depth ---- */
.um-dd-menu{
  position:absolute;top:calc(100% + 5px);left:0;right:0;z-index:80;
  background:var(--surface-2);border:1px solid var(--border-2);
  border-radius:var(--r-sm);
  max-height:300px;overflow:hidden;padding:5px;
  box-shadow:var(--shadow-3);
  display:none;
}
.um-dd.open .um-dd-menu{display:block}

/* Search box (long lists) — sticky at the top; the item list scrolls below it. */
.um-dd-search-wrap{
  padding:2px 2px 6px;position:sticky;top:0;z-index:1;
  background:var(--surface-2);
}
.um-dd-search{
  width:100%;box-sizing:border-box;
  background:var(--surface-sunk);border:1px solid var(--border-2);color:var(--text);
  border-radius:var(--r-btn);padding:9px 12px;
  font-size:13.5px;font-family:inherit;
  transition:border-color var(--t-fast),box-shadow var(--t-fast),background var(--t-fast);
}
.um-dd-search::placeholder{color:var(--text-mute)}
.um-dd-search:hover{border-color:var(--border-3)}
.um-dd-search:focus{
  outline:none;border-color:rgba(32,216,137,0.5);
  box-shadow:0 0 0 3px var(--green-glow);
}

.um-dd-list{max-height:236px;overflow:auto}
.um-dd-empty{padding:14px 10px;text-align:center;color:var(--text-mute);font-size:13px}

/* ---- Rows ---- */
.um-dd-item{
  display:flex;align-items:center;gap:10px;
  padding:9px 11px;border-radius:var(--r-xs);
  color:var(--text);cursor:pointer;font-size:14px;
  transition:background var(--t-fast),color var(--t-fast);
}
.um-dd-item:hover{background:rgba(255,255,255,0.03)}
/* Selected: quiet green text on the solid tint, plus a thin green indicator
   drawn with an inset shadow so the flex layout stays untouched. */
.um-dd-item.selected{
  background:var(--green-soft);color:var(--green-quiet);font-weight:560;
  box-shadow:inset 2px 0 0 var(--green-quiet);
}
.um-dd-item.selected:hover{background:var(--green-soft)}
.um-dd-item .check{margin-left:auto;color:var(--green-quiet);stroke-width:1.75;opacity:0}
.um-dd-item.selected .check{opacity:1}
.um-dd-item .nm{display:flex;flex-direction:column;line-height:1.25;min-width:0}
.um-dd-item .nm .ttl{font-weight:560;font-size:13.5px}
.um-dd-item .nm .sub{color:var(--text-mute);font-size:11.5px}

/* ---- Identity chips (flag / coin artwork, or the initial-letter fallback) ---- */
.um-dd-item .icon{flex-shrink:0;width:30px;height:30px;display:flex;align-items:center;justify-content:center}
.um-dd-item .icon img,.um-dd-item .icon svg{width:30px;height:30px;border-radius:50%}
.um-dd-toggle .icon{width:28px;height:28px;display:flex;align-items:center;justify-content:center;flex-shrink:0}
.um-dd-toggle .icon img,.um-dd-toggle .icon svg{width:28px;height:28px;border-radius:50%}

/* The asset artwork carries its own colour, so the chip behind it is neutral. */
.cur-icon{
  width:30px;height:30px;border-radius:50%;flex-shrink:0;overflow:hidden;
  display:flex;align-items:center;justify-content:center;
  background:var(--surface-3);border:1px solid var(--border-2);
  color:var(--text-dim);font-weight:600;font-size:11px;
}

/* ==========================================================================
   Legacy bot helpers kept for older markup. The dropzone, the bot settings
   grid and the bot cards are owned by theme.css / bot.css now, so this file no
   longer redeclares them — it would only shadow the restyled versions.
   ========================================================================== */

/* Trade history mini-table. */
.bot-trades-table{width:100%;border-collapse:collapse;font-size:13px}
.bot-trades-table th{
  padding:9px 10px;text-align:left;
  color:var(--text-mute);font-weight:560;font-size:10.5px;
  letter-spacing:0.07em;text-transform:uppercase;
  background:var(--surface-sunk);border-bottom:1px solid var(--border);
}
.bot-trades-table td{padding:9px 10px;border-top:1px solid var(--border);font-variant-numeric:tabular-nums}
.bot-trades-table tr:hover td{background:rgba(255,255,255,0.022)}
/* Table cells are ordinary data — the quiet pair, never the CTA green. */
.pnl-pos{color:var(--green-quiet);font-weight:560;font-variant-numeric:tabular-nums}
.pnl-neg{color:var(--red-quiet);font-weight:560;font-variant-numeric:tabular-nums}

/* Pair icon (two overlapping identity discs). */
.pair-icon{position:relative;width:36px;height:30px;flex-shrink:0;display:inline-block}
.pair-icon .flg,.pair-icon .crypto{
  position:absolute;width:24px;height:24px;border-radius:50%;overflow:hidden;
  display:flex;align-items:center;justify-content:center;
  background:var(--surface-3);border:2px solid var(--surface-2);
}
.pair-icon .flg:nth-child(1),.pair-icon .crypto:nth-child(1){left:0;top:3px;z-index:2}
.pair-icon .flg:nth-child(2),.pair-icon .crypto:nth-child(2){right:0;top:3px;z-index:1}
.pair-icon img,.pair-icon svg{display:block;width:100%;height:100%;object-fit:cover}
.crypto-letter{
  width:100%;height:100%;display:flex;align-items:center;justify-content:center;
  color:var(--text);font-weight:600;font-size:11px;line-height:1;
}
