/* The Initial Design Assessment ("floor review" in the code; owner, 24 to 26
   Oct 2026), built to the approved mock-ups (FLOOR-REVIEW-PLAN.md section 5):
   the icon beside "2D Layout"; the panel under the Knowledge hub while a
   review is written (typed words and a slim bar for the floor being
   reviewed); the finish (a circle that draws itself with a tick, one faint
   green sweep); the grey eye on each reviewed floor's row; the answer's card
   (style A). Only transform, opacity and one small SVG stroke move, once;
   with reduced motion nothing moves. js/pages/workspace/floor-review.js. */

/* ── the icon beside the 2D Layout heading ─────────────────────────────── */
.fr-head-btn {
  width: 24px; height: 24px; display: grid; place-items: center; flex: none;
  border: 0; border-radius: 6px; background: transparent; color: var(--muted);
  cursor: pointer; padding: 0; margin: -4px 0; letter-spacing: 0; text-transform: none;
  transition: background 160ms var(--ease), color 160ms var(--ease), opacity 160ms var(--ease);
}
.fr-head-btn[hidden] { display: none; }
.fr-head-btn svg { width: 15px; height: 15px; }
.fr-head-btn:hover, .fr-head-btn:focus-visible { background: var(--hover); color: var(--ink); }
.fr-head-btn:focus-visible { outline: 2px solid var(--flame); outline-offset: 1px; }
/* Greyed: nothing to review, or an answer being written. */
.fr-head-btn.is-off { opacity: .4; cursor: default; }
.fr-head-btn.is-off:hover { background: transparent; color: var(--muted); }
/* Green while a review runs. */
.fr-head-btn.is-on, .fr-head-btn.is-on:hover { color: var(--flame-deep); background: transparent; cursor: default; }

