/* Fair proof: every rep side by side on the BoogieBoard */

/* ---------- Board ---------- */

.bbi-fp-head {
  display: flex;
  align-items: center;
  gap: 12px;
  height: 60px;
  padding: 0 14px 0 16px;
  border-bottom: 1px solid var(--bbi-line);
}

.bbi-fp-head > .bbi-tile { width: 36px; height: 36px; border-radius: 11px; }
.bbi-fp-head > .bbi-tile svg { width: 19px; height: 19px; }
.bbi-fp-title b { display: block; font-size: 16px; font-weight: 800; color: var(--bbi-ink); }
.bbi-fp-title small { display: block; font-size: 12px; font-weight: 600; color: var(--bbi-muted); white-space: nowrap; }

.bbi-fp-share {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  height: 34px;
  margin-left: auto;
  padding: 0 13px;
  border-radius: 10px;
  border: 1px solid rgba(94, 114, 228, 0.35);
  background: #fff;
  box-shadow: var(--bbi-shadow-sm);
  font-size: 13px;
  font-weight: 800;
  color: var(--bbi-indigo);
  white-space: nowrap;
  transition: transform 0.2s ease, background-color 0.3s ease, color 0.3s ease, border-color 0.3s ease;
}

.bbi-fp-share svg { width: 15px; height: 15px; }
.bbi-fp-share.is-pressed { transform: scale(0.95); }
.bbi-fp-share.is-done { border-color: var(--bbi-good-edge); background: var(--bbi-good-bg); color: var(--bbi-good); }

.bbi-fp-grid {
  display: grid;
  grid-template-columns: 196px repeat(3, minmax(0, 1fr));
  column-gap: 12px;
  align-items: center;
  padding: 0 18px;
}

.bbi-fp-cols {
  height: 32px;
  font-size: 11px;
  font-weight: 800;
  letter-spacing: 0.07em;
  text-transform: uppercase;
  color: var(--bbi-muted);
  white-space: nowrap;
}

.bbi-fp-row {
  height: 56px;
  transition: height 0.45s var(--bbi-ease), background-color 0.3s ease;
}

.bbi-fp-board.is-open .bbi-fp-row { height: 46px; }
.bbi-fp-row.is-open { background: rgba(94, 114, 228, 0.05); }

.bbi-fp-who { display: flex; align-items: center; gap: 11px; min-width: 0; }
.bbi-fp-who .bbi-avatar { width: 34px; height: 34px; }
.bbi-fp-who b { display: block; font-size: 14px; font-weight: 800; color: var(--bbi-ink); line-height: 1.25; white-space: nowrap; }
.bbi-fp-who small { display: block; font-size: 12px; font-weight: 600; color: var(--bbi-muted); white-space: nowrap; }

.bbi-fp-cell {
  height: 40px;
  padding: 0 10px 0 12px;
  font-size: 16px;
  font-weight: 800;
  transition: background-color 0.5s ease, color 0.5s ease, border-color 0.5s ease, box-shadow 0.3s ease, transform 0.2s ease;
}

