/* Swap page wrapper. Dark, token-based (theme.css provides tokens/fonts/reset).
   The LI.FI widget renders itself inside #root and keeps its own styling. */

body {
  background: var(--bg);
  color: var(--ink);
  min-height: 100vh;
}

.page-container {
  max-width: 1000px;
  margin: 0 auto;
  padding: 52px 24px 64px;
}

.page-title {
  font-family: var(--font-display);
  font-size: clamp(28px, 5vw, 40px);
  color: var(--ink);
  margin-bottom: 14px;
  text-align: center;
  font-weight: 700;
  letter-spacing: -0.02em;
}

.swap-description {
  text-align: center;
  font-size: 16px;
  color: var(--ink-soft);
  max-width: 620px;
  margin: 0 auto 32px;
  line-height: 1.7;
}

/* Widget (compact, ~400px) on the left, info panel on the right.
   Single column below 640px. */
.swap-layout {
  display: grid;
  grid-template-columns: minmax(0, 420px) minmax(0, 1fr);
  gap: 28px;
  align-items: start;
  justify-content: center;
}

.widget-wrapper {
  display: flex;
  justify-content: center;
  padding: 8px 0;
}

.swap-aside {
  display: flex;
  flex-direction: column;
  gap: 18px;
  padding-top: 8px;
}

.swap-card {
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 22px 24px;
}

.swap-card-title {
  font-family: var(--font-display);
  font-size: 18px;
  font-weight: 600;
  color: var(--ink);
  margin-bottom: 14px;
}

.swap-steps {
  margin: 0;
  padding-left: 20px;
  color: var(--ink-soft);
  font-size: 14px;
  line-height: 1.6;
}
.swap-steps li { margin: 8px 0; }

.swap-nets {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.swap-net {
  font-size: 13px;
  font-weight: 600;
  color: var(--ink-soft);
  padding: 6px 13px;
  border-radius: 999px;
  border: 1px solid var(--line-strong);
  background: var(--surface-2);
}

@media (max-width: 860px) {
  .swap-layout {
    grid-template-columns: 1fr;
    max-width: 460px;
    margin: 0 auto;
  }
}

@media (max-width: 640px) {
  .page-container { padding: 40px 20px 48px; }
}

/* Placeholder shown until the visitor asks for the widget. React's createRoot()
   wipes #root on first render, so this needs no teardown of its own. */
.swap-placeholder {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 16px;
  min-height: 320px;
  padding: 32px 24px;
  text-align: center;
  border: 1px dashed var(--line);
  border-radius: 14px;
  background: var(--surface);
}
.swap-placeholder p {
  color: var(--ink-dim);
  font-size: 14.5px;
  max-width: 34ch;
  margin: 0;
}
