/* ============================================================
   overlay.css
   Consolidated overlay system: all popup/modal overlays
   (.ai-popup-overlay, .wallet-popup-overlay, .bridge-popup-overlay,
   .launch-popup-overlay, .launches-overlay, .overlay, .sdx-popup-overlay,
   #gidoverse-popup-overlay, #tradefi-popup-overlay, #wpin-panel-overlay, etc.)
   Includes base styles, theme variants, and sidebar-collapsed /
   sidebar-expanded offset & padding rules.
   Migrated from: agent.css, swap.css, bridge.css, launches.css, wallet.css,
   tokens-select.css, style.css, unified-nav.css, swapdex-redesign.css,
   pakixto-theme.css, unified-platform.css, rizq-base.css
   Load this file LAST (after all other page stylesheets) so it wins cascade.
   ============================================================ */

/* ---------- migrated from css/agent.css ---------- */
.ai-popup-overlay {
  background: var(--bg) !important;
  backdrop-filter: none !important;
  -webkit-backdrop-filter: none !important;
}

.ai-popup-overlay.open ~ header #hdr-ai-settings-wrap,
body.ai-open header #hdr-ai-settings-wrap { display:flex !important; }

.ai-popup-overlay.open ~ header #hdr-ai-settings-wrap,

/* Reposition settings menu so it drops down correctly from main header */
#hdr-ai-settings-wrap .ai-settings-menu {
  position: fixed !important;
  top: 60px !important;
  left: 0 !important;
  right: 0 !important;
  bottom: 0 !important;
  width: 100% !important;
  max-height: none !important;
  transform: none !important;
  overflow-y: auto !important;
  overflow-x: hidden !important;
  -webkit-overflow-scrolling: touch !important;
  overscroll-behavior: contain !important;
  scrollbar-width: none !important;
  z-index: 9995 !important;
  border: none !important;
  border-radius: 0 !important;
  box-shadow: none !important;
  padding: 16px !important;
}

.ai-popup-overlay{
  display:none;
  position:fixed;top:62px;left:0;right:0;bottom:0;z-index:1000;
  background:var(--card,#131412);
  overflow:hidden;
}

.ai-popup-overlay.open{
  display:flex;flex-direction:column;
  /* animation:aiFadeIn .22s ...; — disabled: dust-transition.js drives
     the fade-in for this panel now (via switchView). Having both fired
     a double fade ("blink"). */
}

.wallet-popup-overlay, .ai-popup-overlay,

/* ── Wallet popup ── */
.wallet-popup-overlay, .ai-popup-overlay,
.bridge-popup-overlay, .launch-popup-overlay {
  background: var(--bg, #000000) !important;
}

body.theme-light .bridge-popup-overlay {
  background: #ffffff !important;
}

body.theme-dark .wallet-popup-overlay,
body.theme-dark .ai-popup-overlay,
body.theme-dark .bridge-popup-overlay,
body.theme-dark .launch-popup-overlay,
body.theme-dark #gidoverse-popup-overlay,

/* ── Claude official theme colors for all overlays ── */
/* Dark mode */
body.theme-dark .wallet-popup-overlay,
body.theme-dark .ai-popup-overlay,
body.theme-dark .bridge-popup-overlay,
body.theme-dark .launch-popup-overlay,
body.theme-dark #gidoverse-popup-overlay,
body.theme-dark #tradefi-popup-overlay,
body.theme-dark #stk-popup-overlay {
  background: #000000 !important;
  backdrop-filter: none !important;
  -webkit-backdrop-filter: none !important;
}

body.theme-light .wallet-popup-overlay,
body.theme-light .ai-popup-overlay,
body.theme-light .bridge-popup-overlay,
body.theme-light .launch-popup-overlay,
body.theme-light #gidoverse-popup-overlay,

/* Light mode */
body.theme-light .wallet-popup-overlay,
body.theme-light .ai-popup-overlay,
body.theme-light .bridge-popup-overlay,
body.theme-light .launch-popup-overlay,
body.theme-light #gidoverse-popup-overlay,
body.theme-light #tradefi-popup-overlay,
body.theme-light #stk-popup-overlay {
  background: #ffffff !important;
  backdrop-filter: none !important;
  -webkit-backdrop-filter: none !important;
}

html[data-theme="light"] .ai-popup-overlay,
body.theme-light .ai-popup-overlay,
html[data-theme="light"] .ai-panel,

/* ── 8. LIGHT MODE CHAT TEXT FIXES ── */

html[data-theme="light"] .ai-popup-overlay,
body.theme-light .ai-popup-overlay,
html[data-theme="light"] .ai-panel,
body.theme-light .ai-panel {
  background: #FFFFFF !important;
}

/* ---------- migrated from css/swap.css ---------- */
.overlay{
  display:none;position:fixed;inset:0;background:rgba(0,0,0,.9);
  backdrop-filter:blur(10px);-webkit-backdrop-filter:blur(10px);z-index:999;
  align-items:flex-end;justify-content:center
}

@media(min-height:550px) {

.overlay{align-items:center}

}

.overlay.open{display:flex}

body.theme-light .overlay { background: rgba(0,0,0,0.4) !important; }

/* ---------- migrated from css/bridge.css ---------- */
.bridge-popup-overlay{
  display:none;position:fixed;top:62px;left:0;right:0;bottom:0;z-index:1000;
  background:var(--card,#131412);
  overflow:hidden;
}

.bridge-popup-overlay.open{
  display:flex;flex-direction:column;
  /* animation:bridgeFadeIn .22s ...; — disabled, see .ai-popup-overlay.open note */
}

.bridge-mobile-menu-overlay {
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, 0.5);
  backdrop-filter: blur(2px);
  -webkit-backdrop-filter: blur(2px);
  z-index: 960;
  opacity: 0;
  pointer-events: none;
  transition: opacity .25s;
}

.bridge-mobile-menu-overlay.open {
  opacity: 1;
  pointer-events: auto;
}

body.theme-light .bridge-popup-overlay {
  background: #ffffff !important;
}

/* ---------- migrated from css/launches.css ---------- */
.launch-popup-overlay {
  display: none;
  position: fixed;
  top: 62px; left: 0; right: 0; bottom: 0;
  z-index: 900;
  background: var(--card,#131412);
  overflow: hidden;
}

.launch-popup-overlay.open {
  display: flex;
  flex-direction: column;
  /* animation: walletFadeIn .22s ...; — disabled, see .ai-popup-overlay.open note */
}

.launches-overlay{
  display:none;position:fixed;top:62px;left:0;right:0;bottom:0;z-index:1000;
  background:rgba(0,0,0,.96);
  animation:lOverlayIn .18s ease
}

@keyframes lOverlayIn{from{opacity:0}to{opacity:1}}

.launches-overlay.open{display:flex;align-items:stretch;justify-content:stretch}

.nexus-mobile-menu-overlay {
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, 0.5);
  backdrop-filter: blur(2px);
  -webkit-backdrop-filter: blur(2px);
  z-index: 960;
  opacity: 0;
  pointer-events: none;
  transition: opacity .25s;
}

