/* SPDX-License-Identifier: Apache-2.0 */
/* Lab Ontology Hub - layout sizing + content styles.
 * Structural sizing only for the shell; content uses a small themed palette
 * that adapts to light/dark (data-theme on <html>). Colors here are content
 * presentation, not Webix control chrome. */
html, body, #app { height: 100%; margin: 0; padding: 0; }

.loh-header .webix_el_label { font-size: 15px; }

/* Larger, more readable sidebar labels. */
.webix_sidebar .webix_list_item,
.webix_sidebar .webix_tree_item,
.webix_sidebar_dir_item,
.webix_sidebar_item { font-size: 15px; }

:root {
  --loh-fg: #20302a;
  --loh-muted: #6b7d72;
  --loh-accent: #2f7d4f;
  --loh-accent-soft: #e7f2ea;
  --loh-card: #ffffff;
  --loh-border: #d8e4dc;
  --loh-note: #eef6f0;
  --loh-wish-bg: #f7eccf;
  --loh-wish-fg: #8a5a00;
  --loh-shadow: 0 1px 2px rgba(20,40,30,.06), 0 4px 12px rgba(20,40,30,.05);
}
html[data-theme="dark"] {
  --loh-fg: #e2ece4;
  --loh-muted: #9bafa1;
  --loh-accent: #84cf90;
  --loh-accent-soft: #1f2c23;
  --loh-card: #1a241e;
  --loh-border: #2c3a31;
  --loh-note: #1d2a22;
  --loh-wish-bg: #352c15;
  --loh-wish-fg: #d8b269;
  --loh-shadow: none;
}

/* page host fills the scrollview; the page itself is a readable column */
.loh-page-host { height: auto; }
.loh-page {
  max-width: 1000px;
  padding: 26px 34px 60px;
  color: var(--loh-fg);
  font-size: 14.5px;
  line-height: 1.62;
}
.loh-h2 {
  margin: 4px 0 6px;
  font-size: 26px;
  font-weight: 700;
  letter-spacing: -.01em;
  color: var(--loh-fg);
}
.loh-h3 {
  margin: 30px 0 8px;
  font-size: 17px;
  font-weight: 700;
  color: var(--loh-fg);
}
.loh-lead {
  margin: 0 0 14px;
  font-size: 17px;
  line-height: 1.55;
  color: var(--loh-muted);
}
.loh-p { margin: 0 0 12px; }
.loh-muted { color: var(--loh-muted); }
.loh-hr { border: 0; border-top: 1px solid var(--loh-border); margin: 26px 0; }

.loh-ul, .loh-ol { margin: 6px 0 14px; padding-left: 22px; }
.loh-ul li, .loh-ol li { margin: 4px 0; }

.loh-note {
  margin: 14px 0;
  padding: 12px 16px;
  background: var(--loh-note);
  border-left: 4px solid var(--loh-accent);
  border-radius: 6px;
}
.loh-note-i { margin-right: 4px; }

/* KPI tiles */
.loh-kpis { display: flex; flex-wrap: wrap; gap: 14px; margin: 16px 0 8px; }
.loh-kpi {
  flex: 1 1 130px;
  min-width: 120px;
  padding: 16px 18px;
  background: var(--loh-card);
  border: 1px solid var(--loh-border);
  border-radius: 12px;
  box-shadow: var(--loh-shadow);
}
.loh-kpi-v { font-size: 26px; font-weight: 700; color: var(--loh-accent); line-height: 1.1; }
.loh-kpi-l { margin-top: 4px; font-size: 12.5px; color: var(--loh-muted); }

/* cards grid */
.loh-cards { display: grid; grid-template-columns: repeat(auto-fit, minmax(220px, 1fr)); gap: 16px; margin: 16px 0; }
.loh-card {
  padding: 18px 18px 16px;
  background: var(--loh-card);
  border: 1px solid var(--loh-border);
  border-radius: 12px;
  box-shadow: var(--loh-shadow);
}
.loh-card-i { font-size: 26px; line-height: 1; margin-bottom: 8px; }
.loh-card-t { font-weight: 700; margin-bottom: 4px; }
.loh-card-x { color: var(--loh-muted); font-size: 13.5px; }
.loh-card-nav { cursor: pointer; transition: border-color .12s, box-shadow .12s, transform .12s; }
.loh-card-nav:hover { border-color: var(--loh-accent); box-shadow: 0 2px 4px rgba(20,40,30,.08), 0 8px 20px rgba(20,40,30,.10); transform: translateY(-3px); }
.loh-card-go { margin-top: 10px; color: var(--loh-accent); font-weight: 700; font-size: 13px; }

