/* SUNDEX p193 — network-selection reachability.
 *
 * The unselected verification screen keeps the asset rail as its only scroll
 * owner. Once an asset is selected, ownership moves to the complete form so
 * every network, the locked quote and the submit action remain reachable on
 * short desktop screens and mobile viewports. */

/* Deposit and other processing steps that do not own a dedicated asset rail
 * must always be able to reach their final action inside the ticket. */
body.sundex-transaction-system.stx-funding-route:not(.sx110-deposit-select):not(.sx156-withdraw-select)
  .stx-stage {
  min-height: 0 !important;
  overflow-x: hidden !important;
  overflow-y: auto !important;
  overscroll-behavior: contain !important;
  -webkit-overflow-scrolling: touch !important;
  touch-action: pan-y !important;
  scroll-padding-bottom: 28px !important;
}

/* The verification selector is a special combined step. Keep the metal
 * ticket fixed and let its decorated content become the selected-state
 * document viewport. This avoids two competing full-height scrollers. */
body.sundex-transaction-system.sx127-withdraw-layout.sx123-verification-coins.sx135-verification-coin-selected
  .stx-stage.sx123-stage,
body.sundex-transaction-system.sx127-withdraw-layout.sx123-verification-coins.sx135-verification-coin-selected
  .stx-stage.sx123-stage
  > .stx-vf-motion-host {
  min-height: 0 !important;
  overflow: hidden !important;
  overscroll-behavior: none !important;
}

body.sundex-transaction-system.sx127-withdraw-layout.sx123-verification-coins.sx135-verification-coin-selected
  .stx-stage.sx123-stage
  > .stx-vf-motion-host
  > .sx135-deposit-clone {
  box-sizing: border-box !important;
  height: 100% !important;
  min-height: 0 !important;
  max-height: 100% !important;
  flex: 1 1 0% !important;
  padding: 0 6px 32px 0 !important;
  overflow-x: hidden !important;
  overflow-y: auto !important;
  overscroll-behavior: contain !important;
  -webkit-overflow-scrolling: touch !important;
  touch-action: pan-y !important;
  scrollbar-gutter: stable !important;
  scrollbar-width: thin !important;
  scrollbar-color: rgba(180, 201, 228, 0.25) transparent !important;
  scroll-padding: 12px 0 32px !important;
  contain: layout paint !important;
}

body.sundex-transaction-system.sx127-withdraw-layout.sx123-verification-coins.sx135-verification-coin-selected
  .sx135-deposit-clone
  > .sx132-coins-head {
  margin-bottom: 14px !important;
}

/* One compact asset row remains visible after selection. It can still be
 * scrolled or filtered, so changing the coin does not require going back. */
body.sundex-transaction-system.sx127-withdraw-layout.sx123-verification-coins.sx135-verification-coin-selected
  .sx135-deposit-clone
  > .sx134-step1-search,
body.sundex-transaction-system.sx127-withdraw-layout.sx123-verification-coins.sx135-verification-coin-selected
  .sx135-deposit-clone
  > .sx134-step1-search
  > input {
  height: 56px !important;
  min-height: 56px !important;
}

body.sundex-transaction-system.sx127-withdraw-layout.sx123-verification-coins.sx135-verification-coin-selected
  .sx135-deposit-clone
  > .sx134-step1-list {
  box-sizing: border-box !important;
  height: 70px !important;
  min-height: 70px !important;
  max-height: 70px !important;
  flex: 0 0 70px !important;
  padding: 0 5px 6px 0 !important;
  overflow-x: hidden !important;
  overflow-y: auto !important;
  overscroll-behavior: contain !important;
  scrollbar-gutter: stable !important;
  scroll-snap-type: y proximity !important;
  clip-path: inset(0 round 12px) !important;
}

body.sundex-transaction-system.sx127-withdraw-layout.sx123-verification-coins.sx135-verification-coin-selected
  .sx135-deposit-clone
  > .sx134-step1-list
  > button {
  min-height: 62px !important;
  flex-basis: 62px !important;
  scroll-snap-align: start !important;
}