.nexus-mobile-menu-overlay.open {
  opacity: 1;
  pointer-events: auto;
}

/* ---------- migrated from css/wallet.css ---------- */
.wallet-popup-overlay{
  display:none;
  position:fixed;top:62px;left:0;right:0;bottom:0;z-index:1000;
  background:var(--bg,#000000);
  overflow:hidden;
}

.wallet-popup-overlay.open{
  display:flex;flex-direction:column;
  /* animation:walletFadeIn .22s ...; — disabled, see .ai-popup-overlay.open note */
}

#wpin-panel-overlay {
  background: none !important;
}

html[data-theme="light"] #wpin-panel-overlay {
  background: none !important;
}

body.theme-dark #wpin-panel-overlay,
html[data-theme="dark"] #wpin-panel-overlay {
  background: none !important;
}

#wpin-panel-overlay._wbio_confirm_overlay {
  background: rgba(0,0,0,0.72) !important;
  backdrop-filter: blur(10px);
}

body.theme-light #wpin-panel-overlay._wbio_confirm_overlay {
  background: rgba(0,0,0,0.45) !important;
  backdrop-filter: blur(10px);
}

.wallet-popup-overlay, .ai-popup-overlay,
.bridge-popup-overlay, .launch-popup-overlay {
  background: var(--bg, #000000) !important;
}

body.theme-light .wallet-popup-overlay {
  background: #ffffff !important;
}

#wpin-panel-overlay .wallet-panel {
  background: #000000 !important;
}

body.theme-light #wpin-panel-overlay .wallet-panel,
html[data-theme="light"] #wpin-panel-overlay .wallet-panel {
  background: #ffffff !important;
}

/* ---------- migrated from css/tokens-select.css ---------- */
.sdx-popup-overlay {
  display: none !important;
  position: fixed !important;
  top: 0 !important;
  left: 52px !important;
  right: 0 !important;
  bottom: 0 !important;
  width: auto !important;
  height: auto !important;
  background: var(--sdv5-bg, var(--bg, #000000)) !important;
  z-index: 100000 !important;
}

.sdx-popup-overlay.open {
  display: flex !important;
}

body.sidebar-is-expanded .sdx-popup-overlay,
body.sidebar-is-expanded .sdx-popup-overlay.open {
  left: 113px !important;
  right: 0 !important;
}

body.sidebar-is-collapsed .sdx-popup-overlay,
body.sidebar-is-collapsed .sdx-popup-overlay.open {
  left: 52px !important;
  right: 0 !important;
}

/* ---------- migrated from css/style.css ---------- */
.overlay-bottom-nav{
  display:flex;align-items:center;justify-content:center;gap:0;
  width:100%;
  height:calc(58px + env(safe-area-inset-bottom, 0px));
  flex-shrink:0;
  background:var(--bg);border-top:1px solid var(--gold-b);
  padding-bottom:env(safe-area-inset-bottom, 0px);
  border: 1px solid var(--bb-border)!important;
  max-width: 100vw !important;
  box-sizing: border-box !important;
  top: 0 !important;
}

body.sidebar-is-collapsed .launches-overlay,
body.sidebar-is-collapsed #gidoverse-popup-overlay,
body.sidebar-is-collapsed #tradefi-popup-overlay,
body.sidebar-is-collapsed .ai-popup-overlay,
body.sidebar-is-collapsed .wallet-popup-overlay,
body.sidebar-is-collapsed .bridge-popup-overlay,
body.sidebar-is-collapsed .launch-popup-overlay,
body.sidebar-is-collapsed #_sdx_w3m_overlay {
  left: var(--side-w-icons, 52px) !important;
}

/* ---------- migrated from web3modal.html inline <style id="_clome_style"> ---------- */
body.sidebar-is-expanded #_sdx_w3m_overlay {
  left: var(--side-w-full, 180px) !important;
}

@media (max-width: 600px) {
  #_sdx_w3m_overlay {
    left: var(--side-w-icons, 52px) !important;
  }
}

._clome_demo_shell #_sdx_w3m_overlay {
  top: 0;
  left: 20px;
}

.wallet-popup-overlay {
  overflow: hidden !important;
}

.launch-popup-overlay {
  overflow-x: hidden !important;
}

/* ---------- migrated from css/unified-nav.css ---------- */
.fs-view,
.launches-overlay,
.ai-popup-overlay,        .ai-popup-overlay.open,
.wallet-popup-overlay,    .wallet-popup-overlay.open,
.bridge-popup-overlay,    .bridge-popup-overlay.open,
.launch-popup-overlay,    .launch-popup-overlay.open,
#rwd-popup-overlay {
  left: calc(var(--side-w) + var(--side-gap)) !important;
}

.bottom-nav, .overlay-bottom-nav { display: none !important; }

body.sidebar-is-collapsed .fs-view,
body.sidebar-is-collapsed .launches-overlay,
body.sidebar-is-collapsed .ai-popup-overlay,
body.sidebar-is-collapsed .ai-popup-overlay.open,
body.sidebar-is-collapsed .wallet-popup-overlay,
body.sidebar-is-collapsed .wallet-popup-overlay.open,
body.sidebar-is-collapsed .bridge-popup-overlay,
body.sidebar-is-collapsed .bridge-popup-overlay.open,
body.sidebar-is-collapsed .launch-popup-overlay,
body.sidebar-is-collapsed .launch-popup-overlay.open,
body.sidebar-is-collapsed .gidoverse-popup-overlay,
body.sidebar-is-collapsed .gidoverse-popup-overlay.open,
body.sidebar-is-collapsed .tradefi-popup-overlay,
body.sidebar-is-collapsed .tradefi-popup-overlay.open {
  left: calc(var(--side-w-icons) + var(--side-gap)) !important;
}

@media (max-width: 600px) {

.fs-view,
  .launches-overlay,
  .ai-popup-overlay,
  .ai-popup-overlay.open,
  .wallet-popup-overlay,
  .wallet-popup-overlay.open,
  .bridge-popup-overlay,
  .bridge-popup-overlay.open,
  .launch-popup-overlay,
  .launch-popup-overlay.open,
  #rwd-popup-overlay {
    left: var(--side-w-icons, 52px) !important;
  }

}

body:has(#ai-popup-overlay.open) header {
  display: none !important;
}

