/* Estilos do Frontend */
.risc-downloads-wrapper {
  max-width: 1200px;
  margin: 30px auto;
  padding: 0 20px;
}

/* Campo de busca */
.risc-downloads-search {
  margin-bottom: 25px;
}

.risc-downloads-search input {
  width: 100%;
  padding: 14px 20px;
  background: rgba(76, 175, 80, 0.08);
  border: 2px solid rgba(76, 175, 80, 0.3);
  border-radius: 8px;
  font-size: 16px;
  transition: all 0.3s ease;
}

.risc-downloads-search input::placeholder {
  color: rgba(46, 125, 50, 0.6);
}

.risc-downloads-search input:focus {
  outline: none;
  background: #fff;
  border-color: #4caf50;
  box-shadow: 0 0 0 3px rgba(76, 175, 80, 0.1);
}

/* Tabela de downloads */
.risc-downloads-table-wrapper {
  overflow-x: auto;
  background: #fff;
  border-radius: 8px;
  box-shadow: 0 2px 12px rgba(0, 0, 0, 0.08);
}

.risc-downloads-table {
  width: 100%;
  border-collapse: separate;
  border-spacing: 0;
  background: #fff;
}

.risc-downloads-table thead {
  background: #2e7d32;
  color: #fff;
}

.risc-downloads-table th {
  padding: 18px 20px;
  text-align: left;
  font-weight: 600;
  font-size: 16px;
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

.risc-downloads-table td {
  padding: 18px 20px;
  border-bottom: 1px solid #e8e8e8;
  font-size: 15px;
  color: #333;
  vertical-align: middle;
}

.risc-downloads-table tbody tr {
  transition: background 0.2s ease;
}

.risc-downloads-table tbody tr:hover {
  background: #e8f5e9;
}

.risc-downloads-table tbody tr:last-child td {
  border-bottom: none;
}

.risc-document-cell {
  display: flex;
  align-items: center;
  gap: 15px;
  min-height: 40px;
}

.risc-file-icon {
  width: 40px;
  height: 40px;
  object-fit: contain;
  flex-shrink: 0;
}

.risc-document-cell span {
  font-weight: 500;
  color: #1b5e20;
}

/* Botão de download */
.risc-download-btn {
  display: inline-block;
  background: #4caf50;
  color: #fff !important;
  padding: 10px 24px;
  border-radius: 6px;
  text-decoration: none;
  font-weight: 600;
  font-size: 14px;
  transition: all 0.3s ease;
  border: 2px solid #4caf50;
}

.risc-download-btn:hover {
  background: #388e3c;
  border-color: #388e3c;
  color: #fff !important;
  transform: translateY(-2px);
  box-shadow: 0 4px 12px rgba(76, 175, 80, 0.3);
}

.risc-download-btn:active {
  transform: translateY(0);
}

/* Mensagem de nenhum resultado */
.risc-no-results {
  text-align: center;
  padding: 40px 20px;
  color: #999;
  font-size: 16px;
  font-style: italic;
}

/* Responsividade */
@media (max-width: 768px) {
  .risc-downloads-table {
    font-size: 14px;
  }

  .risc-downloads-table th,
  .risc-downloads-table td {
    padding: 12px 15px;
  }

  .risc-downloads-table th {
    font-size: 14px;
  }

  .risc-file-icon {
    width: 32px;
    height: 32px;
  }

  .risc-document-cell {
    gap: 10px;
  }

  .risc-download-btn {
    padding: 8px 16px;
    font-size: 13px;
  }
}

@media (max-width: 576px) {
  /* Layout em cards para mobile */
  .risc-downloads-table thead {
    display: none;
  }

  .risc-downloads-table,
  .risc-downloads-table tbody,
  .risc-downloads-table tr,
  .risc-downloads-table td {
    display: block;
    width: 100%;
  }

  .risc-downloads-table tr {
    margin-bottom: 20px;
    border: 1px solid #e8e8e8;
    border-radius: 8px;
    overflow: hidden;
  }

  .risc-downloads-table td {
    padding: 15px;
    border-bottom: 1px solid #f0f0f0;
    position: relative;
    padding-left: 50%;
  }

  .risc-downloads-table td:last-child {
    border-bottom: none;
  }

  .risc-downloads-table td:before {
    content: attr(data-label);
    position: absolute;
    left: 15px;
    font-weight: 600;
    color: #1b5e20;
  }

  .risc-document-cell {
    justify-content: flex-start;
  }

  .risc-download-btn {
    width: 100%;
    text-align: center;
  }
}
