/* Area "Arquivos para download" (anexos) em formato amigavel (24/11/2026).
   Marcacao do com_attachments: .attachmentsContainer > .anexo > table > caption, thead, tbody > tr.
   So CSS: a tabela vira um cartao com uma linha por arquivo. */

.attachmentsContainer { clear: both; margin: 28px 0 10px; }

.attachmentsContainer .anexo {
  background: #fff;
  border: 1px solid #eadde1;
  border-radius: 16px;
  box-shadow: 0 2px 10px rgba(38, 50, 58, 0.06);
  overflow: hidden;
}

.attachmentsContainer .anexo table {
  display: block;
  width: 100%;
  margin: 0;
  border: 0;
  border-collapse: collapse;
  background: transparent;
}

/* titulo do bloco */
.attachmentsContainer .anexo caption {
  display: block;
  caption-side: top;
  margin: 0;
  padding: 16px 22px;
  background: #f8f3f5;
  border-bottom: 1px solid #eadde1;
  color: #26323a;
  font-size: 1.1rem;
  font-weight: 800;
  text-align: left;
}
.attachmentsContainer .anexo caption::before {
  content: "\f019";
  font-family: "Font Awesome 5 Free";
  font-weight: 900;
  margin-right: 10px;
  color: #82283f;
}

/* cabecalho de colunas: fica so para leitores de tela */
.attachmentsContainer .anexo thead {
  position: absolute;
  width: 1px;
  height: 1px;
  overflow: hidden;
  clip: rect(0 0 0 0);
  white-space: nowrap;
}

.attachmentsContainer .anexo tbody { display: block; }