body:has(#ai-popup-overlay.open) #ai-popup-overlay {
  top: 0 !important;
}

/* ---------- migrated from css/swapdex-redesign.css ---------- */
.sdv5-wallet ~ .overlay-bottom-nav,
.sdv5-bridge ~ .overlay-bottom-nav { display: none !important; }

.overlay,
.overlay.open {
  position: fixed !important;
  top: 0 !important;
  left: 52px !important;
  right: 0 !important;
  bottom: 0 !important;
  width: auto !important;
}

body.sidebar-is-expanded .overlay,
body.sidebar-is-expanded .overlay.open {
  left: 113px !important;
}

.wallet-popup-overlay,
.wallet-popup-overlay.open {
  top: 0 !important;
  left: 52px !important;
}

body.sidebar-is-expanded .wallet-popup-overlay,
body.sidebar-is-expanded .wallet-popup-overlay.open {
  left: 113px !important;
}

@keyframes sdv5SelOverlay { from { opacity: 0; } to { opacity: 1; } }

@media (min-width: 768px) {

body.sidebar-is-expanded .fs-view,
  body.sidebar-is-expanded .launches-overlay,
  body.sidebar-is-expanded .ai-popup-overlay,
  body.sidebar-is-expanded .ai-popup-overlay.open,
  body.sidebar-is-expanded .wallet-popup-overlay,
  body.sidebar-is-expanded .wallet-popup-overlay.open,
  body.sidebar-is-expanded .bridge-popup-overlay,
  body.sidebar-is-expanded .bridge-popup-overlay.open,
  body.sidebar-is-expanded .launch-popup-overlay,
  body.sidebar-is-expanded .launch-popup-overlay.open,
  body.sidebar-is-expanded .overlay,
  body.sidebar-is-expanded .overlay.open,
  body.sidebar-is-expanded #gidoverse-popup-overlay,
  body.sidebar-is-expanded #tradefi-popup-overlay,
  body.sidebar-is-expanded #rwd-popup-overlay,
  body.sidebar-is-expanded #dex-view.fs-view,
  body.sidebar-is-expanded #sdv5-send,
  body.sidebar-is-expanded #sdv5-receive,
  body.sidebar-is-expanded #sdx-buy-popup,
  body.sidebar-is-expanded #sdx-swap-popup,
  body.sidebar-is-expanded #sdx-buy-popup.sdv5-buy {
    left: 141px !important;
  }

}

@media (min-width: 1100px) {

body.sidebar-is-expanded .fs-view,
  body.sidebar-is-expanded .launches-overlay,
  body.sidebar-is-expanded .ai-popup-overlay,
  body.sidebar-is-expanded .ai-popup-overlay.open,
  body.sidebar-is-expanded .wallet-popup-overlay,
  body.sidebar-is-expanded .wallet-popup-overlay.open,
  body.sidebar-is-expanded .bridge-popup-overlay,
  body.sidebar-is-expanded .bridge-popup-overlay.open,
  body.sidebar-is-expanded .launch-popup-overlay,
  body.sidebar-is-expanded .launch-popup-overlay.open,
  body.sidebar-is-expanded .overlay,
  body.sidebar-is-expanded .overlay.open,
  body.sidebar-is-expanded #gidoverse-popup-overlay,
  body.sidebar-is-expanded #tradefi-popup-overlay,
  body.sidebar-is-expanded #rwd-popup-overlay,
  body.sidebar-is-expanded #dex-view.fs-view,
  body.sidebar-is-expanded #sdv5-send,
  body.sidebar-is-expanded #sdv5-receive,
  body.sidebar-is-expanded #sdx-buy-popup,
  body.sidebar-is-expanded #sdx-swap-popup,
  body.sidebar-is-expanded #sdx-buy-popup.sdv5-buy {
    left: 153px !important;
  }

}

/* ---------- migrated from css/pakixto-theme.css ---------- */
.fs-view,
.launches-overlay,
.ai-popup-overlay,
.ai-popup-overlay.open,
.wallet-popup-overlay,
.wallet-popup-overlay.open,
.bridge-popup-overlay,
.bridge-popup-overlay.open,
.launch-popup-overlay,
.launch-popup-overlay.open,
.overlay,
.overlay.open {
  left: 52px !important;
  top: 60px !important;
}

#gidoverse-popup-overlay,
#tradefi-popup-overlay,
#stk-popup-overlay {
  left: 52px !important;
  top: 0 !important;
}

body.sidebar-is-expanded .fs-view,
body.sidebar-is-expanded .launches-overlay,
body.sidebar-is-expanded .ai-popup-overlay,
body.sidebar-is-expanded .ai-popup-overlay.open,
body.sidebar-is-expanded .wallet-popup-overlay,
body.sidebar-is-expanded .wallet-popup-overlay.open,
body.sidebar-is-expanded .bridge-popup-overlay,
body.sidebar-is-expanded .bridge-popup-overlay.open,
body.sidebar-is-expanded .launch-popup-overlay,
body.sidebar-is-expanded .launch-popup-overlay.open,
body.sidebar-is-expanded #gidoverse-popup-overlay,
body.sidebar-is-expanded #tradefi-popup-overlay,
body.sidebar-is-expanded #rwd-popup-overlay {
  left: 113px !important;
}

body:not(.view-ai) .ai-popup-overlay,
body:not(.view-ai) .wallet-popup-overlay,
body:not(.view-ai) .bridge-popup-overlay,
body:not(.view-ai) .launch-popup-overlay,
body:not(.view-ai) .launches-overlay,
body:not(.view-ai) .fs-view {
  top: 0 !important;
}

@media (max-width: 600px) {

body.sidebar-is-expanded .fs-view,
  body.sidebar-is-expanded .launches-overlay,
  body.sidebar-is-expanded .ai-popup-overlay,
  body.sidebar-is-expanded .ai-popup-overlay.open,
  body.sidebar-is-expanded .wallet-popup-overlay,
  body.sidebar-is-expanded .wallet-popup-overlay.open,
  body.sidebar-is-expanded .bridge-popup-overlay,
  body.sidebar-is-expanded .bridge-popup-overlay.open,
  body.sidebar-is-expanded .launch-popup-overlay,
  body.sidebar-is-expanded .launch-popup-overlay.open,
  body.sidebar-is-expanded #gidoverse-popup-overlay,
  body.sidebar-is-expanded #tradefi-popup-overlay,
  body.sidebar-is-expanded #rwd-popup-overlay,
  body.sidebar-is-expanded #dex-view.fs-view,
  body.sidebar-is-expanded #sdv5-send,
  body.sidebar-is-expanded #sdv5-receive,
  body.sidebar-is-expanded #sdx-buy-popup,
  body.sidebar-is-expanded #sdx-swap-popup {
    left: 130px !important;
  }

}

