/* SWAP PAGE */
.logo-img { height: 64px; width: auto; display: block; mix-blend-mode: lighten; }
.page-hero { padding:140px 48px 60px; background:var(--bg); border-bottom:1px solid var(--border); position:relative; overflow:hidden; }
.page-hero::before { content:''; position:absolute; top:0; left:0; right:0; bottom:0; background-image:linear-gradient(var(--border) 1px,transparent 1px),linear-gradient(90deg,var(--border) 1px,transparent 1px); background-size:80px 80px; mask-image:linear-gradient(to bottom, black 0%, transparent 100%); pointer-events:none; }
.page-hero-inner { max-width:1280px; margin:0 auto; position:relative; z-index:1; }
.page-hero h1 { font-family:var(--serif); font-size:clamp(36px,5vw,60px); font-weight:800; font-style:italic; letter-spacing:-0.02em; margin-bottom:12px; }
.page-hero p { font-size:15px; color:var(--text-muted); font-weight:300; }
.section-tag { display:block; margin-bottom:12px; font-size:11px; letter-spacing:0.14em; text-transform:uppercase; color:var(--orange); font-weight:600; font-family:var(--mono); }

.swap-wrap { max-width:1080px; margin:0 auto; padding:32px 48px 64px; }
@media(max-width:768px) { .swap-wrap{padding:16px;} .page-hero{padding:120px 24px 48px;} }

