/* ============================================================================
 * Billie image attachments — attach button, staging tray, in-bubble thumbnails.
 * Lives inside the existing .ai-panel__input pill (light glass, dark text).
 * ==========================================================================*/

/* Attach (image) button inside the input pill */
.bi-attach {
  flex: 0 0 auto;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 30px;
  height: 30px;
  padding: 0;
  border: none;
  border-radius: 50%;
  background: transparent;
  color: rgba(0, 0, 0, 0.5);
  cursor: pointer;
  transition: background 0.18s ease, color 0.18s ease, transform 0.12s ease;
}
.bi-attach:hover { background: rgba(0, 0, 0, 0.07); color: rgba(0, 0, 0, 0.82); }
.bi-attach:active { transform: scale(0.9); }
.bi-attach svg { width: 19px; height: 19px; display: block; }

/* Staging tray above the pill */
.bi-tray {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  padding: 4px 6px 10px;
  margin: 0;
}
.bi-thumb {
  position: relative;
  width: 58px;
  height: 58px;
  border-radius: 12px;
  overflow: hidden;
  background: rgba(0, 0, 0, 0.12);
  border: 1px solid rgba(255, 255, 255, 0.5);
  box-shadow: 0 6px 14px rgba(0, 0, 0, 0.18);
  animation: bi-pop 0.22s cubic-bezier(0.22, 1, 0.36, 1);
}
.bi-thumb img { width: 100%; height: 100%; object-fit: cover; display: block; }
@keyframes bi-pop { from { transform: scale(0.6); opacity: 0; } to { transform: scale(1); opacity: 1; } }
.bi-thumb.bi-loading {
  background:
    linear-gradient(110deg, rgba(255,255,255,0.08) 30%, rgba(255,255,255,0.35) 50%, rgba(255,255,255,0.08) 70%)
    rgba(0,0,0,0.18);
  background-size: 220% 100%;
  animation: bi-shimmer 1s linear infinite;
}
@keyframes bi-shimmer { from { background-position: 220% 0; } to { background-position: -220% 0; } }
.bi-thumb-x {
  position: absolute;
  top: 2px;
  right: 2px;
  width: 18px;
  height: 18px;
  border: none;
  border-radius: 50%;
  background: rgba(0, 0, 0, 0.65);
  color: #fff;
  font-size: 13px;
  line-height: 1;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 0;
}
.bi-thumb-x:hover { background: rgba(0, 0, 0, 0.85); }

/* Drag-over highlight on the pill */
.ai-panel__input-pill.bi-dragover {
  outline: 2px dashed rgba(0, 0, 0, 0.35);
  outline-offset: 2px;
}

/* In-bubble images (user messages, live + reloaded history) */
.bi-msg-imgs {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 6px;
  margin-bottom: 8px;
  max-width: 280px;
}
.bi-msg-imgs--one { grid-template-columns: 1fr; }
.bi-msg-img {
  width: 100%;
  max-height: 220px;
  object-fit: cover;
  border-radius: 14px;
  cursor: zoom-in;
  display: block;
  background: rgba(0, 0, 0, 0.1);
}
.bi-msg-text { white-space: pre-wrap; }
