/* equations (#92): the equation card, built by js/tools/equations.js */
#equation-card {
  position: fixed;
  z-index: 60;
  max-width: 420px;
  padding: 6px 10px;
  border: 1px solid var(--border, #ddd);
  border-radius: 6px;
  background: #fff;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.15);
  font: 500 13px/1.4 'Inter', sans-serif;
  color: var(--text-primary, #222);
  pointer-events: none;
}
#equation-card[hidden] { display: none; }

/* colouring + hover card (#91) */

.btn-colouring {
  margin-left: 6px;
  padding: 5px 10px;
  background: #fff;
  border: 1px solid var(--border);
  border-radius: 6px;
  font-family: inherit;
  font-size: 11px;
  color: var(--text-muted);
  cursor: pointer;
}
.btn-colouring[aria-pressed="true"] { color: var(--text-primary); }

#hover-card {
  position: fixed;
  z-index: 50;
  pointer-events: none;
  background: rgba(255, 255, 255, 0.97);
  border: 1px solid var(--border);
  border-radius: 8px;
  padding: 6px 10px;
  font-size: 12px;
  line-height: 1.5;
  box-shadow: 0 4px 14px rgba(0,0,0,0.13);
  white-space: nowrap;
}
#hover-card .hc-title { font-weight: 600; }
#hover-card .hc-warn  { color: #dc2626; font-weight: 600; }

/* mistake checker (#95) */

#mistakes-panel {
  position: absolute;
  top: 50px;               /* tools/mistakes.js moves it under #sim-results */
  right: 14px;
  width: 260px;
  max-height: 40vh;
  overflow-y: auto;
  background: rgba(255, 255, 255, 0.97);
  border: 1px solid var(--border);
  border-radius: 10px;
  padding: 8px 10px;
  font-size: 12px;
  line-height: 1.5;
  box-shadow: 0 4px 20px rgba(0,0,0,0.13);
  display: none;
  pointer-events: auto;
}

.mistake-row {
  padding: 5px 6px;
  border-radius: 6px;
  cursor: pointer;
}
.mistake-row + .mistake-row { border-top: 1px solid var(--border); }
.mistake-row:hover { background: #f5f2ed; }
.mistake-icon   { display: inline-block; width: 18px; color: #dc2626; font-weight: 700; }
.mistake-labels { color: var(--text-primary); font-weight: 600; }
.mistake-why    { color: #b45309; padding-left: 18px; }
.mistake-none   { color: #15803d; font-weight: 600; }
.mistake-info .mistake-icon { color: #2563eb; font-style: italic; }   /* info, not a mistake (#126) */
.mistake-info .mistake-why  { color: #475569; }

/* csv export (#101) */
#csv-export-btn { color: var(--text-primary); }

/* thevenin (#93) */

#thevenin-btn { color: var(--text-primary); }
/* Picking (#196): pressed, and a crosshair on the canvas. */
#thevenin-btn[aria-pressed="true"] { background: var(--text-primary); border-color: var(--text-primary); color: #fff; }
canvas.th-picking { cursor: crosshair; }

#thevenin-card {
  position: fixed;
  z-index: 60;
  padding: 6px 10px;
  border: 1px solid var(--border, #ddd);
  border-radius: 6px;
  background: #fff;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.15);
  font: 500 13px/1.5 'Inter', sans-serif;
  color: var(--text-primary, #222);
  white-space: nowrap;
  pointer-events: none;
}
#thevenin-card[hidden] { display: none; }
#thevenin-card .th-title { font-weight: 600; }
#thevenin-card .th-why   { color: #b45309; white-space: normal; max-width: 280px; }

/* meter display (#97): the multimeter's screen, built by js/tools/meter-display.js */
#meter-display {
  position: absolute;
  bottom: 44px;            /* above #hole-label, bottom left */
  left: 14px;
  min-width: 150px;
  max-width: 240px;
  padding: 8px 12px;
  background: #f2b400;
  border: 1px solid #c99500;
  border-radius: 10px;
  box-shadow: 0 4px 20px rgba(0,0,0,0.13);
  font-size: 11px;
  pointer-events: none;
}
#meter-display[hidden] { display: none; }
#meter-mode {
  font-weight: 700;
  color: #1a1a1a;
}
#meter-reading {
  margin-top: 4px;
  padding: 4px 8px;
  background: #9fb59a;
  border-radius: 4px;
  font: 700 22px/1.2 'Courier New', monospace;
  color: #1a1a1a;
  text-align: right;
}
#meter-reading.meter-fuse { color: #dc2626; }
#meter-note:empty { display: none; }
#meter-note {
  margin-top: 4px;
  color: #1a1a1a;
  line-height: 1.4;
}

/* ENSC 220 Labs menu (#98), built by js/tools/labs.js */

.labs-menu-wrap { position: relative; }

#labs-menu {
  position: absolute;
  top: calc(100% + 6px);
  right: 0;
  z-index: 70;
  min-width: 240px;
  padding: 4px;
  background: #fff;
  border: 1px solid var(--border);
  border-radius: 8px;
  box-shadow: 0 4px 14px rgba(0, 0, 0, 0.13);
}
#labs-menu[hidden] { display: none; }

.labs-menu-item {
  display: block;
  width: 100%;
  padding: 7px 10px;
  background: transparent;
  border: none;
  border-radius: 5px;
  font-family: inherit;
  font-size: 12px;
  text-align: left;
  color: var(--text-primary);
  cursor: pointer;
}
.labs-menu-item:hover,
.labs-menu-item:focus-visible { background: #f5f2ed; outline: none; }

/* mini scope (#121): built by js/tools/scope.js, bottom right above Reset View */
#scope {
  position: absolute;
  bottom: 50px;
  right: 14px;
  padding: 6px;
  background: #10161c;
  border: 1px solid #26323d;
  border-radius: 10px;
  box-shadow: 0 4px 20px rgba(0,0,0,0.2);
  font: 500 11px/1.5 monospace;
  pointer-events: auto;
}
#scope[hidden], #scope .scope-ch[hidden] { display: none; }
#scope-canvas { display: block; position: static; width: 240px; height: 120px; border-radius: 6px; }
#scope-ch1 { color: #ffd25a; margin-top: 4px; }
#scope-ch2 { color: #5ad2ff; }
#scope-probe-btn { margin: 4px 0 0; }
#scope-probe-btn[aria-pressed="true"] { color: var(--text-primary); border-color: #5ad2ff; }
