.drugs-header {
  margin-bottom: 1.5rem;
}

.drugs-header h1 {
  font-size: 1.8rem;
  font-weight: 600;
  color: var(--main-color);
}

/* Search bar */
.search-wrapper {
  max-width: 480px;
}

.search-wrapper .form-control {
  border-radius: 8px 0 0 8px;
  border: 1.5px solid var(--light-gray);
}

.search-wrapper .btn-search {
  border-radius: 0 8px 8px 0;
  background-color: var(--dark-gray);
  border: 1.5px solid var(--dark-gray);
  color: #fff;
}

.search-wrapper .btn-search:hover {
  background-color: var(--dusty-blue);
  border-color: var(--dusty-blue);
}

/* Drug card */
.drug-card {
  border-radius: 10px;
  overflow: hidden;
  box-shadow: 0 2px 8px rgb(0 0 0 / 0.1);
  background: #fff;
  display: flex;
  flex-direction: column;
  height: 100%;
}

.drug-card-header {
  background-color: #1c3156;
  color: #fff;
  padding: 0.75rem 1rem;
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 0.75rem;
}

.drug-header-main {
  display: flex;
  align-items: baseline;
  gap: 0.6rem;
  flex-wrap: wrap;
  min-width: 0;
}

.drug-name {
  font-size: 1.05rem;
  font-weight: 700;
  line-height: 1.3;
}

.db-id-badge {
  font-size: 0.72rem;
  font-weight: 600;
  background: rgb(255 255 255 / 0.15);
  border-radius: 4px;
  padding: 0.15rem 0.45rem;
  letter-spacing: 0.04em;
  white-space: nowrap;
  flex-shrink: 0;
}

.drugbank-link {
  font-size: 0.75rem;
  color: #a8c4e0;
  text-decoration: none;
  white-space: nowrap;
  flex-shrink: 0;
  padding-top: 0.1rem;
}

.drugbank-link:hover {
  color: #d0e6f8;
  text-decoration: underline;
}

.drug-card-body {
  padding: 1rem;
  flex: 1;
  display: flex;
  flex-direction: column;
  gap: 1rem;
}

/* Identifiers */
.section-label {
  font-size: 0.7rem;
  font-weight: 600;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--dark-gray);
  margin-bottom: 0.5rem;
}

.identifiers-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  grid-template-rows: auto auto;
  gap: 0.5rem;
}

.id-box {
  border: 1px solid #e0e0e0;
  border-radius: 6px;
  padding: 0.5rem 0.6rem;
  min-width: 0;
}

.id-box--wide {
  grid-column: 1 / -1;
}

.id-name {
  font-size: 0.62rem;
  font-weight: 600;
  letter-spacing: 0.05em;
  text-transform: uppercase;
  color: var(--extra-light-gray);
  display: block;
  margin-bottom: 0.2rem;
}

.id-value {
  font-size: 0.88rem;
  font-weight: 600;
  color: var(--main-color);
  word-break: break-all;
}

.inchi-value {
  font-size: 0.82rem;
  font-weight: 500;
  color: #1c3156;
  text-decoration: none;
  word-break: break-all;
}

.inchi-value:hover {
  text-decoration: underline;
}

/* Accession row */
.drug-info-row {
  display: flex;
  gap: 0.75rem;
  align-items: baseline;
  font-size: 0.82rem;
}

.di-label {
  font-size: 0.7rem;
  font-weight: 600;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--dark-gray);
  white-space: nowrap;
  flex-shrink: 0;
}

.di-value {
  color: var(--main-color);
}

/* Synonyms */
.synonyms-section {
  flex: 1;
}

.synonyms-pills {
  display: flex;
  flex-wrap: wrap;
  gap: 0.35rem;
}

.synonym-pill {
  display: inline-block;
  background: #f0f4fa;
  color: var(--main-color);
  font-size: 0.75rem;
  border-radius: 20px;
  padding: 0.2rem 0.65rem;
  line-height: 1.4;
}

.synonyms-wrap {
  position: relative;
}

.synonyms-wrap.collapsed .synonyms-pills {
  max-height: 4.5rem;
  overflow: hidden;
}

.synonyms-wrap.collapsed::after {
  content: '';
  position: absolute;
  bottom: 0;
  left: 0;
  right: 0;
  height: 1.5rem;
  background: linear-gradient(transparent, #fff);
  pointer-events: none;
}

.synonyms-wrap.expanded .synonyms-pills {
  max-height: none;
}

.synonyms-wrap.expanded::after {
  display: none;
}

.toggle-synonyms {
  background: none;
  border: none;
  padding: 0;
  font-size: 0.75rem;
  color: var(--dusty-blue);
  cursor: pointer;
  margin-top: 0.3rem;
}

.toggle-synonyms:hover {
  text-decoration: underline;
}

/* Results count */
.results-count {
  font-size: 0.85rem;
  color: var(--dark-gray);
}

/* Pagination */
.page-link {
  color: var(--dark-gray);
  border-color: #dee2e6;
}

.page-item.active .page-link {
  background-color: #1c3156;
  border-color: #1c3156;
  color: #fff;
}

.page-link:hover {
  color: #1c3156;
}

/* Empty state */
.empty-state {
  text-align: center;
  padding: 3rem;
  color: var(--extra-light-gray);
}

.empty-state i {
  font-size: 3rem;
  margin-bottom: 1rem;
  display: block;
}

/* Spinner */
.drugs-spinner {
  display: flex;
  justify-content: center;
  padding: 4rem;
}