.bbi-fp-board.is-open .bbi-fp-cell { height: 36px; }
.bbi-fp-cell.is-on { box-shadow: 0 0 0 2px #fff, 0 0 0 4px rgba(94, 114, 228, 0.5); }
.bbi-fp-cell.is-pressed { transform: scale(0.96); }

/* "Highest" badge riding on the cell's top edge */
.bbi-fp-top {
  position: absolute;
  top: -9px;
  right: 8px;
  display: inline-flex;
  align-items: center;
  gap: 3px;
  height: 18px;
  padding: 0 7px 0 5px;
  border-radius: 6px;
  background: var(--bbi-grad-brand);
  box-shadow: 0 4px 10px -4px rgba(94, 114, 228, 0.6);
  font-size: 10px;
  font-style: normal;
  font-weight: 800;
  letter-spacing: 0.02em;
  color: #fff;
  white-space: nowrap;
  opacity: 0;
  transform: translateY(4px) scale(0.8);
  transition: opacity 0.3s ease, transform 0.45s var(--bbi-spring);
}

.bbi-fp-top svg { width: 10px; height: 10px; }
.bbi-fp-top.is-on { opacity: 1; transform: none; }

/* Accounts behind a value */

.bbi-fp-detail {
  display: flex;
  align-items: center;
  gap: 8px;
  height: 0;
  margin: 0 8px;
  padding: 0 10px;
  overflow: hidden;
  border-radius: 12px;
  background: var(--bbi-surface-2);
  transition: height 0.45s var(--bbi-ease), margin 0.45s var(--bbi-ease);
}

.bbi-fp-detail.is-open { height: 48px; margin-top: 2px; margin-bottom: 4px; }

.bbi-fp-detail__label {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  margin-right: 2px;
  font-size: 12px;
  font-weight: 800;
  color: var(--bbi-indigo);
  white-space: nowrap;
}

.bbi-fp-detail__label svg { width: 13px; height: 13px; }
.bbi-fp-acct { height: 30px; gap: 6px; }
.bbi-fp-acct small { font-size: 12px; font-weight: 700; color: var(--bbi-muted); font-variant-numeric: tabular-nums; }

.bbi-fp-detail__more {
  margin-left: auto;
  font-size: 12px;
  font-weight: 800;
  color: var(--bbi-muted);
  white-space: nowrap;
}

/* ---------- Chat ---------- */

.bbi-fp-chat { padding: 0 16px; }

.bbi-fp-chat__head {
  display: flex;
  align-items: center;
  gap: 9px;
  height: 42px;
  font-size: 14px;
  color: var(--bbi-ink);
}

.bbi-fp-chat__head b { font-weight: 800; }
.bbi-fp-chat__head small { margin-left: auto; font-size: 12px; font-weight: 700; color: var(--bbi-muted); }

.bbi-fp-msg { display: flex; align-items: flex-end; gap: 8px; }
.bbi-fp-msg .bbi-avatar { width: 28px; height: 28px; box-shadow: none; }

.bbi-fp-bubble {
  display: flex;
  flex-direction: column;
  gap: 7px;
  padding: 8px 13px;
  border-radius: 15px;
  font-size: 13px;
  font-weight: 600;
  line-height: 1.4;
}

.bbi-fp-msg--them .bbi-fp-bubble {
  border-bottom-left-radius: 5px;
  background: var(--bbi-surface-2);
  color: var(--bbi-ink);
}

.bbi-fp-text { display: none; }
.bbi-fp-msg--them.is-sent .bbi-fp-text { display: block; }
.bbi-fp-msg--them.is-sent .bbi-fp-typing { display: none; }

.bbi-fp-typing { display: none; gap: 4px; padding: 5px 2px; }
.bbi-fp-msg--them.is-typing .bbi-fp-typing { display: flex; }

.bbi-fp-typing i {
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: var(--bbi-faint);
  animation: bbi-fp-dot 1s ease-in-out infinite;
}

.bbi-fp-typing i:nth-child(2) { animation-delay: 0.15s; }
.bbi-fp-typing i:nth-child(3) { animation-delay: 0.3s; }

@keyframes bbi-fp-dot {
  0%, 100% { transform: translateY(0); opacity: 0.5; }
  50% { transform: translateY(-3px); opacity: 1; }
}

.bbi-fp-msg--me { position: relative; justify-content: flex-end; margin-top: 8px; }

.bbi-fp-msg--me .bbi-fp-bubble {
  max-width: 330px;
  border-bottom-right-radius: 5px;
  background: var(--bbi-grad-brand);
  color: #fff;
}

.bbi-fp-link {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 5px 10px 5px 5px;
  border-radius: 10px;
  background: rgba(255, 255, 255, 0.16);
}

.bbi-fp-link .bbi-tile { background: #fff; color: var(--bbi-indigo); }
.bbi-fp-link b { display: block; font-size: 12px; font-weight: 800; line-height: 1.3; }
.bbi-fp-link small { display: block; font-size: 11px; font-weight: 600; opacity: 0.8; line-height: 1.3; }

.bbi-fp-react {
  position: absolute;
  right: 8px;
  bottom: -12px;
  display: inline-flex;
  align-items: center;
  gap: 4px;
  height: 24px;
  padding: 0 7px 0 3px;
  border-radius: 999px;
  background: #fff;
  box-shadow: var(--bbi-shadow-sm), 0 0 0 1px var(--bbi-line);
  color: var(--bbi-good);
}

.bbi-fp-react .bbi-avatar { width: 18px; height: 18px; }
.bbi-fp-react svg { width: 13px; height: 13px; }

/* ---------- Score ---------- */

.bbi-fp-score {
  display: flex;
  flex-direction: column;
  gap: 12px;
  padding: 18px 16px 16px;
}

.bbi-fp-score__top { display: flex; align-items: center; gap: 12px; }
.bbi-fp-score__top b { display: block; font-size: 14px; font-weight: 800; color: var(--bbi-ink); white-space: nowrap; }
.bbi-fp-score__top small { display: block; font-size: 12px; font-weight: 600; color: var(--bbi-muted); white-space: nowrap; }

.bbi-fp-ring {
  --fp-score: 0;
  position: relative;
  display: grid;
  place-items: center;
  width: 50px;
  height: 50px;
  flex: none;
  border-radius: 50%;
  background: conic-gradient(var(--bbi-good) calc(var(--fp-score) * 1%), var(--bbi-line) 0);
}

.bbi-fp-ring::after {
  content: '';
  position: absolute;
  inset: 5px;
  border-radius: 50%;
  background: #fff;
}

.bbi-fp-ring b {
  position: relative;
  z-index: 1;
  font-size: 15px;
  font-weight: 800;
  color: var(--bbi-ink);
  font-variant-numeric: tabular-nums;
}

.bbi-fp-legend {
  display: flex;
  align-items: center;
  gap: 5px;
  font-size: 12px;
  font-weight: 600;
  color: var(--bbi-muted);
  white-space: nowrap;
}

.bbi-fp-legend i { width: 10px; height: 10px; border-radius: 3px; }
.bbi-fp-legend i.is-good { background: var(--bbi-good-bg); box-shadow: inset 0 0 0 1.5px var(--bbi-good); }
.bbi-fp-legend i.is-bad { margin-left: 8px; background: var(--bbi-bad-bg); box-shadow: inset 0 0 0 1.5px var(--bbi-bad); }

.bbi-fp-verdict {
  align-self: flex-start;
  height: 30px;
  padding: 0 12px;
  font-size: 13px;
  opacity: 0;
  transform: scale(0.9);
  transition: opacity 0.35s ease, transform 0.45s var(--bbi-spring);
}

.bbi-fp-verdict.is-on { opacity: 1; transform: none; }
