/* TrypsnetDB2 – main stylesheet */

:root {
  --teal:    #1a7f7a;
  --teal-dk: #145f5b;
  --gold:    #e8a020;
  --bg:      #f8fafb;
  --text:    #1e2328;
  --muted:   #6c757d;
  --border:  #dee2e6;
}

body { background: var(--bg); color: var(--text); font-family: 'Segoe UI', system-ui, sans-serif; }

/* Navbar */
.navbar { background: var(--teal) !important; }
.navbar-brand { font-weight: 700; font-size: 1.4rem; letter-spacing: .5px; color: #fff !important; }
.navbar-brand span { color: var(--gold); }
.nav-link { color: rgba(255,255,255,.85) !important; }
.nav-link:hover, .nav-link.active { color: #fff !important; }

/* Hero */
.hero { background: linear-gradient(135deg, var(--teal) 0%, #0d4a47 100%);
        color: #fff; padding: 64px 0 48px; }
.hero h1 { font-size: 2.4rem; font-weight: 700; }
.hero p  { font-size: 1.1rem; opacity: .88; max-width: 580px; }

/* Search box (multi-gene) */
.search-wrap { max-width: 660px; margin: 30px auto 0; position: relative; }
.multi-search-box { position: relative; background: #fff; border-radius: 14px;
    box-shadow: 0 8px 30px rgba(0,0,0,.20); padding: 12px 12px 6px; }
.multi-search-box textarea.form-control {
    font-size: 1.02rem; border: none; border-radius: 9px; padding: 12px 14px;
    resize: vertical; min-height: 130px; line-height: 1.55; box-shadow: none;
    font-family: 'Segoe UI', system-ui, sans-serif; color: var(--text); }
.multi-search-box textarea.form-control:focus { box-shadow: none; outline: 2px solid var(--teal); }
.multi-search-box textarea.form-control::placeholder { color: #9aa4ab; }
.search-actions { display: flex; align-items: center; justify-content: space-between;
    gap: 12px; padding: 8px 6px 4px; }
.search-hint { font-size: .8rem; color: var(--muted); text-align: left; }
.search-wrap .btn-search { background: var(--gold); color: #fff; border: none;
    border-radius: 9px; padding: 9px 30px; font-size: 1rem; font-weight: 600; white-space: nowrap; }
.search-wrap .btn-search:hover { background: #c98a18; }
/* autocomplete drops below the whole box */
.search-wrap #autocomplete { position: absolute; top: 100%; left: 0; right: 0;
    margin-top: 6px; z-index: 40; max-height: 280px; overflow-y: auto; text-align: left; }
/* example chips */
.examples { margin-top: 16px; font-size: .9rem; color: rgba(255,255,255,.8); text-align: center; }
.ex-chip { display: inline-block; background: rgba(255,255,255,.14); color: #fff !important;
    text-decoration: none; border: 1px solid rgba(255,255,255,.35); border-radius: 20px;
    padding: 3px 13px; margin: 3px; font-size: .83rem; cursor: pointer; transition: background .15s; }
.ex-chip:hover { background: rgba(255,255,255,.30); }
.ex-complex { background: var(--gold); border-color: var(--gold); font-weight: 600; }
.ex-complex:hover { background: #c98a18; }

/* Cards */
.card { border: 1px solid var(--border); border-radius: 10px; }
.card-header { background: #f1f5f6; font-weight: 600; border-bottom: 1px solid var(--border); }
.stat-card { text-align: center; padding: 28px 16px; }
.stat-card .num { font-size: 2rem; font-weight: 700; color: var(--teal); }
.stat-card .lbl { font-size: .85rem; color: var(--muted); text-transform: uppercase; letter-spacing: .5px; }

/* Badges */
.badge-og6  { background:#2563eb; color:#fff; }
.badge-og7  { background:#7c3aed; color:#fff; }
.badge-both { background:#059669; color:#fff; }
.badge-exp  { background: var(--gold); color:#fff; }
.badge-prim { background:#dc2626; color:#fff; }
.badge-sec  { background:#0891b2; color:#fff; }

/* Network container */
#cy { width: 100%; height: 560px; background: #fff;
      border: 1px solid var(--border); border-radius: 8px; }

/* Tables */
.datatable-wrap { overflow-x: auto; }
table.dataTable thead th { background: #f1f5f6; font-weight: 600; }
table.dataTable tbody tr:hover { background: #f0faf9; }

/* Organism list */
.org-card { cursor: pointer; transition: box-shadow .15s; }
.org-card:hover { box-shadow: 0 4px 16px rgba(0,0,0,.12); }
.org-badge { display: inline-block; padding: 2px 10px; border-radius: 20px;
             font-size: .78rem; font-weight: 600; }
.genus-trypanosoma { background: #dbeafe; color: #1e40af; }
.genus-leishmania  { background: #dcfce7; color: #166534; }
.genus-other       { background: #fef3c7; color: #92400e; }

/* Gene detail */
.gene-header { background: linear-gradient(90deg, var(--teal), #1a9a94);
               color:#fff; border-radius:10px; padding:28px 32px; margin-bottom:24px; }
.gene-header h2 { font-size:1.7rem; font-weight:700; margin:0 0 6px; }

/* Network node tooltip (multi-gene view) */
#cyTip { position: absolute; z-index: 1080; max-width: 300px; display: none;
    background: #1e2328; color: #fff; border-radius: 8px; padding: 9px 12px;
    font-size: .82rem; line-height: 1.4; box-shadow: 0 6px 20px rgba(0,0,0,.35);
    pointer-events: none; }
#cyTip.pinned { pointer-events: auto; }
#cyTip .tip-id { font-weight: 700; font-family: monospace; font-size: .86rem; }
#cyTip .tip-desc { margin-top: 3px; color: #e8edf0; }
#cyTip .tip-org  { margin-top: 3px; color: #9fb0b8; font-style: italic; font-size: .76rem; }
#cyTip .tip-link { display: inline-block; margin-top: 6px; color: var(--gold);
    text-decoration: none; font-size: .78rem; font-weight: 600; }
#cyTip .tip-link:hover { text-decoration: underline; }
#cyTip .tip-close { float: right; margin-left: 10px; color: #9fb0b8; cursor: pointer;
    font-weight: 700; line-height: 1; }
/* highlighted interaction row when its node is hovered/clicked in the graph */
tr.row-hl td { background: #fff3cd !important; transition: background .1s; }

/* Footer */
footer { background: #1e2328; color: rgba(255,255,255,.65);
         padding: 32px 0; margin-top: 64px; font-size:.9rem; }
footer a { color: rgba(255,255,255,.8); }
