/*
 * Phase 8Q.3-C -- ADMIN CHAOS.
 *
 *   .acx-*          ARSENAL -> ADMIN CHAOS in the Admin Console (admin-chaos.js)
 *   .chaos-reveal   the player's "ADMIN CHAOS! / <ABILITY> / ..." splash
 *   .chaos-chip     the small chip on a Games section or a prize card
 *
 * Mobile first (375 px): every row wraps, nothing has a fixed width, every
 * control is at least the tap height, and inputs are 16 px so iOS does not
 * zoom. Only tokens defined in app.css :root are used.
 */

/* ---------------------------- the console tab ---------------------------- */

.acx-panel {
  min-width: 0;
}

.acx-intro,
.acx-status {
  color: var(--text-dim);
  margin: 0 0 10px;
  overflow-wrap: anywhere;
}

.acx-body {
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  gap: 10px;
}

@media (min-width: 900px) {
  .acx-body {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

.acx-card {
  border: 1px solid var(--line);
  border-radius: var(--radius-sm);
  background: var(--bg-elev);
  padding: 12px;
  min-width: 0;
  overflow-wrap: anywhere;
}

.acx-card[data-available="no"] {
  border-style: dashed;
}

.acx-card__head {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-wrap: wrap;
}

.acx-card__icon {
  font-size: 1.3rem;
}

.acx-card__name {
  margin: 0;
  font-size: 1rem;
  flex: 1 1 auto;
  min-width: 0;
}

.acx-chip {
  font-size: 0.75rem;
  border-radius: 999px;
  padding: 2px 8px;
  border: 1px solid var(--line);
  white-space: nowrap;
}

.acx-chip--ready {
  color: var(--accent);
  border-color: var(--accent-dim);
}

.acx-chip--blocked {
  color: var(--text-faint);
}

.acx-card__desc,
.acx-card__config,
.acx-card__reason,
.acx-card__message {
  margin: 8px 0 0;
  font-size: 0.9rem;
}

.acx-card__config {
  color: var(--text-dim);
  font-family: var(--mono);
  font-size: 0.8rem;
}

.acx-card__reason {
  color: var(--warn);
}

.acx-card__pickers {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: 10px;
}

.acx-select,
.acx-input {
  flex: 1 1 160px;
  min-width: 0;
  max-width: 100%;
  min-height: var(--tap);
  background: var(--bg-elev-2);
  color: var(--text);
  border: 1px solid var(--line);
  border-radius: var(--radius-sm);
  padding: 0 10px;
  font: inherit;
  font-size: 16px;
}

.acx-field {
  display: flex;
  flex-direction: column;
  gap: 4px;
  flex: 1 1 110px;
  min-width: 0;
}

.acx-field__label {
  font-size: 0.75rem;
  color: var(--text-dim);
}

.acx-card__actions,
.acx-confirm {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: 10px;
}

.acx-card__actions .btn,
.acx-confirm .btn {
  min-height: var(--tap);
}

.acx-confirm {
  border: 1px solid var(--warn);
  border-radius: var(--radius-sm);
  padding: 10px;
  align-items: center;
}

.acx-confirm__text {
  flex: 1 1 100%;
  margin: 0;
}

.acx-recent__title {
  margin: 12px 0 4px;
  font-size: 0.8rem;
  color: var(--text-dim);
  text-transform: uppercase;
}

.acx-recent,
.acx-outcomes {
  list-style: none;
  margin: 0;
  padding: 0;
}

.acx-recent__item {
  border-top: 1px solid var(--line-soft);
  padding: 6px 0;
}

.acx-recent__line,
.acx-recent__summary,
.acx-recent__id,
.acx-outcomes__item {
  margin: 2px 0;
  font-size: 0.8rem;
  overflow-wrap: anywhere;
}

.acx-recent__summary {
  color: var(--text-dim);
}

.acx-recent__id {
  color: var(--text-faint);
  font-family: var(--mono);
}

.acx-recent__details summary {
  cursor: pointer;
  font-size: 0.8rem;
  min-height: 32px;
}

/* ------------------------------ the reveal ------------------------------ */

.chaos-splash {
  text-align: center;
}

.chaos-reveal {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 6px;
  padding: 8px 0;
  overflow-wrap: anywhere;
}

.chaos-reveal__kicker {
  margin: 0;
  color: var(--warn);
  font-weight: 800;
  letter-spacing: 0.08em;
}

.chaos-reveal__icon {
  margin: 0;
  font-size: 2.6rem;
  line-height: 1.1;
}

.chaos-reveal__title {
  margin: 0;
  font-size: 1.5rem;
  font-weight: 800;
  color: var(--accent);
}

.chaos-reveal__sentence {
  margin: 0;
  color: var(--text);
  max-width: 34ch;
}

.chaos-reveal__amount {
  margin: 4px 0 0;
  font-size: 1.2rem;
  font-weight: 700;
  color: var(--accent);
}

.chaos-reveal__choices {
  display: flex;
  flex-direction: column;
  gap: 8px;
  width: 100%;
  margin-top: 8px;
}

.chaos-reveal__choice {
  min-height: var(--tap);
  width: 100%;
  white-space: normal;
}

/* ------------------------------- the chips ------------------------------- */

.chaos-chip {
  display: inline-block;
  max-width: 100%;
  margin: 0 0 6px;
  padding: 2px 10px;
  border-radius: 999px;
  border: 1px solid var(--warn);
  color: var(--warn);
  font-size: 0.75rem;
  font-weight: 700;
  letter-spacing: 0.04em;
  overflow-wrap: anywhere;
}

.chaos-chip--prize {
  margin: 6px 8px 8px;
}
