/* ---------- AI changes (section 26i) ----------
   What the AI would change, before it is applied, in the look of the AI's other proposals: an object changed is the
   still copy of what it would be, over it (which hides under it), its outline dashed as the preview's (ai.css); one to
   be removed fades, its words struck through, a dashed outline round it in the colour of removing; a new one is a
   ghost (ai-ghost.css); a board here with changes inside it has a dashed ring. Over each, why and its ✓ and × (made in
   script, in screen space); at the top, the bar. */
#aie { position: absolute; inset: 0; transform-origin: 0 0; pointer-events: none; }     /* the camera's, as #objs (section 8b) */
#aie > * { pointer-events: none; }
#aie > .obj { transition: none; }
#aie > .ae-up { box-shadow: var(--pop); outline: 1.25px dashed var(--ink-3); outline-offset: 5px; }
#aie > .ae-up.header { box-shadow: none; outline: 0; }
#aie > .ae-up.header::after { height: 0; background: none; border-bottom: 1px dashed var(--ink-3); }
#objs .obj.ae-under { visibility: hidden; }
#objs .obj.ae-gone { opacity: .45; }
#objs .obj.ae-gone :is(.tx, .hd, .tdt, .tit, .tc, .bt, .ct, .lk-t) { text-decoration: line-through; text-decoration-thickness: 1.25px; }
.ae-del { position: absolute; border-radius: 6px; outline: 1.25px dashed var(--danger); outline-offset: 5px; background: color-mix(in srgb, var(--danger) 5%, transparent); }
.ae-in { position: absolute; border-radius: 6px; outline: 1.25px dashed var(--ink-3); outline-offset: 5px; }
/* A new one, as the ghosts are (no paper shadow: it hasn't landed), and a picture only: nothing in it is pressed. */
#aie > .obj.ae-new { background: color-mix(in srgb, var(--surface) 58%, transparent); border-style: dashed; border-color: var(--ink-3); box-shadow: none; }
#aie > .obj.ae-new > * { opacity: .72; }
#aie > .obj.ae-new.header { background: transparent; }
#aie > .obj.ae-new.header::after { height: 0; background: none; border-bottom: 1px dashed var(--ink-3); }
#aie > .obj.ae-new.header::before { background: var(--ink-3); }
#aie > .obj.ae-new.board[data-view="icon"] { background: transparent; border-color: transparent; }
#aie > .obj.ae-new.board[data-view="icon"] > .binner { box-shadow: none; outline: 1px dashed var(--ink-3); outline-offset: -1px; background-color: color-mix(in srgb, var(--surface) 58%, transparent); }

/* Over each change, why and its ✓ and ×: a small pill like the ghosts'; on a board, how many inside, opening to the
   list of them. Under the group, the bar (the preview's, ai.css). */
#aiedit { position: fixed; inset: 0; z-index: 11; pointer-events: none; }     /* over the guide, under the rail, as the preview */
.ae-one {
  position: absolute; left: 0; top: 0; display: flex; align-items: center; gap: 1px; max-width: min(300px, calc(100vw - 24px)); padding: 2px; box-sizing: border-box;
  border-radius: 6px; pointer-events: auto; background: var(--glass); box-shadow: var(--glass-sh);
  -webkit-backdrop-filter: blur(8px); backdrop-filter: blur(8px); user-select: none; -webkit-user-select: none;
  transition: opacity 120ms ease-out;
}
.ae-one.far { opacity: 0; pointer-events: none; }
.ae-why {
  flex: 0 1 auto; min-width: 0; padding: 0 7px 0 8px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap;
  font: 500 11.5px/22px var(--f-ui); color: var(--ink-2);
}
.ae-one.del > .ae-why { color: var(--danger); }
.ae-one button { display: grid; place-items: center; height: 22px; padding: 0; border: 0; border-radius: 5px; cursor: pointer; color: var(--ink-2); background: transparent; transition: background-color 140ms ease-out, color 140ms ease-out; }
.ae-one :is(.ae-y, .ae-x) { flex: none; width: 22px; }
.ae-one svg { width: 10px; height: 10px; fill: none; stroke: currentColor; stroke-width: 1.5px; stroke-linecap: round; stroke-linejoin: round; }
@media (hover: hover) { .ae-one button:hover { color: var(--ink); background: color-mix(in srgb, var(--surface) 90%, transparent); } }
.ae-one button:active { background: var(--press-bg); box-shadow: var(--press); }
.ae-one button:focus-visible { outline: 2px solid var(--ink); outline-offset: 0; }
#aiedit.run :is(.ae-y, .ae-x) { display: none; }      /* while it is written: what each does, not yet a way to apply it */
/* On a board: "3 changes inside" opens the list, one row each. */
.ae-grp { flex-wrap: wrap; }
.ae-one .ae-more { display: flex; align-items: center; gap: 6px; padding: 0 7px 0 8px; font: 500 11.5px/22px var(--f-ui); }
.ae-more::after { content: ""; width: 5px; height: 5px; margin-top: -3px; border: solid currentColor; border-width: 0 1.25px 1.25px 0; rotate: 45deg; transition: rotate 140ms ease-out, margin 140ms ease-out; }
.ae-more[aria-expanded="true"]::after { rotate: 225deg; margin-top: 3px; }
.ae-ls { display: flex; flex-direction: column; flex-basis: 100%; gap: 1px; max-height: 40vh; margin-top: 2px; padding-top: 2px; overflow: auto; border-top: 1px solid var(--rule); }
.ae-ls[hidden] { display: none; }
.ae-row { display: flex; align-items: center; gap: 1px; }
.ae-row > .ae-why { flex: 1 1 auto; }
.ae-bar .btn { flex: none; }
.ae-bar .ae-t { flex: none; }      /* how many stays whole on a narrow screen; what the AI says gives way (ellipsis) */
body.moving #aiedit .ae-one, body.sizing #aiedit .ae-one, body.drawing #aiedit .ae-one, body.panning #aiedit .ae-one { opacity: 0; pointer-events: none; }
@media (pointer: coarse) {
  .ae-one button, .ae-why, .ae-more { height: 30px; line-height: 30px; }
  .ae-one :is(.ae-y, .ae-x) { width: 30px; }
  .ae-bar .btn { height: 36px; }
}
/* arrows over the canvas (ai-map.js): an arrow changed, as it would be; a new one, see-through */
#aie > .obj.arrow { background: none; border: 0; box-shadow: none; outline: 0; }
#aie > .obj.arrow.ae-new > * { opacity: .6; }
#aie > .obj.arrow:not([data-label]) > .ar-lb { opacity: 0; }