/* ---------- migrated from css/unified-platform.css ---------- */
.modal-overlay { display: none; position: fixed; inset: 0; background: rgba(0,0,0,0.75); backdrop-filter: blur(10px); z-index: 200; align-items: center; justify-content: center; }

.modal-overlay.active { display: flex; animation: fadeIn 0.2s ease; }

.modal-overlay.tf-modal { display: flex; animation: fadeIn 0.2s ease; }

.modal-overlay.tf-modal.hidden { display: none !important; }

@media (max-width: 900px) {

.sidebar-overlay { display: none; }

.sidebar-overlay.visible { display: block; }

}

.sidebar-overlay {
  display: none;
  position: fixed;
  inset: 0;
  background: rgba(0,0,0,0.55);
  z-index: 150;
}

.sidebar-overlay.visible { display: block; }

.gidoverse-matrix-mobile-menu-overlay {
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, 0.5);
  backdrop-filter: blur(2px);
  -webkit-backdrop-filter: blur(2px);
  z-index: 960;
  opacity: 0;
  pointer-events: none;
  transition: opacity .25s;
}

.gidoverse-matrix-mobile-menu-overlay.open {
  opacity: 1;
  pointer-events: auto;
}

.modal-overlay.tf-modal {
  display: flex;
  position: fixed; inset: 0;
  background: rgba(0,0,0,0.7);
  z-index: 300;
  align-items: center; justify-content: center;
  backdrop-filter: blur(4px);
}

/* ---------- migrated from rizq/rizq-base.css ---------- */
.sidebar, .sidebar-overlay, .rz-hamburger, .rz-close-btn { display: none !important; }

.modal-overlay { background: rgba(0,0,0,0.7) !important; backdrop-filter: blur(12px); }



/* ============================================================
   PANEL SYSTEM — full styling for overlay inner panels
   (.ai-panel, .wallet-panel, .bridge-panel, .nexus-panel, .sdx-panel
   and all their sub-components: headers, buttons, scroll areas, forms)
   Migrated from: agent.css, wallet.css, bridge.css, style.css,
   launches.css, swap-elite-v16.css, tokens-select.css, swapdex-redesign.css
   ============================================================ */

/* ---------- migrated from css/agent.css ---------- */
.ai-panel {
  background: var(--bg) !important;
  max-width: 780px !important;
  margin: 0 auto !important;
  width: 100% !important;
}

.ai-quick-btn,
.ai-provider-btn,
.ai-clear-btn,

/* ══════════════════════════════════════════════════════════════════
   QUICK-ACTION BAR — unified token set (dark mode base)
   All four buttons share identical bg / border / radius / font.
   ══════════════════════════════════════════════════════════════════ */

/* shared base */
.ai-quick-btn,
.ai-provider-btn,
.ai-clear-btn,
#ai-panel-settings-wrap .ai-settings-btn {
  height: 36px !important;
  background: rgba(255,255,255,0.06) !important;
  border: 1px solid var(--bb-border) !important;
  border-radius: 10px !important;
  display: flex !important;
  align-items: center !important;
  justify-content: center !important;
  font-family: var(--ff-base) !important;
  font-size: 13px !important;
  font-weight: 500 !important;
  color: var(--text-white-a85) !important;
  cursor: pointer !important;
  flex-shrink: 0 !important;
  transition: background 120ms ease, color 120ms ease, border-color 120ms ease !important;
  white-space: nowrap !important;
}

.ai-quick-btn:hover,
.ai-provider-btn:hover,
.ai-clear-btn:hover,

/* shared hover */
.ai-quick-btn:hover,
.ai-provider-btn:hover,
.ai-clear-btn:hover,
#ai-panel-settings-wrap .ai-settings-btn:hover {
  background: rgba(255,255,255,0.11) !important;
  border-color: var(--bb-border) !important;
  color: var(--text-white-a85) !important;
}

.ai-clear-btn,

/* Clear + Settings — fixed square */
.ai-clear-btn,
#ai-panel-settings-wrap .ai-settings-btn {
  width: 36px !important;
}

body.theme-dark #ai-settings-menu,
body.theme-dark #ai-panel-settings-menu,

/* Kill any late --bb-surface override from style.css on the settings menu */
body.theme-dark #ai-settings-menu,
body.theme-dark #ai-panel-settings-menu,
body.theme-dark #hdr-ai-settings-wrap .ai-settings-menu {
  background: #000000 !important;
}

body.theme-light #ai-settings-menu,
body.theme-light #ai-panel-settings-menu,

body.theme-light #ai-settings-menu,
body.theme-light #ai-panel-settings-menu,
body.theme-light #hdr-ai-settings-wrap .ai-settings-menu {
  background: #FFFFFF !important;
}

@media (min-width: 768px) {

.ai-panel {
    max-width: 760px !important;
    margin: 0 auto !important;
  }

}

.ai-panel { overflow: visible !important; }

#ai-panel-settings-wrap {
  position: static !important;
  flex-shrink: 0 !important;
  overflow: visible !important;
}

html[data-theme="light"] .ai-quick-btn,
body.theme-light .ai-quick-btn,
html[data-theme="light"] .ai-provider-btn,
body.theme-light .ai-provider-btn,
html[data-theme="light"] .ai-clear-btn,
body.theme-light .ai-clear-btn,
html[data-theme="light"] #ai-panel-settings-wrap .ai-settings-btn,

/* ══════════════════════════════════════════════════════════════════
   QUICK-ACTION BAR — light mode unified overrides
   Mirrors the dark token set with light-appropriate values.
   ══════════════════════════════════════════════════════════════════ */
html[data-theme="light"] .ai-quick-btn,
body.theme-light .ai-quick-btn,
html[data-theme="light"] .ai-provider-btn,
body.theme-light .ai-provider-btn,
html[data-theme="light"] .ai-clear-btn,
body.theme-light .ai-clear-btn,
html[data-theme="light"] #ai-panel-settings-wrap .ai-settings-btn,
body.theme-light #ai-panel-settings-wrap .ai-settings-btn {
  background: rgba(0,0,0,0.05) !important;
  border-color: var(--bb-border) !important;
  color: var(--text-black-a85) !important;
}

html[data-theme="light"] .ai-quick-btn:hover,
body.theme-light .ai-quick-btn:hover,
html[data-theme="light"] .ai-provider-btn:hover,
body.theme-light .ai-provider-btn:hover,
html[data-theme="light"] .ai-clear-btn:hover,
body.theme-light .ai-clear-btn:hover,
html[data-theme="light"] #ai-panel-settings-wrap .ai-settings-btn:hover,

