/* ================= CONTENEDOR PRINCIPAL PARA TABLA ================= */
.containerDatosEntrada {
  background-color: transparent !important;
  box-shadow: none !important;
  border-radius: 0 !important;
  padding: 0 !important;
  overflow-x: hidden;   /* 👈 evitamos scroll lateral innecesario */
  min-width: 0;
}

/* ================= TABLA ================= */
#tablaDatos table {
  width: 100%;
  max-width: 100%;       /* 👈 nunca más ancha que el contenedor */
  border-collapse: collapse;
  background-color: #d3d9dd; /* gris azulado claro */
  border-radius: 8px;
  overflow: hidden;
  box-shadow: 0 0 8px rgba(0, 0, 0, 0.1);
  font-family: 'Segoe UI', sans-serif;
  table-layout: auto;    /* 👈 columnas ajustables automáticamente */
}

#tablaDatos th,
#tablaDatos td {
  padding: 12px 18px;
  border: 1px solid #a4adb2;
  word-wrap: break-word;
  overflow-wrap: break-word;
  word-break: break-word;
  white-space: normal;
}

#tablaDatos th {
  background-color: #f0f0f0;
  color: #222;
  font-weight: bold;
  text-align: center;
  vertical-align: middle;
  height: 60px;
  line-height: 1.4em;
}

#tablaDatos td {
  background-color: #e3e9ec;
  color: #333;
  vertical-align: middle;
}

/* Enlaces dentro de celdas */
#tablaDatos td a {
  color: #215dbd;
  text-decoration: none;
  font-size: 0.9em;
}

#tablaDatos td a:hover {
  text-decoration: underline;
}

/* Anchos de columnas */
#tablaDatos th:nth-child(1),
#tablaDatos td:nth-child(1) {
  width: 20%; /* Perovskite */
}

#tablaDatos th:nth-child(2),
#tablaDatos td:nth-child(2),
#tablaDatos th:nth-child(3),
#tablaDatos td:nth-child(3),
#tablaDatos th:nth-child(4),
#tablaDatos td:nth-child(4) {
  width: 10%; /* TF, Globularity, Year */
}

#tablaDatos th:nth-child(5),
#tablaDatos td:nth-child(5) {
  padding-left: 10px;   /* 👈 menos padding lateral */
  padding-right: 10px;
  white-space: normal;
  word-wrap: break-word;
  overflow-wrap: break-word;
}

/* ================= MENSAJE DE ERROR ================= */
.errorTabla {
  background-color: #d3d9dd;
  border-radius: 8px;
  padding: 20px;
  box-shadow: 0 0 8px rgba(0, 0, 0, 0.1);
  font-family: 'Segoe UI', sans-serif;
  text-align: center;
}

/* ================= PAGINACIÓN ================= */
.pagination {
  display: flex;
  justify-content: stretch;
  align-items: center;
  gap: 8px;
  margin-top: 1rem;
  width: 100%;
  box-sizing: border-box;
}

.pagination button {
  flex: 1;                 /* 👈 cada botón ocupa el mismo ancho */
  background-color: #222;
  color: white;
  border: none;
  padding: 10px 0;         /* altura uniforme */
  font-size: 1rem;
  border-radius: 6px;
  cursor: pointer;
  transition: background-color 0.3s ease;
  min-width: 0;            /* 👈 evita que el texto empuje demasiado */
}

.pagination button:hover:not(:disabled) {
  background-color: #333;
}

.pagination button:disabled {
  background-color: #444;
  cursor: default;
}

.pagination .active {
  background-color: orange;
  color: black;
}



/* ================= FILTROS DE LA TABLA ================= */
#tablaDatos thead tr:last-child th {
  padding: 4px;
  vertical-align: middle;
}

.filter-input-wrapper {
  display: flex;
  justify-content: center;
  align-items: center;
  height: 100%;
  width: 100%;
}

#tablaDatos thead tr:last-child th input {
  -webkit-appearance: none;
  -moz-appearance: none;
  appearance: none;
  background-color: #e3e9ec;
  border: 1px solid #a4adb2;
  color: #333;
  border-radius: 4px;
  padding: 6px 8px;
  font-family: 'Segoe UI', sans-serif;
  font-size: 0.95em;
  width: 92%;
  box-sizing: border-box;
  text-align: left;
  transition: border-color 0.3s ease, box-shadow 0.3s ease;
}

#tablaDatos thead tr:last-child th input::placeholder {
  color: #777;
  opacity: 0.8;
}

#tablaDatos thead tr:last-child th input:focus {
  border-color: #215dbd;
  outline: none;
  box-shadow: 0 0 0 2px rgba(33, 93, 189, 0.2);
  background-color: #ffffff;
}
