/* app.css — custom overrides to vendored Pico CSS 2.1.1.
 * Owns: SMILES cell wrap, source badge, copy button, taxon subheader,
 * miss-state banners, /misses sticky header.
 * Do NOT add inline <style> tags in templates; extend this file.
 */

:root {
  --nes-warning-bg: #fff3cd;
  --nes-warning-border: #ffc107;
  --nes-info-bg: #cfe2ff;
  --nes-info-border: #0172ad;
  --nes-miss-bg: #f8d7da;
  --nes-miss-border: #dc3545;
}

@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) {
    --nes-warning-bg: #4a3800;
    --nes-warning-border: #e6ac00;
    --nes-info-bg: #002a6e;
    --nes-info-border: #01aaff;
    --nes-miss-bg: #4a0010;
    --nes-miss-border: #e85563;
  }
}

[data-theme="dark"] {
  --nes-warning-bg: #4a3800;
  --nes-warning-border: #e6ac00;
  --nes-info-bg: #002a6e;
  --nes-info-border: #01aaff;
  --nes-miss-bg: #4a0010;
  --nes-miss-border: #e85563;
}

/* UI-SPEC §3 — SMILES cell (APP-06, D-TABLE-4) */
.smiles-cell {
  font-family: var(--pico-font-family-monospace);
  word-break: break-all;
  overflow-wrap: anywhere;
}

/* UI-SPEC §4 — Source badge (D-TABLE-2) */
.source-badge {
  font-size: 0.875rem;
  letter-spacing: -0.05em;
  white-space: nowrap;
  text-align: center;
  width: 2.5rem;
}

/* UI-SPEC §5 — Copy button (APP-05, D-TABLE-5) */
.copy-btn {
  font-size: 0.875rem;
  padding: 0.125rem 0.5rem;
  min-height: 44px;
  margin-left: 0.5rem;
  cursor: pointer;
}

/* UI-SPEC §7 — Multi-species grouped sub-header (D-TABLE-1) */
.taxon-subheader th {
  background: var(--pico-card-background-color);
  font-style: italic;
  font-weight: 700;
  padding-top: 1rem;
}

/* UI-SPEC §8 — Ambiguity / miss banners (D-TABLE-3, D-MISS-1..4) */
.banner {
  border-left: 4px solid;
  padding: 0.75rem 1rem;
  margin-bottom: 1rem;
}
.banner--warning {
  background: var(--nes-warning-bg);
  border-color: var(--nes-warning-border);
}
.banner--info {
  background: var(--nes-info-bg);
  border-color: var(--nes-info-border);
}
.banner--miss {
  background: var(--nes-miss-bg);
  border-color: var(--nes-miss-border);
}

/* UI-SPEC §12 — /misses sticky header (APP-12) */
.misses-table thead th {
  position: sticky;
  top: 0;
  background: var(--pico-background-color);
  z-index: 1;
}