html[data-theme="light"] .ai-quick-btn:hover,
body.theme-light .ai-quick-btn:hover,
html[data-theme="light"] .ai-provider-btn:hover,
body.theme-light .ai-provider-btn:hover,
html[data-theme="light"] .ai-clear-btn:hover,
body.theme-light .ai-clear-btn:hover,
html[data-theme="light"] #ai-panel-settings-wrap .ai-settings-btn:hover,
body.theme-light #ai-panel-settings-wrap .ai-settings-btn:hover {
  background: rgba(0,0,0,0.10) !important;
  border-color: var(--bb-border) !important;
  color: var(--text-black-a85) !important;
}

.ai-panel .ai-log { border-top: none; }

#ai-panel-settings-wrap {
  flex-shrink: 0;
  position: static;
}

#ai-panel-settings-wrap .ai-settings-btn {
  width: 36px;
  height: 36px;
  flex-direction: column;
  gap: 1px;
  border: 1px solid rgba(208,208,208,.12);
}

.ai-panel{
  background:transparent;border:none;border-radius:0;
  width:100%;height:100%;max-width:100%;margin:0;
  display:flex;flex-direction:column;
  overflow:hidden;
  box-shadow:none;
}

.ai-panel {
  background: var(--bb-bg) !important;
}

.ai-quick-btn,
.ai-provider-btn,
.ai-clear-btn,

/* All four quick-bar buttons share this base */
.ai-quick-btn,
.ai-provider-btn,
.ai-clear-btn,
#ai-panel-settings-wrap .ai-settings-btn {
  height: 38px !important;
  background: rgba(255,255,255,0.07) !important;
  border: 1px solid var(--bb-border) !important;
  border-radius: 11px !important;
  font-family: var(--ff-base, 'Inter', sans-serif) !important;
  font-size: 13px !important;
  font-weight: 500 !important;
  color: var(--text-white-a80) !important;
  cursor: pointer !important;
  display: flex !important;
  align-items: center !important;
  justify-content: center !important;
  transition: background 120ms, border-color 120ms, color 120ms !important;
  white-space: nowrap !important;
  flex-shrink: 0 !important;
}

.ai-quick-btn:hover,
.ai-provider-btn:hover,
.ai-clear-btn:hover,

.ai-quick-btn:hover,
.ai-provider-btn:hover,
.ai-clear-btn:hover,
#ai-panel-settings-wrap .ai-settings-btn:hover {
  background: rgba(255,255,255,0.13) !important;
  border-color: var(--bb-border) !important;
  color: var(--gold) !important;
}

.ai-clear-btn,

/* Trash + gear — square icon buttons */
.ai-clear-btn,
#ai-panel-settings-wrap .ai-settings-btn {
  width: 38px !important;
  padding: 0 !important;
}

.ai-clear-btn svg,

/* SVG stroke in dark mode */
.ai-clear-btn svg,
#ai-panel-settings-wrap .ai-settings-btn svg {
  stroke: rgba(255,255,255,0.65) !important;
}

html[data-theme="light"] .ai-quick-btn,
body.theme-light .ai-quick-btn,
html[data-theme="light"] .ai-provider-btn,
body.theme-light .ai-provider-btn,
html[data-theme="light"] .ai-clear-btn,
body.theme-light .ai-clear-btn,
html[data-theme="light"] #ai-panel-settings-wrap .ai-settings-btn,

/* Quick bar buttons */
html[data-theme="light"] .ai-quick-btn,
body.theme-light .ai-quick-btn,
html[data-theme="light"] .ai-provider-btn,
body.theme-light .ai-provider-btn,
html[data-theme="light"] .ai-clear-btn,
body.theme-light .ai-clear-btn,
html[data-theme="light"] #ai-panel-settings-wrap .ai-settings-btn,
body.theme-light #ai-panel-settings-wrap .ai-settings-btn {
  background: #ffffff !important;
  border-color: var(--bb-border) !important;
  color: var(--text-black-a75) !important;
  border: 1px solid var(--bb-border)!important;
}

html[data-theme="light"] .ai-quick-btn:hover,
body.theme-light .ai-quick-btn:hover,
html[data-theme="light"] .ai-provider-btn:hover,
body.theme-light .ai-provider-btn:hover,
html[data-theme="light"] .ai-clear-btn:hover,
body.theme-light .ai-clear-btn:hover,
html[data-theme="light"] #ai-panel-settings-wrap .ai-settings-btn:hover,

html[data-theme="light"] .ai-quick-btn:hover,
body.theme-light .ai-quick-btn:hover,
html[data-theme="light"] .ai-provider-btn:hover,
body.theme-light .ai-provider-btn:hover,
html[data-theme="light"] .ai-clear-btn:hover,
body.theme-light .ai-clear-btn:hover,
html[data-theme="light"] #ai-panel-settings-wrap .ai-settings-btn:hover,
body.theme-light #ai-panel-settings-wrap .ai-settings-btn:hover {
  background: #f0f0ee !important;
  border-color: var(--bb-border) !important;
  color: var(--text-black-a90) !important;
}

html[data-theme="light"] .ai-clear-btn svg,
html[data-theme="light"] #ai-panel-settings-wrap .ai-settings-btn svg,
body.theme-light .ai-clear-btn svg,

html[data-theme="light"] .ai-clear-btn svg,
html[data-theme="light"] #ai-panel-settings-wrap .ai-settings-btn svg,
body.theme-light .ai-clear-btn svg,
body.theme-light #ai-panel-settings-wrap .ai-settings-btn svg {
  stroke: rgba(0,0,0,0.50) !important;
}

#ai-panel .ai-composer-frame .ai-input-wrap {
  background: transparent !important;
  border-top: none !important;
  padding: 0 !important;
  gap: 0 !important;
  margin-top: 8px !important;
  display: flex !important;
  flex-direction: column !important;
}

#ai-panel .ai-composer-frame .ai-input-row,

/* Strip the textarea card — no bg, no border, no shadow inside composer frame */
#ai-panel .ai-composer-frame .ai-input-row,
#ai-panel .ai-composer-frame .ai-input-row:focus-within {
  background: transparent !important;
  border: none !important;
  border: 1px solid var(--bb-border)!important;
  border-radius: 0 !important;
  padding: 0 !important;
  width: 100% !important;
}

#ai-panel .ai-composer-frame .ai-inp,
#ai-panel .ai-composer-frame #ai-inp,
#ai-panel .ai-composer-frame .ai-inp:focus,

