/* SUNDEX buy/sell navigation — a quiet text action below the current step. */

body.sundex-transaction-system.stx-buy-sell-route .stx-head {
  align-content: flex-start !important;
  align-items: flex-start !important;
  padding-top: 30px !important;
}

body.sundex-transaction-system.stx-buy-sell-route .stx-head > .stx-title-group {
  width: 100% !important;
  flex: 1 1 100% !important;
}

/* Keep the native React control alive for navigation, but visually replace it
   with one stable text action at the end of the current stage. */
body.sundex-transaction-system.stx-buy-sell-route .stx-head > :is(
  button.stx-back-control,
  button.sx96-back-control
) {
  display: none !important;
}

body.sundex-transaction-system.stx-buy-sell-route .sx109-back-row {
  display: flex !important;
  width: 100% !important;
  min-height: 44px !important;
  align-items: center !important;
  justify-content: center !important;
  margin: 4px 0 0 !important;
  padding: 0 !important;
}

body.sundex-transaction-system.stx-buy-sell-route .sx109-back-link {
  position: static !important;
  inset: auto !important;
  display: inline-flex !important;
  width: auto !important;
  min-width: 0 !important;
  height: 44px !important;
  min-height: 44px !important;
  flex: 0 0 auto !important;
  align-items: center !important;
  justify-content: center !important;
  margin: 0 !important;
  padding: 10px 16px !important;
  border: 0 !important;
  border-radius: 0 !important;
  color: #838d9b !important;
  background: transparent !important;
  box-shadow: none !important;
  backdrop-filter: none !important;
  -webkit-backdrop-filter: none !important;
  font: inherit !important;
  font-size: 13px !important;
  font-weight: 520 !important;
  line-height: 1 !important;
  letter-spacing: -0.005em !important;
  cursor: pointer !important;
  opacity: 1 !important;
  transform: none !important;
  transition: color 150ms ease, opacity 150ms ease !important;
}

@media (hover: hover) and (pointer: fine) {
  body.sundex-transaction-system.stx-buy-sell-route .sx109-back-link:hover {
    color: #d4dae3 !important;
    background: transparent !important;
  }
}

body.sundex-transaction-system.stx-buy-sell-route .sx109-back-link:active {
  color: #eef2f7 !important;
  opacity: 0.72 !important;
}

body.sundex-transaction-system.stx-buy-sell-route .sx109-back-link:focus-visible {
  outline: 2px solid rgba(205, 219, 238, 0.7) !important;
  outline-offset: 2px !important;
}

/* Swap is a single workspace rather than a stepped flow. */
body.stx-swap-route .sundex-swap-page-head :is(
  .sundex-swap-back,
  .stx-back-control,
  .sx96-back-control
) {
  display: none !important;
}

@media (max-width: 640px) {
  body.sundex-transaction-system.stx-buy-sell-route .stx-head {
    padding-top: 28px !important;
  }

  body.sundex-transaction-system.stx-buy-sell-route .sx109-back-row {
    margin-top: 2px !important;
  }
}

@media (prefers-reduced-motion: reduce) {
  body.sundex-transaction-system.stx-buy-sell-route .sx109-back-link {
    transition: none !important;
  }
}
