/*
 * Phase 8Q.3-F -- pitfall teasers and the live status chips.
 *
 * Only tokens app.css defines (--bg-elev, --bg-elev-2, --line, --line-soft,
 * --accent, --accent-dim, --warn, --danger, --text, --text-dim, --radius,
 * --radius-sm, --tap): an undefined custom property fails silently into a
 * default colour (Phase 8B shipped four).
 *
 * Nothing here has a fixed width: a 375 px phone with the system font at its
 * largest must not scroll sideways. Text wraps anywhere (a long display name
 * in NAME IN LIGHTS), and the box and target rows wrap instead of overflowing.
 * Linked before phase8k.css, which stays LAST.
 */

/* ---- the teaser ---------------------------------------------------------- */

.pf-splash {
  border-top: 4px solid var(--warn);
}

.pf-splash--hot_potato,
.pf-splash--frozen_wallet {
  border-top-color: var(--danger);
}

.pf-splash--mystery_box,
.pf-splash--name_in_lights {
  border-top-color: var(--accent);
}

.pf {
  display: grid;
  gap: 8px;
  padding: 8px 2px 2px;
  min-width: 0;
  overflow-wrap: anywhere;
}

.pf__kicker {
  margin: 0;
  font-size: 0.8rem;
  font-weight: 700;
  letter-spacing: 0.12em;
  color: var(--text-dim);
  text-align: center;
}

.pf__title {
  margin: 0;
  font-size: clamp(1.4rem, 7vw, 2rem);
  font-weight: 800;
  line-height: 1.1;
  color: var(--warn);
  text-align: center;
}

.pf__desc {
  margin: 0;
  font-weight: 600;
  color: var(--text);
  text-align: center;
}

.pf__facts {
  display: grid;
  gap: 6px;
  margin: 4px 0 0;
  padding: 10px 12px;
  border: 1px solid var(--line);
  border-radius: var(--radius-sm);
  background: var(--bg-elev-2);
}

.pf__fact {
  display: grid;
  gap: 2px;
  min-width: 0;
}

.pf__label {
  margin: 0;
  font-size: 0.75rem;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--text-dim);
}

.pf__text {
  margin: 0;
  color: var(--text);
}

.pf__note {
  margin: 0;
  color: var(--text-dim);
}

.pf__outcome {
  margin: 4px 0 0;
  padding: 10px 12px;
  border-radius: var(--radius-sm);
  background: var(--accent-dim);
  color: var(--text);
  font-weight: 700;
  text-align: center;
}

/* Three identical boxes: equal thirds that shrink, never a fixed width. */
.pf__boxes {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 8px;
  margin-top: 4px;
}

.pf__box {
  min-height: var(--tap);
  aspect-ratio: 1 / 1;
  max-height: 120px;
  border: 2px solid var(--accent);
  border-radius: var(--radius);
  background: var(--bg-elev);
  color: var(--text);
  font-size: clamp(1.6rem, 9vw, 2.6rem);
  cursor: pointer;
}

.pf__box:disabled {
  opacity: 0.55;
  cursor: progress;
}

.pf__pass {
  display: grid;
  gap: 6px;
}

.pf__targets {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.pf__target {
  min-height: var(--tap);
  max-width: 100%;
  padding: 6px 14px;
  border: 1px solid var(--line);
  border-radius: var(--radius-sm);
  background: var(--bg-elev);
  color: var(--text);
  font: inherit;
  font-weight: 700;
  overflow-wrap: anywhere;
  cursor: pointer;
}

/* ---- the status chips (Home, Prizes, Games) ------------------------------ */

.pf-host {
  margin: 0 0 12px;
}

.pf-host[hidden] {
  display: none;
}

.pf-chips {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  min-width: 0;
}

.pf-public {
  flex: 1 1 100%;
  margin: 0;
  padding: 8px 12px;
  border: 1px solid var(--accent);
  border-radius: var(--radius-sm);
  background: var(--accent-dim);
  color: var(--text);
  font-weight: 800;
  letter-spacing: 0.02em;
  overflow-wrap: anywhere;
}

.pf-chip {
  min-height: var(--tap);
  max-width: 100%;
  padding: 6px 12px;
  border: 1px solid var(--warn);
  border-radius: 999px;
  background: var(--bg-elev);
  color: var(--text);
  font: inherit;
  font-size: 0.85rem;
  font-weight: 700;
  text-align: left;
  overflow-wrap: anywhere;
  cursor: pointer;
}

.pf-chip--frozen_wallet,
.pf-chip--hot_potato {
  border-color: var(--danger);
}

.pf-chip--mystery_box,
.pf-chip--name_in_lights {
  border-color: var(--accent);
}

/* ---- the bid screen's Grinch Tax disclosure ------------------------------ */

.pf-disclosure {
  margin: 6px 0 0;
  padding: 8px 10px;
  border: 1px solid var(--warn);
  border-radius: var(--radius-sm);
  background: var(--bg-elev-2);
  color: var(--warn);
  font-weight: 700;
  overflow-wrap: anywhere;
}

/* ---- Admin Console: Rewards & Economy > Pitfalls ------------------------ */

.ac__form {
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  gap: 8px;
}

@media (min-width: 720px) {
  .ac__form {
    grid-template-columns: minmax(0, 1fr) minmax(0, 1fr) auto;
    align-items: center;
  }
}

.ac__form .field__input {
  width: 100%;
  min-width: 0;
}

.ac__row {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  padding: 8px 0;
  border-bottom: 1px solid var(--line-soft);
}

.ac__row-text {
  flex: 1 1 14rem;
  min-width: 0;
  margin: 0;
  overflow-wrap: anywhere;
}

@media (max-width: 359px) {
  .pf__title {
    font-size: 1.3rem;
  }
  .pf__boxes {
    gap: 6px;
  }
  .pf-chip {
    font-size: 0.8rem;
    padding: 6px 10px;
  }
}

@media (prefers-reduced-motion: no-preference) {
  .pf-splash .pf__title {
    animation: pf-pop 260ms ease-out;
  }
  @keyframes pf-pop {
    from {
      transform: scale(0.92);
      opacity: 0.4;
    }
    to {
      transform: scale(1);
      opacity: 1;
    }
  }
}
