/* Documentation-only styling (sidebar, notes, accessibility test bench, the user guide) -
   split out of style.css. Loaded by pages/docs.php, which every documentation page
   renders through. */


/* -------------------------------------------------------
   ---- Side guidance panel on all documentation pages 
   -------------------------------------------------------
*/

.API-side-toggle {
	padding:3px 8px;
  margin-bottom:var(--spacing);
	font-size:80%;
	border:1px solid #555;
	z-index: 1001;
	/*position: absolute;*/
}

.API-side-toggle:hover {
	background-color: #555;
	cursor: hand; 
 }

.API-side {
	font-size: 90%;
	z-index: 1000;
  margin-bottom:var(--spacing);
  margin-left: var(--margin);
  display: none;
}

.API-side h5 {
	font-size:120%;
	margin-top: 1.2em;
}

.API-side a {
	display: block;
  margin-left: -5px;
  padding-left: 15px;
  text-decoration: none;
}

.dark .API-side a { color: white; }

.dark .API-highlight {
    background: var(--green);
    border-radius: 5px;
    margin-right: 5px;
    max-width:150px;
}

.API-side-dropdown {
	visibility: hidden;
	height: 0;
	padding-left: 15px;
}

.API-show-dropdown {
	visibility: visible;
	height: auto;
}

/* Moved here from style.css's own 768px media query - it has to live in the same file as
   the bare .API-side rule above (display:none) it overrides. Equal specificity, so whichever
   of the two loads LAST on the page wins regardless of viewport width; style.css always loads
   before this file, so leaving the override there meant this file's unconditional display:none
   always won and the sidebar never came back at any width. */
@media (min-width: 768px) {
  .API-side {
    display: block;
    width: 200px;
    height: 90vh;
    position: sticky;
    top: 100px;
    padding-bottom: 1rem;
  }

  .API-side.position-fixed {
      box-shadow: 7px 7px 3px 0 #000;
  }

  .API-side-toggle {
    display: none;
    visibility: hidden;
  }
}



.plugin-versions {
  float: right;
  margin-top:1em;
}

.version {
  color: white;
  border: none;
}

button.version.selected {
  background-color: var(--darkblue);
}

button.version:not(.selected):hover {
  border-color: white;
  background-color: unset;
  text-decoration: underline;
}
.cke_dialog td:first-child {
	padding-right: 0;
	border-right: none;
}
/* -----------------------------
   ---- Documentation notes ----
   -----------------------------
   A call-out for the things a reader needs to notice but that are not the main
   thread of the page: an upgrade caveat, a prerequisite, a gotcha. Deliberately
   quieter than an alert - this is information, not a warning. */

.note {
  border-left: 4px solid var(--highlight, #f89a2d);
  background-color: rgba(248, 154, 45, 0.07);
  padding: 10px 16px;
  margin: 16px 0;
  border-radius: 0 4px 4px 0;
}

.note > :first-child { margin-top: 0; }
.note > :last-child  { margin-bottom: 0; }

/* ----------------------------------
   ---- Accessibility test bench ----
   ----------------------------------
   The test rows are deliberately NOT a <table>: a screen reader announces its
   position on every cell - "row 5, column 2" - before reaching the content,
   which buries the very equation the page exists to listen to. Plain divs on a
   grid look identical and say nothing. */

.a11y-pipeline {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 8px;
  font-size: 0.95rem;
}
.a11y-pipeline span {
  border: 1px solid var(--rule, #d3dde9);
  border-radius: 3px;
  padding: 4px 12px;
  background: rgba(255, 255, 255, 0.06);
}
.a11y-pipeline i { font-style: normal; opacity: 0.55; }

.a11y-controls { display: flex; flex-wrap: wrap; gap: 14px; margin: 16px 0; }
.a11y-controls fieldset {
  border: 1px solid rgba(128, 150, 180, 0.4);
  border-radius: 4px;
  padding: 8px 14px 12px;
  margin: 0;
}
.a11y-controls legend {
  font-size: 0.72rem;
  letter-spacing: 0.09em;
  text-transform: uppercase;
  opacity: 0.7;
  padding: 0 4px;
}
.a11y-controls label { display: inline-block; margin-right: 16px; font-size: 0.9rem; }
.a11y-controls input { width: auto; margin-right: 5px; vertical-align: middle; }

.a11y-docs { display: grid; gap: 10px; margin: 16px 0; }
.a11y-doc {
  border: 1px solid rgba(128, 150, 180, 0.35);
  border-radius: 5px;
  overflow: hidden;
}
.a11y-doc.active { border-color: var(--lightblue); }
.a11y-doc h3 {
  margin: 0;
  padding: 8px 14px;
  font-size: 0.95rem;
  background: rgba(128, 150, 180, 0.12);
  border-bottom: 1px solid rgba(128, 150, 180, 0.3);
}
.a11y-doc.active h3 { background: rgba(0, 238, 255, 0.1); }
.a11y-badge {
  float: right;
  font-size: 0.7rem;
  font-weight: normal;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--lightblue);
}
.a11y-doc .a11y-why { margin: 0; padding: 9px 14px; font-size: 0.85rem; opacity: 0.82; }
.a11y-doc pre { margin: 0; border-radius: 0; font-size: 0.75rem; line-height: 1.5; }

.a11y-status { font-size: 0.9rem; }

/* ============================================================================
   ---- The user guide ----
   ============================================================================
   Lives in the documentation under fxEditor, and is also served at /guide - the
   short URL the editor's own information badge points at. One page, two routes,
   the documentation menu around it either way. */

body.ui .guide-eyebrow {
  font-family: "IBM Plex Mono", ui-monospace, Menlo, monospace;
  font-size: 11px;
  font-weight: 600;
  letter-spacing: .14em;
  text-transform: uppercase;
  color: #58616e;
  margin: 0 0 10px;
}

body.ui .guide h1 { margin-bottom: 12px; }

body.ui .guide-lede {
  font-size: 17px;
  line-height: 1.6;
  color: var(--d-ink-soft);
  margin-bottom: 26px;
  max-width: var(--d-measure);
}

/* The live editor sits in the flow of the page rather than in a panel of its own:
   it is the subject, not an illustration beside it. */
body.ui .guide #equation-editor { margin-bottom: 8px; }

/* Keys, set as keys. Without this they are indistinguishable from the prose
   around them, which matters on a page that is mostly a list of them. */
body.ui kbd {
  display: inline-block;
  font-family: "IBM Plex Mono", ui-monospace, Menlo, monospace;
  font-size: 11.5px;
  line-height: 1.5;
  padding: 1px 6px;
  color: var(--d-ink-strong);
  background: var(--d-panel);
  border: 1px solid #ccd2da;
  border-bottom-width: 2px;
  border-radius: 4px;
  white-space: nowrap;
}

body.ui .guide-keys td:first-child { white-space: normal; line-height: 2; }
body.ui .guide-keys th:first-child { width: 32%; }

body.docs .API-side h5 .x {
  text-transform: lowercase;
  font-size: 1.12em;
  letter-spacing: 0;
}
