.ai-chat-composer .chat-composer-attachment-list {
  display: grid;
  grid-template-columns: 1fr;
  gap: 8px;
  width: 100%;
  margin: 12px 0 0;
  padding: 12px 0 0;
  overflow: visible;
  border-top: 1px solid #e6ecef;
}

.ai-chat-composer .chat-composer-attachment-list::before {
  content: "附件";
  color: #607985;
  font-size: 12px;
  font-weight: 600;
}

.ai-chat-composer .chat-composer-attachment-list[hidden] {
  display: none;
}

.ai-chat-composer .chat-composer-attachment-card {
  display: grid;
  grid-template-columns: 46px minmax(0, 1fr) auto;
  gap: 12px;
  align-items: center;
  min-width: 0;
  box-sizing: border-box;
  padding: 10px 11px;
  overflow: visible;
  border: 1px solid #dfe7eb;
  border-radius: 11px;
  background: #fbfcfd;
}

.ai-chat-composer .chat-composer-attachment-card.is-saved {
  border-color: #b9e3d0;
  background: #fbfffc;
}

.ai-chat-composer .chat-composer-attachment-preview {
  display: grid;
  place-items: center;
  width: 46px;
  height: 46px;
  overflow: hidden;
  border-radius: 8px;
  background: #fff0df;
  color: #c76400;
  font-size: 20px;
}

.ai-chat-composer .chat-composer-attachment-preview img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.ai-chat-composer .chat-composer-attachment-copy {
  min-width: 0;
}

.ai-chat-composer .chat-composer-attachment-copy strong,
.ai-chat-composer .chat-composer-attachment-copy small {
  display: block;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.ai-chat-composer .chat-composer-attachment-copy strong {
  color: #28465a;
  font-size: 13px;
}

.ai-chat-composer .chat-composer-attachment-copy small {
  margin-top: 5px;
  color: #78909e;
  font-size: 11px;
}

.ai-chat-composer .chat-composer-attachment-card.is-saved .chat-composer-attachment-copy small {
  color: #4a9871;
}

.ai-chat-composer .chat-composer-attachment-copy .chat-inline-marker {
  margin-top: 4px;
  color: #c56a17;
}

.ai-chat-composer .chat-composer-attachment-actions {
  display: flex;
  gap: 7px;
  align-items: center;
  justify-content: flex-end;
}

.ai-chat-composer .chat-composer-attachment-button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 32px;
  box-sizing: border-box;
  padding: 6px 11px;
  border: 1px solid #d8e2e7;
  border-radius: 7px;
  background: #fff;
  color: #4f6c7d;
  font: 600 12px inherit;
  text-decoration: none;
  white-space: nowrap;
  cursor: pointer;
}

.ai-chat-composer .chat-composer-attachment-button:hover {
  border-color: #ff9b3c;
  background: #fff8f0;
  color: #c76500;
}

.ai-chat-composer .chat-composer-attachment-button:disabled {
  opacity: .58;
  cursor: not-allowed;
}

.ai-chat-composer .chat-composer-attachment-more {
  position: relative;
}

.ai-chat-composer .chat-composer-attachment-more > summary {
  list-style: none;
}

.ai-chat-composer .chat-composer-attachment-more > summary::-webkit-details-marker {
  display: none;
}

.ai-chat-composer .chat-composer-attachment-more[open] > summary {
  border-color: #ff9b3c;
  background: #fff8f0;
  color: #c76500;
}

.ai-chat-composer .chat-composer-attachment-menu {
  position: absolute;
  z-index: 30;
  top: calc(100% + 6px);
  right: 0;
  display: grid;
  min-width: 120px;
  padding: 6px;
  border: 1px solid #dbe5ea;
  border-radius: 9px;
  background: #fff;
  box-shadow: 0 8px 20px rgba(33, 61, 80, .14);
}

.ai-chat-composer .chat-composer-attachment-more.is-open-up .chat-composer-attachment-menu {
  top: auto;
  bottom: calc(100% + 6px);
}

.ai-chat-composer .chat-composer-attachment-menu button {
  width: 100%;
  padding: 7px 9px;
  border: 0;
  border-radius: 5px;
  background: transparent;
  color: #4f6c7d;
  font: 600 12px inherit;
  text-align: left;
  white-space: nowrap;
  cursor: pointer;
}

.ai-chat-composer .chat-composer-attachment-menu button:hover {
  background: #fff6ed;
  color: #c76500;
}

.ai-chat-composer .chat-composer-attachment-menu button.is-danger {
  color: #be5649;
}

.ai-chat-composer .chat-composer-attachment-menu button.is-danger:hover {
  background: #fff3f1;
  color: #a54136;
}

@media (max-width: 720px) {
  .ai-chat-composer .chat-composer-attachment-card {
    grid-template-columns: 46px minmax(0, 1fr);
  }

  .ai-chat-composer .chat-composer-attachment-actions {
    grid-column: 1 / -1;
    justify-content: flex-start;
    padding-left: 58px;
  }
}
