/* ---------- Search ---------- */
.search-wrap { position: relative; max-width: 600px; margin: 0 auto; }
.search-row  { display: flex; gap: 0.5rem; }

input[type="text"] {
  flex: 1;
  padding: 0.75rem 1rem;
  font-size: 1rem;
  border: 1px solid #d1d5db;
  border-radius: 8px;
  outline: none;
}
input[type="text"]:focus {
  border-color: #2563eb;
  box-shadow: 0 0 0 3px rgba(37,99,235,0.15);
}

button {
  padding: 0.75rem 1.5rem;
  background: #2563eb;
  color: white;
  border: none;
  border-radius: 8px;
  font-size: 1rem;
  cursor: pointer;
  font-weight: 500;
}
button:hover    { background: #1d4ed8; }
button:disabled { background: #93c5fd; cursor: not-allowed; }

/* ---------- Suggestions ---------- */
.suggestions {
  position: absolute;
  top: 100%;
  left: 0;
  right: 0;
  background: white;
  border: 1px solid #d1d5db;
  border-top: none;
  border-radius: 0 0 8px 8px;
  max-height: 300px;
  overflow-y: auto;
  z-index: 10;
  display: none;
}
.suggestions.open { display: block; }

.suggestion {
  padding: 0.6rem 1rem;
  cursor: pointer;
  border-bottom: 1px solid #f3f4f6;
}
.suggestion:last-child { border-bottom: none; }
.suggestion:hover,
.suggestion.active { background: #eff6ff; }
.suggestion .cui {
  color: #6b7280;
  font-size: 0.85rem;
  margin-left: 0.5rem;
}

/*--------- Intro block under search -------------*/
.intro {
  max-width: 975px;
  margin: 3rem auto 2rem;
  padding: 1.5rem 2rem;
  background: #ffffff;
  border: 1px solid #e5e7eb;
  border-radius: 8px;
  text-align: center;
  transition: opacity 0.15s;
}

.hidden {
  display: none;
}

.intro.hidden {
  display: none;
}

.intro-title {
  font-size: 1.75rem;
  font-weight: 700;
  color: #1f2937;
  margin: 0 0 1rem;
  line-height: 1.3;
}
 
.intro-text {
  font-size: 1rem;
  line-height: 1.7;
  color: #4b5563;
  margin: 0;
}

/* ---------- Status ---------- */
.status { text-align: center; margin: 2rem 0; color: #6b7280; }
.status.error { color: #dc2626; }

/* ----- TEMPORARY block to show what diseases are in database --- */
.home-diseases {
  max-width: 800px;
  margin: 2rem auto 1.5rem;
  padding: 0 1rem;
  text-align: center;
}

.disease-list-label {
  font-size: 0.85rem;
  color: #6b7280;
  margin: 0 0 0.75rem;
  text-transform: uppercase;
  letter-spacing: 0.04em;
}

.disease-list {
  list-style: none;
  padding: 0;
  margin: 0;
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 0.5rem;
}

.disease-chip {
  display: inline-block;
  padding: 0.4rem 0.9rem;
  background: #eff6ff;
  color: #1d4ed8;
  border: 1px solid #bfdbfe;
  border-radius: 999px;
  font-size: 0.9rem;
  font-weight: 500;
}

/* ------- homepage stats ----- */
.home-stats {
  max-width: 800px;
  margin: 2rem auto 0;
  padding: 0 1rem;
}

.stats-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(140px, 1fr));
  gap: 0.75rem;
}

.stat-card {
  background: #ffffff;
  border: 1px solid #e5e7eb;
  border-radius: 8px;
  padding: 0.9rem 0.5rem;
  text-align: center;
}

.stat-value {
  font-size: 1.4rem;
  font-weight: 700;
  color: #1f2937;
  line-height: 1.2;
}

.stat-label {
  font-size: 0.75rem;
  color: #6b7280;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  margin-top: 0.25rem;
}

/* ---------- Sections ---------- */ 
.section-title {
  display: flex;
  align-items: center;
  justify-content: space-between;   /* ← add this */
  font-size: 1.1rem;
  font-weight: 600;
  margin: 2rem 0 0.75rem;
  padding-bottom: 0.5rem;
  border-bottom: 2px solid #e5e7eb;
  gap: 0.5rem;
}

.section-title > span {
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

.section-link {
  font-size: 0.85rem;
  font-weight: 500;
  color: #1d4ed8;
  text-decoration: none;
  white-space: nowrap;
}

.section-link:hover {
  text-decoration: underline;
}

.badge {
  font-size: 0.75rem;
  padding: 0.15rem 0.5rem;
  border-radius: 999px;
  font-weight: 500;
}
.badge.unknown { background: #fef3c7; color: #92400e; }
.badge.known   { background: #dbeafe; color: #1e40af; }

/* ---------- Gene Grid ---------- */
.gene-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(220px, 1fr));
  gap: 0.6rem;
  margin-top: 0.5rem;
}
.gene-card {
  background: white;
  border: 1px solid #e5e7eb;
  border-radius: 8px;
  padding: 0.6rem 0.8rem;
  font-size: 0.9rem;
  transition: box-shadow 0.15s, border-color 0.15s;
}
.gene-card.unknown { border-left: 3px solid #f59e0b; }
.gene-card.known   { border-left: 3px solid #3b82f6; }

.gene-card a {
  color: #1d4ed8;
  text-decoration: none;
  font-weight: 500;
}
.gene-card a:hover { text-decoration: underline; }
.gene-card .name   { font-weight: 500; }
.gene-card .pred   { color: #6b7280; font-size: 0.8rem; margin-top: 0.2rem; }


.gene-table {
  width: 100%;
  border-collapse: collapse;
  margin-top: 0.5rem;
  font-size: 0.875rem;
  background: #ffffff;
  border: 1px solid #e5e7eb; 
  border-radius: 6px;
  overflow: hidden;
}

.gene-table thead th {
  text-align: left;
  padding: 0.6rem 0.75rem;
  background: #f3f4f6;
  color: #374151;
  font-weight: 600;
  font-size: 0.8rem;
  text-transform: uppercase;
  letter-spacing: 0.02em;
  border-bottom: 1px solid #e5e7eb;
  white-space: nowrap;
}

.gene-table thead th[title] {
  cursor: help;
  border-bottom: 1px dashed transparent;
}

.gene-table thead th[title]:hover {
  border-bottom-color: #9ca3af;
}

.gene-table tbody td {
  padding: 0.5rem 0.75rem;
  border-bottom: 1px solid #f3f4f6;
  color: #1f2937;
  vertical-align: top;
}

.gene-table tbody tr:last-child td {
  border-bottom: none;
}

.gene-table tbody tr:hover {
  background: #f9fafb;
}

.gene-table a {
  color: #1d4ed8;
  text-decoration: none;
  font-weight: 500;
}

.gene-table a:hover {
  text-decoration: underline;
}

/* Horizontal scroll on narrow screens */
.gene-table-wrap {
  overflow-x: auto;
}

.show-more-wrap {
  display: flex;
  justify-content: center;
  margin: 1.25rem 0 0.5rem;
}

.show-more-btn {
  padding: 0.6rem 1.25rem;
  background: #eff6ff;
  color: #1d4ed8;
  border: 1px solid #bfdbfe;
  border-radius: 6px;
  font-size: 0.9rem;
  font-weight: 500;
  cursor: pointer;
  transition: background 0.15s, border-color 0.15s;
}

.show-more-btn:hover:not(:disabled) {
  background: #dbeafe;
  border-color: #93c5fd;
}

.show-more-btn:disabled {
  opacity: 0.6;
  cursor: not-allowed;
}


@media (max-width: 600px) {
  .intro {
    margin: 2rem auto 1.5rem;
  }
  .intro-title {
    font-size: 1.25rem;
  }
  .intro-text {
    font-size: 0.95rem;
  }
}
