/* FileGuru — FIDO + loaders (v1). Text inherits the site fonts; numbers use IBM Plex Mono like the rest of the site. */

/* ---------- FIDO button: the FG mark brought to life ---------- */
html #fido-btn{position:fixed;inset-inline-end:18px;bottom:calc(18px + env(safe-area-inset-bottom,0px));z-index:60;
  width:58px;height:58px;padding:0;border-radius:18px;background:#ffffff;border:1px solid #dfe6f0;display:grid;place-items:center;
  cursor:pointer;box-shadow:0 6px 22px rgba(13,27,46,.16);transition:transform .15s}
html #fido-btn:hover{transform:translateY(-2px)}
html #fido-btn:focus-visible{outline:2px solid #1D9E75;outline-offset:3px}
#fido-btn svg{display:block;width:40px;height:40px;overflow:visible}
.fd-eyepos{transition:transform .45s ease}
.fd-eye{fill:#3fc4a1;transform-box:fill-box;transform-origin:center;transition:fill .3s}
#fido-btn.fd-idle .fd-eye{animation:fdBlink 4.2s infinite}
#fido-btn.fd-scan .fd-eyepos{animation:fdSlide 1.2s ease-in-out infinite alternate}
#fido-btn.fd-done .fd-eye{animation:fdBlink2 .9s 1}
#fido-btn.fd-warn .fd-eye{fill:#EF9F27}
#fido-btn.fd-warn{animation:fdShake .5s 1}
@keyframes fdBlink{0%,90%,100%{transform:scaleY(1)}94%{transform:scaleY(.12)}}
@keyframes fdBlink2{0%,30%,60%,100%{transform:scaleY(1)}15%,45%{transform:scaleY(.12)}}
@keyframes fdSlide{from{transform:translateX(-16px)}to{transform:translateX(74px)}}
@keyframes fdShake{0%,100%{transform:translateX(0)}20%,60%{transform:translateX(-4px)}40%,80%{transform:translateX(4px)}}

/* ---------- FIDO panel ---------- */
html #fido-panel{position:fixed;inset-inline-end:18px;bottom:calc(90px + env(safe-area-inset-bottom,0px));z-index:60;
  width:min(340px,calc(100vw - 36px));padding:0;overflow:hidden;background:var(--panel,#fff);border:1px solid var(--line,#dfe6f0);
  border-radius:18px;box-shadow:0 1px 2px rgba(13,27,46,.06),0 16px 48px rgba(13,27,46,.18);color:var(--ink,#0d1b2e);
  transform-origin:bottom left;animation:fdPop .18s ease-out}
html[dir="ltr"] #fido-panel{transform-origin:bottom right}
html #fido-panel.hidden{display:none}
@keyframes fdPop{from{opacity:0;transform:translateY(6px) scale(.98)}to{opacity:1;transform:none}}
html #fido-panel h4{display:none}
.fd-head{display:flex;align-items:center;gap:11px;padding:14px 14px 14px 16px;background:#0f3b66;color:#fff}
html[dir="rtl"] .fd-head{padding:14px 16px 14px 14px}
.fd-ava{width:38px;height:38px;flex:none;border-radius:12px;background:#fff;display:grid;place-items:center}
.fd-ava svg{width:26px;height:26px;display:block;overflow:visible}
.fd-who{flex:1;min-width:0;line-height:1.35}
.fd-who b{display:block;font-size:15px;font-weight:700;letter-spacing:.2px}
.fd-who span{display:flex;align-items:center;gap:6px;font-size:12px;color:rgba(255,255,255,.72)}
.fd-who span i{width:7px;height:7px;border-radius:50%;background:#3fc4a1;flex:none}
.fd-warnhead .fd-who span i{background:#EF9F27}
html #fido-panel .fido-close{position:static;flex:none;width:30px;height:30px;border-radius:50%;border:none;cursor:pointer;
  background:rgba(255,255,255,.12);color:#fff;font-size:14px;line-height:1;display:grid;place-items:center;padding:0;transition:background .15s}
html #fido-panel .fido-close:hover{background:rgba(255,255,255,.22)}
.fd-body{padding:16px 16px 6px}
html #fido-msg{margin:0;padding:11px 13px;background:var(--soft,#eef3f9);border-radius:4px 14px 14px 14px;font-size:14px;line-height:1.65;color:var(--ink,#0d1b2e)}
html[dir="rtl"] #fido-msg{border-radius:14px 4px 14px 14px}
html .fd-warnhead #fido-msg{background:#FAEEDA;color:#633806}
html #fido-panel ul{margin:12px 0 0;padding:0;list-style:none;font-size:13.5px;display:flex;flex-direction:column;gap:6px}
html #fido-panel ul:empty{display:none}
html #fido-panel li{position:relative;padding:8px 12px;padding-inline-start:30px;border:1px solid var(--line,#dfe6f0);border-radius:11px;color:var(--muted,#5a6b82);line-height:1.55}
html #fido-panel li::before{content:"";position:absolute;inset-inline-start:12px;top:14px;width:7px;height:7px;border-radius:50%;background:#1D9E75}
html #fido-panel li.fd-link{padding:0;border:none}
html #fido-panel li.fd-link::before{display:none}
html #fido-panel li a{display:flex;align-items:center;justify-content:space-between;gap:10px;padding:9px 12px;border:1px solid var(--line,#dfe6f0);
  border-radius:11px;color:var(--ink,#0d1b2e);transition:border-color .15s,background .15s}
html #fido-panel li a:hover{border-color:#1D9E75;background:var(--accent-soft,#e6f5f1)}
html #fido-panel li a em{font-style:normal;flex:none;width:24px;height:24px;border-radius:8px;display:grid;place-items:center;background:var(--soft,#eef3f9);color:#0f3b66;font-size:13px}
.fd-foot{display:flex;align-items:center;gap:7px;padding:10px 16px 13px;font-size:11.5px;color:var(--muted,#5a6b82)}
.fd-foot svg{flex:none}

/* ---------- Processing loader (page → table + FG badge) ---------- */
.fd-load{position:fixed;inset:0;z-index:70;display:grid;place-items:center;padding:20px;background:rgba(13,27,46,.28);
  opacity:0;pointer-events:none;transition:opacity .25s}
.fd-load.on{opacity:1;pointer-events:auto}
.fd-card{background:var(--panel,#fff);border:1px solid var(--line,#dfe6f0);border-radius:20px;padding:22px 24px 18px;width:min(320px,100%);
  display:flex;flex-direction:column;align-items:center;gap:12px;box-shadow:0 18px 60px rgba(13,27,46,.22);color:var(--ink,#0d1b2e)}
.fd-card svg{width:210px;height:auto;display:block}
.fd-meta{width:100%}
.fd-row{display:flex;justify-content:space-between;gap:10px;font-size:13.5px;color:var(--muted,#5a6b82);margin-bottom:7px}
.fd-lbl{overflow:hidden;text-overflow:ellipsis;white-space:nowrap}
.fd-pct{font-family:"IBM Plex Mono",ui-monospace,monospace;font-weight:600;direction:ltr;unicode-bidi:isolate}
.fd-bar{height:6px;border-radius:3px;background:var(--soft,#eef3f9);overflow:hidden;position:relative}
.fd-bar i{position:absolute;inset-block:0;inset-inline-start:0;width:0;background:#1D9E75;border-radius:3px;transition:width .4s ease}
.fd-load.indet .fd-bar i{width:34%;animation:fdIndet 1.2s ease-in-out infinite}
.fd-load.indet .fd-pct{visibility:hidden}
@keyframes fdIndet{from{inset-inline-start:-34%}to{inset-inline-start:100%}}
.fd-safe{margin:9px 0 0;font-size:12px;color:var(--muted,#5a6b82);text-align:center}

/* ---------- Button spinner ---------- */
.fd-busy{pointer-events:none;opacity:.92}
.fd-bspin{width:22px;height:22px;flex:none;display:inline-block;vertical-align:middle}
.fd-bspin + *{vertical-align:middle}

/* ---------- Reduced motion: keep colours and numbers, drop movement ---------- */
@media (prefers-reduced-motion:reduce){
  #fido-btn,#fido-btn *,.fd-load *,.fd-bspin *{animation:none!important;transition:none!important}
}

/* header avatar eye mirrors FIDO's state */
.fd-heye2{animation:fdBlink 4.2s infinite}
.fd-warnhead .fd-heye2{fill:#EF9F27}
@media (prefers-reduced-motion:reduce){.fd-heye2,#fido-panel{animation:none!important}}