/* ── the panel under the Knowledge hub ─────────────────────────────────── */
.fr-panel { flex: none; position: relative; overflow: hidden; margin-top: 12px; }
.fr-panel.is-pop { animation: frPop 420ms cubic-bezier(.2,.8,.2,1) both; }
@keyframes frPop { from { opacity: 0; transform: translateY(14px) scale(.97); } to { opacity: 1; transform: none; } }
.fr-panel.is-closing { animation: frClose 520ms cubic-bezier(.4,0,.2,1) both; }
@keyframes frClose { to { opacity: 0; transform: translateY(-6px) scale(.97); } }
/* The title gives way to the count at narrow widths, never overlapping it. */
.fr-panel-head { align-items: center; }
.fr-panel-head .fr-title { min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.fr-panel-head .count { flex: none; white-space: nowrap; }

/* Five floors show; the rest scroll, the floor being reviewed kept in view. */
.fr-list { position: relative; padding: 4px 10px 10px; max-height: 214px; overflow-y: auto; overflow-x: hidden; }
.fr-list::-webkit-scrollbar { width: 6px; }
.fr-list::-webkit-scrollbar-thumb { background: var(--border-strong); border-radius: 999px; }
.fr-row { display: grid; grid-template-columns: 18px 1fr auto; column-gap: 10px; align-items: center; min-height: 32px; padding: 0 6px; border-radius: 7px; }
.fr-ic { width: 16px; height: 16px; color: var(--muted-2); display: grid; place-items: center; }
.fr-ic svg { width: 15px; height: 15px; }
.fr-name { font-size: 13px; color: var(--ink); min-width: 0; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.fr-state { font-size: 12px; color: var(--muted-2); white-space: nowrap; }
.fr-row.is-wait .fr-name { color: var(--muted); }
.fr-row.is-done .fr-ic { color: var(--flame-deep); }
.fr-row.is-done .fr-state { color: var(--muted); }
.fr-ic.is-pop { animation: frTick 380ms cubic-bezier(.2,1.6,.4,1) both; }
@keyframes frTick { from { transform: scale(.2); opacity: 0; } to { transform: none; opacity: 1; } }
.fr-row.is-run { padding-top: 6px; padding-bottom: 8px; align-items: start; }
.fr-row.is-run .fr-ic { margin-top: 1px; }
.fr-work { grid-column: 2 / 4; margin-top: 4px; min-width: 0; }
/* A longer line ("Checking against Approved Document B", the "still
   working" lines) wraps at a word, whole, with the caret after its last letter. */
.fr-line { display: block; font-family: var(--font-mono); font-size: 11.5px; line-height: 1.45; color: var(--muted); white-space: normal; overflow-wrap: break-word; }
.fr-caret { display: inline-block; width: 6px; height: 12px; margin-left: 3px; background: var(--flame); transform: translateY(2px); }
.fr-bar { position: relative; height: 3px; margin-top: 7px; border-radius: 999px; background: var(--hover); overflow: hidden; }
.fr-bar > span { position: absolute; top: 0; left: 0; width: 0; height: 100%; border-radius: 999px; background: linear-gradient(90deg, var(--flame), rgba(99,199,106,.6)); transition: width 250ms linear; }
.fr-spin { width: 13px; height: 13px; border-radius: 50%; border: 2px solid var(--hover); border-top-color: var(--flame); }
.fr-spin.is-moving { animation: frSpin .8s linear infinite; }
@keyframes frSpin { to { transform: rotate(360deg); } }

/* The finish: the count becomes a circle that draws itself, with a tick
   drawn inside after it, while one very faint green band sweeps across. */
.fr-sweep {
  position: absolute; top: 0; bottom: 0; left: 0; width: 45%; pointer-events: none;
  background: linear-gradient(90deg, rgba(99,199,106,0), rgba(99,199,106,.10) 50%, rgba(99,199,106,0));
  transform: translateX(-100%);
}
.fr-sweep.is-on { animation: frSweep 900ms cubic-bezier(.4,0,.2,1) both; }
@keyframes frSweep { from { transform: translateX(-100%); } to { transform: translateX(240%); } }
.fr-ring { width: 16px; height: 16px; flex: none; margin-left: auto; align-self: center; color: var(--flame-deep); }
.fr-ring circle { stroke-dasharray: 44; stroke-dashoffset: 44; }
.fr-ring path { stroke-dasharray: 12; stroke-dashoffset: 12; }
.fr-ring.is-on circle { animation: frDraw 500ms ease-out both; }
.fr-ring.is-on path { animation: frDraw 300ms 450ms ease-out both; }
.fr-ring.is-still circle, .fr-ring.is-still path { stroke-dashoffset: 0; }
@keyframes frDraw { to { stroke-dashoffset: 0; } }

/* ── the eye on a reviewed floor's row in the 2D layout ────────────────── */
/* Neutral grey, never green (owner, 24 Oct 2026: a tick reads as "all
   good"). It sits where the hidden edit and remove buttons are, steps aside
   while the row is pointed at or has focus, and never takes a click. */
#planList .doc-item { position: relative; }
.fr-st {
  position: absolute; right: 12px; top: 50%; margin-top: -8px; width: 16px; height: 16px;
  display: grid; place-items: center; pointer-events: none; color: var(--muted);
}
.fr-st svg { width: 15px; height: 15px; }
#planList .doc-item:hover .fr-st,
#planList .doc-item:focus-within .fr-st { display: none; }

/* ── the answer in the chat: the card, style A ─────────────────────────── */
.message.assistant.fr-a > .bubble {
  background: var(--surface); border: 1px solid rgba(47,156,88,.35); border-radius: var(--r-xl);
  padding: 16px 20px 6px; box-shadow: 0 1px 2px rgba(40,30,14,.04), 0 6px 20px rgba(40,30,14,.05);
}
.fr-head { display: flex; align-items: baseline; gap: 10px; margin-bottom: 4px; }
.fr-label { font-family: var(--font-mono); font-size: 11px; letter-spacing: .14em; text-transform: uppercase; font-weight: 600; color: var(--flame-deep); }
.fr-meta { margin-left: auto; font-size: 12px; color: var(--muted-2); white-space: nowrap; }
.message.assistant.fr-answer > .bubble h3 { font-size: 14.5px; font-weight: 600; color: var(--ink); margin: 14px 0 6px; letter-spacing: -.01em; }
.message.assistant.fr-answer > .bubble ul { margin: 0 0 8px; }
.message.assistant.fr-answer > .bubble li { margin: 4px 0; }
.fr-answer .gx-loader { min-height: 26px; margin: 6px 0 10px; }
/* A review still being written when the chat is opened is drawn as the chat's
   loader is (.gf-thinking); its card keeps the answer's own type, not the
   loader's mono, and only the loader line inside is mono. */
.message.assistant.fr-a.gf-thinking { font-family: var(--font); color: var(--ink); line-height: 1.45; }

/* ── reduced motion: nothing slides, sweeps or draws; it simply appears ── */
@media (prefers-reduced-motion: reduce) {
  .fr-panel.is-pop, .fr-panel.is-closing, .fr-ic.is-pop { animation: none; }
  .fr-sweep, .fr-sweep.is-on { display: none; animation: none; }
  .fr-ring.is-on circle, .fr-ring.is-on path { animation: none; stroke-dashoffset: 0; }
  .fr-spin.is-moving { animation: none; }
  .fr-bar > span { transition: none; }
  .fr-head-btn { transition: none; }
}
