/*
 * Syntax Highlight Overlay
 *
 * Transparent textarea technique: the textarea has transparent text color
 * so the user sees the colored spans in the overlay div behind it, while
 * still being able to type and interact with the native textarea.
 */

.syntax-highlight-container {
  position: relative;
  font-family: 'Source Code Pro', ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, monospace;
  font-size: 0.875rem;
  line-height: 1.5;
}

.syntax-highlight-overlay {
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  pointer-events: none;
  white-space: pre-wrap;
  overflow-wrap: break-word;
  overflow: hidden;
  padding: 0.5rem;
  border: 1px solid transparent;
  color: var(--dark-gray, #343a40);
}

.syntax-highlight-container textarea {
  position: relative;
  z-index: 1;
  color: transparent;
  -webkit-text-fill-color: transparent;
  caret-color: var(--dark-gray, #343a40);
  background: transparent;
  white-space: pre-wrap;
  overflow-wrap: break-word;
  font-family: inherit;
  font-size: inherit;
  line-height: inherit;
  padding: 0.5rem;
  width: 100%;
  resize: vertical;
}

/* Highlight classes */
.hl-header {
  color: #2563eb;
  font-weight: 600;
}

.hl-quantity {
  color: #ea580c;
}

.hl-element {
  color: #16a34a;
}

.hl-condition {
  color: #9333ea;
}

.hl-rest {
  color: #6b7280;
}

.hl-rule {
  color: #6b7280;
  font-style: italic;
}

.hl-scaling {
  color: #0d9488;
}
