/* === Scroll + alineación derecha para la tabla LINAME === */

/* Evita que el ítem de la grilla expanda el ancho y se salga del contenedor */
.top-grid>.card {
  min-width: 0;
}

#dispCard {
  min-width: 0;
}

/* Contenedor con scroll en ambos ejes */
#tablaDispWrap {
  overflow: auto;
  /* horizontal y vertical */
  max-height: clamp(220px, 28vh, 340px);
  /* alto máximo con scroll */
  /* alto máximo con scroll */
  border: 1px solid var(--card-border);
  border-radius: 10px;
  background: #16202a;
}

/* Scroll horizontal sin romper el layout */
#tablaDisp {
  width: max(1100px, 100%);
  table-layout: fixed;
  /* celdas de ancho estable */
  border-collapse: separate;
  border-spacing: 0;
}

/* Recorte de contenido largo dentro de celdas */
#tablaDisp th,
#tablaDisp td {
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

#tablaDisp th:nth-child(1),
#tablaDisp td:nth-child(1) {
  width: 9ch;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

/* Anchos finos para la tabla #tablaDisp */
#tablaDisp {
  table-layout: fixed;
}

/* Columna 2: N° de Registro Sanitario */
#tablaDisp th:nth-child(2),
#tablaDisp td:nth-child(2) {
  width: 15ch;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

/* Columna 3: Empresa */
#tablaDisp th:nth-child(3),
#tablaDisp td:nth-child(3) {
  width: 42ch;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

/* Columna 4: Nombre Comercial */
#tablaDisp th:nth-child(4),
#tablaDisp td:nth-child(4) {
  width: 32ch;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

/* Columna 5: Nombre Genérico */
#tablaDisp th:nth-child(5),
#tablaDisp td:nth-child(5) {
  width: 20ch;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

/* Columna 6: Forma Farmacéutica */
#tablaDisp th:nth-child(6),
#tablaDisp td:nth-child(6) {
  width: 16ch;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

/* Columna 7: Concentración */
#tablaDisp th:nth-child(7),
#tablaDisp td:nth-child(7) {
  width: 15ch;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

/* Columna 8: Presentación/Envase */
#tablaDisp th:nth-child(8),
#tablaDisp td:nth-child(8) {
  width: 150ch;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

/* Columna 8: Código LINAME */
#tablaDisp th:nth-child(9),
#tablaDisp td:nth-child(9) {
  width: 16ch;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}