/* The email composer's and the Letter Creator's water and glass (liquid-writing.js): the approved plan, step 2. */
/* "Remove the Ai window" (point 10): the email's A.V.I.S window goes, the bubble over the words takes its place. The Letter
   Creator's own A.V.I.S part, which also writes a letter or a greeting card from an instruction, stays beside its bubble. */
.compose-grid{grid-template-columns:minmax(0,1fr)!important}
.compose-avis{display:none!important}
/* A ring from where the finger touched, as on the desk and in Chat AVI. */
.liquid-drop{position:fixed;z-index:2147483000;width:132px;height:132px;margin:-66px 0 0 -66px;border:1.5px solid #ffffffb3;border-radius:50%;background:radial-gradient(circle,#ffffff38 0,#ffffff14 42%,#fff0 68%);box-shadow:0 0 0 1px #0f172a14,inset 0 0 18px #ffffff52;pointer-events:none;animation:liquid-drop .7s cubic-bezier(.2,.7,.3,1) both}
.liquid-drop::after{content:"";position:absolute;inset:22%;border:1px solid #ffffff8c;border-radius:50%;box-shadow:0 0 0 1px #0f172a0f;animation:liquid-drop .7s .12s cubic-bezier(.2,.7,.3,1) both}
@keyframes liquid-drop{from{transform:scale(.12);opacity:.95}to{transform:scale(1);opacity:0}}
/* A picture or document held lifts as glass; let go or put in, it settles like water. Nothing stays round it. */
:is(.compose-inline-image,.letter-placed-asset,#composeSignature){transition:scale .28s cubic-bezier(.3,1.6,.5,1),box-shadow .28s ease}
:is(.compose-inline-image,.letter-placed-asset).liquid-held,#composeSignature.liquid-pulled{scale:1.03;border-radius:12px;box-shadow:inset 0 0 0 1px #ffffffd9,inset 0 1px 0 #fff,0 0 0 1px #0f172a1f,0 14px 32px #0f172a2e;z-index:3}
.compose-inline-image.is-moving{transition:scale .28s cubic-bezier(.3,1.6,.5,1),box-shadow .28s ease}
:is(.compose-inline-image,.letter-placed-asset,#composeSignature).liquid-settle{animation:liquid-settle .62s cubic-bezier(.3,1.4,.5,1)}
:is(.compose-inline-image,.letter-placed-asset,.compose-toolbar).liquid-landed{animation:liquid-land .68s cubic-bezier(.3,1.4,.5,1)}
@keyframes liquid-settle{0%{scale:1.03}45%{scale:.985}75%{scale:1.008}100%{scale:1}}
@keyframes liquid-land{0%{scale:1.08;opacity:.6}50%{scale:.97;opacity:1}78%{scale:1.01}100%{scale:1}}
/* The email's signature: pulled as one block, never written on while it moves. A touch
   screen still scrolls and zooms with two fingers over it (app-zoom.test.mjs): it is taken up only when held a moment. */
#composeSignature{position:relative}
#composeSignature.liquid-pulled{cursor:grabbing;user-select:none;-webkit-user-select:none;background:#ffffffb8}
#composeSignature:not(:focus){cursor:grab}
#composeSignature:not(:focus) :is(a,img){cursor:grab}
/* The bubble: Improve, Rewrite, Translate - glass beside the words, fading in and out. Glass without blur, as everywhere
   (no-blocking-windows.test.mjs): see-through white, a sheen and a light edge. */
.liquid-bubble{position:fixed;z-index:2147482000;max-width:min(420px,calc(100vw - 16px));padding:5px;display:flex;flex-wrap:wrap;align-items:center;gap:4px;border-radius:20px;background:linear-gradient(180deg,#ffffffeb,#ffffffd1);box-shadow:inset 0 0 0 1px #ffffffe6,inset 0 1px 0 #fff,0 0 0 1px #0f172a1a,0 12px 30px #0f172a2e;color:#1d1d1f;font:500 calc(13px * var(--avis-text, 1))/1.2 system-ui,-apple-system,"Segoe UI",sans-serif;opacity:0;scale:.92;transform-origin:20px 100%;transition:opacity .22s ease,scale .3s cubic-bezier(.3,1.5,.5,1)}
.liquid-bubble.is-shown{opacity:1;scale:1}
.liquid-bubble[hidden]{display:none}
.liquid-bubble button{min-height:30px;padding:5px 12px;border:0;border-radius:15px;background:transparent;color:inherit;font:inherit;cursor:pointer}
.liquid-bubble button:is(:hover,:focus-visible){background:#1d1d1f0f}
.liquid-bubble button[aria-pressed=true]{box-shadow:inset 0 0 0 1px #1d1d1f33}
.liquid-bubble-note{padding:5px 10px;color:#3a3a3c}
.liquid-bubble.is-busy .liquid-bubble-note{animation:liquid-busy .9s ease-in-out infinite alternate}
@keyframes liquid-busy{to{opacity:.45}}
/* On the phone the writing tools wait for a longer touch and come as one floating glass block. */
.liquid-tools-away{display:none!important}
@media (max-width:760px){
  #composeToolbar:not(.is-floating){display:none!important}
  #composeToolbar.is-floating{position:fixed;z-index:2147481000;width:280px;max-width:calc(100vw - 16px);max-height:calc(100dvh - 16px);overflow-y:auto;overscroll-behavior:contain;margin:0;padding:6px;display:grid;grid-template-columns:repeat(6,minmax(0,1fr));align-items:center;gap:2px;border:0;border-radius:18px;background:#fff;box-shadow:inset 0 0 0 1px #ffffffe6,inset 0 1px 0 #fff,0 0 0 1px #0f172a1a,0 16px 38px #0f172a33}
  #composeToolbar.is-floating .liquid-tools-away{display:flex!important;font-size:calc(20px * var(--avis-text, 1))}
}
/* Then: "The email composer and the letter composer needs the pill buttons to emigrate into the right-click drop-down glass
   windows list and or hold long in tablets" - on a computer and a tablet the writing tools wait for a right-click or a
   finger held (liquid-writing.js bindToolList) and come there as one glass list. */
@media (min-width:761px){
  :is(#composeToolbar,#letterFormatToolbar):not(.is-listed){display:none!important}
  :is(#composeToolbar,#letterFormatToolbar).is-listed{position:fixed;z-index:2147481000;width:280px;max-width:calc(100vw - 16px);max-height:calc(100dvh - 16px);overflow-y:auto;overscroll-behavior:contain;margin:0;padding:6px;display:grid!important;grid-template-columns:repeat(6,minmax(0,1fr));align-items:center;gap:2px;border:0;border-radius:16px;background:#fff;box-shadow:inset 0 0 0 1px #ffffffe6,inset 0 1px 0 #fff,0 0 0 1px #0f172a1a,0 16px 38px #0f172a33}
}
/* The list, on a phone's longer touch too ("But not as pill buttons only as text"): plain words and icons - no pill, no glass
   of their own. Then, with Apple Mail's as the picture: "the text on the field is like not ordered and must be professional
   readable heaving a good wide on the window and easy handling centre right left is never a text no these are standard icons
   the uploaded example is professional" - wide enough for every word on one line; in groups with a thin line between them;
   the small tools (bold, italic, underline, colour, undo, redo; alignment and lists) standard icons six to a line, every other
   tool its icon and its word on a line of its own, the email's own buttons last. */
:is(.is-listed,#composeToolbar.is-floating)>:is(select,.compose-font-pick,.picture-tools,.letter-zoom-control,#composeLink,[data-format=removeFormat],[data-letter-format=removeFormat],.compose-attach-pick,#composeSignatureEdit,#letterInsertImage,#letterInsertVideo){grid-column:1/-1}
:is(.is-listed,#composeToolbar.is-floating)>:is(#composeFontSize,#composeLineHeight,#composeSizePick,#composeLinePick,#letterFontSize,#letterLineSpacing){grid-column:span 3}
:is(.is-listed,#composeToolbar.is-floating)>:is(.compose-toolbar-divider,.letter-toolbar-divider){grid-column:1/-1;display:block;width:auto;height:1px;margin:4px 6px;background:#1d1d1f14}
:is(.is-listed,#composeToolbar.is-floating)>.liquid-tools-actions{grid-column:1/-1;display:flex;flex-direction:column;gap:0;padding-top:4px;margin-top:4px;border-top:1px solid #1d1d1f14}
:is(.is-listed,#composeToolbar.is-floating) :is(.liquid-tools-actions>button,#composeLink,[data-format=removeFormat],[data-letter-format=removeFormat],#composeAttachPick,#composeSignatureEdit,#letterInsertImage,#letterInsertVideo){justify-content:flex-start!important;gap:10px;text-align:left;white-space:nowrap}
:is(.is-listed,#composeToolbar.is-floating) :is(button,.compose-encrypted-toggle,.letter-highlight-color) svg{flex:0 0 auto;width:18px;height:18px;fill:none;stroke:currentColor;stroke-width:1.8;stroke-linecap:round;stroke-linejoin:round}
:is(.is-listed,#composeToolbar.is-floating) #composeSignatureEdit{height:auto;display:flex!important;padding:4px 10px!important;border-radius:9px!important}
:is(.is-listed,#composeToolbar.is-floating) #composeSignatureEdit img{flex:0 0 auto;width:18px;height:18px;object-fit:contain}
:is(.is-listed,#composeToolbar.is-floating) .compose-encrypted-toggle{min-height:34px;padding:4px 10px;display:flex;align-items:center;gap:10px;border-radius:9px;color:#1d1d1f;font:500 calc(14px * var(--avis-text, 1))/1.2 system-ui,-apple-system,"Segoe UI",sans-serif;white-space:nowrap;cursor:pointer}
:is(.is-listed,#composeToolbar.is-floating) .compose-encrypted-toggle input{position:absolute;opacity:0;pointer-events:none}
:is(.is-listed,#composeToolbar.is-floating) .compose-encrypted-toggle:has(input:checked)::after{content:"✓";margin-left:auto;font-weight:700}
:is(.is-listed,#composeToolbar.is-floating) .compose-encrypted-toggle:is(:hover,:focus-within){background:#1d1d1f0f}
@media (max-width:900px){:is(.is-listed,#composeToolbar.is-floating) #composeMaximize{display:none!important}}
:is(.is-listed,#composeToolbar.is-floating) :is(button,.letter-highlight-color):not(:is(.compose-font-list,.compose-attach-menu) *){width:100%;min-width:0;min-height:34px;margin:0;padding:4px 10px;display:flex;align-items:center;justify-content:center;border:0!important;border-radius:9px;background:none!important;box-shadow:none!important;color:#1d1d1f;font:500 calc(14px * var(--avis-text, 1))/1.2 system-ui,-apple-system,"Segoe UI",sans-serif}
:is(.is-listed,#composeToolbar.is-floating) #composeFontPick{justify-content:space-between;text-align:left}
:is(.is-listed,#composeToolbar.is-floating) [hidden]{display:none!important}
:is(.is-listed,#composeToolbar.is-floating) button:disabled{opacity:.4;cursor:default}
:is(.is-listed,#composeToolbar.is-floating) button:not(#composeFontPick)::before,:is(.is-listed,#composeToolbar.is-floating) button:not(#composeFontPick)::after{content:none!important;display:none!important}
:is(.is-listed,#composeToolbar.is-floating) :is(button,.letter-highlight-color):not(:is(.compose-font-list,.compose-attach-menu) *):is(:hover,:focus-visible){background:#1d1d1f0f!important}
:is(#composeToolbar,#letterFormatToolbar):is(.is-listed,.is-floating) :is(select,.compose-font-pick,#composeFontPick):not(.letter-zoom-control>*){width:100%;max-width:none;min-height:34px}
:is(.is-listed,#composeToolbar.is-floating)>input[type=color]{width:100%;height:30px;padding:0 4px;border:0;background:none}
:is(.is-listed,#composeToolbar.is-floating)>.picture-tools:not([hidden]){display:flex;align-items:center;gap:4px}
#letterFormatToolbar.is-listed>.letter-zoom-control{display:grid;grid-template-columns:40px minmax(0,1fr) 40px;align-items:center;gap:4px}
#letterFormatToolbar.is-listed>.letter-zoom-control>select{width:100%;min-width:0}
/* Asked for, the list lies over everything: A.V.I.S (avi-widget.css, above every window) waits behind the writer until it is put
   away, so neither he nor his words cover a tool. */
body:has(:is(#composeToolbar,#letterFormatToolbar).is-listed,#composeToolbar.is-floating) :is(.avi-character,.avi-panel){z-index:90}
@media (prefers-reduced-motion:reduce){.liquid-drop{display:none}:is(.compose-inline-image,.letter-placed-asset,#composeSignature,.compose-toolbar){animation:none!important;transition:none!important}.liquid-bubble{transition:none}}
@media (prefers-reduced-transparency:reduce){.liquid-bubble,#composeToolbar.is-floating,.is-listed{background:#fff}}
