

/* Upload input: keep in DOM for iOS, but visually hidden */
.ia-msg-upload-input{
  position:absolute !important;
  width:1px !important;
  height:1px !important;
  padding:0 !important;
  margin:-1px !important;
  overflow:hidden !important;
  clip:rect(0,0,0,0) !important;
  white-space:nowrap !important;
  border:0 !important;
}



/* Upload status (attachments) — compact, non-layout shifting */
.ia-msg-composer{ position: sticky; } /* ensure positioned context comes from layout.css, but safe */

/* visually hidden text */
.ia-msg-sr{
  position:absolute !important;
  width:1px !important;
  height:1px !important;
  padding:0 !important;
  margin:-1px !important;
  overflow:hidden !important;
  clip:rect(0,0,0,0) !important;
  white-space:nowrap !important;
  border:0 !important;
}

.ia-msg-upload-progress{
  position: absolute;
  left: 48px;            /* just to the right of the paperclip */
  top: 10px;
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 4px 8px;
  border-radius: 999px;
  border: 1px solid var(--ia-line2);
  background: rgba(0,0,0,0.28);
  font-size: 12px;
  color: var(--ia-muted);
  max-width: calc(100% - 120px); /* never force textarea off-screen */
  pointer-events: none;  /* don't steal taps */
  z-index: 35;
}
.ia-msg-upload-progress[hidden]{ display:none !important; }

.ia-msg-upload-spinner{
  width: 14px;
  height: 14px;
  border-radius: 999px;
  border: 2px solid rgba(255,255,255,0.22);
  border-top-color: rgba(255,255,255,0.65);
  animation: iaMsgSpin 0.8s linear infinite;
  flex: 0 0 auto;
}

@keyframes iaMsgSpin{
  from { transform: rotate(0deg); }
  to   { transform: rotate(360deg); }
}

.ia-msg-upload-progress__pct{
  flex: 0 0 auto;
  line-height: 1;
}

/* Upload input: keep in DOM for iOS, but visually hidden */
.ia-msg-upload-input{
  position:absolute !important;
  width:1px !important;
  height:1px !important;
  padding:0 !important;
  margin:-1px !important;
  overflow:hidden !important;
  clip:rect(0,0,0,0) !important;
  white-space:nowrap !important;
  border:0 !important;
}


/* Upload progress (attachments) */
.ia-msg-upload-progress{
  flex: 1 1 100%;
  margin-top: 8px;
  padding: 8px 10px;
  border-radius: 12px;
  border: 1px solid var(--ia-line2);
  background: rgba(0,0,0,0.22);
}
.ia-msg-upload-progress[hidden]{ display:none !important; }
.ia-msg-upload-progress__top{
  display:flex;
  align-items:center;
  justify-content:space-between;
  gap: 10px;
  font-size: 12px;
  color: var(--ia-muted);
  margin-bottom: 6px;
}
.ia-msg-upload-progress__label{
  overflow:hidden;
  text-overflow:ellipsis;
  white-space:nowrap;
  max-width: 75%;
}
.ia-msg-upload-progress__bar{
  height: 8px;
  border-radius: 999px;
  overflow:hidden;
  background: rgba(255,255,255,0.08);
  border: 1px solid rgba(255,255,255,0.08);
}
.ia-msg-upload-progress__fill{
  height:100%;
  width:0%;
  background: rgba(167,139,250,0.70);
  transition: width 120ms linear;
}
