/* The Editor (the Correction chat). Same tokens as the rest of the app; no status dots,
   no counters, no uppercase micro-labels (the owner's validated style). */
#fixPane { overflow: hidden; }
#fixPane.is-drop .fx-main { outline: 2px dashed var(--accent-line); outline-offset: -8px; }
.fx { display: flex; flex: 1 1 auto; min-height: 0; width: 100%; }

/* Past edits live in a small History menu in the bar, not in a column of their own. */
.fx-hist { left: auto; right: 0; width: 320px; max-width: min(320px, calc(100vw - 32px)); padding: var(--s1); }
.fx-list { display: flex; flex-direction: column; gap: 1px; }
.fx-none { color: var(--muted); font-size: 13px; margin: var(--s2); }
.fx-item { display: flex; align-items: center; border-radius: var(--r-xs); }
.fx-item:hover, .fx-item.is-on { background: var(--panel-3); }
.fx-open { flex: 1 1 auto; min-width: 0; display: flex; align-items: center; gap: var(--s2); padding: 5px var(--s2); background: none; border: 0; color: var(--text-2); font: inherit; font-size: 13px; text-align: left; cursor: pointer; border-radius: var(--r-xs); }
.fx-item.is-on .fx-open, .fx-item:hover .fx-open { color: var(--text); }
.fx-open img, .fx-ph { width: 28px; height: 28px; border-radius: var(--r-xs); object-fit: cover; background: var(--panel-3); flex: none; }
.fx-name { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.fx-del { opacity: 0; width: 26px; height: 26px; }
.fx-item:hover .fx-del, .fx-del:focus-visible { opacity: 1; }

.fx-main { flex: 1 1 auto; display: flex; flex-direction: column; min-width: 0; min-height: 0; }
.fx-bar { display: flex; align-items: center; gap: var(--s2); padding: var(--s3) var(--s5); border-bottom: 1px solid var(--border); min-height: 52px; }
.fx-bar .spacer { flex: 1 1 auto; }
.fx-title { margin: 0; font-size: 15px; font-weight: 600; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.fx-scroll { flex: 1 1 auto; overflow-y: auto; min-height: 0; }
.fx-thread { max-width: 760px; margin: 0 auto; padding: var(--s5); display: flex; flex-direction: column; gap: var(--s5); }

.fx-empty { margin: 10vh auto 0; max-width: 460px; text-align: center; display: flex; flex-direction: column; align-items: center; gap: var(--s3); }
.fx-empty h3 { margin: 0; font-size: 20px; font-weight: 600; letter-spacing: -0.01em; }
.fx-empty p { margin: 0; color: var(--muted); font-size: 14px; line-height: 1.55; }

.fx-msg { display: flex; flex-direction: column; gap: var(--s2); max-width: 100%; }
.fx-me { align-items: flex-end; }
.fx-bot { align-items: flex-start; }
.fx-text { margin: 0; font-size: 14.5px; line-height: 1.55; white-space: pre-wrap; overflow-wrap: anywhere; }
.fx-me .fx-text { background: var(--panel-3); padding: 9px 14px; border-radius: var(--r-lg); max-width: 85%; }
.fx-pics { display: grid; gap: var(--s2); max-width: 100%; }
.fx-me .fx-pics { justify-content: end; }
.fx-n1 { grid-template-columns: minmax(0, 360px); }
.fx-n2 { grid-template-columns: repeat(2, minmax(0, 180px)); }
.fx-n3, .fx-n4 { grid-template-columns: repeat(2, minmax(0, 150px)); }
.fx-bot .fx-n1 { grid-template-columns: minmax(0, 460px); }
.fx-pic { margin: 0; }
.fx-zoom { display: block; padding: 0; border: 1px solid var(--border); border-radius: var(--r); overflow: hidden; background: var(--panel-3); cursor: zoom-in; width: 100%; }
.fx-zoom img, .fx-pic > img { display: block; width: 100%; height: auto; }
.fx-pic > img { border-radius: var(--r); border: 1px solid var(--border); }
.fx-acts { display: flex; gap: var(--s1); margin-top: var(--s2); }

.fx-working { display: flex; align-items: center; gap: var(--s3); color: var(--muted); font-size: 13.5px; }
.fx-shimmer { width: 120px; height: 150px; border-radius: var(--r); background: linear-gradient(100deg, var(--panel-3) 30%, var(--panel) 50%, var(--panel-3) 70%); background-size: 200% 100%; animation: fx-sh 1.4s linear infinite; }
@keyframes fx-sh { to { background-position: -200% 0; } }
@media (prefers-reduced-motion: reduce) { .fx-shimmer { animation: none; } }

.fx-composer { padding: var(--s3) var(--s5) var(--s5); max-width: 760px; width: 100%; margin: 0 auto; }
/* the Run composer's own card and ghost pills: .composer, .composer-bar, .cbtn */
.fx-card { padding: var(--s3) var(--s3) var(--s2); }
.fx-card .composer-input { padding: var(--s1) var(--s2); }
.fx-tray { display: flex; flex-wrap: wrap; gap: var(--s2); padding: 0 var(--s2) var(--s2); }
.fx-tray[hidden] { display: none; }
.fx-chip { position: relative; width: 64px; height: 64px; }
.fx-chip img { width: 100%; height: 100%; object-fit: cover; border-radius: var(--r-sm); border: 1px solid var(--border); }
.fx-chip-x { position: absolute; top: -6px; right: -6px; width: 20px; height: 20px; border-radius: 50%; border: 1px solid var(--border-2); background: var(--panel); color: var(--text); display: grid; place-items: center; padding: 0; cursor: pointer; }
.fx-chip-x .ico { width: 11px; height: 11px; }
.fx-card .composer-bar { margin-top: var(--s1); }
.fx-card .cbtn[disabled] { opacity: .45; cursor: not-allowed; }
.fx-card .cbtn[aria-expanded="true"], .fx-bar .cbtn[aria-expanded="true"] { background: var(--panel-3); color: var(--text); }
.fx-price { font-family: var(--mono, ui-monospace, monospace); font-size: 11px; color: var(--muted); font-variant-numeric: tabular-nums; }
.fx-send { width: 32px; height: 32px; padding: 0; border-radius: 50%; justify-content: center; }

/* Quick edits: a plain menu. The packshot panel: options, then one filled button with the price. */
.fx-quickmenu { min-width: 220px; }
.fx-pk { width: 300px; max-width: calc(100vw - 32px); padding: var(--s3); gap: var(--s3); overflow: visible; }
.fx-pk-note { margin: 0; font-size: 12.5px; line-height: 1.45; color: var(--muted); white-space: normal; }
.fx-pk-note.is-bad { color: var(--danger); }
.fx-pk-row { display: flex; align-items: center; gap: var(--s2); }
.fx-pk-lab { width: 76px; flex: none; font-size: 12.5px; color: var(--muted); }
.fx-pk-opt { flex: 1 1 0; padding: 5px 6px; border: 1px solid var(--border); border-radius: var(--r-xs); background: transparent; color: var(--text-2); font: inherit; font-size: 12.5px; cursor: pointer; }
.fx-pk-opt:hover { background: var(--panel-3); color: var(--text); }
.fx-pk-opt[aria-pressed="true"] { background: var(--panel-3); color: var(--text); border-color: var(--border-2); box-shadow: inset 0 0 0 1px var(--border-2); }
.fx-pk-go { justify-content: center; width: 100%; }

@media (max-width: 860px) {
  .fx-bar, .fx-thread, .fx-composer { padding-left: var(--s4); padding-right: var(--s4); }
}

/* Phone: the menus open across the whole card instead of hanging off their button, and the
   composer bar stays on one line (icons and price give way before anything wraps). */
@media (max-width: 700px) {
  .fx-card .menu-anchor { position: static; }
  .fx-card .menu-up.fx-pk, .fx-card .menu-up.fx-quickmenu { left: 0; right: 0; width: auto; max-width: none; }
  .fx-card .composer-bar { flex-wrap: nowrap; }
  .fx-card .cbtn:not(.cbtn-round) > .ico:first-child, .fx-price { display: none; }
}

/* styles.css collapses every .menu-anchor to static between 901 and 1200 px (for the sidebar's menus):
   the Editor's own menus keep hanging off their buttons. */
#fixPane .fx-bar .menu-anchor { position: relative; }
@media (min-width: 701px) { #fixPane .fx-card .menu-anchor { position: relative; } }

/* Apple finish, batch 3: a message that arrives while you watch rises in, as in the Studio chat */
.fx-msg.is-new { animation: fx-rise var(--dur-3, .44s) var(--spring, ease-out) backwards; }
@keyframes fx-rise { from { opacity: 0; transform: translateY(8px); } }
@media (prefers-reduced-motion: reduce) { .fx-msg.is-new { animation: fx-fade .16s linear backwards; } @keyframes fx-fade { from { opacity: 0; } } }