/* Strip card styling from textarea itself inside composer frame */
#ai-panel .ai-composer-frame .ai-inp,
#ai-panel .ai-composer-frame #ai-inp,
#ai-panel .ai-composer-frame .ai-inp:focus,
#ai-panel .ai-composer-frame #ai-inp:focus {
  background: transparent !important;
  border: none !important;
  border-radius: 0 !important;
  border: 1px solid var(--bb-border)!important;
  outline: none !important;
}

.claude-icon-btn,
.ai-clear-btn,
#ai-panel-settings-wrap .ai-settings-btn {
  width: 36px !important;
  height: 36px !important;
  padding: 0 !important;
  border-radius: 50% !important;
  background: transparent !important;
  border: 1px solid var(--bb-border) !important;
  color: var(--text-white-a60) !important;
  display: flex !important;
  align-items: center !important;
  justify-content: center !important;
  transition: background 120ms ease, border-color 120ms ease, color 120ms ease !important;
}

.claude-icon-btn:hover,
.ai-clear-btn:hover,
#ai-panel-settings-wrap .ai-settings-btn:hover {
  background: rgba(255,255,255,0.08) !important;
  border-color: var(--bb-border) !important;
  color: var(--text-white-a95) !important;
}

.claude-icon-btn:active,
.ai-clear-btn:active,
#ai-panel-settings-wrap .ai-settings-btn:active {
  transform: scale(0.94) !important;
}

html[data-theme="light"] .claude-icon-btn,
html[data-theme="light"] .ai-clear-btn,
html[data-theme="light"] #ai-panel-settings-wrap .ai-settings-btn,
body.theme-light .claude-icon-btn,
body.theme-light .ai-clear-btn,
body.theme-light #ai-panel-settings-wrap .ai-settings-btn {
  background: transparent !important;
  border-color: var(--bb-border) !important;
  color: var(--text-black-a60) !important;
}

html[data-theme="light"] .claude-icon-btn:hover,
html[data-theme="light"] .ai-clear-btn:hover,
html[data-theme="light"] #ai-panel-settings-wrap .ai-settings-btn:hover,
body.theme-light .claude-icon-btn:hover,
body.theme-light .ai-clear-btn:hover,
body.theme-light #ai-panel-settings-wrap .ai-settings-btn:hover {
  background: rgba(0,0,0,0.06) !important;
  border-color: var(--bb-border) !important;
  color: var(--text-black-a90) !important;
}

#ai-panel-settings-menu.ai-settings-menu,
#ai-panel-settings-menu.ai-settings-dropup {
  border: none !important;
  min-width: unset !important;
  width: auto !important;
  left: 0 !important;
  right: 0 !important;
  bottom: 100% !important;
  margin-bottom: 6px !important;
  top: auto !important;
  position: absolute !important;
  border: 1px solid var(--bb-border)!important;
}

#ai-panel-settings-wrap {
  position: static !important;
  overflow: visible !important;
}

/* ---------- migrated from css/wallet.css ---------- */
.wallet-panel{
  background:transparent;border:none;border-radius:0;
  width:100%;height:100%;max-width:100%;margin:0;
  display:flex;flex-direction:column;overflow:hidden;
  box-shadow:none;
}

.wallet-panel {
  background: #0d0d0f !important;
  font-family: var(--ff-base) !important;
}

body.theme-light .wallet-panel,
html[data-theme="light"] .wallet-panel {
  background: #FFFFFF !important;
}

/* ---------- migrated from css/bridge.css ---------- */
.bridge-panel{
  width:100%;height:100%;max-width:100%;margin:0;
  display:flex;flex-direction:column;overflow:hidden;
  background:transparent;
  padding-bottom:64px;
}

/* ---------- migrated from css/style.css ---------- */
.nexus-panel {
  width: 100% !important;
  max-width: 100% !important;
  overflow: hidden !important;
  box-sizing: border-box !important;
}

/* ---------- migrated from css/launches.css ---------- */
.nexus-panel{
  position:relative;
  width:100%;height:100%;
  display:flex;flex-direction:column;
  overflow:hidden;
  animation:lPanelIn .22s cubic-bezier(.2,.8,.4,1)
}
.nexus-frame{
  flex:1;width:100%;
  border:none;display:block;
  background:#000000;
  min-height:0
}
body.theme-light .nexus-frame,
html[data-theme="light"] .nexus-frame {
  background:#ffffff;
}

/* ---------- migrated from css/swap-elite-v16.css ---------- */
#tok-modal .sdx-panel,
#set-modal .sdx-panel {
  background: #131412 !important;
  background-color: #131412 !important;
  border-top: 1px solid var(--bb-border) !important;
  color: var(--muted2) !important;
}
body.theme-light #tok-modal .sdx-panel,
html[data-theme="light"] #tok-modal .sdx-panel,
body.theme-light #set-modal .sdx-panel,
html[data-theme="light"] #set-modal .sdx-panel {
  background: #F0F0F0 !important;
  background-color: #F0F0F0 !important;
  border-top: 1px solid var(--bb-border) !important;
  color: var(--muted2) !important;
}

body.theme-light #tok-modal .sdx-panel-title,
html[data-theme="light"] #tok-modal .sdx-panel-title,
body.theme-light #tok-modal .sdx-panel-close,
html[data-theme="light"] #tok-modal .sdx-panel-close {
  color: var(--muted2) !important;
}

body.theme-light #tok-modal .sdx-panel-search-wrap,
html[data-theme="light"] #tok-modal .sdx-panel-search-wrap {
  background: #2a2a2a !important;
  border-color: var(--bb-border) !important;
}

body.theme-light #tok-modal .sdx-panel-search,
html[data-theme="light"] #tok-modal .sdx-panel-search {
  background: transparent !important;
  color: var(--muted2) !important;
}

body.theme-light #tok-modal .sdx-panel-search::placeholder,
html[data-theme="light"] #tok-modal .sdx-panel-search::placeholder {
  color: var(--text-dim-tier) !important;
}

body.theme-light #tok-modal .sdx-panel-footer,
html[data-theme="light"] #tok-modal .sdx-panel-footer {
  background: #F0F0F0 !important;
  border-top: 1px solid var(--bb-border) !important;
  color: var(--muted2) !important;
}

/* ---------- migrated from css/tokens-select.css ---------- */
#tok-modal .sdx-panel {
  background: transparent !important;
  border: none !important;
  border-top: none !important;
  border-radius: 0 !important;
  box-shadow: none !important;
  font-family: var(--ff-base) !important;
  width: 100% !important;
  max-width: 100% !important;
  max-height: 100% !important;
  height: 100% !important;
  display: flex !important;
  flex-direction: column !important;
  pointer-events: auto !important;
  animation: sdv5PopIn 0.3s cubic-bezier(.2,.8,.4,1) both !important;
}

#tok-modal .sdx-panel-bar {
  display: none !important;
}

