/* Interaction details. Structural layout remains in workspace.css. */
.ui-motion-ready .view, .ui-motion-ready .modal[open], .ui-motion-ready .toast { animation: none; }
.ui-motion-ready .button:active { transform: none; }
.brand, .mobile-brand { letter-spacing: -.035em; }
.side-nav { position: relative; }
.nav-link:first-child svg { fill: none; stroke: currentColor; stroke-width: 1.6; }
.nav-link { color: #969694; }
.nav-link:hover { color: #F4F3F1; background: #ffffff04; }
.nav-link.active { font-weight: 600; }
.motion-selection { position: relative; isolation: isolate; }
.motion-selection > button { position: relative; z-index: 1; }
.motion-selection > .selection-ink { position: absolute; z-index: 0; background: #2A2A28; border-radius: 5px; transform-origin: left center; pointer-events: none; box-shadow: inset 0 1px #ffffff08, 0 1px 3px #0002; }
.motion-selection.side-nav > .selection-ink { background: #222220; border-left: 2px solid var(--accent); border-radius: 7px; }
.motion-selection.side-nav .nav-link.active { background: transparent; }
.motion-selection.side-nav .nav-link.active::before { display: none; }
.motion-selection.segmented > button.active,
.motion-selection.filter-pills > button.active,
.motion-selection.dialog-tabs > button.active,
.motion-selection.chain-options > button.active,
.motion-selection.asset-choices > button.active { background: transparent; }
.motion-selection.asset-choices > .selection-ink, .motion-selection.chain-options > .selection-ink { background: #333331; border: 1px solid #686866; }
.motion-selection.asset-choices > button.active, .motion-selection.chain-options > button.active { border-color: transparent; }
.motion-selection.trade-sides > button.active { background: transparent; border-color: transparent; }
.motion-selection.trade-sides:has(.long.active) > .selection-ink { background: #274030; }
.motion-selection.trade-sides:has(.short.active) > .selection-ink { background: #492B26; }
.motion-selection.table-tabs > .selection-underline { border-radius: 2px; background: var(--accent); box-shadow: none; }
.motion-selection.table-tabs > button.active::after { display: none; }
.button.primary { box-shadow: inset 0 1px 0 #ffffff45, 0 1px 2px #0003; }
.button.primary:hover { box-shadow: inset 0 1px 0 #ffffff60, 0 3px 16px #aebeff12; }
.button.secondary { box-shadow: inset 0 1px 0 #ffffff06; }
.button > svg:last-child { transition: translate .22s var(--ease); }
.button:hover > svg:last-child { translate: 2px 0; }
.button:disabled > svg:last-child { translate: 0; }
.icon-button { color: #B9B9B6; background: #ffffff02; }
.icon-button:hover { background: #ffffff08; }
.icon-button svg { stroke-width: 1.6; }
.button:focus-visible, .info-help:focus-visible, .icon-button:focus-visible,
.featured-market:focus-visible, .nav-link:focus-visible { outline: 2px solid var(--accent); outline-offset: 3px; box-shadow: 0 0 0 5px #b8c4ff0c; }
.panel, .featured-market, .opportunity-actions button, .market-workspace { box-shadow: inset 0 1px 0 #ffffff04; }
.featured-market, .opportunity-actions button { position: relative; background: radial-gradient(350px circle at var(--pointer-x, 50%) var(--pointer-y, 50%), #b8c4ff00, transparent 70%), var(--surface); transition: border-color .24s, background .24s, box-shadow .24s; }
@media (hover: hover) and (pointer: fine) {
  .featured-market:hover, .opportunity-actions button:hover { border-color: #535350; background: radial-gradient(350px circle at var(--pointer-x, 50%) var(--pointer-y, 50%), #b8c4ff0c, transparent 70%), #343432; box-shadow: inset 0 1px 0 #c6d0ff12, 0 8px 28px #00000015; }
  .featured-top svg { transition: transform .24s var(--ease), stroke .24s; }
  .featured-market:hover .featured-top svg { transform: rotate(-45deg) translateX(2px); stroke: var(--accent); }
  .opportunity-actions button > svg { transition: translate .24s var(--ease), stroke .24s; }
  .opportunity-actions button:hover > svg { translate: 3px 0; stroke: var(--accent); }
  .discovery-banner .banner-link svg { transition: translate .25s var(--ease); }
  .discovery-banner:hover .banner-link svg { translate: 3px 0; }
}
.discovery-banner { box-shadow: inset 0 1px 0 #ffffff18; }
.opportunity-actions .action-symbol svg { display: block; width: 22px; height: 22px; margin: 0; stroke: var(--accent); }
.performance-top .balance-label { display: inline-flex; align-items: center; gap: 7px; }
.performance-metrics > div > span, .stat-label { display: flex; align-items: center; gap: 6px; }
.info-help { display: inline-grid; flex: none; place-items: center; width: 22px; height: 22px; margin: -4px 0; padding: 0; border: 0; border-radius: 50%; color: #7F7F7C; background: transparent; cursor: help; }
.info-help:hover, .info-help:focus-visible { color: var(--accent); background: #b8c4ff0a; }
.workspace-tooltip { position: fixed; top: 0; left: 0; z-index: 200; width: max-content; max-width: min(280px, calc(100vw - 24px)); padding: 10px 13px; border: 1px solid #51514F; border-radius: 8px; background: #242422; box-shadow: 0 8px 30px #0005, inset 0 1px #ffffff08; color: #E3E2E0; font: 12px/1.65 var(--font); pointer-events: none; }
.workspace-tooltip[hidden] { display: none; }
.amount-field, .ticket-input, .swap-field, .search-field, .chat-composer { transition: border-color .16s var(--ease), box-shadow .16s var(--ease), background .16s; }
.amount-field:focus-within, .ticket-input:focus-within, .swap-field:focus-within, .search-field:focus-within, .chat-composer:focus-within { border-color: #8D8D8A; box-shadow: 0 0 0 3px #a3b6ff0c, inset 0 1px 3px #0002; background-color: #252523; }
.amount-field input:focus-visible, .ticket-input input:focus-visible, .swap-field input:focus-visible, .search-field input:focus-visible, .chat-composer input:focus-visible { outline: none; }
input[type="number"] { appearance: textfield; -moz-appearance: textfield; }
input::-webkit-outer-spin-button, input::-webkit-inner-spin-button { -webkit-appearance: none; margin: 0; }
.amount-field input, .ticket-input input, .swap-input-row input { caret-color: var(--accent); }
.amount-field:has(input:invalid:not(:focus)), .ticket-input:has(input:invalid:not(:focus)) { border-color: #C0786C; }
.market-table tbody tr { position: relative; }
.market-table tbody tr:hover td, .portfolio-table tbody tr:hover td { background: #b8c4ff05; }
.market-table tbody tr:focus-visible { outline: 1px solid #777775; outline-offset: -2px; background: #b8c4ff08; }
.market-table tbody tr:hover .asset-copy strong { color: #DEDEDB; }
.market-table tbody tr .row-action { opacity: .72; transition: opacity .16s, background .16s; }
.market-table tbody tr:hover .row-action, .row-action:focus-visible { opacity: 1; background: #b8c4ff0a; }
.table-scroll { scrollbar-width: thin; scrollbar-color: #4A4948 transparent; }
::-webkit-scrollbar { width: 5px; height: 4px; }
::-webkit-scrollbar-thumb { border-radius: 10px; background: #4B4B49; }
::-webkit-scrollbar-track { background: transparent; }
.modal { transition: none; }
.modal-header { box-shadow: inset 0 1px #ffffff05; }
.modal-header .icon-button { width: 32px; height: 32px; border-color: transparent; }
.modal-header .icon-button:hover { border-color: var(--line-strong); }
.search-modal { max-width: 640px; border-color: #4C4C4A; background: #2B2B29; box-shadow: 0 32px 100px #0009, 0 0 0 4px #ffffff03; }
.search-box { height: 72px; padding: 0 22px; gap: 14px; background: #222120; }
.search-box > svg { color: var(--accent); stroke: var(--accent); width: 20px; height: 20px; }
.search-box input { font-size: 15px; }
.search-box input:focus-visible { outline: none; }
.key-hint { min-height: 25px; padding: 0 5px; border-color: #4C4C4A; color: #B9B9B6; font-size: 9px; text-transform: lowercase; background: #ffffff03; }
.search-results { padding: 8px; max-height: min(450px, 60dvh); scrollbar-width: thin; }
.search-section-label { display: flex; justify-content: space-between; padding: 9px 12px 12px; color: #B9B9B6; font-size: 11px; }
.search-section-label > span { color: var(--subtle); font-size: 10px; }
.search-result { gap: 12px; min-height: 72px; padding: 12px; border: 1px solid transparent; border-radius: 8px; }
.search-result.selected { background: #353532; border-color: #4E4E4B; box-shadow: inset 0 1px #ffffff05; }
.search-result:hover { background: #2E2E2C; }
.search-result .asset-copy strong { display: flex; gap: 10px; align-items: center; font-size: 13px; }
.search-result .search-class { font-size: 10px; color: #AEAEAB; font-weight: 400; }
.search-result .asset-copy > span { font-size: 11px; }
.search-result .search-price { display: grid; gap: 4px; color: #E6E5E3; font-family: var(--font); font-size: 13px; font-variant-numeric: tabular-nums; text-align: right; }
.search-price small { font-size: 10px; }
.search-enter { display: grid; place-items: center; width: 24px; height: 24px; margin-left: 7px; border: 1px solid #60605E; border-radius: 5px; color: #D5D5D2; opacity: 0; }
.search-result.selected .search-enter { opacity: 1; }
.search-empty { display: flex; align-items: center; flex-direction: column; gap: 10px; min-height: 220px; justify-content: center; }
.search-empty svg { color: var(--subtle); }
.search-empty strong { font-size: 14px; color: var(--text); font-weight: 500; }
.search-empty span { font-size: 12px; }
.search-footer { display: flex; gap: 20px; align-items: center; padding: 13px 20px; border-top: 1px solid var(--line-strong); color: var(--subtle); background: #191817; font-size: 10px; }
.search-footer > span { display: flex; gap: 5px; align-items: center; }
.search-footer > span:last-child { margin-left: auto; }
.search-footer kbd { display: grid; place-items: center; min-width: 17px; height: 18px; padding: 0 3px; border: 1px solid #40403E; border-radius: 3px; color: #B2B2AF; font: 10px var(--font); }
.toast { align-items: center; pointer-events: auto; gap: 12px; max-width: 420px; padding: 12px 12px 12px 16px; background: #21201F; border-color: #50504E; box-shadow: 0 14px 50px #0005, inset 0 1px #ffffff06; border-radius: 10px; }
.toast::before { display: none; }
.toast-icon { display: grid; flex: none; place-items: center; width: 26px; height: 26px; border-radius: 50%; border: 1px solid #72d8b02b; background: #72d8b010; color: var(--positive); }
.toast.error .toast-icon { color: var(--negative); background: #f18d9c10; border-color: #f18d9c2b; }
.toast-copy { font-size: 12px; color: #E4E4E1; line-height: 1.6; }
.toast-close { display: grid; place-items: center; flex: none; width: 32px; height: 32px; margin-left: auto; border-radius: 6px; background: transparent; color: var(--subtle); }
.toast-close:hover { background: #ffffff08; color: var(--text); }
.leverage-range { appearance: none; height: 5px; border: 0; border-radius: 4px; background: #444442; cursor: pointer; }
.leverage-range::-webkit-slider-thumb { appearance: none; width: 16px; height: 16px; border-radius: 50%; border: 3px solid #D3D3D0; background: #81817E; box-shadow: 0 0 0 4px #a5b9ff0d, 0 2px 5px #0004; }
.leverage-range::-moz-range-thumb { width: 12px; height: 12px; border-radius: 50%; border: 3px solid #D3D3D0; background: #81817E; }
.leverage-range:focus-visible { outline: 2px solid var(--accent); outline-offset: 7px; }
@media (max-width: 700px) {
  .segmented button { min-height: 40px; min-width: 40px; }
  .search-box { padding: 0 16px; gap: 10px; height: 66px; }
  .search-results { padding: 5px; max-height: min(420px, 57dvh); }
  .search-result { gap: 10px; padding: 10px; min-height: 72px; }
  .search-result .asset-copy strong { display: grid; gap: 2px; }
  .search-class { display: none; }
  .search-result .asset-copy > span { max-width: 145px; }
  .search-enter { display: none; }
  .search-footer { padding: 12px 14px; gap: 14px; }
  .search-footer > span:first-child { display: none; }
  .toast { max-width: none; padding: 10px 10px 10px 14px; }
  .toast-copy { font-size: 11px; }
  .toast-close { width: 40px; height: 40px; }
  .info-help { width: 24px; height: 24px; }
  .key-hint { min-height: 36px; }
  .modal-header .icon-button { width: 40px; height: 40px; }
}
@media (prefers-reduced-motion: reduce) {
  .featured-market, .opportunity-actions button { background: var(--surface); }
  .button > svg:last-child, .opportunity-actions button > svg { translate: 0 !important; }
  .modal { transition: none; }
}
