/* DireBit app interface — styles for the markets, pair, favorites and
   profile screens rendered by assets/app.js. Extends the base styles
   already inlined in app.html. */

.app-screen[hidden] { display: none !important }

/* ----------------------------------------------------------- topbar ----- */
.topbar-left { align-items: center; display: flex; gap: 10px; min-width: 0 }
.topbar-title { color: var(--text); font-size: 17px; font-weight: 760; line-height: 1.2 }
.topbar-sub { color: var(--muted); font-size: 12px; margin-top: 2px }

.back-button {
  align-items: center; background: rgba(255, 255, 255, 0.06);
  border: 1px solid var(--line-soft); border-radius: 8px; color: var(--text);
  display: inline-flex; flex: 0 0 auto; font-size: 24px; height: 34px;
  justify-content: center; line-height: 1; padding-bottom: 3px; width: 34px;
}
.back-button:hover { border-color: var(--accent); color: var(--accent) }

/* ------------------------------------------------------ search/filter --- */
.search-wrap { margin-bottom: 10px }
.search-input {
  background: #080e18; border: 1px solid var(--line); border-radius: 8px;
  color: var(--text); font-size: 14px; min-height: 42px; padding: 0 12px; width: 100%;
}
.search-input::placeholder { color: var(--dim) }

.filter-chips { display: flex; flex-wrap: wrap; gap: 7px; margin-bottom: 14px }
.filter-chip {
  background: rgba(255, 255, 255, 0.055); border: 1px solid var(--line-soft);
  border-radius: 999px; color: var(--muted); font-size: 12px; font-weight: 720;
  min-height: 30px; padding: 0 12px;
}
.filter-chip:hover { color: var(--text) }
.filter-chip.is-on { background: rgba(46, 197, 255, 0.14); border-color: rgba(46, 197, 255, 0.4); color: var(--accent-2) }

/* --------------------------------------------------------- pair rows ---- */
.pair-change { font-size: 12px; font-weight: 760 }
.is-up { color: var(--positive) }
.is-down { color: var(--negative) }

.fav-star {
  background: transparent; color: var(--dim); font-size: 18px; line-height: 1;
  padding: 6px; align-self: center;
}
.fav-star:hover { color: var(--accent-2) }
.fav-star.is-on { color: var(--accent) }

.pair-row { grid-template-columns: 38px minmax(0, 1fr) auto auto }

/* -------------------------------------------------------- pair detail --- */
.pair-head { position: relative }
.pair-head-price { color: var(--text); font-size: 30px; font-weight: 800; line-height: 1.1 }
.pair-head-change { font-size: 13px; font-weight: 760; margin-top: 6px }
.pair-head-star { position: absolute; right: 12px; top: 12px; font-size: 22px }

.chart-wrap { overflow: hidden }
.candle-chart { display: block; height: auto; width: 100% }

/* --------------------------------------------------------- order book --- */
.book { display: grid; gap: 3px }
.book-side { display: grid; gap: 3px }
.book-row {
  align-items: center; display: grid; gap: 8px;
  grid-template-columns: minmax(0, 1fr) auto; min-height: 24px;
  padding: 2px 8px; position: relative;
}
.book-bar { inset: 0 auto 0 0; opacity: 0.14; position: absolute; border-radius: 3px }
.book-row.is-ask .book-bar { background: var(--negative) }
.book-row.is-bid .book-bar { background: var(--positive) }
.book-price { font-size: 12.5px; font-weight: 720; position: relative }
.book-row.is-ask .book-price { color: var(--negative) }
.book-row.is-bid .book-price { color: var(--positive) }
.book-amt { color: var(--muted); font-size: 12px; position: relative; text-align: right }
.book-mid {
  border-block: 1px solid var(--line-soft); color: var(--text);
  font-size: 15px; font-weight: 800; margin: 5px 0; padding: 7px 8px;
}

/* ------------------------------------------------------ recent trades --- */
.trade-list { display: grid; gap: 2px }
.trade-row {
  display: grid; gap: 8px; grid-template-columns: minmax(0, 1fr) auto auto;
  min-height: 24px; padding: 2px 8px;
}
.trade-price { font-size: 12.5px; font-weight: 720 }
.trade-amt { color: var(--muted); font-size: 12px; text-align: right }
.trade-time { color: var(--dim); font-size: 12px; text-align: right; min-width: 58px }

/* ---------------------------------------------------------- favorites --- */
.empty-panel {
  background: var(--panel); border: 1px solid var(--line-soft); border-radius: var(--radius);
  display: grid; gap: 12px; justify-items: center; padding: 34px 22px; text-align: center;
}
.empty-icon { color: var(--accent); font-size: 40px; line-height: 1 }
.empty-state { color: var(--muted); font-size: 13.5px; line-height: 1.65; margin: 0 }
.primary-button {
  background: var(--accent); border-radius: 7px; color: #04121d;
  font-weight: 760; min-height: 40px; padding: 0 18px;
}
.primary-button:hover { background: #1aa9e6 }

/* ------------------------------------------------------------ profile --- */
.verify-panel { border-color: rgba(46, 197, 255, 0.28) }
.verify-badge {
  background: rgba(46, 197, 255, 0.12); border: 1px solid rgba(46, 197, 255, 0.34);
  border-radius: 999px; color: var(--accent-2); display: inline-block;
  font-size: 12px; font-weight: 760; margin-bottom: 10px; padding: 6px 12px;
}
.verify-copy { color: var(--muted); font-size: 13px; line-height: 1.65; margin: 0 }

.kv-list { display: grid; gap: 2px }
.kv-row {
  border-bottom: 1px solid var(--line-soft); display: flex; gap: 10px;
  justify-content: space-between; padding: 9px 2px;
}
.kv-row:last-child { border-bottom: 0 }
.kv-key { color: var(--muted); font-size: 13px }
.kv-val { color: var(--text); font-size: 13px; font-weight: 720 }

.link-list { display: grid; gap: 2px }
.link-row {
  align-items: center; border-bottom: 1px solid var(--line-soft); color: var(--text);
  display: flex; font-size: 13.5px; justify-content: space-between; padding: 11px 2px;
}
.link-row:last-child { border-bottom: 0 }
.link-row:hover { color: var(--accent) }
.link-chevron { color: var(--dim); font-size: 18px }

/* the active tab colour was left over from the previous amber palette */
.nav-item.is-active { background: rgba(46, 197, 255, 0.14); color: #cdefff }

/* Below 520px the shell goes full-bleed (width:100vw) but .app-page kept its
   18px padding, pushing the shell 36px wider than the viewport. .app-page also
   sets overflow:hidden, so the excess was silently clipped rather than
   scrollable — the right-hand column of every row was cut off on a phone. */
@media (max-width: 520px) {
  .app-page { padding: 0 }
}
