/*
    --- Versionamento ---
    16/10/2025 - César - Primeira Versão   
    --- Fim Versionamento ---
*/

.gerenciador-afinder {
  background-color: #f4f7f9;
  padding: 20px;
  color: #333;
  --border-radius: 0.375rem;
}

.gerenciador-afinder .container-principal {
  background-color: #ffffff;
  border-radius: 8px;
  box-shadow: 0 4px 15px rgba(0, 0, 0, 0.08);
  overflow: hidden;
  display: flex;
  flex-direction: column;
  height: calc(100vh - 40px);
}

/* --- Barra de Ferramentas --- */
.gerenciador-afinder #contenedor_ferramentas_arquivo {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 12px 20px;
  border-bottom: 1px solid #e0e5e9;
  background-color: #fcfdff;
  flex-shrink: 0;
}

.gerenciador-afinder #botoes_principais {
  display: flex;
  gap: 10px;
}

/* --- Área de Exibição dos Arquivos --- */
.gerenciador-afinder #contenedor_gestor_arquivos {
  display: flex;
  flex-wrap: wrap;
  gap: 15px;
  align-content: flex-start;
  padding: 20px;
  flex-grow: 1;
  overflow-y: auto;
}

.gerenciador-afinder .barra-filtros {
  width: 100%;
  padding-bottom: 20px;
  display: flex;
  align-items: center;
  gap: 15px;
  flex-wrap: wrap;
}

.gerenciador-afinder .barra-filtros input[type="text"],
.gerenciador-afinder .barra-filtros select {
  padding: 8px;
  border: 1px solid #ccc;
  border-radius: var(--border-radius);
  font-size: 14px;
}

.gerenciador-afinder .barra-filtros .checkbox-group {
  display: flex;
  align-items: center;
  gap: 5px;
}

/* --- Estilo dos Itens (Pastas e Arquivos) --- */
.gerenciador-afinder .item_pasta_arquivo {
  position: relative;
  width: 135px;
  height: 135px;
  cursor: pointer;
  background-color: #f8f9fa;
  border: 2px solid #dee2e6;
  border-radius: var(--border-radius);
  padding: 10px;
  box-sizing: border-box;
  transition: transform 0.25s ease-in-out, box-shadow 0.25s ease-in-out,
    border-color 0.25s ease-in-out;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
}

.gerenciador-afinder .item_pasta_arquivo.selected {
  border-color: var(--primary, #4a90e2);
  box-shadow: 0 0 10px rgba(74, 144, 226, 0.3);
}

.gerenciador-afinder .item_pasta_arquivo:hover {
  transform: translateY(-2px);
  box-shadow: 0 6px 12px rgba(0, 0, 0, 0.1);
}

.gerenciador-afinder .item-icon {
  height: 65px;
  display: flex;
  align-items: center;
  justify-content: center;
  margin-bottom: 10px;
}

.gerenciador-afinder .item-icon img {
  max-width: 60px;
  max-height: 60px;
  object-fit: contain;
}

.gerenciador-afinder .item-icon img.icone-svg {
  max-width: 50px;
  max-height: 50px;
}

.gerenciador-afinder .item-name {
  font-size: 13px;
  color: #495057;
  width: 100%;
  text-align: center;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

/* --- Menu de Ações no Item --- */
.gerenciador-afinder .item-actions-trigger {
  position: absolute;
  top: 5px;
  right: 5px;
  width: 28px;
  height: 28px;
  border-radius: 50%;
  background-color: rgba(255, 255, 255, 0.8);
  border: 1px solid #ccc;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  opacity: 0;
  transition: opacity 0.2s ease;
}

.gerenciador-afinder .item_pasta_arquivo:hover .item-actions-trigger,
.gerenciador-afinder .item_pasta_arquivo.selected .item-actions-trigger {
  opacity: 1;
}

.gerenciador-afinder .item-actions-trigger svg {
  width: 18px;
  height: 18px;
  fill: #555;
}

.gerenciador-afinder .item-actions-menu {
  position: absolute;
  top: 35px;
  right: 5px;
  background-color: white;
  border: 1px solid #ccc;
  border-radius: var(--border-radius);
  box-shadow: 0 4px 10px rgba(0, 0, 0, 0.15);
  z-index: 10;
  display: none;
  width: 120px;
  padding: 5px 0;
}

.gerenciador-afinder .item-actions-menu a {
  display: block;
  padding: 8px 15px;
  color: #333;
  text-decoration: none;
  font-size: 14px;
}

.gerenciador-afinder .item-actions-menu a:hover {
  background-color: #f5f5f5;
}

.gerenciador-afinder .item-actions-menu a.excluir:hover {
  background-color: #fff1f0;
  color: var(--danger, #e74c3c);
}

/* --- Rodapé com Dica --- */
.gerenciador-afinder .info-footer {
  text-align: right;
  font-size: 12px;
  color: #95a5a6;
  padding: 10px 20px 15px 20px;
  border-top: 1px solid #e0e5e9;
  flex-shrink: 0;
}

/* --- Estilo para a Tela de Upload --- */
.gerenciador-afinder .upload-container {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: 60px 20px;
  border: 2px dashed #a8b2bc;
  border-radius: 8px;
  background-color: #f8f9fa;
  text-align: center;
  width: 100%;
}

.gerenciador-afinder .upload-container h2 {
  margin: 0 0 10px 0;
  color: #2c3e50;
}

.gerenciador-afinder .upload-container p {
  color: #7f8c8d;
  margin-bottom: 25px;
}

.gerenciador-afinder .upload-container .botoes-upload {
  margin-top: 25px;
  display: flex;
  gap: 15px;
  justify-content: center;
}

.gerenciador-afinder #preview-area {
  display: flex;
  flex-wrap: wrap;
  gap: 15px;
  justify-content: center;
  width: 100%;
  max-height: 280px;
  overflow-y: auto;
  padding: 10px;
  margin-top: 20px;
}

.gerenciador-afinder .preview-card {
  position: relative;
  width: 110px;
  height: 110px;
  border: 1px solid #ddd;
  border-radius: var(--border-radius);
  background-color: #fff;
  padding: 8px;
  box-shadow: 0 2px 4px rgba(0, 0, 0, 0.05);
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
}

.gerenciador-afinder .preview-image {
  width: 50px;
  height: 50px;
  object-fit: cover;
  margin-bottom: 8px;
}

.gerenciador-afinder .preview-icon {
  width: 45px;
  height: 45px;
  object-fit: contain;
  margin-bottom: 8px;
}

.gerenciador-afinder .preview-filename {
  font-size: 12px;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  width: 100%;
}

.gerenciador-afinder .preview-remove-btn {
  position: absolute;
  top: -8px;
  right: -8px;
  width: 24px;
  height: 24px;
  background-color: #e74c3c;
  color: white;
  border: none;
  border-radius: 50%;
  cursor: pointer;
  font-weight: bold;
  font-size: 14px;
  display: flex;
  align-items: center;
  justify-content: center;
  line-height: 1;
}