/* The three AI tools (handwriting to text, image to text, translate PDF). Colours and radii come from site.css. */
.ai [hidden]{display:none!important}
.ai.busy .btns button{opacity:.6;cursor:progress}

/* what is sent and the duty to check: two short lines just above the button that sends, so that the first thing to
   press stays on the first screen */
.ai-notice{margin:10px 0 14px;padding:10px 12px;border:1px solid var(--line);border-inline-start:4px solid var(--warn);border-radius:12px;background:#fffaf0}
.ai-notice p{margin:0;font-size:14px;line-height:1.55}
.ai-notice p+p{margin-top:6px}
html[lang=ur] .ai-notice p{line-height:2.1}
.ai-notice .ai-check .p1{font-weight:700;color:var(--warn)}
.ai-check strong{color:var(--warn)}

/* a sentence in two languages: each on its own line, in its own direction (side by side they break into each other) */
.ai-notice .p2,.ai-daily .p2,.ai .hint .p2,.ai-recheck .p2,.ai-paste .tl-hint .p2,.ai-pages .tl-hint .p2{display:block}
.ai-notice .p2::before,.ai-daily .p2::before,.ai .hint .p2::before,.ai-recheck .p2::before,.ai-paste .tl-hint .p2::before,.ai-pages .tl-hint .p2::before{content:""}
.ai-recheck strong{display:block}
.ai-recheck strong .p2{display:inline}
.ai-recheck strong .p2::before{content:"· "}

.ai-daily{margin:6px 0 0}

/* thumb sized: the row buttons and "add more" are 40 and 38 px in the shared styles */
.ai button.tl-mini{width:44px;height:44px}
.ai .filebtn{padding:10px 14px;min-height:44px;display:inline-flex;align-items:center}

.ai-paste{display:block;margin:12px 0 6px}
.ai-paste>span{display:block;font-size:14px;color:var(--muted);margin:0 0 4px}
.ai-paste>span .p2{display:inline}
.ai-paste .tl-hint{display:block}
.ai textarea.ai-src{min-height:120px;margin-bottom:4px}
.ai-pages{display:flex;flex-direction:column;gap:4px;max-width:340px;margin:12px 0;font-size:14px;color:var(--muted)}
.ai-pages input{width:100%;min-height:44px;font-size:16px;text-align:left}

.ai .status.warn{color:var(--warn)}
.ai-out{margin-top:16px}
.ai-recheck{margin:0 0 8px;padding:8px 12px;border-radius:10px;background:#fffaf0;border:1px solid var(--line);font-size:15px}
.ai-note{margin:0 0 12px}
.ai-note .l2{opacity:.85}
.ai-note .l1:not(:first-child){margin-top:6px}

/* what to compare first: the names as the model wrote them (original beside translation), and numbers that were not found */
.ai-checks{margin:0 0 10px;padding:8px 12px;border:1px solid var(--line);border-radius:10px;background:var(--soft);font-size:14px}
.ai-checks p{margin:0 0 6px}
.ai-checks p .l2{opacity:.85}
.ai-checks .ai-lost{color:var(--err)}
.ai-names{list-style:none;margin:0;padding:0;max-height:210px;overflow:auto;display:grid;grid-template-columns:1fr 1fr;column-gap:12px}
.ai-names li{display:contents}
.ai-names bdi{padding:4px 0;border-top:1px solid var(--line);overflow-wrap:anywhere;font-size:15px}

.ai-out textarea.tl-text{min-height:300px}
.ai-btns{margin-top:4px}
.ai-btns button{min-height:44px}
#ai-done{min-height:0}
#ai-done:empty{margin:0}
.ai-original{margin:14px 0 4px}
.ai-original summary{cursor:pointer;font-weight:700;padding:10px 0;min-height:44px}
.ai-original summary .p2{display:block}
.ai-original summary .p2::before{content:""}
.ai-original textarea{min-height:200px;background:var(--soft)}

@media (max-width:600px){.ai-btns button{flex:1 1 100%}.ai-out textarea.tl-text{min-height:240px}}
