/* ============================================================
   MediSearch — styles.css  (complete)
   ============================================================ */

/* ── Reset ── */
*, *::before, *::after { margin: 0; padding: 0; box-sizing: border-box; }

body {
  font-family: Georgia, 'Times New Roman', serif;
  background: #f7f7f5;
  color: #1a1a1a;
  font-size: 16px;
  line-height: 1.65;
  min-height: 100vh;
}

/* ══════════════════════════════════════
   HEADER
══════════════════════════════════════ */
header { background: #fff; border-bottom: 2px solid #1a1a1a; }

.header-inner {
  max-width: 820px;
  margin: 0 auto;
  padding: 0 1.5rem;
  height: 58px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
}

.logo { display: flex; align-items: center; gap: 8px; }


.logo-name { font-size: 1.05rem; letter-spacing: 0.02em; }

nav { display: flex; gap: 4px; }

.tab-btn {
  background: none; border: 1.5px solid #ccc; border-radius: 3px;
  padding: 5px 14px; font-size: 0.87rem; font-family: inherit;
  color: #555; cursor: pointer; transition: all 0.15s;
}
.tab-btn:hover  { border-color: #1a1a1a; color: #1a1a1a; }
.tab-btn.active { background: #1a1a1a; border-color: #1a1a1a; color: #fff; }

/* ══════════════════════════════════════
   LAYOUT
══════════════════════════════════════ */
main { max-width: 820px; margin: 0 auto; padding: 2rem 1.5rem 4rem; }
.tab-panel        { display: none; }
.tab-panel.active { display: block; }

.page-head { border-bottom: 1px solid #ddd; padding-bottom: 0.85rem; margin-bottom: 1.5rem; }
.page-head h1 { font-size: 1.5rem; font-weight: bold; margin-bottom: 0.2rem; }
.page-head p  { font-size: 0.92rem; color: #666; }

/* ── Inputs ── */
.text-input {
  width: 100%; padding: 8px 11px;
  border: 1.5px solid #ccc; border-radius: 3px;
  font-size: 0.93rem; font-family: inherit;
  background: #fff; color: #1a1a1a;
  outline: none; transition: border-color 0.15s;
}
.text-input:focus { border-color: #1a1a1a; }

/* ── Buttons ── */
.btn {
  background: #1a1a1a; color: #fff;
  border: none; border-radius: 3px;
  padding: 8px 20px; font-size: 0.93rem;
  font-family: inherit; font-weight: bold;
  cursor: pointer; white-space: nowrap; transition: background 0.15s;
}
.btn:hover:not(:disabled) { background: #444; }
.btn:disabled             { background: #bbb; cursor: not-allowed; }
.btn-block                { width: 100%; margin-top: 0.9rem; padding: 10px; }

.search-row             { display: flex; gap: 8px; margin-bottom: 0.75rem; }
.search-row .text-input { flex: 1; }

/* ── Chips ── */
.chips-row { display: flex; align-items: center; flex-wrap: wrap; gap: 5px; margin-bottom: 1.75rem; }
.chip-label { font-size: 0.8rem; color: #999; }
.chip {
  background: #fff; border: 1px solid #ccc; border-radius: 20px;
  padding: 2px 11px; font-size: 0.8rem; color: #555;
  cursor: pointer; font-family: inherit; transition: all 0.12s;
}
.chip:hover { background: #1a1a1a; color: #fff; border-color: #1a1a1a; }

/* ── Status ── */
.loader         { display: none; color: #888; font-size: 0.9rem; font-style: italic; padding: 1rem 0; }
.loader.show    { display: block; }
.error-msg      { display: none; background: #fff5f5; border: 1px solid #f5a0a0; border-radius: 3px; color: #b94a48; padding: 9px 13px; font-size: 0.9rem; margin-bottom: 1rem; }
.error-msg.show { display: block; }
.placeholder    { color: #bbb; font-size: 0.9rem; font-style: italic; padding: 2rem 0; text-align: center; }


/* ══════════════════════════════════════
   DISEASE CARDS — WHO ICD-11
══════════════════════════════════════ */
.results-info { font-size: 0.82rem; color: #999; margin-bottom: 1rem; }

.disease-card { background: #fff; border: 1px solid #ddd; border-radius: 4px; padding: 1.4rem; margin-bottom: 1.1rem; }
.d-name { font-size: 1.25rem; font-weight: bold; margin-bottom: 0.25rem; color: #111; }
.d-code { font-family: monospace; font-size: 0.76rem; color: #fff; background: #444; display: inline-block; padding: 2px 9px; border-radius: 3px; margin-bottom: 0.9rem; }
.d-section-label {
  font-size: 0.72rem; font-weight: bold; text-transform: uppercase;
  letter-spacing: 0.08em; color: #777;
  margin-top: 1rem; margin-bottom: 0.4rem;
  padding-bottom: 0.25rem; border-bottom: 1px solid #f0f0f0;
}
.d-text { font-size: 0.91rem; color: #333; line-height: 1.75; }
.d-synonyms { display: flex; flex-wrap: wrap; gap: 5px; margin-top: 0.25rem; }
.syn-tag { background: #f5f5f5; border: 1px solid #e8e8e8; border-radius: 20px; padding: 2px 10px; font-size: 0.78rem; color: #555; }

/* ── AI disease info section ── */
.ai-divider  { border-top: 1px dashed #ddd; margin: 1rem 0 0.75rem; }
.ai-list     { margin: 0.3rem 0 0.6rem 1.2rem; padding: 0; list-style: disc; }
.ai-list li  { font-size: 0.88rem; color: #333; line-height: 1.75; margin-bottom: 0.1rem; }
.ai-advice       { background: #fffbf0; border: 1px solid #f0d88a; border-radius: 4px;
                   padding: 0.75rem 1rem; font-size: 0.87rem; color: #555;
                   line-height: 1.7; margin-top: 1rem; }
.ai-complication { background: #fff5f5; border-left: 3px solid #e07070; border-radius: 3px;
                   padding: 0.6rem 0.85rem; margin-top: 0.2rem; font-size: 0.88rem; color: #444; line-height: 1.7; }

/* ── FDA drug section ── */
.fda-block { margin-top: 1.1rem; padding-top: 1rem; border-top: 1px dashed #ddd; }
.fda-heading { font-size: 0.74rem; font-weight: bold; text-transform: uppercase; letter-spacing: 0.07em; color: #888; margin-bottom: 0.7rem; }
.drug-card { background: #fdfdf5; border: 1px solid #e0da9a; border-radius: 3px; padding: 0.7rem 0.9rem; margin-bottom: 0.5rem; }
.drug-brand   { font-weight: bold; font-size: 0.9rem; margin-bottom: 0.1rem; }
.drug-generic { font-size: 0.78rem; color: #999; }
.drug-use     { font-size: 0.82rem; color: #555; margin-top: 0.3rem; line-height: 1.55; }
.fda-note     { font-size: 0.73rem; color: #bbb; margin-top: 0.45rem; }

/* ══════════════════════════════════════
   SYMPTOM CHECKER
══════════════════════════════════════ */
.sym-form { background: #fff; border: 1px solid #ddd; border-radius: 3px; padding: 1.25rem; margin-bottom: 1.5rem; }
.form-row-2 { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; margin-bottom: 0.85rem; }
.form-group           { margin-bottom: 0.85rem; }
.form-group label     { display: block; font-size: 0.8rem; font-weight: bold; margin-bottom: 5px; color: #555; }
.sym-count            { font-size: 0.82rem; color: #999; margin-bottom: 0.55rem; }
.sym-count strong     { color: #1a1a1a; }

.sym-input-row             { display: flex; gap: 8px; }
.sym-input-row .text-input { flex: 1; }

.sym-tags {
  display: flex; flex-wrap: wrap; gap: 6px;
  min-height: 38px; padding: 6px;
  background: #fafafa; border: 1px solid #e0e0e0;
  border-radius: 3px; margin-bottom: 0.75rem;
}
.sym-tag {
  background: #1a1a1a; color: #fff;
  border-radius: 20px; padding: 3px 10px;
  font-size: 0.82rem; display: flex; align-items: center; gap: 6px;
}
.sym-tag-remove { cursor: pointer; opacity: 0.6; font-size: 1rem; line-height: 1; }
.sym-tag-remove:hover { opacity: 1; }

/* ── Diagnosis results ── */
.dx-heading { font-size: 0.74rem; font-weight: bold; text-transform: uppercase; letter-spacing: 0.07em; color: #888; margin-bottom: 0.8rem; }
.dx-card { background: #fff; border: 1px solid #ddd; border-radius: 3px; padding: 0.9rem 1rem; margin-bottom: 0.6rem; }
.dx-left    { flex: 1; }
.dx-name    { font-weight: bold; font-size: 0.95rem; margin-bottom: 0.15rem; }
.dx-meta    { font-size: 0.78rem; color: #999; margin-bottom: 0.4rem; }

.btn-view { background: none; border: 1px solid #ccc; border-radius: 3px; padding: 3px 11px; font-size: 0.78rem; color: #555; cursor: pointer; font-family: inherit; transition: all 0.12s; }
.btn-view:hover { background: #1a1a1a; color: #fff; border-color: #1a1a1a; }
.dx-disclaimer  { font-size: 0.76rem; color: #bbb; text-align: center; margin-top: 1rem; line-height: 1.65; }

.dx-card-ai     { display: block; }
.dx-ai-text     { font-size: 0.85rem; color: #444; margin: 0.4rem 0; line-height: 1.6; }
.dx-ai-rec      { font-size: 0.83rem; color: #555; margin-top: 0.35rem; line-height: 1.55; }
.dx-ai-section  { font-size: 0.87rem; color: #333; margin-bottom: 0.6rem; line-height: 1.65; }

/* ══════════════════════════════════════
   FOOTER
══════════════════════════════════════ */
footer { border-top: 1px solid #ddd; padding: 1.5rem; text-align: center; font-size: 0.78rem; color: #bbb; line-height: 1.9; }
.footer-apis  { margin-top: 0.15rem; }
footer a      { color: #888; text-decoration: none; }
footer a:hover{ text-decoration: underline; }

/* ══════════════════════════════════════
   RESPONSIVE
══════════════════════════════════════ */
@media (max-width: 580px) {
  .search-row          { flex-direction: column; }
  .search-row .btn     { width: 100%; }
  .sym-input-row       { flex-direction: column; }
  .sym-input-row .btn  { width: 100%; }
  .form-row-2          { grid-template-columns: 1fr; }
  .header-inner        { flex-direction: column; height: auto; padding: 0.6rem 1rem; gap: 0.4rem; }
}