.ks-trade-card {
  width: min(425px, calc(100vw - 32px));
  margin: 0 auto;
  padding: 16px;
  border-radius: 20px;
  background: #202020;
  color: #fff;
  box-shadow: 0 18px 48px rgba(0, 0, 0, 0.26);
}

.ks-trade-tabs {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-bottom: 12px;
}

.ks-trade-tabs button {
  border: 0;
  background: transparent;
  color: #aeb8c4;
  font-size: 17px;
  font-weight: 800;
  cursor: pointer;
}

.ks-trade-tabs button.is-active {
  color: var(--ks-primary, #31cb9e);
}

.ks-trade-tabs span {
  width: 1px;
  height: 24px;
  background: #4a4a4a;
}

.ks-trade-settings {
  display: none !important;
  margin-left: auto;
  color: #a9a9a9 !important;
}

.ks-trade-subtitle {
  margin: 0 0 16px;
  color: #d7dee8;
  font-size: 13px;
  font-weight: 600;
}

.ks-mode-body {
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.ks-token-box,
.ks-rate-box {
  padding: 16px;
  border-radius: 15px;
  background: #101010;
}

.ks-box-head,
.ks-inline-row,
.ks-token-line,
.ks-chain-wallet-row,
.ks-wallet-balance,
.ks-slippage-line,
.ks-route-options-row {
  display: flex;
  align-items: center;
}

.ks-box-head,
.ks-chain-wallet-row {
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 13px;
  color: #dbe4ef;
  font-size: 13px;
  font-weight: 800;
}

.ks-box-label {
  color: #c5cfdb;
  font-size: 12px;
  font-weight: 700;
}

.ks-token-line {
  gap: 12px;
}

.ks-token-line [data-slot="amount"] {
  display: flex;
  min-width: 0;
  flex: 1 1 auto;
  align-items: center;
  cursor: text;
}

.ks-token-line .token-amount-input {
  position: relative;
  z-index: 1;
  width: 100% !important;
  min-width: 0;
  flex: 1 1 auto;
  height: 42px;
  padding: 0 !important;
  border: 0 !important;
  background: transparent !important;
  color: #fff !important;
  font-size: 24px !important;
  font-weight: 700 !important;
  outline: none !important;
  -webkit-text-fill-color: currentColor !important;
  pointer-events: auto !important;
  user-select: text;
}

.ks-output-box .token-amount-input {
  color: #667281 !important;
}

.ks-output-box.is-quote-refreshing [data-slot="amount"]::after {
  content: "";
  width: 12px;
  height: 12px;
  flex: 0 0 12px;
  margin-left: 8px;
  border: 2px solid rgba(49, 203, 158, 0.22);
  border-top-color: var(--ks-primary, #31cb9e);
  border-radius: 999px;
  animation: ks-quote-spin 0.72s linear infinite;
}

@keyframes ks-quote-spin {
  to {
    transform: rotate(360deg);
  }
}

.ks-token-line .open-currency-select-button {
  min-height: 38px !important;
  max-width: 150px;
  padding: 8px 10px !important;
  border: 0 !important;
  border-radius: 999px !important;
  background: #222 !important;
  color: #d8e0ea !important;
  font-size: 18px !important;
  font-weight: 800 !important;
  box-shadow: none !important;
}

.ks-token-line .open-currency-select-button img {
  width: 22px !important;
  height: 22px !important;
  min-width: 22px !important;
}

.ks-usd {
  color: #707b89;
  font-size: 13px;
  pointer-events: none;
  white-space: nowrap;
}

.ks-reverse-button {
  display: flex;
  width: 30px;
  height: 30px;
  align-items: center;
  justify-content: center;
  align-self: center;
  margin: -4px 0;
  border: 0;
  border-radius: 999px;
  background: #303030;
  color: #aab3bf;
  cursor: pointer;
}

.ks-slippage-line,
.ks-route-options-row {
  justify-content: space-between;
  gap: 10px;
  color: #c3ccd8;
  font-size: 13px;
}

.ks-slippage-line button,
.ks-chip-button,
.ks-chain-button,
.ks-wallet-button,
.ks-expiry-button,
.ks-route-options-button {
  border: 0;
  border-radius: 999px;
  background: transparent;
  color: #fff;
  font-weight: 800;
  cursor: pointer;
}

.ks-route-options-button {
  min-height: 28px;
  padding: 0 12px;
  background: #303030;
  color: #d8e0ea;
  font-size: 14px;
}

.ks-info-box {
  display: flex;
  flex-direction: column;
  gap: 13px;
  padding: 16px;
  border: 1px solid #4d4d4d;
  border-radius: 14px;
}

.ks-info-row {
  display: flex;
  justify-content: space-between;
  gap: 16px;
  color: #c5ced9;
  font-size: 13px;
}

.ks-info-row span {
  border-bottom: 1px dotted #78818c;
}

.ks-info-row b {
  color: #fff;
  font-size: 12px;
  text-align: right;
}

.ks-connect-button {
  width: 100% !important;
  min-height: 44px !important;
  border: 0 !important;
  border-radius: 999px !important;
  background: var(--ks-primary, #31cb9e) !important;
  color: #07130f !important;
  font-size: 14px !important;
  font-weight: 800 !important;
}

.ks-rate-box {
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.ks-rate-main {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  align-items: end;
  gap: 16px;
}

.ks-rate-input {
  width: 100%;
  border: 0;
  background: transparent;
  color: var(--ks-primary, #31cb9e);
  font-size: 22px;
  font-weight: 800;
  outline: none;
}

.ks-market-toggle {
  padding: 7px 10px;
  background: rgba(49, 203, 158, 0.16);
  color: var(--ks-primary, #31cb9e);
}

.ks-adjustments {
  display: flex;
  gap: 6px;
}

.ks-adjustments button {
  min-height: 25px;
  padding: 0 11px;
  border: 1px solid #48525e;
  border-radius: 7px;
  background: transparent;
  color: #cbd4df;
  font-weight: 800;
  cursor: pointer;
}

.ks-adjustments button.is-active {
  border-color: var(--ks-primary, #31cb9e);
  color: #fff;
}

.ks-chain-button,
.ks-wallet-button,
.ks-expiry-button {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  padding: 0;
  color: #fff;
}

.ks-chain-button img {
  width: 20px;
  height: 20px;
  border-radius: 999px;
}

.ks-wallet-balance {
  gap: 5px;
  margin-top: 9px;
  color: #a9b2bf;
  font-size: 12px;
}

.ks-recipient input {
  width: 100%;
  min-height: 44px;
  padding: 0 12px;
  border: 0;
  border-radius: 10px;
  background: #101010;
  color: #fff;
  outline: none;
}

.ks-field-error {
  margin-top: 5px;
  color: #ffb545;
  font-size: 12px;
}

.ks-routed-via {
  color: #7d8794;
  font-size: 12px;
  font-style: italic;
}

.ks-popover {
  position: fixed;
  z-index: 99999;
  min-width: 190px;
  padding: 8px;
  border: 1px solid #3b3b3b;
  border-radius: 12px;
  background: #181818;
  box-shadow: 0 18px 40px rgba(0, 0, 0, 0.45);
  transform-origin: top right;
  animation: ks-popover-in 150ms ease both;
}

.ks-popover.ks-popover-closing {
  animation: ks-popover-out 140ms ease both;
  pointer-events: none;
}

.ks-popover button {
  display: block;
  width: 100%;
  min-height: 34px;
  padding: 0 10px;
  border: 0;
  border-radius: 8px;
  background: transparent;
  color: #e6edf6;
  text-align: left;
  cursor: pointer;
}

.ks-popover button:hover {
  background: #242424;
}

@keyframes ks-popover-in {
  from {
    opacity: 0;
    transform: translateY(-6px) scale(0.98);
  }

  to {
    opacity: 1;
    transform: translateY(0) scale(1);
  }
}

@keyframes ks-popover-out {
  from {
    opacity: 1;
    transform: translateY(0) scale(1);
  }

  to {
    opacity: 0;
    transform: translateY(-6px) scale(0.98);
  }
}

.ks-swap-status {
  min-height: 18px;
  color: #9aa3af;
  font-size: 12px;
  text-align: center;
}

.ks-swap-status[data-tone="error"] {
  color: #ffb545;
}

.ks-swap-status[data-tone="success"] {
  color: var(--ks-primary, #31cb9e);
}

.ks-unsupported-network {
  display: flex;
  min-height: 132px;
  flex-direction: column;
  justify-content: center;
  gap: 10px;
  padding: 18px;
  border: 1px solid #4d4d4d;
  border-radius: 15px;
  background: #101010;
  color: #d7dee8;
}

.ks-unsupported-network b {
  color: #fff;
  font-size: 15px;
}

.ks-unsupported-network span {
  color: #aab3bf;
  font-size: 13px;
  line-height: 1.45;
}

.ks-connect-button:disabled {
  cursor: not-allowed !important;
  opacity: 0.55;
}