#tok-modal .sdx-panel-head {
  display: flex !important;
}

#tok-modal .sdx-panel-title {
  font-family: var(--ff-base) !important;
  font-size: var(--fs-2xl) !important;
  font-weight: var(--fw-bold) !important;
  letter-spacing: var(--ls-tight) !important;
  color: var(--text-normal-tier) !important;
}

#tok-modal .sdx-panel-close {
  border: 1px solid var(--bb-border) !important;
  background: rgba(255,255,255,0.04) !important;
  color: var(--muted2) !important;
  flex-shrink: 0 !important;
  width: 36px !important;
  height: 36px !important;
  display: flex !important;
  align-items: center !important;
  justify-content: center !important;
  border-radius: var(--radius-full) !important;
  transition: background var(--duration-fast) var(--ease-out),
              border-color var(--duration-fast) var(--ease-out),
              color var(--duration-fast) var(--ease-out) !important;
  cursor: pointer !important;
}

#tok-modal .sdx-panel-close:hover {
  background: rgba(255,255,255,0.09) !important;
  border-color: var(--bb-border) !important;
  color: var(--muted2) !important;
  box-shadow: none !important;
}

#tok-modal .sdx-panel-search-wrap {
  flex: 1 !important;
  margin: 0 !important;
  position: relative !important;
}

#tok-modal .sdx-panel-search {
  font-family: var(--ff-base) !important;
  font-size: var(--fs-md) !important;
  border-radius: var(--radius-lg) !important;
  border: var(--border-subtle) !important;
  background: rgba(255,255,255,0.04) !important;
  border: 1px solid var(--bb-border)!important;
  color: var(--muted2) !important;
  transition: border-color var(--duration-base) var(--ease-out),
              background var(--duration-base) var(--ease-out),
              box-shadow var(--duration-base) var(--ease-out) !important;
}

#tok-modal .sdx-panel-search::placeholder {
  font-size: var(--fs-sm) !important;
  color: var(--muted) !important;
}

#tok-modal .sdx-panel-search:focus {
  border-color: var(--bb-border) !important;
  background: rgba(255,255,255,0.06) !important;
  border: 1px solid var(--bb-border)!important;
}

#tok-modal .tok-search-row .sdx-panel-close {
  position: static !important;
  transform: none !important;
  flex-shrink: 0 !important;
}

#tok-modal .sdx-panel-footer {
  display: none !important;
}

body.theme-light #tok-modal .sdx-panel,
html[data-theme="light"] #tok-modal .sdx-panel {
  background: #FFFFFF !important;
  border: none !important;
}

body.theme-light #tok-modal .sdx-panel-title,
html[data-theme="light"] #tok-modal .sdx-panel-title,
body.theme-light #tok-modal .t-sym,
html[data-theme="light"] #tok-modal .t-sym,
body.theme-light #tok-modal .t-bal,
html[data-theme="light"] #tok-modal .t-bal,
body.theme-light #tok-modal .t-usd,
html[data-theme="light"] #tok-modal .t-usd {
  color: var(--muted2) !important;
}

body.theme-light #tok-modal .sdx-panel-head,
html[data-theme="light"] #tok-modal .sdx-panel-head,
body.theme-light #tok-modal .tok-row,
html[data-theme="light"] #tok-modal .tok-row,
body.theme-light #tok-modal .sdx-panel-footer,
html[data-theme="light"] #tok-modal .sdx-panel-footer {
  border-color: var(--bb-border) !important;
}

body.theme-light #tok-modal .sdx-panel-search,
html[data-theme="light"] #tok-modal .sdx-panel-search,
body.theme-light #tok-modal .tok-chip,
html[data-theme="light"] #tok-modal .tok-chip,
body.theme-light #tok-modal .t-av,
html[data-theme="light"] #tok-modal .t-av,
body.theme-light #tok-modal .t-addr-pill,
html[data-theme="light"] #tok-modal .t-addr-pill,
body.theme-light #tok-modal .t-native-tag,
html[data-theme="light"] #tok-modal .t-native-tag,
body.theme-light #tok-modal .t-vol-chip,
html[data-theme="light"] #tok-modal .t-vol-chip {
  background: #FFFFFF !important;
  border-color: var(--bb-border) !important;
}

body.theme-light #tok-modal .sdx-panel-close,
html[data-theme="light"] #tok-modal .sdx-panel-close {
  background: rgba(0,0,0,0.04) !important;
  border-color: var(--bb-border) !important;
  color: var(--muted2) !important;
}

/* ---------- migrated from css/swapdex-redesign.css ---------- */
.sdx-panel-backdrop {
  display: none;
  position: fixed;
  top: 0;
  left: 52px;        /* collapsed sidebar */
  right: 0;
  bottom: 0;
  z-index: 99998;
  background: transparent;
  align-items: flex-end;
  justify-content: stretch;
}

.sdx-panel-backdrop.open {
  display: flex;
}

body.sidebar-is-expanded .sdx-panel-backdrop {
  left: 113px;
}

.sdx-panel {
  width: 100%;
  max-height: 92vh;
  background: var(--sdv5-bg-card, #000000);
  border-top: 1px solid var(--bb-border);
  border-radius: 18px 18px 0 0;
  display: flex;
  flex-direction: column;
  overflow: hidden;
  animation: sdxPanelUp 0.28s cubic-bezier(0.16, 1, 0.3, 1) both;
}

.sdx-panel-bar {
  width: 36px;
  height: 4px;
  border-radius: 99px;
  background: rgba(255,255,255,0.14);
  margin: 10px auto 0;
  flex-shrink: 0;
}

.sdx-panel-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 14px 18px 10px;
  flex-shrink: 0;
  border-bottom: 1px solid var(--bb-border);
}

.sdx-panel-title {
  font-size: 16.9px;
  font-weight: 700;
  color: var(--text-normal-tier);
  letter-spacing: 0.01em;
  display: flex;
  align-items: center;
}

.sdx-panel-close {
  width: 32px;
  height: 32px;
  border-radius: 50%;
  border: 1px solid var(--bb-border);
  background: rgba(255,255,255,0.05);
  color: var(--sdv5-muted);
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition: background 0.15s, color 0.15s;
  flex-shrink: 0;
}

.sdx-panel-close:hover {
  background: rgba(255,255,255,0.12);
  color: var(--muted2);
}

.sdx-panel-search-wrap {
  position: relative;
  margin: 12px 16px 8px;
  flex-shrink: 0;
}

.sdx-panel-srch-ico {
  position: absolute;
  left: 13px;
  top: 50%;
  transform: translateY(-50%);
  color: var(--sdv5-muted);
  pointer-events: none;
}

