/* Width — compress-pdf (.tool-wrap) er sathe hubohu ek: max-width 720px,
   bam-dan e 22px padding. Sob tool ek jaygay theke shuru ar sesh hoy, tai
   ek tool theke onno tool e gele card er dhar sore jay na. */
.ac-wrap { max-width: 720px; margin: 0 auto; padding: 40px 22px 80px; }
.ac-head { text-align: center; margin-bottom: 28px; }
.ac-head h1 { font-size: clamp(2.2rem, 6vw, 3.2rem); margin: 10px 0 8px; color: var(--txt); }
.ac-head p { color: var(--txt3); }
.ai-warn {
  margin-top: 14px; padding: 12px 16px; border-radius: var(--r);
  background: rgba(194,240,74,0.08); border: 1px solid rgba(194,240,74,0.25);
  color: var(--txt2); font-size: 14px; text-align: left;
}

.ac-card {
  background: var(--card);
  border: 1px solid var(--line2);
  border-radius: var(--r-lg);
  padding: 30px 32px;
  box-shadow: 0 4px 24px -12px rgba(15,23,42,0.12);
}

/* PDF pora hocche — in-place loader (full-screen overlay noy).
   `.ac-spin` ta main.js tinta ring e upgrade kore ar niche progress bar
   boshay; ekhankar niyom gulo sudhu fallback ar lekha r jonno. */
.ac-scan-box { text-align: center; padding: 46px 24px; }
.ac-spin { width: 52px; height: 52px; margin: 0 auto 22px; border: 2px solid var(--surface2);
  border-top-color: var(--lime); border-radius: 50%; animation: spin .8s linear infinite;
  box-shadow: 0 0 20px -6px var(--lime); }
.ac-scan-box h3 { font-size: 1.3rem; }
.ac-scan-box p { font-family: 'JetBrains Mono', monospace; font-size: .76rem; color: var(--txt3); margin-top: 8px; }

.ac-drop {
  position: relative; display: flex; flex-direction: column; align-items: center; justify-content: center;
  gap: 8px; border: 2px dashed var(--line2); border-radius: var(--r-lg); background: var(--surface);
  padding: 44px 30px; cursor: pointer; text-align: center; transition: all .25s;
}
.ac-drop:hover, .ac-drop.drag { border-color: var(--lime); background: rgba(194,240,74,0.04); }
.ac-drop-ic {
  width: 60px; height: 60px; margin-bottom: 4px; border-radius: 18px; display: grid; place-items: center;
  background: var(--lime); color: #0a0b0d; transition: transform .25s;
}
.ac-drop:hover .ac-drop-ic { transform: translateY(-4px); }
.ac-drop .t { font-size: 1.3rem; font-weight: 700; color: var(--txt); }
.ac-drop .s { font-family: 'JetBrains Mono', monospace; font-size: .76rem; color: var(--txt3); letter-spacing: .02em; }
.ac-drop .s strong { color: var(--lime); font-weight: 500; }

.hidden { display: none !important; }

.ac-filelist { display: flex; flex-direction: column; gap: 10px; margin-top: 16px; }
.ac-filelist.hidden { display: none; }
.ac-file {
  display: flex; align-items: center; gap: 13px;
  padding: 14px 16px; border-radius: var(--r); background: var(--surface); border: 1px solid var(--line2);
}
.ac-file.warn { border-color: rgba(240,180,74,0.5); background: rgba(240,180,74,0.06); }
.ac-file-ic {
  width: 40px; height: 40px; border-radius: 11px; background: var(--surface2); border: 1px solid var(--line);
  display: grid; place-items: center; font-size: 18px; flex-shrink: 0;
}
.ac-file-info { flex: 1; min-width: 0; }
.ac-file-name { font-weight: 700; font-size: .94rem; color: var(--txt); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.ac-file-size { font-family: 'JetBrains Mono', monospace; font-size: .72rem; color: var(--txt3); }
.ac-file-rm { background: none; border: none; cursor: pointer; color: var(--txt3); font-size: 1.1rem; flex-shrink: 0; }
.ac-file-rm:hover { color: var(--lime); }

.ac-addmore {
  display: block; margin-top: 12px; width: 100%; text-align: center;
  padding: 12px; border-radius: var(--r); border: 1px dashed var(--line2);
  background: transparent; color: var(--txt3); cursor: pointer; font-size: 13.5px;
  font-family: 'JetBrains Mono', monospace; transition: all .2s;
}
.ac-addmore:hover { border-color: var(--lime); color: var(--lime); }
.ac-addmore.hidden { display: none; }

.ac-chat-head { display: flex; align-items: center; gap: 13px; padding-bottom: 20px; border-bottom: 1px solid var(--line); margin-bottom: 20px; }
.ac-doc-ic {
  width: 44px; height: 44px; border-radius: 12px; background: var(--lime); color: #0a0b0d;
  display: grid; place-items: center; font-size: 20px; flex-shrink: 0;
}
.ac-doc-info { flex: 1; min-width: 0; }
.ac-doc-name { font-weight: 700; font-size: 15px; color: var(--txt); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.ac-doc-meta { font-size: 12px; color: var(--txt3); margin-top: 2px; }

.ac-messages { display: flex; flex-direction: column; gap: 12px; min-height: 260px; max-height: 55vh; overflow-y: auto; padding: 4px 2px 12px; }
.ac-msg { display: flex; }
.ac-msg-user { justify-content: flex-end; }
.ac-bubble { max-width: 80%; padding: 11px 15px; border-radius: 14px; font-size: 14.5px; line-height: 1.5; white-space: pre-wrap; }
.ac-msg-bot .ac-bubble { background: var(--surface2); color: var(--txt); border: 1px solid var(--line); border-bottom-left-radius: 4px; }
.ac-msg-user .ac-bubble { background: var(--lime); color: #0a0b0d; border-bottom-right-radius: 4px; }
.ac-msg-error .ac-bubble { background: rgba(220,60,60,0.12); color: #ff8b8b; border: 1px solid rgba(220,60,60,0.3); }
.ac-msg-typing .ac-bubble { display: flex; gap: 4px; align-items: center; }
.ac-dot { width: 6px; height: 6px; border-radius: 50%; background: var(--txt3); animation: ac-bounce 1.2s infinite ease-in-out; }
.ac-dot:nth-child(2) { animation-delay: .15s; }
.ac-dot:nth-child(3) { animation-delay: .3s; }
@keyframes ac-bounce { 0%, 60%, 100% { transform: translateY(0); opacity: .5; } 30% { transform: translateY(-4px); opacity: 1; } }

.ac-composer { display: flex; gap: 10px; padding-top: 16px; border-top: 1px solid var(--line); }
.ac-input {
  flex: 1; border: 1px solid var(--line2); border-radius: var(--r); padding: 12px 14px;
  font-size: 14.5px; background: var(--surface); color: var(--txt);
}
.ac-input::placeholder { color: var(--txt3); }
.ac-input:focus { outline: none; border-color: var(--lime); }

@media (max-width: 640px) {
  .ac-card { padding: 22px 18px; }
  .ac-drop { padding: 36px 18px; }
  .ac-bubble { max-width: 90%; }
}
