/* Copyright (c) Amazon.com and Affiliates: This deliverable is considered Developed Content as defined in the AWS Service Terms and the SOW between the parties dated 24.08.2026. */

#chat-form {
  display: block;
}

.composer-row {
  display: flex;
  align-items: flex-end;
  gap: 0.6rem;
}

#attach-file {
  width: 2.7rem;
  height: 2.7rem;
  padding: 0;
  flex: none;
  border: 1px solid var(--border);
  background: var(--panel);
  color: var(--text);
  font-size: 1.2rem;
}

#chat-form.dragging {
  outline: 2px dashed var(--accent);
  outline-offset: -0.45rem;
}

.composer-attachments,
.message-attachments {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
}

.composer-attachments {
  margin-bottom: 0.65rem;
}

.message-attachments {
  margin-top: 0.65rem;
}

.attachment-chip {
  position: relative;
  display: flex;
  align-items: center;
  gap: 0.55rem;
  min-width: 0;
  max-width: 100%;
  padding: 0.45rem 0.55rem;
  border: 1px solid var(--border);
  border-radius: 6px;
  background: rgba(15, 20, 25, 0.55);
  white-space: normal;
}

.attachment-preview {
  width: 3.2rem;
  height: 3.2rem;
  flex: none;
  border-radius: 4px;
  object-fit: cover;
  background: var(--bg);
}

.attachment-details {
  display: flex;
  flex-direction: column;
  min-width: 0;
  max-width: 24rem;
}

.attachment-name {
  overflow: hidden;
  color: var(--text);
  font-size: 0.8rem;
  font-weight: 600;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.attachment-meta,
.attachment-state,
.attachment-veeva {
  color: var(--muted);
  font-family: var(--mono);
  font-size: 0.66rem;
  line-height: 1.35;
}

.attachment-state.failed,
.attachment-veeva.failed,
.attachment-veeva.not_started,
.attachment-veeva.uncertain {
  color: #f0c4c4;
}

.attachment-veeva.uploaded {
  color: #70cbbb;
}

.attachment-chip progress {
  width: 4.5rem;
  height: 0.35rem;
  accent-color: var(--accent);
}

.attachment-remove {
  width: 1.4rem;
  height: 1.4rem;
  padding: 0;
  flex: none;
  display: grid;
  place-items: center;
  border: none;
  border-radius: 3px;
  background: transparent;
  color: var(--muted);
  line-height: 1;
}

.attachment-keep {
  flex: none;
  padding: 0.15rem 0.5rem;
  border: 1px solid var(--border);
  border-radius: 3px;
  background: transparent;
  color: var(--text);
  font-size: 0.7rem;
}

.attachment-keep:hover {
  border-color: var(--accent);
}

.attachment-remove:hover {
  background: var(--danger);
  color: #fff;
}

.composer-error {
  display: flex;
  flex-direction: column;
  gap: 0.3rem;
  margin: 0.45rem 0 0;
  color: #f0c4c4;
  font-size: 0.75rem;
}

.composer-error-item {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.5rem;
}

.composer-error-dismiss {
  width: 1.35rem;
  height: 1.35rem;
  padding: 0;
  flex: none;
  border: none;
  border-radius: 3px;
  background: transparent;
  color: inherit;
}

.composer-error-dismiss:hover {
  background: var(--danger);
  color: #fff;
}
