/* SPDX-FileCopyrightText: 2026 VTT Technical Research Centre of Finland Ltd
 * SPDX-License-Identifier: AGPL-3.0-or-later */
.handbook-search { display: flex; flex-wrap: wrap; gap: .7rem; margin: 1.5rem 0; }
.handbook-search label { width: 100%; }
.handbook-search input { min-width: 8rem; flex: 1; padding: .7rem; font: inherit; color: var(--color-foreground-primary); background: var(--color-background-primary); border: 1px solid var(--color-foreground-primary); }
.handbook-search button { padding: .7rem 1rem; font: inherit; color: var(--openpfc-paper); background: var(--openpfc-tide); border: 1px solid var(--color-foreground-primary); cursor: pointer; }

/* Preserve readable row labels when a wide scientific table scrolls on phones. */
.table-wrapper table th:first-child,
.table-wrapper table td:first-child {
  min-width: 8ch;
}

/* Mermaid's default grey edge labels miss text contrast in the dark theme. */
.mermaid .edgeLabel,
.mermaid .edgeLabel .labelBkg,
.mermaid .edgeLabel p {
  color: var(--color-foreground-primary) !important;
  background-color: var(--color-background-primary) !important;
}

/* Fullscreen diagrams open at readable size, with explicit keyboard controls. */
.mermaid-container-fullscreen {
  display: block !important;
  background: var(--color-background-primary) !important;
}
.mermaid-container-fullscreen pre.mermaid {
  display: block !important;
  width: max-content !important;
  min-width: 100%;
  height: auto !important;
  margin: 0 !important;
  padding: 0 !important;
}
.mermaid-fullscreen-tools {
  position: fixed;
  top: 1rem;
  left: 1rem;
  display: flex;
  gap: .4rem;
  z-index: 10000;
}
.mermaid-fullscreen-tools button {
  padding: .5rem .65rem;
  font: inherit;
  color: var(--color-foreground-primary);
  background: var(--color-background-primary);
  border: 1px solid var(--color-foreground-primary);
  cursor: pointer;
}
