/*
 * attachment.css - Widget de Artefato (PDF/Sheets)
 * ==================================================
 * PORQUE: Quando o backend retorna um arquivo (PDF ou Planilha),
 * este componente renderiza um card de download integrado a bolha
 * de mensagem da Athena, similar ao ChatGPT.
 */

/* ── Container do attachment ── */
.attachment-card {
  display: flex;
  align-items: center;
  gap: 14px;
  margin-top: 12px;
  padding: 14px 18px;
  background: var(--bg-input);
  border: 1px solid var(--border);
  border-radius: 12px;
  transition: border-color 0.2s ease, box-shadow 0.2s ease;
  cursor: pointer;
  text-decoration: none;
  color: inherit;
}

.attachment-card:hover {
  border-color: var(--red);
  box-shadow: 0 0 16px var(--red-glow);
}

/* ── Icone do tipo de arquivo ── */
.attachment-icon {
  flex-shrink: 0;
  width: 44px;
  height: 44px;
  border-radius: 10px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 20px;
}

.attachment-icon.pdf {
  background: rgba(220, 38, 38, 0.12);
  color: #ef4444;
}

.attachment-icon.sheet {
  background: rgba(34, 197, 94, 0.12);
  color: #22c55e;
}

/* ── Informacoes do arquivo ── */
.attachment-info {
  flex: 1;
  min-width: 0;
}

.attachment-title {
  font-family: 'Open Sans', sans-serif;
  font-size: 14px;
  font-weight: 600;
  color: var(--white);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.attachment-meta {
  font-family: 'Open Sans', sans-serif;
  font-size: 12px;
  color: var(--muted);
  margin-top: 2px;
}

/* ── Botao de download ── */
.attachment-download {
  flex-shrink: 0;
  width: 36px;
  height: 36px;
  border-radius: 8px;
  border: 1px solid var(--border);
  background: transparent;
  color: var(--muted-light);
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition: all 0.2s ease;
}

.attachment-download:hover {
  background: var(--red);
  border-color: var(--red);
  color: #fff;
}

.attachment-download svg {
  width: 16px;
  height: 16px;
}

/* ── Animacao de entrada ── */
@keyframes attachmentSlideIn {
  from {
    opacity: 0;
    transform: translateY(8px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

.attachment-card {
  animation: attachmentSlideIn 0.3s ease forwards;
}
