/* fileUpload.css - ChatBot 檔案上傳專用樣式 */

.bot-file-list-panel {
  margin: 0 0.25rem 0.5rem 0.25rem;
}

.bot-file-list {
  display: flex;
  flex-direction: row;
  flex-wrap: nowrap;
  gap: 0.4rem;
  overflow-x: auto;
  overflow-y: hidden;
  padding-bottom: 0.15rem;
}

.file-upload-item {
  border: 1px solid #d9e0ea;
  border-radius: 14px;
  background: #ffffff;
  padding: 0.5rem 0.65rem;
  min-width: 220px;
  max-width: 220px;
  flex: 0 0 220px;
  display: flex;
  flex-direction: column;
  justify-content: center;
}

.file-upload-left {
  display: flex;
  align-items: stretch;
  gap: 0.55rem;
  min-width: 0;
}

.file-upload-details {
  min-width: 0;
  flex: 1;
}

.file-name {
  font-size: 0.92rem;
  font-weight: 600;
  color: #2a2a2a;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.file-status {
  font-size: 0.78rem;
  color: #7b8796;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.file-progress-bar {
  height: 4px;
  border-radius: 999px;
  background: #edf1f7;
  overflow: hidden;
  margin-top: 0.45rem;
}

.file-progress-fill {
  height: 100%;
  background-color: var(--mainColor, #11646c);
  transition: width 0.25s ease;
}

.file-delete-icon {
  border: none;
  background: transparent;
  color: #b8c0cb;
  padding: 0;
  width: 28px;
  min-height: 40px;
  height: auto;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  flex: 0 0 28px;
  font-size: 1.2rem;
  line-height: 1;
  border-radius: 50%;
  align-self: stretch;
}

.file-delete-icon:hover {
  color: #8f99a8;
}

.file-upload-item.error {
  border-color: #f1c9cf;
  background: #fff7f8;
}

.file-upload-item:not(.completed):not(.error) .file-delete-icon {
  visibility: hidden;
  opacity: 0;
  pointer-events: none;
}

.file-upload-item.completed .file-delete-icon,
.file-upload-item.error .file-delete-icon {
  visibility: visible;
  opacity: 1;
}

@media (max-width: 767px) {
  .bot-file-list-panel {
    margin: 0 0 0.4rem 0;
  }

  .file-upload-item {
    padding: 0.45rem 0.55rem;
    min-width: 180px;
    max-width: 180px;
    flex-basis: 180px;
  }

  .file-name {
    font-size: 0.88rem;
  }
}
