/* Fixed77: improve CodeMirror selection and line-highlight visibility in light theme */
html[data-theme="light"] .CodeMirror{
  background:#ffffff!important;
  color:#172033!important;
}

/* Mouse/keyboard selected text: keep it clearly visible even when the editor loses focus. */
html[data-theme="light"] .CodeMirror-selected,
html[data-theme="light"] .CodeMirror-focused .CodeMirror-selected{
  background:rgba(37,99,235,.34)!important;
  box-shadow:inset 0 0 0 1px rgba(29,78,216,.18)!important;
}

/* Student's private line highlight. */
html[data-theme="light"] .cm-local-line{
  background:rgba(34,197,94,.22)!important;
  box-shadow:inset 4px 0 0 #16a34a,inset 0 1px 0 rgba(22,163,74,.18),inset 0 -1px 0 rgba(22,163,74,.18)!important;
}
html[data-theme="light"] .CodeMirror-gutter-elt.cm-gutter-local{
  color:#087a55!important;
  font-weight:900!important;
  background:rgba(34,197,94,.14)!important;
  border-radius:4px!important;
}

/* Administrator/shared highlight. */
html[data-theme="light"] .cm-shared-line{
  background:rgba(244,63,94,.18)!important;
  box-shadow:inset 4px 0 0 #e11d48,inset 0 1px 0 rgba(225,29,72,.15),inset 0 -1px 0 rgba(225,29,72,.15)!important;
}
html[data-theme="light"] .CodeMirror-gutter-elt.cm-gutter-shared{
  color:#be123c!important;
  font-weight:900!important;
  background:rgba(244,63,94,.12)!important;
  border-radius:4px!important;
}

/* Search matches and matching brackets in the light editor. */
html[data-theme="light"] .CodeMirror-searching{
  background:#fde68a!important;
  color:#111827!important;
  outline:1px solid #f59e0b!important;
}
html[data-theme="light"] .CodeMirror-matchingbracket{
  color:#0f5132!important;
  background:#bbf7d0!important;
  outline:1px solid #22c55e!important;
  font-weight:800!important;
}
html[data-theme="light"] .CodeMirror-nonmatchingbracket{
  color:#991b1b!important;
  background:#fecaca!important;
  outline:1px solid #ef4444!important;
}
