/* Trade page dropdowns: Price Guide-style searchable pickers.
   Desktop = compact floating panel. Mobile = true body-level fly-up sheet. */
.trade-page-select.trade-page-select--native-hidden{
  position:absolute !important;
  opacity:0 !important;
  pointer-events:none !important;
  width:1px !important;
  height:1px !important;
  margin:0 !important;
  padding:0 !important;
}
.trade-page-picker{
  position:relative;
  width:100%;
  min-width:0;
  z-index:5;
}
.trade-page-picker.is-open{ z-index:10020; }
.trade-page-picker-trigger{
  width:100%;
  min-height:44px;
  display:flex;
  align-items:center;
  justify-content:space-between;
  gap:10px;
  padding:10px 12px;
  border:1px solid var(--border);
  border-radius:14px;
  background:rgba(255,255,255,.04);
  color:var(--text);
  cursor:pointer;
  font-size:13px;
  font-weight:800;
  text-align:left;
  box-shadow:none;
}
.trade-page-picker-trigger:hover,
.trade-page-picker-trigger[aria-expanded="true"]{
  border-color:rgba(154,139,255,.55);
  background:rgba(154,139,255,.16);
}
.trade-page-picker-trigger:focus-visible{
  border-color:var(--focus);
  box-shadow:0 0 0 3px var(--focus-ring), var(--shadow);
  outline:none;
}
.trade-page-picker-trigger:disabled{ opacity:.55; cursor:not-allowed; }
.trade-page-picker-trigger-text{
  min-width:0;
  overflow:hidden;
  white-space:nowrap;
  text-overflow:ellipsis;
}
.trade-page-picker-trigger .material-symbols-outlined{ flex:0 0 auto; font-size:20px; }

.trade-page-picker-overlay{
  position:fixed;
  inset:0;
  z-index:10000;
  display:none;
  background:rgba(0,0,0,.52);
  backdrop-filter:blur(4px);
  -webkit-backdrop-filter:blur(4px);
}
.trade-page-picker-overlay.open{ display:block; }

.trade-page-picker-panel{
  position:fixed;
  left:12px;
  top:120px;
  width:min(420px, calc(100vw - 24px));
  height:auto;
  max-height:260px;
  display:none;
  grid-template-rows:auto minmax(0,1fr);
  gap:6px;
  padding:8px;
  border:1px solid var(--border);
  border-radius:16px;
  background:linear-gradient(180deg,var(--panel) 0%,var(--panel-2) 100%);
  box-shadow:var(--shadow);
  overflow:hidden;
  z-index:10010;
  overscroll-behavior:contain;
}
.trade-page-picker-panel.open{ display:grid; }
.trade-page-picker-panel.is-mobile-sheet{ display:none; }
.trade-page-picker-panel.is-mobile-sheet.open{ display:grid; }

