/*
 * PHASE 8I -- mobile auction bidding.
 *
 * Layered over game.css's .bidbar rules (loaded earlier). Uses only tokens that
 * exist in app.css: --tap, --line, --bg, --bg-elev-2, --text, --text-faint,
 * --accent, --radius-sm, with literal fallbacks.
 */

/*
 * Every bid control is a plain button. touch-action: manipulation removes the
 * double-tap-to-zoom delay, so rapid +/- taps register as taps; the pressed
 * state is visible without hover, because a phone has no hover.
 */
.bidbar__quick .btn,
.bidbar__step,
.bidbar__stale .btn {
  touch-action: manipulation;
  -webkit-tap-highlight-color: transparent;
  user-select: none;
  -webkit-user-select: none;
}

.bidbar__quick .btn:active,
.bidbar__step:active,
.bidbar__stale .btn:active {
  transform: scale(0.96);
  filter: brightness(1.15);
}

.bidbar__step {
  min-width: 48px;
  min-height: var(--tap, 44px);
}

.bidbar__step:disabled {
  opacity: 0.4;
  cursor: default;
}

/* The amount looks editable and reads at a glance: large, tabular digits. */
.bidbar__input {
  font-size: 24px;
  min-height: 52px;
  border-width: 2px;
  border-style: dashed;
  border-color: var(--line, #444);
  caret-color: var(--accent, #f5b800);
}

.bidbar__input:focus {
  border-style: solid;
  border-color: var(--accent, #f5b800);
}

.bidbar[data-mode="manual"] .bidbar__hint {
  color: var(--text, #fff);
}

/* The overtaken-draft warning sits between the amount and Place Bid. */
.bidbar__stale {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  margin: 0 0 10px;
  padding: 8px 10px;
  border-radius: var(--radius-sm, 8px);
  border: 1px solid var(--accent, #f5b800);
  font-weight: 700;
  font-size: 0.9rem;
}

.bidbar__stale[hidden],
.bidbar__warn[hidden] {
  display: none;
}

.bidbar__stale .btn {
  flex: 0 0 auto;
  min-height: var(--tap, 44px);
}

.bidbar__warn {
  margin: 0 0 10px;
  font-size: 0.8rem;
  color: var(--text-faint, #bbb);
  text-align: center;
}

/*
 * While the amount is being typed, the fixed tab bar would sit over Place Bid
 * on an iPhone (it rides above the keyboard in a home-screen app). It steps
 * aside until the field loses focus. Nothing else moves, so the field itself
 * does not jump.
 */
.is-bid-editing .tabbar {
  display: none;
}
