/* Public swap / exchange (/swap). Self-contained; light + dark via data-theme. */
/* The `hidden` attribute must win over the display:flex/grid class rules below,
   otherwise state panels (e.g. the "Sending…" line) never actually hide. */
[hidden] { display: none !important; }
:root{--sw-accent:#08a05a}
/* Embedded widget (iframe): transparent, no page chrome, tight spacing. */
body.sw-embed{background:transparent}
body.sw-embed .sw-wrap{padding:14px 12px;max-width:520px}
body.sw-embed .sw-head,body.sw-embed .sw-usps,body.sw-embed .sw-info,body.sw-embed .sw-how-head{display:none}
body.sw-embed .cp-hero-glow{display:none}

.sw-wrap { max-width: 720px; margin: 0 auto; padding: 40px 20px 80px; position: relative; }
.sw-head { text-align: center; margin-bottom: 26px; }
.sw-pill { display: inline-flex; align-items: center; gap: 6px; font-size: 12px; font-weight: 600;
    padding: 5px 12px; border-radius: 999px; border: 1px solid rgba(8,160,90,.3); color: var(--sw-accent); background: rgba(8,160,90,.08); }
.sw-h1 { margin: 16px 0 8px; font-size: 40px; line-height: 1.05; font-weight: 800; letter-spacing: -.02em; }
.sw-sub { color: #64748b; max-width: 520px; margin: 0 auto; font-size: 15px; line-height: 1.6; }
[data-theme="dark"] .sw-sub { color: #94a3b8; }

.sw-card { background: #fff; color: #0f172a; border: 1px solid rgba(15,23,42,.1); border-radius: 20px; padding: 22px;
    box-shadow: 0 30px 70px -50px rgba(15,23,42,.5); }
[data-theme="dark"] .sw-card { background: #0f172a; color: #e6edf7; border-color: rgba(148,163,184,.16); }
/* Inputs/selects inherit the card colour so amounts stay visible in both themes. */
.sw-amt, .sw-input, .sw-coin, .sw-net, .sw-cpick-btn, .sw-cpick-code, .sw-cpick-search { color: inherit; }
.sw-amt::placeholder, .sw-input::placeholder { color: #94a3b8; }

.sw-leg { background: #f4f6fb; border: 1px solid rgba(15,23,42,.08); border-radius: 14px; padding: 14px; }
[data-theme="dark"] .sw-leg { background: #111c33; border-color: rgba(148,163,184,.14); }
.sw-leg-row { display: flex; align-items: center; justify-content: space-between; margin-bottom: 8px; }
.sw-amt-row { display: flex; gap: 10px; align-items: center; }
.sw-amt { flex: 1; border: 0; background: transparent; font-size: 26px; font-weight: 700; color: inherit; outline: none; width: 100%; }
.sw-coin, .sw-net { border: 1px solid rgba(15,23,42,.14); background: #fff; border-radius: 10px; padding: 8px 10px; font-size: 13px; font-weight: 600; color: inherit; cursor: pointer; }
[data-theme="dark"] .sw-coin, [data-theme="dark"] .sw-net { background: #0b1424; border-color: rgba(148,163,184,.2); }
.sw-coin { font-size: 15px; }
.sw-net { max-width: 200px; }

/* Custom coin picker (icon + code + name in the list) */
.sw-cpick { position: relative; }
.sw-cpick-btn { display: inline-flex; align-items: center; gap: 7px; border: 1px solid rgba(15,23,42,.14); background: #fff; border-radius: 10px; padding: 7px 10px; font-size: 15px; font-weight: 700; color: inherit; cursor: pointer; }
[data-theme="dark"] .sw-cpick-btn { background: #0b1424; border-color: rgba(148,163,184,.2); }
.sw-cpick-ic { width: 22px; height: 22px; border-radius: 50%; }
.sw-cpick-car { color: #94a3b8; font-size: 11px; }
.sw-cpick-menu { position: absolute; right: 0; top: calc(100% + 6px); z-index: 30; width: 260px; max-width: 78vw;
    background: #fff; border: 1px solid rgba(15,23,42,.12); border-radius: 14px; box-shadow: 0 24px 50px -24px rgba(15,23,42,.5); padding: 8px; }
[data-theme="dark"] .sw-cpick-menu { background: #0f172a; border-color: rgba(148,163,184,.2); }
.sw-cpick-search { width: 100%; border: 1px solid rgba(15,23,42,.12); background: #f4f6fb; border-radius: 9px; padding: 8px 10px; font-size: 13px; color: inherit; outline: none; margin-bottom: 6px; }
[data-theme="dark"] .sw-cpick-search { background: #111c33; border-color: rgba(148,163,184,.2); }
.sw-cpick-list { max-height: 260px; overflow-y: auto; }
.sw-cpick-item { display: flex; align-items: center; gap: 9px; padding: 8px 9px; border-radius: 9px; cursor: pointer; }
.sw-cpick-item:hover { background: rgba(8,160,90,.1); }
.sw-cpick-item img { width: 22px; height: 22px; border-radius: 50%; flex: 0 0 auto; }
.sw-cpick-item b { font-size: 13.5px; font-weight: 700; }
.sw-cpick-item span { font-size: 12px; color: #64748b; margin-left: auto; text-align: right; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; max-width: 120px; }
.sw-muted { color: #64748b; font-size: 12px; text-transform: uppercase; letter-spacing: .5px; font-weight: 600; }
[data-theme="dark"] .sw-muted { color: #94a3b8; }

.sw-swapicon { width: 40px; height: 40px; margin: -12px auto; position: relative; z-index: 2;
    display: flex; align-items: center; justify-content: center; border-radius: 12px; cursor: pointer;
    background: var(--sw-accent); color: #fff; font-size: 18px; box-shadow: 0 6px 18px -6px rgba(8,160,90,.7); border: 3px solid #fff; }
[data-theme="dark"] .sw-swapicon { border-color: #0f172a; }

.sw-rate-row { display: flex; align-items: center; justify-content: space-between; gap: 10px; margin: 16px 0 6px; flex-wrap: wrap; }
.sw-rate { font-size: 13px; font-weight: 600; color: #334155; }
[data-theme="dark"] .sw-rate { color: #cbd5e1; }
.sw-type { display: inline-flex; background: #eef1f6; border-radius: 10px; padding: 3px; }
[data-theme="dark"] .sw-type { background: #111c33; }
.sw-type-btn { border: 0; background: transparent; padding: 7px 12px; border-radius: 8px; font-size: 12.5px; font-weight: 700; color: #64748b; cursor: pointer; }
.sw-type-btn.active { background: #fff; color: var(--sw-accent); box-shadow: 0 1px 4px rgba(15,23,42,.12); }
[data-theme="dark"] .sw-type-btn.active { background: #0b1424; }

.sw-fine { font-size: 12px; color: #94a3b8; line-height: 1.5; margin: 6px 0 0; }
.sw-center { text-align: center; }
.sw-opt { text-transform: none; letter-spacing: 0; font-weight: 400; color: #94a3b8; }

.sw-btn { width: 100%; margin-top: 16px; border: 0; border-radius: 12px; padding: 14px; font-size: 15px; font-weight: 700;
    background: var(--sw-accent); color: #fff; cursor: pointer; transition: filter .15s; }
.sw-btn:hover { filter: brightness(1.05); }
.sw-btn:disabled { opacity: .6; cursor: default; }
.sw-btn-sm { width: auto; padding: 10px 16px; margin: 0; font-size: 13px; }
.sw-back { border: 0; background: transparent; color: #64748b; font-size: 13px; cursor: pointer; margin-bottom: 10px; }
.sw-link { color: var(--sw-accent); font-weight: 600; text-decoration: none; }

.sw-field { margin-bottom: 14px; }
.sw-field label { display: block; margin-bottom: 6px; }
.sw-input { width: 100%; border: 1px solid rgba(15,23,42,.14); background: #fff; border-radius: 11px; padding: 12px 13px; font-size: 14px; color: inherit; outline: none; font-family: inherit; }
[data-theme="dark"] .sw-input { background: #0b1424; border-color: rgba(148,163,184,.2); }
.sw-input:focus { border-color: var(--sw-accent); }

.sw-summary { background: #f4f6fb; border-radius: 12px; padding: 14px; margin: 6px 0 4px; }
[data-theme="dark"] .sw-summary { background: #111c33; }
.sw-sum-row { display: flex; justify-content: space-between; font-size: 14px; padding: 4px 0; }
.sw-sum-row span { color: #64748b; }

.sw-alert { background: rgba(248,113,113,.12); border: 1px solid rgba(248,113,113,.4); color: #b91c1c; border-radius: 12px; padding: 11px 13px; font-size: 13px; margin-bottom: 14px; }
[data-theme="dark"] .sw-alert { color: #fca5a5; }

/* Status view */
.sw-track-top { display: flex; align-items: center; justify-content: space-between; margin-bottom: 16px; }
.sw-track-id { font-size: 15px; font-weight: 700; }
.sw-mono { font-family: ui-monospace, Menlo, monospace; }
.sw-badge { font-size: 12px; font-weight: 700; padding: 6px 12px; border-radius: 999px; background: rgba(251,191,36,.16); color: #b45309; letter-spacing: .3px; }
[data-theme="dark"] .sw-badge { color: #fcd34d; }
.sw-flow { display: flex; align-items: center; gap: 12px; background: #f4f6fb; border-radius: 14px; padding: 16px; margin-bottom: 16px; }
[data-theme="dark"] .sw-flow { background: #111c33; }
.sw-flow-side { flex: 1; display: flex; flex-direction: column; gap: 2px; }
.sw-flow-side strong { font-size: 17px; }
.sw-flow-side small { color: #94a3b8; font-size: 11px; }
.sw-flow-arrow { color: var(--sw-accent); font-size: 20px; font-weight: 700; }

.sw-qr { width: 172px; height: 172px; margin: 12px auto; padding: 10px; background: #fff; border-radius: 14px; }
.sw-copy { display: flex; align-items: center; gap: 8px; background: #f4f6fb; border: 1px solid rgba(15,23,42,.1); border-radius: 12px; padding: 11px 12px; }
[data-theme="dark"] .sw-copy { background: #0b1424; border-color: rgba(148,163,184,.18); }
.sw-copy code { flex: 1; font-size: 12.5px; word-break: break-all; font-family: ui-monospace, Menlo, monospace; }
.sw-copybtn { border: 0; background: rgba(8,160,90,.18); color: var(--sw-accent); font-weight: 600; font-size: 12px; padding: 7px 12px; border-radius: 9px; cursor: pointer; white-space: nowrap; }
.sw-lock { text-align: center; font-size: 12px; color: #b45309; margin: 10px 0 0; }
.sw-status-line { display: flex; align-items: center; justify-content: center; gap: 10px; margin-top: 16px; padding: 13px; border-radius: 12px; background: #f4f6fb; color: #64748b; font-size: 14px; }
[data-theme="dark"] .sw-status-line { background: #111c33; color: #94a3b8; }
.sw-spinner { width: 16px; height: 16px; border: 2px solid rgba(148,163,184,.4); border-top-color: var(--sw-accent); border-radius: 50%; animation: swspin 1s linear infinite; }
@keyframes swspin { to { transform: rotate(360deg); } }
.sw-state { text-align: center; padding: 20px 0 6px; }
.sw-state-icon { width: 56px; height: 56px; margin: 0 auto 12px; border-radius: 50%; display: flex; align-items: center; justify-content: center; font-size: 26px; font-weight: 700; }
.sw-state-icon.ok { background: rgba(52,211,153,.16); color: #059669; }
.sw-state-icon.warn { background: rgba(251,191,36,.16); color: #b45309; }
.sw-state h2 { font-size: 20px; font-weight: 800; margin: 0 0 4px; }
.sw-receipt { display: flex; gap: 8px; margin-top: 16px; }

/* Why swap here — real feature cards */
.sw-usps { display: grid; grid-template-columns: repeat(3, 1fr); gap: 12px; margin: 34px 0 10px; }
.sw-usp { display: flex; align-items: flex-start; gap: 12px; background: #fff; border: 1px solid rgba(148,163,184,.2); border-radius: 14px;
    padding: 16px; transition: border-color .2s, box-shadow .2s, transform .2s; }
.sw-usp:hover { border-color: rgba(8,160,90,.35); box-shadow: 0 10px 26px -18px rgba(8,160,90,.5); transform: translateY(-2px); }
[data-theme="dark"] .sw-usp { background: rgba(148,163,184,.04); }
.sw-usp-ic { flex: 0 0 auto; width: 40px; height: 40px; display: grid; place-items: center; font-size: 20px; border-radius: 11px;
    background: rgba(8,160,90,.1); border: 1px solid rgba(8,160,90,.2); }
.sw-usp strong { display: block; font-size: 14px; font-weight: 700; margin-bottom: 3px; }
.sw-usp small { display: block; font-size: 12.5px; line-height: 1.5; color: #64748b; }
[data-theme="dark"] .sw-usp small { color: #94a3b8; }
.sw-usp sup { color: var(--sw-accent); font-weight: 700; }

/* How it works — numbered step boxes */
.sw-how-head { text-align: center; margin: 44px 0 18px; }
.sw-how-head h2 { font-size: 24px; font-weight: 800; letter-spacing: -.02em; margin: 0 0 6px; }
.sw-how-head p { font-size: 14px; color: #64748b; margin: 0; }
[data-theme="dark"] .sw-how-head p { color: #94a3b8; }
.sw-info { display: grid; grid-template-columns: repeat(3, 1fr); gap: 14px; margin-top: 4px; }
.sw-info-card { position: relative; border: 1px solid rgba(148,163,184,.2); border-radius: 16px; padding: 22px 18px 18px;
    background: #fff; transition: border-color .2s, box-shadow .2s; }
[data-theme="dark"] .sw-info-card { background: rgba(148,163,184,.04); }
.sw-info-card:hover { border-color: rgba(8,160,90,.3); box-shadow: 0 12px 30px -20px rgba(8,160,90,.45); }
.sw-info-n { display: inline-flex; align-items: center; justify-content: center; width: 30px; height: 30px; border-radius: 9px;
    font-weight: 800; font-size: 14px; color: #fff; background: var(--sw-accent); margin-bottom: 12px; }
.sw-info-card h3 { font-size: 16px; font-weight: 700; margin: 0 0 6px; }
.sw-info-card p { font-size: 13.5px; color: #64748b; line-height: 1.55; margin: 0; }
[data-theme="dark"] .sw-info-card p { color: #94a3b8; }

/* ── Landing marketing sections (below the widget) ───────────────────────── */

/* Scroll-reveal (progressively enhanced; JS adds .in) */
.sw-reveal { opacity: 0; transform: translateY(18px); transition: opacity .6s ease, transform .6s ease; }
.sw-reveal.in { opacity: 1; transform: none; }
@media (prefers-reduced-motion: reduce) { .sw-reveal { opacity: 1; transform: none; transition: none; } }

/* Supported-assets carousel section (reuses the front-page .cp-coin-carousel) */
.sw-assets { padding: 30px 20px 10px; }
.sw-assets-head { text-align: center; max-width: 620px; margin: 0 auto 22px; }
.sw-assets-head h2 { font-size: 26px; font-weight: 800; letter-spacing: -.02em; margin: 12px 0 8px; }
.sw-assets-head p { font-size: 14.5px; color: #64748b; margin: 0; }
[data-theme="dark"] .sw-assets-head p { color: #94a3b8; }
.sw-stats { display: grid; grid-template-columns: repeat(4, 1fr); gap: 14px; max-width: 720px; margin: 26px auto 0; }
.sw-stat { text-align: center; border: 1px solid rgba(148,163,184,.2); border-radius: 14px; padding: 18px 10px; background: #fff; }
[data-theme="dark"] .sw-stat { background: rgba(148,163,184,.04); }
.sw-stat strong { display: block; font-size: 24px; font-weight: 800; letter-spacing: -.02em; color: var(--sw-accent); }
.sw-stat span { display: block; font-size: 12.5px; color: #64748b; margin-top: 4px; }
[data-theme="dark"] .sw-stat span { color: #94a3b8; }

.sw-market { padding: 60px 20px 90px; }
.sw-market-in { max-width: 940px; margin: 0 auto; }
.sw-market-head { text-align: center; max-width: 640px; margin: 0 auto 34px; }
.sw-market-head h2 { font-size: 30px; font-weight: 800; letter-spacing: -.02em; margin: 12px 0 10px; }
.sw-market-head p { font-size: 15px; line-height: 1.6; color: #64748b; margin: 0; }
[data-theme="dark"] .sw-market-head p { color: #94a3b8; }

.sw-market-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 18px; }
.sw-market-card { border: 1px solid rgba(148,163,184,.2); border-radius: 18px; padding: 24px; display: flex; flex-direction: column;
    background: rgba(148,163,184,.03); transition: opacity .6s ease, transform .6s ease, border-color .2s, box-shadow .2s; }
.sw-market-card:hover { border-color: rgba(8,160,90,.35); box-shadow: 0 12px 30px -18px rgba(8,160,90,.5); }
.sw-market-badge { align-self: flex-start; font-size: 11.5px; font-weight: 700; text-transform: uppercase; letter-spacing: .04em;
    color: var(--sw-accent); background: rgba(8,160,90,.1); border: 1px solid rgba(8,160,90,.22); border-radius: 999px; padding: 4px 10px; margin-bottom: 14px; }
.sw-market-card h3 { font-size: 19px; font-weight: 700; margin: 0 0 8px; }
.sw-market-card > p { font-size: 14px; line-height: 1.6; color: #64748b; margin: 0 0 14px; }
[data-theme="dark"] .sw-market-card > p { color: #94a3b8; }
.sw-market-card > p code { font-size: 12.5px; background: rgba(148,163,184,.16); padding: 1px 5px; border-radius: 5px; }
.sw-code { background: #0f172a; color: #d1fae5; border-radius: 10px; padding: 12px 14px; font-size: 12.5px; overflow-x: auto; margin: 0 0 16px; }
.sw-code code { font-family: ui-monospace, SFMono-Regular, Menlo, monospace; }
.sw-btn-inline { width: auto; margin-top: auto; display: inline-block; text-decoration: none; text-align: center; }
.sw-btn-ghost { background: transparent; border: 1px solid rgba(8,160,90,.4); color: var(--sw-accent); }
.sw-btn-ghost:hover { background: rgba(8,160,90,.08); filter: none; }

.sw-earn { text-align: center; font-size: 15px; font-weight: 600; line-height: 1.55; max-width: 620px; margin: 34px auto 0; color: #334155; }
[data-theme="dark"] .sw-earn { color: #cbd5e1; }

.sw-steps { display: grid; grid-template-columns: repeat(3, 1fr); gap: 16px; margin-top: 44px; }
.sw-step { text-align: center; padding: 8px; }
.sw-step-n { display: inline-flex; align-items: center; justify-content: center; width: 38px; height: 38px; border-radius: 50%;
    font-weight: 800; font-size: 16px; color: var(--sw-accent); background: rgba(8,160,90,.1); border: 1px solid rgba(8,160,90,.25); margin-bottom: 12px; }
.sw-step h4 { font-size: 15px; font-weight: 700; margin: 0 0 5px; }
.sw-step p { font-size: 13.5px; color: #64748b; line-height: 1.55; margin: 0; }
[data-theme="dark"] .sw-step p { color: #94a3b8; }

.sw-cta { text-align: center; margin-top: 56px; padding: 40px 24px; border-radius: 20px;
    background: linear-gradient(135deg, rgba(8,160,90,.09), rgba(8,160,90,.02)); border: 1px solid rgba(8,160,90,.2); }
.sw-cta h2 { font-size: 26px; font-weight: 800; letter-spacing: -.02em; margin: 0 0 8px; }
.sw-cta p { font-size: 14.5px; color: #64748b; margin: 0 0 20px; }
[data-theme="dark"] .sw-cta p { color: #94a3b8; }
.sw-cta-btns { display: flex; gap: 12px; justify-content: center; flex-wrap: wrap; }

@media (max-width: 860px) {
    .sw-usps { grid-template-columns: repeat(2, 1fr); }
}
@media (max-width: 640px) {
    .sw-h1 { font-size: 30px; }
    .sw-usps, .sw-info { grid-template-columns: 1fr; }
    .sw-net { max-width: 150px; }
    .sw-market-grid, .sw-steps { grid-template-columns: 1fr; }
    .sw-market-head h2 { font-size: 25px; }
    .sw-stats { grid-template-columns: repeat(2, 1fr); }
}