.trade-page-picker-sheet-title{
  display:none;
  color:var(--muted);
  font-size:11px;
  font-weight:900;
  letter-spacing:.09em;
  text-transform:uppercase;
  padding:0 2px 1px;
}
.trade-page-picker-search-wrap{
  position:relative;
  z-index:2;
  display:flex;
  align-items:center;
  gap:8px;
  padding:9px 11px;
  border:1px solid rgba(255,255,255,.10);
  border-radius:14px;
  background:linear-gradient(180deg,var(--panel) 0%,var(--panel-2) 100%);
  box-shadow:0 10px 28px rgba(0,0,0,.18);
}
.trade-page-picker-search-wrap .material-symbols-outlined{ font-size:18px; color:var(--muted); }
.trade-page-picker-search{
  width:100%;
  min-width:0;
  border:0;
  outline:0;
  background:transparent;
  color:var(--text);
  font-size:16px;
  font-weight:700;
}
.trade-page-picker-search::placeholder{ color:var(--muted); opacity:.82; }
.trade-page-picker-options{
  min-height:0;
  overflow:auto;
  display:grid;
  align-content:start;
  gap:4px;
  padding-right:2px;
  -webkit-overflow-scrolling:touch;
  overscroll-behavior:contain;
  touch-action:pan-y;
}
.trade-page-picker-option{
  width:100%;
  min-height:42px;
  display:flex;
  align-items:center;
  justify-content:space-between;
  gap:10px;
  padding:10px 12px;
  border:0;
  border-radius:10px;
  background:transparent;
  color:var(--text);
  cursor:pointer;
  font-size:13px;
  font-weight:700;
  text-align:left;
}
.trade-page-picker-option:hover,
.trade-page-picker-option[aria-selected="true"]{ background:rgba(255,255,255,.08); }
.trade-page-picker-option .material-symbols-outlined{ font-size:18px; opacity:.85; flex:0 0 auto; }
.trade-page-picker-option.has-card-preview{
  min-height:64px;
  justify-content:flex-start;
  gap:10px;
  padding:8px 10px;
}
.trade-page-picker-option-preview-img,
.trade-page-picker-option-preview-ph{
  width:42px;
  flex:0 0 42px;
  aspect-ratio:3/4;
  object-fit:contain;
  border:1px solid rgba(255,255,255,.10);
  background:rgba(255,255,255,.04);
}
.trade-page-picker-option-preview-ph{
  opacity:.45;
  background:repeating-linear-gradient(45deg, rgba(255,255,255,.08), rgba(255,255,255,.08) 6px, rgba(255,255,255,.03) 6px, rgba(255,255,255,.03) 12px);
}
.trade-page-picker-option-preview-copy{
  min-width:0;
  display:grid;
  gap:3px;
  flex:1 1 auto;
}
.trade-page-picker-option-preview-line1,
.trade-page-picker-option-preview-line2{
  min-width:0;
  overflow:hidden;
  white-space:nowrap;
  text-overflow:ellipsis;
  line-height:1.2;
}
.trade-page-picker-option-preview-line1{
  color:var(--text);
  font-size:13px;
  font-weight:900;
}
.trade-page-picker-option-preview-line2{
  color:var(--muted);
  font-size:12px;
  font-weight:700;
}
.trade-page-picker-option.has-card-preview .material-symbols-outlined{
  margin-left:auto;
}
@media (min-width:781px){
  .trade-page-picker-option-preview-line1,
  .trade-page-picker-option-preview-line2{
    overflow:visible;
    white-space:normal;
    text-overflow:clip;
  }
}
.trade-page-picker-empty{ padding:11px 10px; color:var(--muted); font-size:13px; }
body.trade-page-picker-open{ overflow-x:hidden; }

/* Mobile sheet event-layer fix: keep the original select trigger behind the sheet/backdrop. */
@media (max-width:780px){
  .trade-page-picker.is-open{ z-index:5 !important; }
  .trade-page-picker-overlay.open{
    z-index:10020 !important;
    pointer-events:auto !important;
    touch-action:none !important;
  }
  .trade-page-picker-panel.is-mobile-sheet{
    z-index:10030 !important;
  }
}

@media (max-width:780px){
  html.trade-page-picker-lock,
  body.trade-page-picker-lock{
    overflow:hidden !important;
    overscroll-behavior:none !important;
  }
  .trade-page-picker-overlay.open{ display:block; }
  .trade-page-picker-panel.is-mobile-sheet{
    left:0 !important;
    right:0 !important;
    top:auto !important;
    bottom:var(--trade-vv-bottom, 0px) !important;
    width:100vw !important;
    max-width:none !important;
    height:min(72dvh, 560px) !important;
    height:min(calc(var(--trade-vvh, 100vh) * .72), 560px) !important;
    max-height:calc(var(--trade-vvh, 100vh) - 18px - env(safe-area-inset-top, 0px)) !important;
    padding:22px 12px calc(12px + env(safe-area-inset-bottom, 0px)) !important;
    border-left:0 !important;
    border-right:0 !important;
    border-bottom:0 !important;
    border-radius:22px 22px 0 0 !important;
    grid-template-rows:auto auto minmax(0,1fr) !important;
    box-shadow:0 -20px 60px rgba(0,0,0,.62) !important;
    transform:translate3d(0,100%,0);
    opacity:0;
    transition:transform .24s cubic-bezier(.2,.8,.2,1), opacity .18s ease;
    will-change:transform;
    z-index:10030 !important;
  }
  .trade-page-picker-panel.is-mobile-sheet.open{
    transform:translate3d(0,0,0);
    opacity:1;
  }
  .trade-page-picker-panel.is-mobile-sheet::before{
    content:"";
    position:absolute;
    top:8px;
    left:50%;
    transform:translateX(-50%);
    width:46px;
    height:4px;
    border-radius:999px;
    background:rgba(255,255,255,.35);
  }
  .trade-page-picker-sheet-title{ display:block; }
  .trade-page-picker-search-wrap{
    position:sticky;
    top:0;
    z-index:3;
    margin-top:0;
  }
  .trade-page-picker-options{
    min-height:0;
    max-height:none;
    overflow-y:auto;
    padding:2px 2px calc(8px + env(safe-area-inset-bottom, 0px));
  }
  .trade-page-picker-option{
    min-height:48px;
    font-size:14px;
    line-height:1.25;
    border-radius:12px;
  }
}