/* numbered steps */
.loh-steps { margin: 14px 0; }
.loh-step { display: flex; gap: 14px; padding: 10px 0; border-bottom: 1px solid var(--loh-border); }
.loh-step:last-child { border-bottom: 0; }
.loh-step-n {
  flex: 0 0 28px; height: 28px; width: 28px;
  display: flex; align-items: center; justify-content: center;
  background: var(--loh-accent); color: #fff; border-radius: 50%;
  font-weight: 700; font-size: 14px;
}
.loh-step-x { padding-top: 2px; }

/* stepper (flow cards with arrows) */
.loh-stepper { display: flex; gap: 10px; margin: 16px 0; }
.loh-stepper-col { flex-direction: column; align-items: center; }
.loh-stepper-row { flex-direction: row; flex-wrap: wrap; align-items: stretch; }
.loh-scard {
  width: 100%; max-width: 660px;
  padding: 14px 16px;
  background: var(--loh-card);
  border: 1px solid var(--loh-border);
  border-radius: 12px;
  box-shadow: var(--loh-shadow);
}
.loh-stepper-row .loh-scard { flex: 1 1 200px; width: auto; }
.loh-scard-head { display: flex; align-items: center; gap: 8px; margin-bottom: 4px; }
.loh-scard-n { flex: 0 0 24px; width: 24px; height: 24px; display: inline-flex; align-items: center; justify-content: center; background: var(--loh-accent); color: #fff; border-radius: 50%; font-weight: 700; font-size: 13px; }
.loh-scard-i { font-size: 20px; }
.loh-scard-t { font-weight: 700; }
.loh-scard-x { color: var(--loh-muted); font-size: 13.5px; }
.loh-scard-nav { cursor: pointer; transition: border-color .12s, box-shadow .12s, transform .12s; }
.loh-scard-nav:hover { border-color: var(--loh-accent); box-shadow: 0 2px 4px rgba(20,40,30,.08), 0 8px 20px rgba(20,40,30,.10); transform: translateY(-3px); }
.loh-scard-go { margin-left: auto; color: var(--loh-accent); font-weight: 700; font-size: 13px; white-space: nowrap; }
.loh-step-arrow { color: var(--loh-accent); font-size: 22px; font-weight: 700; text-align: center; line-height: 1; }

/* tables */
.loh-table { width: 100%; border-collapse: collapse; margin: 14px 0; font-size: 13.5px; }
.loh-table th, .loh-table td { text-align: left; padding: 8px 12px; border-bottom: 1px solid var(--loh-border); }
.loh-table th { color: var(--loh-muted); font-weight: 700; background: var(--loh-accent-soft); }
.loh-table tr:hover td { background: var(--loh-accent-soft); }

/* catalog tables: one shared column geometry across every category table */
.loh-table-cat { table-layout: fixed; }
.loh-table-cat col.loh-col-status { width: 132px; }
.loh-table-cat col.loh-col-since { width: 88px; }
.loh-table-cat th, .loh-table-cat td { vertical-align: middle; }
.loh-table-cat td:first-child { overflow-wrap: anywhere; }

/* status pill (Integrated / Wishlist) */
.loh-pill { display: inline-block; padding: 2px 11px; border-radius: 999px; font-size: 12px; font-weight: 700; background: var(--loh-border); color: var(--loh-muted); }
.loh-pill-on { background: var(--loh-accent-soft); color: var(--loh-accent); }
.loh-pill-wish { background: var(--loh-wish-bg); color: var(--loh-wish-fg); }

/* catalog vote column (up / down thumbs on wishlist rows, "done" on integrated) */
.loh-table-vote col.loh-col-votes { width: 150px; }
.loh-vcell { white-space: nowrap; }
.loh-vote { cursor: pointer; display: inline-block; vertical-align: middle; color: var(--loh-muted); transition: color .12s; }
.loh-vote .webix_icon { font-size: 18px; vertical-align: middle; background: transparent; }
.loh-vote:hover { color: var(--loh-fg); }
.loh-vup.loh-von { color: var(--loh-accent); }
.loh-vdown.loh-von { color: #c0392b; }
.loh-vcnt { display: inline-block; min-width: 16px; margin: 0 12px 0 4px; text-align: left; color: var(--loh-muted); vertical-align: middle; font-size: 13px; }
.loh-vdone { color: var(--loh-accent); font-size: 18px; vertical-align: middle; background: transparent; }
.loh-vote-hint { margin: 6px 0 12px; font-size: 13px; }

/* in-page navigation button */
.loh-navlink {
  display: inline-block;
  margin: 6px 0 14px;
  padding: 10px 18px;
  background: var(--loh-accent);
  color: #fff;
  border-radius: 10px;
  text-decoration: none;
  font-weight: 700;
  cursor: pointer;
}
.loh-navlink:hover { filter: brightness(1.05); }

/* code block */
.loh-code {
  margin: 12px 0;
  padding: 14px 16px;
  background: var(--loh-accent-soft);
  border: 1px solid var(--loh-border);
  border-radius: 10px;
  font-family: ui-monospace, "Cascadia Code", Consolas, monospace;
  font-size: 12.5px;
  line-height: 1.5;
  white-space: pre;
  overflow-x: auto;
}

/* download / link tiles */
.loh-links { display: grid; grid-template-columns: repeat(auto-fit, minmax(240px, 1fr)); gap: 12px; margin: 14px 0; }
.loh-dl {
  display: flex; align-items: center; gap: 12px;
  padding: 14px 16px;
  background: var(--loh-card);
  border: 1px solid var(--loh-border);
  border-radius: 12px;
  box-shadow: var(--loh-shadow);
  text-decoration: none;
  color: var(--loh-fg);
}
.loh-dl:hover { border-color: var(--loh-accent); }
.loh-dl-i { font-size: 22px; }
.loh-dl-b { display: flex; flex-direction: column; }
.loh-dl-n { color: var(--loh-muted); font-size: 12.5px; }

/* screenshot gallery */
.loh-gallery { display: grid; grid-template-columns: repeat(auto-fill, minmax(200px, 1fr)); gap: 12px; margin: 12px 0; }
.loh-shot { display: block; width: 100%; height: auto; border: 1px solid var(--loh-border); border-radius: 10px; box-shadow: var(--loh-shadow); cursor: zoom-in; }
.loh-shot:hover { border-color: var(--loh-accent); }

/* image lightbox (maximized view) */
.loh-lightbox {
  position: fixed; inset: 0; z-index: 11000; display: none;
  align-items: center; justify-content: center;
  background: rgba(10, 20, 15, .82); padding: 24px;
}
.loh-lb-img { max-width: 94vw; max-height: 90vh; border-radius: 8px; box-shadow: 0 12px 48px rgba(0, 0, 0, .5); background: #fff; }
.loh-lb-close {
  position: absolute; top: 14px; right: 18px; width: 42px; height: 42px;
  display: flex; align-items: center; justify-content: center;
  color: #fff; font-size: 30px; line-height: 1; cursor: pointer;
  border-radius: 50%; background: rgba(255, 255, 255, .14);
}
.loh-lb-close:hover { background: rgba(255, 255, 255, .28); }

/* mermaid host */
.loh-mermaid {
  margin: 18px 0;
  padding: 16px;
  background: var(--loh-card);
  border: 1px solid var(--loh-border);
  border-radius: 12px;
  box-shadow: var(--loh-shadow);
  overflow-x: auto;
  text-align: center;
  color: var(--loh-muted);
}
.loh-mermaid svg { max-width: 100%; height: auto; cursor: default; }
.loh-mermaid .node.clickable, .loh-mermaid .nodes .clickable { cursor: pointer; }
