/* ============================================================
   selector-lab.css — the look of the "Selector lab" page
   ============================================================
   You do NOT need to read this file.
   Works together with see-it.css (the tree style comes from there).
   ============================================================ */

.lab-wrap {
  font-family: Arial, sans-serif;
  max-width: 1180px;
  margin: 0 auto;
}

.lab-ask {
  display: flex;
  align-items: center;
  gap: 10px;
  font-family: Consolas, "Courier New", monospace;
  font-size: 18px;
  background: #FFFFFF;
  border: 1px solid #E4E4E4;
  border-radius: 10px;
  padding: 10px 14px;
}

.lab-ask input {
  flex: 1;
  min-width: 120px;
  font: inherit;
  padding: 6px 10px;
  border: 2px solid #2D62EF;
  border-radius: 6px;
  outline: none;
}

.lab-chips {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin: 12px 0;
}

.lab-chip {
  font-family: Consolas, "Courier New", monospace;
  font-size: 14px;
  padding: 6px 12px;
  border: 1px solid #E4E4E4;
  border-radius: 999px;
  background: #FFFFFF;
  cursor: pointer;
  transition: background-color 0.15s, color 0.15s, transform 0.1s;
}
.lab-chip:hover { background: #EAF0FE; }
.lab-chip:active { transform: scale(0.95); }
.lab-chip.is-on { background: #2D62EF; border-color: #2D62EF; color: #FFFFFF; }

.lab-result {
  font-family: Consolas, "Courier New", monospace;
  font-size: 15px;
  line-height: 1.7;
  background: #1E1E1E;
  color: #7EE2A8;
  border-radius: 10px;
  padding: 10px 16px;
  min-height: 52px;
  white-space: pre-wrap;
}
.lab-result.is-empty { color: #FFD27A; }
.lab-result.is-error { color: #FF9A9C; }

.lab-note {
  margin: 12px 0 16px;
  padding: 12px 16px;
  border-left: 4px solid #2D62EF;
  background: #FFFFFF;
  border-radius: 0 10px 10px 0;
  font-size: 17px;
  line-height: 1.5;
  min-height: 26px;
}
.lab-note code {
  font-family: Consolas, "Courier New", monospace;
  background: #F2F2F2;
  padding: 1px 6px;
  border-radius: 4px;
}

/* the tree is long — keep the whole lab on one projector screen */
.lab-wrap .si-tree-box {
  max-height: 250px;
}

/* ---------- a matched element in the mini page ---------- */
.lab-hit {
  position: relative;
  outline: 3px solid #FFAF04;
  outline-offset: 2px;
  background-color: #FFF5DC !important;
}
.lab-hit::after {
  content: attr(data-lab-i);
  position: absolute;
  top: -12px;
  right: -12px;
  width: 22px;
  height: 22px;
  border-radius: 50%;
  background: #FFAF04;
  color: #000000;
  font: bold 12px/22px Arial, sans-serif;
  text-align: center;
  z-index: 2;
}
.lab-first {
  outline-color: #2D62EF;
}
.lab-first::after {
  background: #2D62EF;
  color: #FFFFFF;
}

/* ---------- a matched node in the tree ---------- */
.si-node.lab-tree-hit {
  position: relative;
  background: #FFF5DC;
  border-color: #FFAF04;
  color: #000000;
}
.si-node.lab-tree-hit::after {
  content: attr(data-lab-i);
  margin-left: 8px;
  display: inline-block;
  min-width: 18px;
  border-radius: 9px;
  background: #FFAF04;
  color: #000000;
  font: bold 11px/18px Arial, sans-serif;
  text-align: center;
}

@media (prefers-reduced-motion: reduce) {
  .lab-chip { transition: none; }
}
