/* ═══ Style Specific Text · compact "search bar that unfolds" ═══
   Idle: one slim bar. Opens on focus / typing / pin. Reuses the existing te-* control classes,
   so all teFaf* JS keeps working. */
.faf2{border:1px solid rgba(0,194,255,.16);border-radius:13px;background:linear-gradient(165deg,rgba(0,194,255,.06),rgba(124,58,237,.035) 60%,var(--pdfed-section-bg));transition:border-color .25s,box-shadow .35s;max-width:100%}
.faf2.open{border-color:rgba(0,194,255,.34);box-shadow:0 10px 30px -14px rgba(0,194,255,.35)}
.faf2-bar{display:flex;align-items:flex-start;gap:8px;padding:7px 8px 7px 7px}
.faf2-tile{width:28px;height:28px;border-radius:8px;flex-shrink:0;display:grid;place-items:center;color:var(--blue);background:linear-gradient(135deg,rgba(0,194,255,.2),rgba(124,58,237,.2));border:1px solid rgba(0,194,255,.28);transition:box-shadow .25s}
.faf2:focus-within .faf2-tile{box-shadow:0 0 0 3px rgba(0,194,255,.16)}
.faf2-input{flex:1;min-width:0;display:block;resize:none;overflow-y:hidden;height:28px;max-height:100px;background:none;border:0;outline:0;color:var(--text);font:500 12.5px/18px 'Inter',sans-serif;padding:5px 0;box-shadow:none;white-space:pre-wrap;overflow-wrap:anywhere;scrollbar-width:thin}
.faf2-input::placeholder{color:var(--text2)}
/* the status becomes a count pill inside the bar, and only shows when there is something to say */
.faf2 .te-faf-status{display:none;margin:3px 0 0;flex-shrink:1;max-width:96px;padding:3px 8px 3px 7px}
.faf2 .te-faf-status.match,.faf2 .te-faf-status.none,.faf2 .te-faf-status.scanning{display:flex}
.faf2-chev{margin-top:1px;width:26px;height:26px;border-radius:8px;border:0;background:none;color:var(--text2);cursor:pointer;display:grid;place-items:center;flex-shrink:0;transition:transform .35s cubic-bezier(.16,1,.3,1),background .2s,color .2s}
.faf2-chev:hover{background:rgba(127,127,127,.14);color:var(--text)}
.faf2-chev:focus-visible{outline:2px solid var(--blue)}
.faf2.open .faf2-chev{transform:rotate(180deg)}
.faf2-tray{display:grid;grid-template-rows:0fr;transition:grid-template-rows .38s cubic-bezier(.16,1,.3,1)}
.faf2.open .faf2-tray{grid-template-rows:1fr}
.faf2-tray>div{overflow:hidden;min-height:0}
.faf2-in{padding:2px 10px 10px;display:flex;flex-direction:column;gap:9px;opacity:0;transition:opacity .25s}
.faf2.open .faf2-in{opacity:1;transition-delay:.1s}
.faf2-in .te-faf-row{margin:0}
.faf2-in .te-color-row{flex:1}
.faf2-aa{margin-left:auto;width:34px;height:28px;border-radius:8px;background:#fff;color:#1b2333;display:grid;place-items:center;font:500 14px Georgia,serif;border:1px solid var(--border);flex-shrink:0}
.faf2 .te-faf-apply-btn{width:100%;margin:0;height:34px}
@media (prefers-reduced-motion:reduce){.faf2,.faf2-tray,.faf2-in,.faf2-chev{transition:none}}

/* ── Sentence mode: the right panel glides wider (same idea as the left panel when Templates opens).
   js/78 adds .faf-wide to #pdfedLayout while the typed text is a sentence. Desktop only. ── */
@media (min-width:861px){
  .pdfeditor-layout.faf-wide{grid-template-columns:200px 1fr 400px}
  .pdfeditor-layout.faf-wide.slt-open{grid-template-columns:400px 1fr 400px}
  .pdfeditor-layout.faf-wide.left-collapsed{grid-template-columns:0px 1fr 400px}
  .pdfeditor-layout.faf-wide.right-collapsed{grid-template-columns:200px 1fr 0px}
  .pdfeditor-layout.faf-wide.slt-open.left-collapsed{grid-template-columns:0px 1fr 400px}
  .pdfeditor-layout.faf-wide.slt-open.right-collapsed{grid-template-columns:400px 1fr 0px}
  .pdfeditor-layout.faf-wide.left-collapsed.right-collapsed{grid-template-columns:0px 1fr 0px}
  .pdfeditor-layout.faf-wide.slt-open.left-collapsed.right-collapsed{grid-template-columns:0px 1fr 0px}
  /* with the extra room, bold / italic / font and the colours sit on one line */
  .pdfeditor-layout.faf-wide .faf2-in{flex-direction:row;flex-wrap:wrap;align-items:center}
  .pdfeditor-layout.faf-wide .faf2-in .te-faf-row:first-child{flex:1 1 190px}
  .pdfeditor-layout.faf-wide .faf2-in .te-faf-row:nth-child(2){flex:1 1 190px}
  .pdfeditor-layout.faf-wide .faf2 .te-faf-apply-btn{flex:1 1 100%}
}
