/* AnexosComponent — openspec: componente-anexos-coleta */

.anexos-dropzone {
  border: 2px dashed #ced4da;
  border-radius: 4px;
  padding: 24px 16px;
  text-align: center;
  cursor: pointer;
  color: #6c757d;
  background: #fbfbfb;
  transition: border-color .15s, background-color .15s;
}
.anexos-dropzone:hover,
.anexos-dropzone:focus {
  border-color: #e99b0d;
  background: #fff8ec;
  outline: 2px solid #e99b0d;
  outline-offset: 2px;
}
.anexos-dropzone i { font-size: 28px; display: block; margin-bottom: 8px; }
.anexos-dropzone-desabilitada {
  cursor: not-allowed;
  opacity: .6;
  border-color: #ced4da;
  background: #f1f1f1;
}
.anexos-input { position: absolute; opacity: 0; width: 1px; height: 1px; }

/* Grid horizontal: 5 colunas via convenção de "col" do Bootstrap.
   Bootstrap não tem fração nativa de quinto (grid é base 12), então .anexos-col
   define a largura diretamente em flex-basis/max-width. O card (.anexos-item)
   tem um max-width próprio menor que a coluna e fica centralizado nela, para
   não esticar em telas largas — em monitores grandes a coluna vira 10% (10
   por linha) em vez de crescer o tamanho do card. */
.anexos-lista {
  list-style: none;
  margin: 12px 0 0;
  padding: 0;
  display: flex;
  flex-wrap: wrap;
  margin-left: -6px;
  margin-right: -6px;
}
.anexos-col {
  flex: 0 0 20%;
  max-width: 20%;
  padding: 0 6px;
  margin-bottom: 12px;
  box-sizing: border-box;
}
.anexos-item {
  position: relative;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  width: 100%;
  max-width: 96px;
  aspect-ratio: 1 / 1;
  margin: 0 auto;
  padding: 6px;
  border: 1px solid #e6e6e6;
  border-radius: 4px;
  background: #fff;
  text-align: center;
}
.anexos-item-falha { border-color: #dc3545; background: #fdf3f4; }
.anexos-thumb {
  width: 40px; height: 40px;
  display: flex; align-items: center; justify-content: center;
  background: #fff; border-radius: 4px; flex: 0 0 40px; color: #6c757d;
  position: relative;
}
.anexos-thumb img { max-width: 100%; max-height: 100%; object-fit: cover; border-radius: 4px; }
.anexos-thumb i { font-size: 22px; }
.anexos-thumb-alerta {
  position: absolute;
  bottom: -3px; right: -3px;
  width: 12px; height: 12px;
  display: flex; align-items: center; justify-content: center;
  background: #dc3545; color: #fff; border-radius: 50%;
  font-size: 8px; line-height: 1;
}
.anexos-info { display: flex; flex-direction: column; align-items: center; min-width: 0; width: 100%; margin-top: 4px; }
.anexos-nome { color: #201E1D; font-size: 10px; word-break: break-word; max-width: 100%; }
.anexos-meta { color: #6c757d; font-size: 9px; }
.anexos-falha { color: #dc3545; font-size: 9px; font-weight: bold; }
.anexos-remover {
  position: absolute;
  top: 2px; right: 2px;
  background: #fff; border: 1px solid #ced4da; border-radius: 4px;
  color: #dc3545; font-size: 14px; line-height: 1;
  width: 20px; height: 20px; flex: 0 0 20px; cursor: pointer;
  z-index: 1;
}
.anexos-remover:hover { background: #dc3545; color: #fff; border-color: #dc3545; }

/* Responsivo: 10 colunas em monitores grandes, 5 em telas médias/largas comuns,
   menos em telas estreitas — acompanhando os breakpoints do Bootstrap já
   usados no formulário de coleta. */
@media (min-width: 1200px) {
  .anexos-col { flex: 0 0 10%; max-width: 10%; }
}
@media (max-width: 767px) {
  .anexos-col { flex: 0 0 33.333%; max-width: 33.333%; }
}
@media (max-width: 480px) {
  .anexos-col { flex: 0 0 50%; max-width: 50%; }
}

.anexos-contador { display: block; color: #6c757d; font-size: 12px; margin-top: 8px; }
.anexos-progresso {
  height: 6px;
  border-radius: 3px;
  background: #e9ecef;
  margin-top: 4px;
  overflow: hidden;
}
.anexos-progresso-barra {
  height: 100%;
  width: 0%;
  background: #e99b0d;
  transition: width .15s, background-color .15s;
}
.anexos-progresso-barra.anexos-progresso-cheio { background: #dc3545; }
.anexos-avisos { margin-top: 8px; }
.anexos-aviso { color: #dc3545; font-size: 13px; margin: 0 0 4px; }
