/* File Editor — Syntax Highlighting Overlay */

.feh-wrapper {
  position: relative;
  flex: 1;
  display: flex;
  overflow: hidden;
}

/* Line number gutter */
.feh-gutter {
  flex-shrink: 0;
  padding: 12px 0;
  background: #000;
  border-right: 1px solid rgba(255, 255, 255, 0.06);
  overflow: hidden;
  user-select: none;
  -webkit-user-select: none;
}

.feh-gutter-line {
  padding: 0 8px 0 8px;
  font-family: 'Menlo', 'Monaco', 'Cascadia Code', 'Consolas', monospace;
  font-size: 13px;
  line-height: 1.5;
  color: #484f58;
  text-align: right;
  white-space: nowrap;
}

/* Code area — contains both highlight layer and textarea */
.feh-code-area {
  position: relative;
  flex: 1;
  min-width: 0;
  overflow: hidden;
}

/* Highlighted code layer — absolute behind the textarea */
.feh-highlight-scroll {
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  overflow: hidden;
  pointer-events: none;
  z-index: 0;
}

.feh-highlight-scroll pre {
  margin: 0;
  padding: 12px;
  font-family: 'Menlo', 'Monaco', 'Cascadia Code', 'Consolas', monospace;
  font-size: 13px;
  line-height: 1.5;
  tab-size: 2;
  -moz-tab-size: 2;
  white-space: pre;
  background: transparent !important;
  overflow: visible;
}

.feh-highlight-scroll code {
  background: transparent !important;
  padding: 0 !important;
  font-family: inherit;
  font-size: inherit;
  line-height: inherit;
}

/* Textarea on top — transparent text, visible caret */
.feh-code-area .file-editor-textarea {
  position: relative;
  z-index: 1;
  color: transparent !important;
  -webkit-text-fill-color: transparent;
  caret-color: #e0e0e0;
  background: transparent !important;
  width: 100%;
  height: 100%;
  min-width: 0;
}

.feh-code-area .file-editor-textarea::selection {
  background: rgba(88, 166, 255, 0.3);
  -webkit-text-fill-color: transparent;
}

.feh-code-area .file-editor-textarea::-moz-selection {
  background: rgba(88, 166, 255, 0.3);
}

/* Override highlight.js theme background for OLED */
.feh-highlight-scroll .hljs {
  background: transparent !important;
}
