/* SPDX-FileCopyrightText: Copyright (c) 2026 NVIDIA CORPORATION & AFFILIATES. All rights reserved. */
/* SPDX-License-Identifier: Apache-2.0 */
/* Interactive USD BRep meshes (docs/viewer/brep_mesh.py). Colors follow the docs theme, light and dark. */
.brep-mesh {
  --brep-view: var(--pst-color-surface, #f3f4f5);
  --brep-edge: var(--pst-color-text-base, #1f2328);
  --brep-pick: var(--pst-color-primary, #76b900);
  margin: 1rem 0 1.5rem;
  border: 1px solid var(--pst-color-border, #d1d9e0);
  border-radius: 0.5rem;
  overflow: hidden;
}
.brep-mesh canvas { display: block; width: 100%; height: 360px; touch-action: none; cursor: grab; }
.brep-mesh canvas:active { cursor: grabbing; }
.brep-mesh .bar { display: flex; flex-wrap: wrap; gap: 0.4rem; padding: 0.5rem 0.75rem 0; }
.brep-mesh button {
  font-size: 0.8rem; padding: 0.15rem 0.6rem; border-radius: 0.35rem; cursor: pointer;
  border: 1px solid var(--pst-color-border, #d1d9e0); background: transparent; color: var(--pst-color-text-muted, #59636e);
}
.brep-mesh button[aria-pressed="true"] {
  background: var(--pst-color-primary, #76b900); border-color: var(--pst-color-primary, #76b900);
  color: var(--pst-color-background, #fff);
}
.brep-mesh .edge-width { display: inline-flex; align-items: center; gap: 0.4rem; font-size: 0.8rem; color: var(--pst-color-text-muted, #59636e); }
.brep-mesh .edge-width input { width: 6rem; accent-color: var(--pst-color-primary, #76b900); }
.brep-mesh .edge-width:has(input:disabled) { opacity: 0.5; }
.brep-mesh .bar .maximize { margin-left: auto; }
.brep-mesh .info { padding: 0.4rem 0.75rem 0.6rem; font-size: 0.85rem; min-height: 1.4em; color: var(--pst-color-text-base, #1f2328); }
.sd-card .brep-mesh { margin: 0 0 0.5rem; }
.sd-card .brep-mesh canvas { height: 260px; }
/* Full screen, or the window when full screen is refused (.expanded). Last, so it wins over the heights above. */
.brep-mesh:fullscreen, .brep-mesh.expanded {
  display: flex; flex-direction: column; margin: 0; border-radius: 0; background: var(--pst-color-background, #fff);
}
.brep-mesh.expanded { position: fixed; inset: 0; z-index: 2000; }
.brep-mesh:fullscreen canvas, .brep-mesh.expanded canvas { flex: 1; height: auto; min-height: 0; }