/* uma linha por arquivo */
.attachmentsContainer .anexo tbody tr {
  position: relative;
  display: flex;
  align-items: center;
  gap: 10px 14px;
  padding: 14px 22px;
  background: transparent;
  border-top: 1px solid #f0e6ea;
  transition: background 0.15s;
}
.attachmentsContainer .anexo tbody tr:first-child { border-top: 0; }
.attachmentsContainer .anexo tbody tr:hover { background: #fbf6f8; }

.attachmentsContainer .anexo td {
  display: block;
  padding: 0;
  border: 0;
  background: transparent;
  line-height: 1.35;
}

/* nome do arquivo + icone */
.attachmentsContainer .anexo td.at_filename {
  flex: 1 1 auto;
  min-width: 0;
  display: flex;
  align-items: center;
  gap: 14px;
  text-align: left;
}
.attachmentsContainer .anexo a.at_icon {
  flex: 0 0 auto;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 46px;
  height: 46px;
  padding: 0;
  border-radius: 50%;
  background: #f5e8ed;
  text-decoration: none;
}
.attachmentsContainer .anexo a.at_icon img { display: none; }
.attachmentsContainer .anexo a.at_icon::before {
  content: "\f15b";
  font-family: "Font Awesome 5 Free";
  font-weight: 900;
  font-size: 1.3rem;
  color: #82283f;
}
/* icone por tipo de arquivo (casa so o nome final do arquivo do icone) */
.attachmentsContainer .anexo a.at_icon:has(img[src$="/pdf.gif"]) { background: #fde8e6; }
.attachmentsContainer .anexo a.at_icon:has(img[src$="/pdf.gif"])::before { content: "\f1c1"; color: #c0392b; }
.attachmentsContainer .anexo a.at_icon:has(img[src$="/word.gif"]),
.attachmentsContainer .anexo a.at_icon:has(img[src$="/wordx.gif"]),
.attachmentsContainer .anexo a.at_icon:has(img[src$="/rtf.gif"]),
.attachmentsContainer .anexo a.at_icon:has(img[src$="/text.gif"]),
.attachmentsContainer .anexo a.at_icon:has(img[src$="/oo-write.gif"]) { background: #e6eefa; }
.attachmentsContainer .anexo a.at_icon:has(img[src$="/word.gif"])::before,
.attachmentsContainer .anexo a.at_icon:has(img[src$="/wordx.gif"])::before,
.attachmentsContainer .anexo a.at_icon:has(img[src$="/rtf.gif"])::before,
.attachmentsContainer .anexo a.at_icon:has(img[src$="/text.gif"])::before,
.attachmentsContainer .anexo a.at_icon:has(img[src$="/oo-write.gif"])::before { content: "\f1c2"; color: #2b579a; }
.attachmentsContainer .anexo a.at_icon:has(img[src$="/excel.gif"]),
.attachmentsContainer .anexo a.at_icon:has(img[src$="/excelx.gif"]),
.attachmentsContainer .anexo a.at_icon:has(img[src$="/csv.gif"]),
.attachmentsContainer .anexo a.at_icon:has(img[src$="/oo-calc.gif"]) { background: #e5f4ea; }
.attachmentsContainer .anexo a.at_icon:has(img[src$="/excel.gif"])::before,
.attachmentsContainer .anexo a.at_icon:has(img[src$="/excelx.gif"])::before,
.attachmentsContainer .anexo a.at_icon:has(img[src$="/csv.gif"])::before,
.attachmentsContainer .anexo a.at_icon:has(img[src$="/oo-calc.gif"])::before { content: "\f1c3"; color: #217346; }
.attachmentsContainer .anexo a.at_icon:has(img[src$="/ppt.gif"]),
.attachmentsContainer .anexo a.at_icon:has(img[src$="/pptx.gif"]),
.attachmentsContainer .anexo a.at_icon:has(img[src$="/oo-impress.gif"]) { background: #fcebe5; }
.attachmentsContainer .anexo a.at_icon:has(img[src$="/ppt.gif"])::before,
.attachmentsContainer .anexo a.at_icon:has(img[src$="/pptx.gif"])::before,
.attachmentsContainer .anexo a.at_icon:has(img[src$="/oo-impress.gif"])::before { content: "\f1c4"; color: #d24726; }
.attachmentsContainer .anexo a.at_icon:has(img[src$="/image.gif"]),
.attachmentsContainer .anexo a.at_icon:has(img[src$="/eps.gif"]),
.attachmentsContainer .anexo a.at_icon:has(img[src$="/3d.gif"]) { background: #efe9f8; }
.attachmentsContainer .anexo a.at_icon:has(img[src$="/image.gif"])::before,
.attachmentsContainer .anexo a.at_icon:has(img[src$="/eps.gif"])::before,
.attachmentsContainer .anexo a.at_icon:has(img[src$="/3d.gif"])::before { content: "\f1c5"; color: #7b5ea7; }
.attachmentsContainer .anexo a.at_icon:has(img[src$="/zip.gif"]),
.attachmentsContainer .anexo a.at_icon:has(img[src$="/archive.gif"]) { background: #fbf1d6; }
.attachmentsContainer .anexo a.at_icon:has(img[src$="/zip.gif"])::before,
.attachmentsContainer .anexo a.at_icon:has(img[src$="/archive.gif"])::before { content: "\f1c6"; color: #a37b00; }
.attachmentsContainer .anexo a.at_icon:has(img[src$="/video.gif"]),
.attachmentsContainer .anexo a.at_icon:has(img[src$="/mov.gif"]),
.attachmentsContainer .anexo a.at_icon:has(img[src$="/flash.gif"]) { background: #e3f1f7; }
.attachmentsContainer .anexo a.at_icon:has(img[src$="/video.gif"])::before,
.attachmentsContainer .anexo a.at_icon:has(img[src$="/mov.gif"])::before,
.attachmentsContainer .anexo a.at_icon:has(img[src$="/flash.gif"])::before { content: "\f1c8"; color: #1c7aa3; }
.attachmentsContainer .anexo a.at_icon:has(img[src$="/audio.gif"]),
.attachmentsContainer .anexo a.at_icon:has(img[src$="/music.gif"]),
.attachmentsContainer .anexo a.at_icon:has(img[src$="/midi.gif"]) { background: #e3f1f7; }
.attachmentsContainer .anexo a.at_icon:has(img[src$="/audio.gif"])::before,
.attachmentsContainer .anexo a.at_icon:has(img[src$="/music.gif"])::before,
.attachmentsContainer .anexo a.at_icon:has(img[src$="/midi.gif"])::before { content: "\f1c7"; color: #1c7aa3; }

.attachmentsContainer .anexo a.at_url {
  color: #26323a;
  font-size: 1rem;
  font-weight: 700;
  text-decoration: none;
  word-break: break-word;
}
.attachmentsContainer .anexo tbody tr:hover a.at_url { color: #82283f; text-decoration: underline; }
/* a linha inteira vira area clicavel do download */
.attachmentsContainer .anexo a.at_url::before { content: ""; position: absolute; top: 0; right: 0; bottom: 0; left: 0; }

/* descricao e etiquetas */
.attachmentsContainer .anexo td.at_description { flex: 0 1 auto; color: #6b7a86; font-size: 0.9rem; }
.attachmentsContainer .anexo td.at_file_size,
.attachmentsContainer .anexo td.at_mod_date {
  flex: 0 0 auto;
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 5px 12px;
  border-radius: 999px;
  background: #f3ecee;
  color: #44525d;
  font-size: 0.85rem;
  font-weight: 600;
  white-space: nowrap;
  text-align: left;
}
.attachmentsContainer .anexo td.at_file_size::before { content: "Tamanho"; color: #82283f; font-weight: 700; }
.attachmentsContainer .anexo td.at_mod_date::before  { content: "Modificado"; color: #82283f; font-weight: 700; }
.attachmentsContainer .anexo td.at_downloads { flex: 0 0 auto; color: #6b7a86; font-size: 0.85rem; }

/* botao de download no fim da linha */
.attachmentsContainer .anexo tbody tr::after {
  content: "\f019";
  font-family: "Font Awesome 5 Free";
  font-weight: 900;
  flex: 0 0 auto;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 40px;
  height: 40px;
  border-radius: 50%;
  background: #82283f;
  color: #fff;
  font-size: 0.95rem;
  transition: background 0.15s;
}
.attachmentsContainer .anexo tbody tr:hover::after { background: #671f32; }

/* celular */
@media (max-width: 575px) {
  .attachmentsContainer .anexo caption { padding: 14px 16px; font-size: 1rem; }
  .attachmentsContainer .anexo tbody tr { flex-wrap: wrap; padding: 14px 16px; }
  .attachmentsContainer .anexo td.at_filename { flex: 1 1 100%; }
  .attachmentsContainer .anexo td.at_file_size { margin-left: 60px; }
  .attachmentsContainer .anexo tbody tr::after { display: none; }
}
