/* 2D structure viewer (feature 006): dialog on top of the site tokens (site.css). */
button.display-structure { background: transparent; border: 0; padding: 0; color: var(--primary);
  font: inherit; text-decoration: underline; cursor: pointer; }
button.display-structure[hidden] { display: none; }
.sv-dialog { width: min(1100px, calc(100vw - 32px)); max-height: calc(100vh - 32px); padding: 16px;
  border: 0; border-radius: var(--radius); background: var(--surface); color: var(--text);
  box-shadow: var(--elev-2, 0 8px 24px rgba(0,0,0,.25)); }
.sv-dialog::backdrop { background: rgba(0, 0, 0, .45); }
.sv-head { display: flex; justify-content: space-between; align-items: baseline; gap: 12px; }
.sv-head h2 { margin: 0; font-size: 1.2rem; }
.sv-info { margin: 4px 0; color: var(--text-2); }
.sv-db { margin: 4px 0 8px; white-space: pre; overflow-x: auto; font-size: .85rem; max-height: 4.5em; }
.sv-tools { display: flex; flex-wrap: wrap; gap: 6px; margin-bottom: 8px; }
.sv-dialog button.btn-outlined, .sv-dialog button.btn-text { background: transparent; color: var(--primary);
  cursor: pointer; font: inherit; font-weight: 500; }
.sv-tools button[aria-pressed="true"] { background: var(--primary); color: var(--on-primary); }
.sv-tools button:disabled { opacity: .45; cursor: default; }
/* the drawing keeps its light palette on white in both themes (like the db2cm plots) */
.sv-canvas { background: #fff; border-radius: var(--radius); height: min(62vh, 640px);
  overflow: hidden; touch-action: none; cursor: grab; }
.sv-canvas:active { cursor: grabbing; }
.sv-svg { display: block; width: 100%; height: 100%; }
.sv-legend { margin: 6px 0 0; font-size: .9rem; }
.sv-error { margin: 6px 0; }
@media (max-width: 600px) {
  .sv-dialog { width: 100vw; max-width: 100vw; max-height: 100vh; height: 100vh; margin: 0; border-radius: 0; }
  .sv-canvas { height: 55vh; }
}
