/* Output panel and syntax highlighting styles */

.output-panel {
  flex: 1;
  min-height: 0;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 3px;
  padding: 12px;
  display: flex;
  flex-direction: column;
  box-shadow:
    0 4px 16px rgba(0, 0, 0, 0.28),
    0 0 0 1px rgba(var(--primary-rgb), 0.1);
}

.output-panel h2 {
  flex: 0 0 auto;
  margin-bottom: 15px;
}

.output-panel .output-box {
  flex: 1;
  min-height: 0;
  overflow-y: auto;
}

.output-box {
  background: linear-gradient(165deg, var(--surface-dim) 0%, #161311 100%);
  border: 1px solid rgba(var(--primary-rgb), 0.32);
  border-radius: 4px;
  padding: 12px;
  height: 100%;
  overflow-y: auto;
  overflow-x: auto;
  position: relative;
  font-family:
    "JetBrains Mono", "Fira Code", "SFMono-Regular", Consolas, monospace;
  font-size: 0.95em;
  line-height: 1.6;
  color: #e6e8ef;
  resize: none;
  white-space: pre-wrap;
  word-wrap: break-word;
  box-shadow:
    0 8px 24px rgba(0, 0, 0, 0.4),
    inset 0 1px 0 rgba(255, 255, 255, 0.025),
    0 0 0 1px rgba(var(--primary-rgb), 0.1);
  scrollbar-color: #3b3b3b #1d1d1d;
}

.output-box::-webkit-scrollbar {
  width: 10px;
  height: 10px;
}

.output-box::-webkit-scrollbar-track {
  background: var(--surface);
}

.output-box::-webkit-scrollbar-thumb {
  background: linear-gradient(180deg, #4a382e 0%, #7a5c48 50%, var(--primary) 100%);
  border: 2px solid #161311;
  border-radius: 8px;
}

.output-box::-webkit-scrollbar-thumb:hover {
  background: linear-gradient(180deg, #5c4538 0%, #967056 45%, var(--primary-hover) 100%);
}

.output-box pre {
  white-space: pre-wrap;
  word-wrap: break-word;
}

.output-box .placeholder {
  color: var(--text-dim);
  font-style: italic;
}

.output-box .loading {
  color: var(--primary);
  font-weight: 600;
}

.output-box .error {
  color: #d32f2f;
}

.output-box .warning {
  color: #f9a825;
  font-weight: 500;
}

/* Python function color coding */
.output-box .func-walk {
  color: #4ec9b0;
  font-weight: 600;
}

.output-box .func-walkasync {
  color: #569cd6;
  font-weight: 600;
}

.output-box .func-walkalign {
  color: #9cdcfe;
  font-weight: 600;
}

.output-box .func-setyaw {
  color: #dcdcaa;
  font-weight: 600;
}

.output-box .func-keydown {
  color: #c586c0;
  font-weight: 600;
}

.output-box .func-keyup {
  color: #d16d9e;
  font-weight: 600;
}

.output-box .func-sleep {
  color: #ce9178;
  font-weight: 600;
}

.output-box .func-sleepstuds {
  color: #d7ba7d;
  font-weight: 600;
}

/* Action execution color coding */
.output-box .action-walk {
  color: #4ec9b0;
  font-weight: 600;
}

.output-box .action-walkalign {
  color: #9cdcfe;
  font-weight: 600;
}

.output-box .action-setyaw {
  color: #dcdcaa;
  font-weight: 600;
}

.output-box .action-keydown {
  color: #c586c0;
  font-weight: 600;
}

.output-box .action-keyup {
  color: #d16d9e;
  font-weight: 600;
}

.output-box .action-sleep {
  color: #ce9178;
  font-weight: 600;
}

.output-box .action-sleepstuds {
  color: #d7ba7d;
  font-weight: 600;
}

.output-box .action-loop {
  color: #b5cea8;
  font-weight: 600;
}

.output-box .action-if {
  color: #c586c0;
  font-weight: 600;
  font-style: italic;
}

.output-box .action-function {
  color: #569cd6;
  font-weight: 600;
}

.output-box .label-function-call {
  color: #9cdcfe;
  font-weight: 600;
}

/* Highlighted output line during animation */
.output-line {
  padding: 2px 4px;
  margin: 0px -4px;
  border-radius: 3px;
  position: relative;
  z-index: 1;
}

.output-line.active {
  background: transparent;
}

.output-highlight-block {
  position: absolute;
  left: 6px;
  right: 6px;
  background-color: rgba(255, 215, 0, 0.12);
  border: 1px solid rgba(0, 232, 255, 0.28);
  border-radius: 3px;
  pointer-events: none;
  z-index: 0;
}

.output-line .line-meta {
  position: absolute;
  right: 6px;
  top: 2px;
  color: var(--text-dim);
  font-size: 12px;
  font-family: Consolas, "Courier New", monospace;
  pointer-events: none;
  background: rgba(36, 36, 36, 0.86);
  padding: 1px 6px;
  border-radius: 4px;
  line-height: 1.4;
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.075);
  z-index: 1;
}
