/* Estilos para tabela de itens GetItens */
.getitens-items-table-container {
  margin: 30px 0;
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Oxygen-Sans, Ubuntu, Cantarell, "Helvetica Neue",
    sans-serif;
}

.getitens-items-table-title {
  font-size: 24px;
  font-weight: 600;
  color: #2c3e50;
  margin-bottom: 20px;
  text-align: center;
}

/* Formulário de pesquisa */
.getitens-items-search-form {
  background: #f8f9fa;
  border: 1px solid #e9ecef;
  border-radius: 8px;
  padding: 20px;
  margin-bottom: 25px;
  box-shadow: 0 2px 5px rgba(0, 0, 0, 0.05);
}

.getitens-items-search-row {
  display: flex;
  gap: 20px;
  margin-bottom: 15px;
}

.getitens-items-search-field {
  flex: 1;
}

.getitens-items-search-field label {
  display: block;
  margin-bottom: 8px;
  font-weight: 600;
  color: #495057;
  font-size: 14px;
}

.getitens-items-search-field input {
  width: 100%;
  padding: 10px 15px;
  border: 1px solid #ced4da;
  border-radius: 4px;
  font-size: 15px;
  transition: border-color 0.3s ease, box-shadow 0.3s ease;
}

.getitens-items-search-field input:focus {
  border-color: #3498db;
  box-shadow: 0 0 0 3px rgba(52, 152, 219, 0.1);
  outline: none;
}

.getitens-items-search-actions {
  display: flex;
  justify-content: center;
  gap: 15px;
  margin-top: 20px;
}

/* Botões */
.getitens-btn {
  background: linear-gradient(135deg, #3498db, #2980b9);
  color: white;
  padding: 12px 25px;
  border: none;
  border-radius: 4px;
  font-size: 15px;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.3s ease;
  min-width: 120px;
  text-align: center;
}

.getitens-btn:hover {
  background: linear-gradient(135deg, #2980b9, #1f5f8b);
  transform: translateY(-2px);
  box-shadow: 0 5px 15px rgba(52, 152, 219, 0.3);
}

.getitens-btn-secondary {
  background: #6c757d;
  color: white;
  padding: 12px 25px;
  border: none;
  border-radius: 4px;
  font-size: 15px;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.3s ease;
  min-width: 120px;
  text-align: center;
}

.getitens-btn-secondary:hover {
  background: #5a6268;
  transform: translateY(-2px);
  box-shadow: 0 5px 15px rgba(108, 117, 125, 0.3);
}

.getitens-btn:disabled,
.getitens-btn-secondary:disabled {
  opacity: 0.6;
  cursor: not-allowed;
  transform: none;
  box-shadow: none;
}

/* Tabela de resultados */
.getitens-items-results {
  position: relative;
  min-height: 200px;
}

.getitens-items-table-wrapper {
  overflow-x: auto;
  margin-bottom: 20px;
}

.getitens-items-table {
  width: 100%;
  border-collapse: collapse;
  border-spacing: 0;
  font-size: 14px;
}

.getitens-items-table th,
.getitens-items-table td {
  padding: 12px 15px;
  text-align: left;
  border-bottom: 1px solid #e9ecef;
}

.getitens-items-table th {
  background-color: #f8f9fa;
  font-weight: 600;
  color: #495057;
  position: sticky;
  top: 0;
  z-index: 10;
  box-shadow: 0 1px 0 rgba(0, 0, 0, 0.1);
}

.getitens-items-table tbody tr {
  transition: background-color 0.3s ease;
}

.getitens-items-table tbody tr:hover {
  background-color: #f1f8ff;
}

.getitens-items-table tbody tr:nth-child(even) {
  background-color: #f8f9fa;
}

.getitens-items-table tbody tr:nth-child(even):hover {
  background-color: #edf3f8;
}

/* Loading */
.getitens-items-loading {
  display: none;
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: rgba(255, 255, 255, 0.8);
  z-index: 100;
  justify-content: center;
  align-items: center;
  flex-direction: column;
  text-align: center;
}

.getitens-items-loading.active {
  display: flex;
}

.getitens-spinner {
  border: 4px solid #f3f3f3;
  border-top: 4px solid #3498db;
  border-radius: 50%;
  width: 40px;
  height: 40px;
  animation: getitens-spin 1s linear infinite;
  margin-bottom: 15px;
}

@keyframes getitens-spin {
  0% {
    transform: rotate(0deg);
  }
  100% {
    transform: rotate(360deg);
  }
}

/* Mensagens */
.getitens-items-message {
  padding: 15px;
  margin: 15px 0;
  border-radius: 4px;
  display: none;
  text-align: center;
  font-weight: 500;
}

.getitens-items-message.success {
  background: #d4edda;
  color: #155724;
  border: 1px solid #c3e6cb;
}

.getitens-items-message.error {
  background: #f8d7da;
  color: #721c24;
  border: 1px solid #f5c6cb;
}

.getitens-items-message.info {
  background: #d1ecf1;
  color: #0c5460;
  border: 1px solid #bee5eb;
}

.getitens-items-message.show {
  display: block;
}

/* Paginação */
.getitens-items-pagination {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-top: 20px;
  font-size: 14px;
}

.getitens-items-pagination-info {
  color: #6c757d;
}

.getitens-items-pagination-controls {
  display: flex;
  gap: 5px;
}

.getitens-items-pagination-controls button {
  background: #f8f9fa;
  border: 1px solid #ced4da;
  color: #495057;
  width: 36px;
  height: 36px;
  border-radius: 4px;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition: all 0.2s ease;
}

.getitens-items-pagination-controls button:hover {
  background: #e9ecef;
  border-color: #adb5bd;
}

.getitens-items-pagination-controls button.active {
  background: #3498db;
  border-color: #3498db;
  color: white;
  font-weight: 600;
}

.getitens-items-pagination-controls button:disabled {
  opacity: 0.5;
  cursor: not-allowed;
  background: #f8f9fa;
  border-color: #ced4da;
}

/* Responsividade */
@media (max-width: 768px) {
  .getitens-items-search-row {
    flex-direction: column;
    gap: 15px;
  }

  .getitens-items-pagination {
    flex-direction: column;
    gap: 10px;
  }

  .getitens-items-table th,
  .getitens-items-table td {
    padding: 10px;
    font-size: 13px;
  }
}

/* Estilos para tabela responsiva em telas pequenas */
@media (max-width: 576px) {
  .getitens-items-table {
    display: block;
  }

  .getitens-items-table thead {
    display: none;
  }

  .getitens-items-table tbody {
    display: block;
  }

  .getitens-items-table tr {
    display: block;
    margin-bottom: 15px;
    border: 1px solid #dee2e6;
    border-radius: 4px;
    padding: 10px;
  }

  .getitens-items-table td {
    display: flex;
    justify-content: space-between;
    align-items: center;
    border-bottom: 1px solid #eee;
    padding: 8px 0;
  }

  .getitens-items-table td:last-child {
    border-bottom: none;
  }

  .getitens-items-table td::before {
    content: attr(data-label);
    font-weight: 600;
    margin-right: 10px;
    min-width: 120px;
  }
}

/* Animações */
@keyframes fadeIn {
  from {
    opacity: 0;
  }
  to {
    opacity: 1;
  }
}

.getitens-items-table tbody tr {
  animation: fadeIn 0.3s ease;
}
