/* Arfi Bridge — product styles. Requires ../tokens.css and ../kit.css */

[hidden] { display: none !important; }
.ic { width: 18px; height: 18px; fill: none; stroke: currentColor; stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; flex: none; }
.ic--xs { width: 13px; height: 13px; }
.ttl { display: flex; align-items: center; gap: .6rem; flex-wrap: wrap; }

/* Chain / asset badges (token colours only) */
.tok__ico--bsc, .tok__ico--bnb { background: var(--warn-soft); color: var(--warn); box-shadow: inset 0 0 0 1px rgba(240,163,58,.35); }
.tok__ico--eth { background: var(--card-hover); color: var(--text); box-shadow: inset 0 0 0 1px var(--line); }
.tok__ico--usdt { background: var(--up-soft); color: var(--up); box-shadow: inset 0 0 0 1px rgba(22,199,132,.3); }
.tok__ico--usdc { background: var(--bg-2); color: var(--text-2); box-shadow: inset 0 0 0 1px var(--line); }

/* Phase banner */
.phase { border-bottom: 1px solid rgba(240,163,58,.25); background: linear-gradient(90deg, rgba(240,163,58,.15), rgba(240,163,58,.04)); }
.phase--paused { border-color: rgba(234,57,67,.3); background: linear-gradient(90deg, rgba(234,57,67,.18), rgba(234,57,67,.05)); }
.phase--live { border-color: rgba(22,199,132,.25); background: linear-gradient(90deg, rgba(22,199,132,.12), rgba(22,199,132,.03)); }
.phase__in { display: flex; align-items: center; gap: 1rem; padding: 1rem 0; }
.phase__ico { width: 40px; height: 40px; flex: none; border-radius: 50%; display: grid; place-items: center; background: var(--warn); color: var(--gold-ink); }
.phase--paused .phase__ico { background: var(--down); color: #fff; }
.phase--live .phase__ico { background: var(--up); color: #06140e; }
.phase__ico .ic { width: 20px; height: 20px; stroke-width: 2.1; }
.phase__txt { flex: 1; min-width: 0; }
.phase__txt b { display: block; font-size: 1.05rem; }
.phase__txt p { font-size: var(--fs-sm); color: var(--text-2); }

.states { display: flex; align-items: center; gap: .75rem; flex-wrap: wrap; margin-bottom: 1.25rem; font-size: var(--fs-xs); font-weight: 700; color: var(--faint); text-transform: uppercase; letter-spacing: .08em; }
.states .seg button { font-size: var(--fs-xs); text-transform: none; letter-spacing: 0; white-space: nowrap; }

/* Layout */
.layout { display: grid; grid-template-columns: minmax(0, 520px) minmax(0, 1fr); gap: 1.25rem; align-items: start; }
.side { display: grid; gap: 1.25rem; min-width: 0; }
.sec { margin-top: 1.25rem; }

/* Bridge card */
.card.bx { overflow: visible; }
.bx__body { display: grid; grid-template-columns: minmax(0, 1fr); gap: 0; }
.leg { border-radius: var(--r-md); background: var(--bg-2); border: 1px solid var(--line-soft); padding: .95rem 1rem 1rem; transition: border-color .15s; }
.leg:focus-within { border-color: var(--line); }
.leg__top { display: flex; align-items: center; gap: .6rem; }
.leg__lbl { font-size: var(--fs-xs); font-weight: 700; color: var(--muted); width: 2.4rem; }
.leg__wallet { margin-left: auto; font-size: var(--fs-xs); color: var(--faint); white-space: nowrap; }
.leg__wallet.is-on { color: var(--text-2); }
.leg__amt { display: flex; align-items: center; gap: .75rem; margin-top: .85rem; }
.leg__input { flex: 1; width: 100%; min-width: 0; height: 48px; border: 0; background: none; outline: 0; font-size: 2rem; font-weight: 800; color: var(--text); padding: 0; letter-spacing: -.01em; }
.leg__out { display: flex; align-items: center; color: var(--text-2); }
.leg__foot { display: flex; justify-content: space-between; align-items: center; margin-top: .3rem; font-size: var(--fs-xs); color: var(--faint); }
.leg__max { border: 0; background: var(--gold-soft); color: var(--gold-400); font-size: var(--fs-xs); font-weight: 800; padding: .15rem .5rem; border-radius: 4px; cursor: pointer; }
.leg--to .tok { padding: 0 .9rem 0 .35rem; height: 40px; border-radius: 999px; background: var(--card); border: 1px solid var(--line); font-size: var(--fs-sm); }

.picker { position: relative; }
.picker__btn { display: inline-flex; align-items: center; gap: .5rem; height: 36px; padding: 0 .6rem 0 .3rem; border-radius: 999px; border: 1px solid var(--line); background: var(--card); color: var(--text); font-size: var(--fs-sm); font-weight: 700; cursor: pointer; white-space: nowrap; }
.picker__btn:hover { background: var(--card-hover); }
.picker__btn .tok__ico { width: 26px; height: 26px; font-size: 9px; }
.picker__btn > .ic { width: 14px; height: 14px; color: var(--muted); }
.picker__btn--asset { height: 40px; padding-left: .35rem; }
.picker .drop, .picker .drop.is-open { position: absolute; display: block; min-width: 240px; margin: 0; box-shadow: var(--shadow-card); }
.picker .drop { opacity: 0; visibility: hidden; transform: translateY(-4px); }
.picker .drop.is-open { opacity: 1; visibility: visible; transform: none; }
.drop--right { left: auto; right: 0; }
.opt { display: flex; align-items: center; gap: .65rem; width: 100%; padding: .55rem .65rem; border: 0; background: none; border-radius: var(--r-sm); font-size: var(--fs-sm); font-weight: 700; color: var(--text-2); cursor: pointer; text-align: left; }
.opt:hover { background: var(--card-hover); color: var(--text); }
.opt small { display: block; font-weight: 400; font-size: var(--fs-xs); color: var(--faint); }
.opt .ic { margin-left: auto; color: var(--gold-400); width: 16px; height: 16px; }
.opt[disabled] { opacity: .45; cursor: not-allowed; }

.flip { display: grid; place-items: center; height: 10px; position: relative; z-index: 2; }
.flip__btn { width: 40px; height: 40px; border-radius: 12px; display: grid; place-items: center; border: 4px solid var(--surface); background: var(--card-hover); color: var(--gold-400); cursor: pointer; transition: transform .25s var(--ease), background .15s; }
.flip__btn:hover { background: var(--line); transform: rotate(180deg); }
.flip__btn .ic { width: 18px; height: 18px; }

.fees { margin: 1.1rem 0 1rem; padding: .5rem .1rem 0; }
.fees > div { padding: .35rem 0; }
.fees b { font-weight: 700; text-align: right; }
.bx__err { margin: -.4rem 0 .8rem; }
.bx__url { display: flex; flex-wrap: wrap; align-items: center; justify-content: center; gap: .4rem; margin-top: .85rem; font-size: var(--fs-xs); color: var(--faint); text-align: center; }
.bx__url b { color: var(--text-2); }
.bx__url .ic { color: var(--gold-400); }

/* Tracker */
.trk__sum { display: flex; align-items: center; gap: .75rem; flex-wrap: wrap; padding-bottom: 1rem; margin-bottom: 1.1rem; border-bottom: 1px solid var(--line-soft); font-size: var(--fs-sm); }
.trk__sum .tok { font-size: var(--fs-body); }
.trk__route { display: inline-flex; align-items: center; gap: .35rem; color: var(--muted); }
.trk__route .tok__ico { width: 20px; height: 20px; font-size: 8px; }
.trk__sum .pill { margin-left: auto; }
.trk { list-style: none; margin: 0; padding: 0; }
.trk li { position: relative; display: grid; grid-template-columns: 32px 1fr; gap: .9rem; padding-bottom: 1.25rem; }
.trk li:last-child { padding-bottom: 0; }
.trk li::before { content: ""; position: absolute; left: 15px; top: 34px; bottom: 2px; width: 2px; background: var(--line); }
.trk li:last-child::before { display: none; }
.trk li.is-done::before { background: var(--up); }
.trk__dot { width: 32px; height: 32px; border-radius: 50%; display: grid; place-items: center; background: var(--card); border: 2px solid var(--line); color: var(--faint); font-size: var(--fs-xs); font-weight: 800; }
.trk__dot .ic { width: 15px; height: 15px; stroke-width: 2.6; }
.is-done .trk__dot { background: var(--up); border-color: var(--up); color: #06140e; }
.is-now .trk__dot { border-color: var(--gold-400); color: var(--gold-400); box-shadow: 0 0 0 4px var(--gold-soft); }
.is-fail .trk__dot { background: var(--down); border-color: var(--down); color: #fff; }
.trk h3 { font-size: var(--fs-sm); display: flex; align-items: center; gap: .5rem; flex-wrap: wrap; }
.trk p { font-size: var(--fs-xs); color: var(--muted); margin-top: .15rem; }
.trk .bar { margin-top: .55rem; height: 6px; }
.trk__link { display: inline-flex; align-items: center; gap: .3rem; margin-top: .35rem; font-size: var(--fs-xs); font-weight: 700; color: var(--gold-400); }
.trk__link .ic { width: 12px; height: 12px; }
.trk__link:hover { color: var(--gold-300); }
.trk .pill { font-size: 11px; padding: .1rem .45rem; }

.kv--tight > div { grid-template-columns: 130px 1fr; padding: .8rem 1.25rem; }
.kv--tight dd { color: var(--text-2); }
.kv--tight dd b { color: var(--text); }

/* Tables */
.t a.mono { color: var(--gold-400); display: inline-flex; align-items: center; gap: .3rem; }
.t a.mono:hover { color: var(--gold-300); }
.t a.mono .ic { width: 12px; height: 12px; }
.route { display: inline-flex; align-items: center; gap: .35rem; }
.route .tok__ico { width: 22px; height: 22px; font-size: 8px; }
.route .ic { width: 14px; height: 14px; color: var(--faint); }
.t .tok__ico { width: 24px; height: 24px; font-size: 9px; }
.sec__foot { padding: .9rem 1.25rem; border-top: 1px solid var(--line-soft); font-size: var(--fs-xs); color: var(--faint); }
.card__head .tabs button { padding: .4rem .8rem; font-size: var(--fs-xs); }

/* Risks */
.sec__head { max-width: 640px; margin: 2.5rem 0 1.25rem; }
.sec__head h2 { font-size: var(--fs-h2); letter-spacing: -.01em; margin: .4rem 0 .5rem; }
.risk { padding: 1.25rem; border-radius: var(--r-lg); background: var(--surface); border: 1px solid var(--line-soft); }
.risk__ico { width: 40px; height: 40px; border-radius: var(--r-sm); background: var(--gold-soft); color: var(--gold-400); display: grid; place-items: center; margin-bottom: .9rem; }
.risk h3 { font-size: 1rem; margin-bottom: .35rem; }
.risk p { font-size: var(--fs-sm); color: var(--muted); }

@media (max-width: 1080px) {
  .layout { grid-template-columns: minmax(0, 1fr); }
  .side { grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); }
}
@media (max-width: 900px) {
  .side { grid-template-columns: minmax(0, 1fr); }
  .kv--tight > div { grid-template-columns: 1fr; }
}
@media (max-width: 640px) {
  .phase__in { flex-wrap: wrap; align-items: flex-start; }
  .phase__txt { flex-basis: calc(100% - 56px); }
  .phase__in .btn { margin-left: 56px; }
  .leg__input { font-size: 1.6rem; }
  .leg__wallet { display: none; }
  .card__head { flex-wrap: wrap; }
  .fees > div { flex-direction: column; gap: .1rem; }
  .fees b { text-align: left; }
  .picker .drop { min-width: 220px; }
  [data-connect] { width: 36px; padding: 0; }
  [data-connect] span { display: none; }
}