/* Network choices are part of the form, never a clipped secondary viewport. */
body.sundex-transaction-system.sx127-withdraw-layout.sx123-verification-coins.sx135-verification-coin-selected
  .sx135-deposit-clone
  > .sx132-networks {
  display: grid !important;
  width: 100% !important;
  min-width: 0 !important;
  max-height: none !important;
  flex: 0 0 auto !important;
  gap: 8px !important;
  margin-top: 6px !important;
  overflow: visible !important;
}

body.sundex-transaction-system.sx127-withdraw-layout.sx123-verification-coins.sx135-verification-coin-selected
  .sx135-deposit-clone
  > .sx132-networks
  > button {
  box-sizing: border-box !important;
  width: 100% !important;
  min-width: 0 !important;
  min-height: 58px !important;
  padding: 11px 16px !important;
  scroll-margin-block: 10px !important;
}

body.sundex-transaction-system.sx127-withdraw-layout.sx123-verification-coins.sx135-verification-coin-selected
  .sx135-deposit-clone
  > :is(.sx132-required-amount, .sx132-submit) {
  flex: 0 0 auto !important;
  scroll-margin-bottom: 28px !important;
}

body.sundex-transaction-system.sx127-withdraw-layout.sx123-verification-coins.sx135-verification-coin-selected
  .sx135-deposit-clone
  > .sx132-submit {
  position: static !important;
  inset: auto !important;
  width: 100% !important;
  min-height: 54px !important;
  margin: 8px 0 0 !important;
  transform: none !important;
}

@media (max-height: 780px) and (min-width: 701px) {
  body.sundex-transaction-system.sx127-withdraw-layout.sx123-verification-coins.sx135-verification-coin-selected
    .stx-stage.sx123-stage
    > .stx-vf-motion-host
    > .sx135-deposit-clone {
    padding-bottom: 24px !important;
  }

  body.sundex-transaction-system.sx127-withdraw-layout.sx123-verification-coins.sx135-verification-coin-selected
    .sx135-deposit-clone
    > .sx132-coins-head {
    margin-bottom: 10px !important;
  }
}

@media (max-width: 700px) {
  body.sundex-transaction-system.stx-funding-route:not(.sx110-deposit-select):not(.sx156-withdraw-select)
    .stx-stage {
    scroll-padding-bottom: max(22px, env(safe-area-inset-bottom)) !important;
  }

  body.sundex-transaction-system.sx127-withdraw-layout.sx123-verification-coins.sx135-verification-coin-selected
    .stx-stage.sx123-stage
    > .stx-vf-motion-host
    > .sx135-deposit-clone {
    padding: 0 2px max(24px, env(safe-area-inset-bottom)) 0 !important;
    scrollbar-gutter: auto !important;
    scroll-padding-bottom: max(24px, env(safe-area-inset-bottom)) !important;
  }

  body.sundex-transaction-system.sx127-withdraw-layout.sx123-verification-coins.sx135-verification-coin-selected
    .sx135-deposit-clone
    > .sx134-step1-search,
  body.sundex-transaction-system.sx127-withdraw-layout.sx123-verification-coins.sx135-verification-coin-selected
    .sx135-deposit-clone
    > .sx134-step1-search
    > input {
    height: 52px !important;
    min-height: 52px !important;
  }

  body.sundex-transaction-system.sx127-withdraw-layout.sx123-verification-coins.sx135-verification-coin-selected
    .sx135-deposit-clone
    > .sx134-step1-list {
    height: 68px !important;
    min-height: 68px !important;
    max-height: 68px !important;
    flex-basis: 68px !important;
  }

  body.sundex-transaction-system.sx127-withdraw-layout.sx123-verification-coins.sx135-verification-coin-selected
    .sx135-deposit-clone
    > .sx132-networks
    > button {
    min-height: 56px !important;
    padding: 10px 13px !important;
  }
}

@media (prefers-reduced-motion: reduce) {
  body.sundex-transaction-system.sx127-withdraw-layout.sx123-verification-coins.sx135-verification-coin-selected
    .sx135-deposit-clone,
  body.sundex-transaction-system.sx127-withdraw-layout.sx123-verification-coins.sx135-verification-coin-selected
    .sx134-step1-list {
    scroll-behavior: auto !important;
  }
}
