body {
  font-family: sans-serif;
  padding: 2rem;
}

table {
  border-collapse: collapse;
  width: 75%;
  margin: 0 auto;
  border: 1px solid #ccc;
}

th, td {
  border: 1px solid #ccc;
  padding: 8px;
  text-align: left;
}

tr {
  transition: background-color 0.2s ease-in-out;
}

tbody tr:hover {
  background-color: #e6f4ff;
  cursor: pointer;
}

tbody {
  display: block;
  max-height: 400px;
  overflow-y: auto;
  border-right: 1px solid #ccc;
  border-bottom: 1px solid #ccc;
}

thead, tbody tr {
  display: table;
  width: 100%;
  table-layout: fixed;
}

#filterMenu {
  width: 75%;
  margin: 0 auto 1.5rem auto;
  padding: 1rem;
  border: 1px solid #ccc;
  border-radius: 6px;
  background-color: #f9f9f9;
}

#filterMenu label {
  font-weight: bold;
  margin-right: 0.5rem;
}

.fieldSelect, #tableSelect, #inputContainer input, #inputContainer select {
  padding: 0.4rem;
  margin: 0.5rem 0;
  font-size: 1rem;
  width: 100%;
  box-sizing: border-box;
}
#inputContainer > div {
  margin-top: 0.75rem;
  border: 1px solid #e0e0e0;
  border-radius: 4px;
  padding: 0.75rem;
  background-color: #fafbfc;
}

#rangeSearch label {
  display: inline-block;
  margin-right: 0.5rem;
}

#rangeSearch input {
  width: calc(50% - 0.5rem);
  display: inline-block;
  margin-right: 1rem;
}

#dropdownSearch select {
  width: 100%;
}

#searchButtonContainer {
  width: 75%;
  margin-top: 1.5rem;
  margin-left: 0;
  text-align: left;
  display: flex;
  justify-content: space-between;
  align-items: center;
}

#searchButton, #clearButton {
  background-color: #007acc;
  color: white;
  padding: 0.6rem 1.2rem;
  font-size: 1rem;
  border: none;
  border-radius: 4px;
  cursor: pointer;
  transition: background-color 0.3s ease;
  margin-right: 0.5rem;
}

#searchButton:hover, #clearButton:hover {
  background-color: #005fa3;
}

#searchButton {
  margin-right: auto;
}

#clearButton {
  margin-left: auto;
  margin-right: 0;
}

#associatedParents, #associatedChildren {
    margin-top: 10px;
}

textarea {
  width: 100%;
  height: 100px;
  margin-bottom: 1rem;
  padding: 0.75rem;
  font-size: 1rem;
  box-sizing: border-box;
  border: 1px solid #ccc;
  border-radius: 4px;
  resize: vertical;
}

form {
  width: 75%;
  margin: 0 auto;
}

button[type="submit"] {
  background-color: #007acc;
  color: white;
  padding: 0.6rem 1.2rem;
  font-size: 1rem;
  border: none;
  border-radius: 4px;
  cursor: pointer;
  transition: background-color 0.3s ease;
}

button[type="submit"]:hover {
  background-color: #005fa3;
}

#results {
  width: 100%;
  max-width: none;
  margin: 2rem auto;
  /* overflow: auto; */
  /* height: 500px; */
  display: block;
  max-height: 500px;
  overflow-y: auto;
  position: relative;
}


#results table {
  border-collapse: collapse;
  table-layout: auto;
  width: auto;
}


button {
  background-color: #007acc;
  color: white;
  padding: 0.6rem 1.2rem;
  font-size: 1rem;
  border: none;
  border-radius: 4px;
  cursor: pointer;
  transition: background-color 0.3s ease;
  margin-right: 0.5rem;
}

button:hover {
  background-color: #005fa3;
}

#dbBadge {
    margin-left:8px; 
    padding:2px 6px; 
    border:1px solid #007acc; 
    border-radius:4px; 
    font-size:15px;
    font-weight: bold;
    text-transform: capitalize;
}

@media (max-width: 1400px) {
  .table-wrapper {
    width: 100%;
    overflow-x: auto;
  }
}

#results thead th {
  position: sticky;
  top: 0;
  background-color: white;
  z-index: 10;
}

/* Truncate cell content with ellipses */
#results th,
#results td {
  max-width: 200px;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}