.data-source-bar { background:rgba(255,107,0,0.06); border:1px solid rgba(255,107,0,0.15); border-radius:6px; padding:8px 16px; margin-bottom:20px; font-size:12px; color:#888; font-family:var(--mono); }
.data-source-bar strong { color:var(--orange); }

.swap-grid { display:grid; grid-template-columns:1.3fr 1fr; gap:24px; align-items:start; }
@media(max-width:900px) { .swap-grid{grid-template-columns:1fr;} }
/* Before a quote exists, the right column (quote/status) has nothing to show —
   center the swap card alone instead of leaving an empty second column. */
.swap-grid.is-centered { grid-template-columns:1fr; max-width:600px; margin:0 auto; }
.swap-grid.is-centered .swap-side { display:none; }

.swap-card, .quote-panel, .status-panel {
  background:var(--bg-card); border:1px solid var(--border); border-radius:16px; padding:24px;
}
.swap-card-header { display:flex; justify-content:space-between; align-items:center; margin-bottom:20px; flex-wrap:wrap; gap:12px; }
.swap-card-header h2 { font-size:16px; font-weight:700; font-family:var(--mono); }

.btn-connect, .btn-use-wallet, .btn-max {
  font-size:12px; font-weight:600; padding:9px 18px; border-radius:100px; border:1px solid var(--border-orange);
  background:rgba(255,107,0,0.08); color:var(--orange); cursor:pointer; transition:all 0.2s; white-space:nowrap;
}
.btn-connect:hover, .btn-use-wallet:hover, .btn-max:hover { background:rgba(255,107,0,0.16); }
.wallet-bar { display:flex; align-items:center; gap:10px; }
.wallet-pill { display:flex; align-items:center; gap:8px; font-size:12px; font-family:var(--mono); color:var(--text-muted); background:var(--bg-elevated); border:1px solid var(--border); border-radius:100px; padding:7px 14px; }
.wallet-pill .dot { width:6px; height:6px; border-radius:50%; background:#22c55e; }
.btn-disconnect { background:none; border:none; color:var(--text-dim); cursor:pointer; font-size:12px; margin-left:4px; }
.btn-disconnect:hover { color:var(--text); }

.swap-field { margin-bottom:16px; }
.swap-field-label { display:flex; justify-content:space-between; align-items:baseline; font-size:11px; text-transform:uppercase; letter-spacing:0.08em; color:var(--text-dim); font-family:var(--mono); margin-bottom:8px; }
.balance-label { text-transform:none; letter-spacing:0; color:var(--text-muted); font-size:11px; }
.swap-field-row { display:flex; gap:8px; flex-wrap:wrap; }
.chain-select, .asset-select {
  background:var(--bg-elevated); border:1px solid var(--border); border-radius:10px; padding:10px 12px; color:var(--text);
  font-size:13px; font-family:var(--sans); cursor:pointer; outline:none;
}
.chain-select:focus, .asset-select:focus, .amount-input:focus, .recipient-input:focus { border-color:var(--orange); }

.asset-select-btn {
  display:flex; flex-direction:row; align-items:center; gap:8px; background:var(--bg-elevated);
  border:1px solid var(--border); border-radius:10px; padding:8px 14px; color:var(--text); font-size:13px;
  font-family:var(--sans); cursor:pointer; transition:border-color 0.2s; white-space:nowrap; min-width:100px;
}
.asset-select-btn:hover { border-color:var(--border-orange); }
.select-btn-text { display:flex; flex-direction:column; align-items:flex-start; gap:2px; }
.asset-select-btn .select-btn-symbol { font-weight:700; }
.asset-select-btn .select-btn-network { color:var(--text-dim); font-size:11px; font-family:var(--mono); }

/* Token/chain icons, with a generated colored-initials fallback for
   anything that isn't provided by 1Click's token data or isn't one of the
   self-hosted chain SVGs — so a missing logo never renders as a broken
   image, just a clean placeholder. */
.icon-circle {
  display:inline-flex; align-items:center; justify-content:center; width:24px; height:24px;
  border-radius:50%; overflow:hidden; flex-shrink:0; background:var(--bg-elevated);
}
.icon-circle img { width:100%; height:100%; object-fit:cover; display:block; }
.icon-fallback {
  width:100%; height:100%; display:flex; align-items:center; justify-content:center;
  color:#fff; font-size:9px; font-weight:700; font-family:var(--mono);
}
.icon-circle.icon-sm { width:22px; height:22px; }
.combo-icon { position:relative; width:28px; height:28px; flex-shrink:0; }
.combo-icon .icon-main { width:28px; height:28px; }
.combo-icon .icon-badge {
  position:absolute; right:-3px; bottom:-3px; width:14px; height:14px; border:2px solid var(--bg-elevated);
}
.combo-icon .icon-badge .icon-fallback { font-size:6px; }

.picker-overlay {
  position:fixed; inset:0; background:rgba(0,0,0,0.6); backdrop-filter:blur(2px);
  display:flex; align-items:center; justify-content:center; z-index:200; padding:20px;
}
.picker-modal {
  width:100%; max-width:380px; max-height:80vh; display:flex; flex-direction:column;
  background:var(--bg-card); border:1px solid var(--border); border-radius:16px; overflow:hidden;
}
.picker-header { display:flex; align-items:center; gap:10px; padding:16px 18px; border-bottom:1px solid var(--border); }
.picker-header h3 { flex:1; font-size:14px; font-weight:700; font-family:var(--mono); }
.picker-back, .picker-close { background:none; border:none; color:var(--text-muted); font-size:16px; cursor:pointer; padding:4px; line-height:1; }
.picker-back:hover, .picker-close:hover { color:var(--text); }
.picker-list { overflow-y:auto; padding:8px; }
.picker-row {
  display:flex; align-items:center; gap:10px; width:100%; text-align:left;
  background:none; border:none; border-radius:10px; padding:12px 10px; color:var(--text); font-size:14px;
  font-family:var(--sans); cursor:pointer; transition:background 0.15s;
}
.picker-row:hover { background:var(--bg-elevated); }
.picker-row-sub { color:var(--text-dim); font-size:11px; font-family:var(--mono); }
.picker-row-icon { width:24px; height:24px; flex-shrink:0; border-radius:6px; }
.picker-section-label { padding:10px 10px 4px; font-size:10px; text-transform:uppercase; letter-spacing:0.08em; color:var(--text-dim); font-family:var(--mono); }
.picker-divider { height:1px; background:var(--border); margin:6px 10px; }
.btn-add-wallet { background:none; border:1px dashed var(--border); border-radius:100px; color:var(--text-muted); font-size:11px; padding:6px 12px; cursor:pointer; transition:all 0.2s; }
.btn-add-wallet:hover { border-color:var(--border-orange); color:var(--orange); }
.amount-input, .recipient-input {
  flex:1; min-width:120px; background:var(--bg-elevated); border:1px solid var(--border); border-radius:10px; padding:10px 14px;
  color:var(--text); font-size:14px; font-family:var(--mono); outline:none;
}
.amount-input.readonly { color:var(--text-muted); }
.field-hint { font-size:11px; color:var(--text-dim); margin-top:8px; line-height:1.5; }

.swap-direction-row { display:flex; justify-content:center; margin:-4px 0; }
.btn-flip {
  width:36px; height:36px; border-radius:50%; border:1px solid var(--border); background:var(--bg-elevated);
  color:var(--orange); font-size:16px; cursor:pointer; transition:all 0.2s; z-index:1;
}
.btn-flip:hover { border-color:var(--orange); transform:rotate(180deg); }

.slippage-row { display:flex; gap:8px; }
.slippage-opt {
  font-size:12px; padding:8px 16px; border-radius:100px; border:1px solid var(--border); background:transparent;
  color:var(--text-muted); cursor:pointer; transition:all 0.2s; font-family:var(--mono);
}
.slippage-opt:hover { border-color:rgba(255,255,255,0.18); color:var(--text); }
.slippage-opt.active { border-color:var(--orange); color:var(--orange); background:rgba(255,107,0,0.06); }

.btn-primary-swap {
  width:100%; padding:14px; border-radius:100px; border:none; background:var(--orange); color:#000;
  font-size:14px; font-weight:700; cursor:pointer; transition:all 0.25s; margin-top:8px;
}
.btn-primary-swap:hover { box-shadow:0 0 28px rgba(255,107,0,0.4); transform:translateY(-1px); }
.btn-primary-swap:disabled { opacity:0.4; cursor:not-allowed; transform:none; box-shadow:none; }
.btn-secondary-swap {
  width:100%; padding:12px; border-radius:100px; border:1px solid var(--border); background:transparent;
  color:var(--text-muted); font-size:13px; font-weight:500; cursor:pointer; transition:all 0.2s; margin-top:10px;
}
.btn-secondary-swap:hover { border-color:rgba(255,255,255,0.18); color:var(--text); }
.btn-view-explorer { display:block; box-sizing:border-box; text-align:center; text-decoration:none; }
#deposit-tx-link a { color:var(--orange); }

.banner { display:flex; justify-content:space-between; align-items:flex-start; gap:12px; border-radius:10px; padding:12px 16px; margin-bottom:16px; font-size:12.5px; line-height:1.5; }
.banner-error { background:rgba(239,68,68,0.08); border:1px solid rgba(239,68,68,0.25); color:#f87171; }
.banner-warn { background:rgba(249,115,22,0.08); border:1px solid rgba(249,115,22,0.25); color:#f97316; }
.banner-close { background:none; border:none; color:inherit; cursor:pointer; font-size:13px; opacity:0.7; }
.banner-close:hover { opacity:1; }

.swap-side { display:flex; flex-direction:column; gap:20px; position:sticky; top:96px; }
.swap-side-placeholder p { color:var(--text-dim); font-size:13px; line-height:1.6; }
.quote-panel h3, .status-panel h3 { font-size:13px; text-transform:uppercase; letter-spacing:0.08em; color:var(--text-dim); font-family:var(--mono); margin-bottom:16px; }
.quote-row { display:flex; justify-content:space-between; align-items:center; padding:8px 0; border-bottom:1px solid var(--border); font-size:13px; }
.quote-row:last-of-type { border-bottom:none; }
.q-label { color:var(--text-muted); }
.q-val { font-family:var(--mono); font-weight:600; text-align:right; }
.q-val.mono { font-size:11px; word-break:break-all; max-width:220px; }
.q-val.privacy-confidential { color:var(--orange); }
.q-pct-positive { color:#22c55e; font-weight:500; }
.q-pct-negative { color:#ef4444; font-weight:500; }
.q-pct-neutral { color:var(--text-muted); font-weight:500; }
.info-icon { color:var(--text-dim); cursor:help; font-size:11px; font-weight:400; }
.quote-row-review:first-of-type { border-top:1px dashed var(--border); margin-top:4px; padding-top:14px; }

.status-steps { list-style:none; display:flex; flex-direction:column; gap:10px; margin-bottom:16px; }
.status-steps li { position:relative; padding-left:26px; font-size:12.5px; color:var(--text-dim); font-family:var(--mono); }
.status-steps li::before { content:''; position:absolute; left:0; top:3px; width:14px; height:14px; border-radius:50%; border:2px solid var(--border); background:var(--bg-elevated); }
.status-steps li.done { color:var(--text); }
.status-steps li.done::before { border-color:var(--orange); background:var(--orange); }
.status-steps li.active { color:var(--orange); }
.status-steps li.active::before { border-color:var(--orange); animation:pulse 2s infinite; }
.status-steps li.failed { color:#ef4444; }
.status-steps li.failed::before { border-color:#ef4444; background:#ef4444; }

.status-badge { display:inline-block; font-size:11px; font-weight:700; letter-spacing:0.06em; text-transform:uppercase; padding:6px 14px; border-radius:100px; font-family:var(--mono); margin-bottom:16px; background:var(--bg-elevated); border:1px solid var(--border); color:var(--text-muted); }
.status-badge.success { color:#22c55e; border-color:rgba(34,197,94,0.3); background:rgba(34,197,94,0.08); }
.status-badge.pending { color:var(--orange); border-color:var(--border-orange); background:rgba(255,107,0,0.08); }
.status-badge.failed { color:#ef4444; border-color:rgba(239,68,68,0.3); background:rgba(239,68,68,0.08); }

.deposit-info { border-top:1px solid var(--border); padding-top:14px; margin-top:4px; }
.swap-details { margin-top:12px; font-size:11px; color:var(--text-dim); font-family:var(--mono); word-break:break-all; }
.swap-details a { color:var(--orange); }

@media(max-width:900px) {
  .swap-side { position:static; }
}
