/* ============================================================
   Order Book (section 9)
   ============================================================ */

.order-book {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 1px;
  background: var(--border-subtle);
  font-family: var(--font-mono);
  font-size: var(--text-xs);
}

.order-book-side {
  background: var(--bg-surface);
  display: flex;
  flex-direction: column;
}

.order-book-header {
  display: flex;
  justify-content: space-between;
  padding: var(--space-2) var(--space-3);
  font-family: var(--font-ui);
  font-size: var(--text-xs);
  font-weight: 600;
  letter-spacing: var(--tracking-widest);
  text-transform: uppercase;
  color: var(--text-tertiary);
  border-bottom: 1px solid var(--border-subtle);
}

.order-book-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 2px var(--space-3);
  height: 24px;
  position: relative;
}

.order-book-row::before {
  content: '';
  position: absolute;
  top: 0;
  bottom: 0;
  pointer-events: none;
}

.order-book-side.bids .order-book-row::before {
  right: 0;
  background: var(--positive-dim);
}

.order-book-side.asks .order-book-row::before {
  left: 0;
  background: var(--negative-dim);
}

.order-book-price {
  z-index: 1;
}

.order-book-side.bids .order-book-price {
  color: var(--positive);
}

.order-book-side.asks .order-book-price {
  color: var(--negative);
}

.order-book-size {
  color: var(--text-secondary);
  z-index: 1;
}

.order-book-spread {
  grid-column: 1 / -1;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: var(--space-2);
  padding: var(--space-2);
  background: var(--bg-elevated);
  font-family: var(--font-ui);
  font-size: var(--text-xs);
  color: var(--text-secondary);
}

.order-book-spread-value {
  font-family: var(--font-mono);
  color: var(--text-primary);
}
