/* Diagnosis List Styles */
#dx-rail {
  position: fixed;
  top: 0;
  left: 0;
  width: 250px;
  height: 100vh;
  background: var(--panel);
  border-right: 1px solid var(--border);
  display: flex;
  flex-direction: column;
  z-index: 100;
}

.dx-list-header {
  padding: 1rem;
  border-bottom: 1px solid var(--border);
  background: var(--panel);
  position: sticky;
  top: 0;
  z-index: 1;
}

/* Searchbar */
.searchbar {
  width: 100%;
}

.search-container {
  position: relative;
}

#search {
  width: 100%;
  padding: 0.75rem 1rem;
  border: 1px solid var(--border);
  border-radius: 0.5rem;
  background: rgba(255, 255, 255, 0.05);
  color: inherit;
  font: inherit;
}

.search-results {
  position: absolute;
  top: 100%;
  left: 0;
  right: 0;
  background: var(--panel);
  border: 1px solid var(--border);
  border-radius: 0.5rem;
  margin-top: 0.5rem;
  max-height: 300px;
  overflow-y: auto;
  display: none;
}

.search-results.active {
  display: block;
}

/* Diagnosis List */
.dx-list {
  flex: 1;
  overflow-y: auto;
  padding: 1rem;
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
}

.dx-item {
  padding: 0.75rem 1rem;
  border-radius: 0.5rem;
  background: rgba(255, 255, 255, 0.05);
  cursor: pointer;
  transition: all 0.2s ease;
}

.dx-item:hover {
  background: var(--panel-hover);
  transform: translateY(-1px);
}

.dx-item.active {
  background: var(--accent);
  color: white;
}

.dx-name {
  font-size: 0.9rem;
  font-weight: 500;
}

/* Lab References Styles - Enhanced for Scrollable Container */
#tbl-labs {
  width: 100%;
  border-collapse: collapse;
  table-layout: fixed;
}

#tbl-labs td {
  padding: 0.75rem 0.5rem;
  border-bottom: 1px solid var(--border);
  vertical-align: top;
  word-wrap: break-word;
}

#tbl-labs tr:hover {
  background: rgba(220, 38, 38, 0.05);
  transition: background-color 0.2s ease;
}

#tbl-labs td:first-child {
  font-weight: 500;
  width: 40%;
  color: var(--cardio-primary);
}

#tbl-labs td:nth-child(2) {
  width: 30%;
  font-weight: 500;
}

#tbl-labs td:last-child {
  font-size: 0.85rem;
  color: var(--muted);
  width: 30%;
  line-height: 1.3;
}

.lab-value {
  width: 100%;
  padding: 0.25rem 0.5rem;
  border: 1px solid var(--border);
  border-radius: 0.25rem;
  background: transparent;
  color: inherit;
  font: inherit;
}