.sdx-panel-search {
  width: 100%;
  box-sizing: border-box;
  background: rgba(255,255,255,0.05);
  border: 1px solid var(--bb-border);
  border-radius: 12px;
  padding: 11px 14px 11px 38px;
  font-size: 15.8px;
  color: var(--muted2);
  outline: none;
  transition: border-color 0.15s, background 0.15s;
}

.sdx-panel-search::placeholder {
  color: var(--sdv5-muted);
  font-size: 14.7px;
}

.sdx-panel-search:focus {
  border-color: var(--sdv5-accent, var(--text-sky));
  background: rgba(var(--accent-sky-rgb), 0.04);
}

.sdx-panel-footer {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 10px 18px 14px;
  border-top: 1px solid var(--bb-border);
  font-size: 12.4px;
  color: var(--sdv5-muted);
  flex-shrink: 0;
  gap: 8px;
}

#tok-modal.sdx-panel-backdrop,
#set-modal.sdx-panel-backdrop {
  left: 52px !important;
  right: 0 !important;
  width: auto !important;
  justify-content: stretch !important;
  align-items: stretch !important;
}

body.sidebar-is-expanded #tok-modal.sdx-panel-backdrop,
body.sidebar-is-expanded #set-modal.sdx-panel-backdrop {
  left: 113px !important;
  right: 0 !important;
  width: auto !important;
}


/* ── User override: unified popup background — settings gear + quick actions ──
   Dark: #131412 · Light: #f0f0f0. Appended last so it wins the cascade
   regardless of the older scattered background rules above. ── */
body.theme-dark #ai-settings-menu,
body.theme-dark #ai-panel-settings-menu,
body.theme-dark #hdr-ai-settings-wrap .ai-settings-menu,
body.theme-dark .ai-quick-menu,
html[data-theme="dark"] #ai-settings-menu,
html[data-theme="dark"] #ai-panel-settings-menu,
html[data-theme="dark"] #hdr-ai-settings-wrap .ai-settings-menu,
html[data-theme="dark"] .ai-quick-menu,
#ai-settings-menu,
#ai-panel-settings-menu,
#hdr-ai-settings-wrap .ai-settings-menu,
.ai-quick-menu {
  background: #131412 !important;
}

body.theme-light #ai-settings-menu,
body.theme-light #ai-panel-settings-menu,
body.theme-light #hdr-ai-settings-wrap .ai-settings-menu,
body.theme-light .ai-quick-menu,
html[data-theme="light"] #ai-settings-menu,
html[data-theme="light"] #ai-panel-settings-menu,
html[data-theme="light"] #hdr-ai-settings-wrap .ai-settings-menu,
html[data-theme="light"] .ai-quick-menu {
  background: #f0f0f0 !important;
}

/* "Choose AI Provider" / "Choose AI Model" picker modal — same two colors */
.sdv5-ai-modal .panel {
  background: #131412 !important;
}
body.theme-light .sdv5-ai-modal .panel,
html[data-theme="light"] .sdv5-ai-modal .panel {
  background: #f0f0f0 !important;
}

/* #hdr-ai-settings-wrap is a hidden template (cloned into the panel menu on
   each gear click) — it must never render. .ai-settings-wrap has a
   `display:flex !important` rule elsewhere that beats a plain inline style,
   so force it off here with an ID selector, which always outranks that
   class rule regardless of load order. */
#hdr-ai-settings-wrap {
  display: none !important;
}

/* Rounded corners: AI Provider/Model picker popup + the API-key Save button */
.sdv5-ai-modal .panel {
  border-radius: 16px !important;
  overflow: hidden !important;
}
.ai-s-save {
  border-radius: 50% !important;
}

/* Settings gear popup (#ai-settings-menu master + #ai-panel-settings-menu clone) —
   border-radius was already set on .ai-settings-dropup, but with only
   overflow-y:auto (no overflow-x) the full-width rows inside painted flush
   over the rounded corners, making them look square. Clipping horizontally
   too (while keeping vertical scroll) fixes it, matching the Quick actions
   popup's already-rounded look. */
#ai-settings-menu.ai-settings-dropup,
#ai-panel-settings-menu.ai-settings-dropup,
#ai-panel-settings-menu.ai-settings-menu {
  border-radius: 16px !important;
  overflow-x: hidden !important;
  overflow-y: auto !important;
}

/* Quick actions inner card blocks (GIDO MATRIX / WALLET / TOKEN LAUNCH) — flat
   colors instead of the diagonal gradient, matching the popup background. */
.ai-quick-menu .aq-grid,
.ai-s-card {
  background: #131412 !important;
}
body.theme-light .ai-quick-menu .aq-grid,
html[data-theme="light"] .ai-quick-menu .aq-grid,
body.theme-light .ai-s-card,
html[data-theme="light"] .ai-s-card {
  background: #f0f0f0 !important;
}

/* Composer textarea — strip the border that a later duplicate rule was
   re-adding after the earlier "border:none" declarations. */
.ai-input-wrap,
.ai-input-row,
.ai-input-row:focus-within,
.ai-inp {
  border: none !important;
  box-shadow: none !important;
}

/* ── Final pass: textarea + header row, no border, flat colors ──
   Earlier rules under #ai-panel .ai-composer-frame set border:none then
   immediately re-added "border:1px solid var(--bb-border)!important" right
   after it in the same block — these ID-scoped selectors outrank a plain
   class override, so they have to be beaten with the same selector shape. */
#ai-panel .ai-composer-frame .ai-input-wrap,
#ai-panel .ai-composer-frame .ai-input-row,
#ai-panel .ai-composer-frame .ai-input-row:focus-within,
#ai-panel .ai-composer-frame .ai-inp,
#ai-panel .ai-composer-frame #ai-inp,
#ai-panel .ai-composer-frame .ai-inp:focus,
#ai-panel .ai-composer-frame #ai-inp:focus {
  border: none !important;
  box-shadow: none !important;
}

/* Composer header row (QUICK / clear / settings bar) — flat colors, no
   border, replacing its diagonal gradient. */
.ai-composer-frame .rz-cta-header.ai-composer-header,
#ai-panel .ai-composer-frame .rz-cta-header.ai-composer-header {
  background: #131412 !important;
  border: none !important;
}
body.theme-light .ai-composer-frame .rz-cta-header.ai-composer-header,
html[data-theme="light"] .ai-composer-frame .rz-cta-header.ai-composer-header,
body.theme-light #ai-panel .ai-composer-frame .rz-cta-header.ai-composer-header,
html[data-theme="light"] #ai-panel .ai-composer-frame .rz-cta-header.ai-composer-header {
  background: #f0f0f0 !important;
  border: none !important;
}
