/*
 * PHASE 8P -- AUCTION ENGAGEMENT.
 *
 * The Home AUCTION card (one row per line, action-needed first), the prizes
 * screen's BID MISSIONS card, the single chip on a prize card, the recovery
 * band on a prize page and the reclaim sheet's lines. Only the app.css
 * tokens are read. Must load BEFORE phase8k.css, which stays last.
 */

.ae-host { display: grid; gap: 8px; }

.ae-line {
  display: grid;
  grid-template-columns: 1fr auto;
  align-items: center;
  gap: 4px 12px;
  min-height: var(--tap);
  padding: 10px 14px;
  border: 1px solid var(--line);
  border-radius: var(--radius-sm);
  background: var(--bg-elev);
  color: var(--text);
  text-decoration: none;
}
.ae-line__text { display: grid; gap: 2px; min-width: 0; }
.ae-line__label { font-size: 0.78rem; font-weight: 800; letter-spacing: 0.06em; color: var(--text-dim); }
.ae-line__sub { font-size: 0.85rem; color: var(--text-dim); overflow-wrap: anywhere; }
.ae-line__value { font-weight: 800; white-space: nowrap; }
/* Phase 8Q: the outbid row is a block -- a summary link, then a real button. */
.ae-line--block { grid-template-columns: 1fr; gap: 8px; }
.ae-line__head {
  display: grid;
  grid-template-columns: 1fr auto;
  align-items: center;
  gap: 4px 12px;
  color: inherit;
  text-decoration: none;
}
.ae-line__button { width: 100%; min-height: var(--tap); }
.ae-line__note { margin: 0; font-size: 0.85rem; color: var(--text-dim); }
.ae-line__more {
  justify-self: start;
  min-height: var(--tap);
  display: inline-flex;
  align-items: center;
  font-size: 0.85rem;
  font-weight: 700;
  color: var(--text-dim);
}
.ae-line--action { border-color: var(--warn); }
.ae-line--action .ae-line__label { color: var(--warn); }
.ae-line--good .ae-line__label { color: var(--accent); }
.ae-line--done .ae-line__value { color: var(--accent); }

.ae-card { display: grid; gap: 10px; }
.ae-mission, .ae-challenge {
  display: grid;
  gap: 6px;
  padding: 10px 12px;
  border: 1px solid var(--line);
  border-radius: var(--radius-sm);
}
.ae-mission__top { display: flex; justify-content: space-between; gap: 8px; font-weight: 800; }
/* Phase 8Q: a mission is a <details>; the summary is the whole tappable row. */
.ae-mission__summary {
  display: grid;
  gap: 4px;
  min-height: var(--tap);
  cursor: pointer;
  list-style: none;
}
.ae-mission__summary::-webkit-details-marker { display: none; }
.ae-mission__status { font-size: 0.72rem; font-weight: 800; letter-spacing: 0.06em; color: var(--text-dim); }
.ae-mission__status--done { color: var(--accent); }
.ae-mission__detail { display: grid; gap: 4px; padding-top: 4px; border-top: 1px solid var(--line-soft); }
.ae-mission__line { margin: 0; font-size: 0.88rem; color: var(--text-dim); overflow-wrap: anywhere; }
.ae-mission__reward { color: var(--accent); white-space: nowrap; }
.ae-mission__title { margin: 0; color: var(--text); overflow-wrap: anywhere; }
.ae-mission__count { font-weight: 800; }
.ae-mission__bar { height: 6px; border-radius: 999px; background: var(--line); overflow: hidden; }
.ae-mission__fill { display: block; height: 100%; background: var(--accent); }
.ae-mission--done { border-color: var(--accent-dim); }
.ae-streak { margin: 0; color: var(--text-dim); }

.prize__media { position: relative; }
/*
 * Phase 8Q: up to two chips share one corner container. It is absolutely
 * positioned (no card height change, ever); a second chip that will not fit
 * beside the first wraps UPWARD rather than off the card, and each chip is
 * one line.
 */
.prize__chips {
  position: absolute;
  left: 8px;
  right: 8px;
  bottom: 8px;
  display: flex;
  flex-wrap: wrap-reverse;
  justify-content: flex-end;
  gap: 4px;
  pointer-events: none;
}
.prize__chip {
  white-space: nowrap;
  padding: 3px 9px;
  border-radius: 999px;
  font-size: 0.72rem;
  font-weight: 800;
  letter-spacing: 0.06em;
  background: var(--bg-elev);
  color: var(--text);
  border: 1px solid var(--line);
}
.prize__chip--outbid { border-color: var(--warn); color: var(--warn); }
.prize__chip--leading { border-color: var(--accent); color: var(--accent); }
.prize__chip--mission,
.prize__chip--challenge,
.prize__chip--mission-challenge { border-color: var(--metal); color: var(--metal); background: var(--bg-elev-2); }

.ae-recovery {
  display: grid;
  gap: 6px;
  margin: 12px 0;
  padding: 12px 14px;
  border: 1px solid var(--warn);
  border-radius: var(--radius-sm);
  background: var(--bg-elev);
}
.ae-recovery__title { margin: 0; font-weight: 800; letter-spacing: 0.06em; color: var(--warn); }
.ae-recovery__detail, .ae-recovery__note { margin: 0; color: var(--text-dim); }
.ae-recovery__cta { min-height: var(--tap); width: 100%; }

.ae-sheet__lines { display: grid; gap: 4px; margin: 8px 0; }
.ae-sheet__line { margin: 0; color: var(--text); }

/* ==========================================================================
 * Phase 8M -- a long Final Call, and the Recovery panel
 * ========================================================================== */

/* Above ten minutes the clock is words, in calm type: a two-hour window is not an emergency. */
.countdown--words {
  display: inline-flex;
  align-items: baseline;
}
.countdown__words {
  font-weight: 700;
  font-variant-numeric: tabular-nums;
  letter-spacing: 0.01em;
}
.countdown--calm .countdown__words { color: var(--text); }
.countdown--soon .countdown__words,
.countdown--soon .countdown__value { color: var(--warn); }

.reopen-panel .btn { margin-top: 0.5rem; margin-right: 0.5rem; }
.reopen-panel__last,
.reopen-panel__chain {
  margin: 0.75rem 0 0;
  font-size: 0.9rem;
  line-height: 1.4;
}
.reopen-panel__chain {
  font-weight: 700;
  letter-spacing: 0.02em;
  overflow-wrap: anywhere;
}
