/* Shared floating help dialog used by the frame and FEM applications. */
.info-help-dialog {
  position: fixed;
  width: min(520px, calc(100vw - 32px));
  max-width: calc(100vw - 32px);
  margin: auto;
  padding: 0;
  border: 1px solid var(--theme-border, #7d8b97);
  border-radius: 8px;
  background: var(--theme-panel, #fff);
  color: var(--theme-text, #17232d);
  box-shadow: 0 16px 52px rgba(0, 0, 0, .38);
}
.info-help-dialog[open] { display: flex; flex-direction: column; }
.info-help-dialog.is-dragged { margin: 0; }
.info-help-dialog::backdrop { background: rgba(15, 22, 28, .54); }
.info-help-dialog-titlebar {
  display: flex;
  align-items: flex-start;
  gap: 12px;
  padding: 15px 17px 13px;
  background: #1a57a8;
  color: #fff;
  cursor: grab;
  user-select: none;

}
.info-help-dialog-titlebar:active { cursor: grabbing; }
.info-help-dialog-heading { flex: 1 1 auto; min-width: 0; }
.info-help-dialog-kicker { margin: 0 0 3px; font-size: 10px; font-weight: 700; letter-spacing: .12em; opacity: .78; }
.info-help-dialog-titlebar h2 { margin: 0; font-size: 18px; line-height: 1.15; }
.info-help-dialog-close {
  flex: 0 0 auto;
  width: 28px;
  height: 28px;
  padding: 0;
  border: 1px solid rgba(255, 255, 255, .52);
  border-radius: 4px;
  background: rgba(255, 255, 255, .14);
  color: #fff;
  font-size: 17px;
  line-height: 1;
  cursor: pointer;
}
.info-help-dialog-close:hover { background: rgba(255, 255, 255, .25); }
.info-help-dialog-body { display: grid; gap: 14px; padding: 18px 19px 18px; }
.info-help-dialog-body p { margin: 0; color: var(--theme-text, #33424d); font-size: 13px; line-height: 1.5; }
.info-help-dialog-body h3 { margin: 0; color: var(--theme-text, #17232d); font-size: 13px; }
.info-help-dialog-body ul, .info-help-dialog-body ol { margin: 0; padding-left: 20px; color: var(--theme-text, #33424d); font-size: 12px; line-height: 1.55; }
.info-help-dialog-body code, .info-help-dialog-body kbd { font-family: ui-monospace, Menlo, Consolas, monospace; }
.info-help-dialog-tip { padding: 10px 11px; border-left: 3px solid var(--theme-accent, #4f87c7); background: var(--theme-panel-2, #f1f6fc); color: var(--theme-text, #3a4b59); font-size: 11px; line-height: 1.45; }
.info-help-dialog-tip strong { display: block; margin-bottom: 2px; color: var(--theme-accent, #1a57a8); }

/* Legacy inline bubbles remain as source text, but never render as a second popup. */
.info-pop .info-bubble { display: none !important; }
.info-pop:focus { outline: 2px solid var(--theme-accent, #1a6fc4); outline-offset: 2px; }

body.dark-mode .info-help-dialog,
body.theme-night .info-help-dialog,
body.theme-matrix .info-help-dialog { background: var(--theme-panel, #363c40); color: var(--theme-text, #edf1f3); border-color: var(--theme-border, #707b84); }
