/* Pane component styles */

.Pane {
  display: flex;
  flex-direction: column;
  overflow: hidden;
}

.Pane-header {
  padding: 6px 12px;
  font-size: 10px;
  text-transform: uppercase;
  letter-spacing: 1px;
  color: var(--text-dim);
  flex-shrink: 0;
  border-bottom: 1px solid var(--border);
}
/* CodeEditor component styles */

.CodeEditor {
  flex: 1;
  min-height: 0;
  position: relative;
  overflow: hidden;
  background: var(--bg);
}

.CodeEditor .cm-editor {
  position: absolute !important;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  height: auto !important;
  background: transparent;
}

.CodeEditor .cm-editor .cm-scroller {
  overflow: auto !important;
}

/* Fallback textarea styled to match CodeMirror */
.CodeEditor-fallback {
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  width: 100%;
  height: 100%;
  padding: 16px 18px;
  margin: 0;
  border: none;
  outline: none;
  resize: none;
  background: transparent;
  color: #b8b8b8;
  font-family: "SF Mono", "Fira Code", Menlo, monospace;
  font-size: 13px;
  line-height: 1.6;
  caret-color: #79b8ff;
  white-space: pre;
  overflow: auto;
  tab-size: 4;
  -moz-tab-size: 4;
  word-wrap: normal;
  overflow-wrap: normal;
}
/* TreeView component styles */

.TreeView {
  flex: 1;
  min-height: 0;
  padding: 12px;
  font-family: var(--font-mono);
  font-size: 12px;
  line-height: 1.8;
  overflow: auto;
  background: var(--bg);
}

.TreeView--inEntry {
  padding: 8px;
  font-size: 11px;
  line-height: 1.6;
}

.TreeView-output {
  margin: 0;
  white-space: pre-wrap;
  word-break: break-word;
  color: var(--text);
}

/* TreeView-pending */

.TreeView-pending {
  display: inline-block;
  color: #64b5f6;
  background: rgba(100, 181, 246, 0.15);
  padding: 2px 8px;
  border-radius: 10px;
  border: 1px solid rgba(100, 181, 246, 0.4);
  font-size: 10px;
  font-weight: 500;
  letter-spacing: 0.5px;
  animation: treeViewPendingPulse 2s ease-in-out infinite;
}

@keyframes treeViewPendingPulse {
  0%,
  100% {
    opacity: 0.7;
  }
  50% {
    opacity: 1;
  }
}

/* TreeView-error */

.TreeView-error {
  display: inline-block;
  color: #e57373;
  background: rgba(229, 115, 115, 0.15);
  padding: 2px 8px;
  border-radius: 10px;
  border: 1px solid rgba(229, 115, 115, 0.4);
  font-size: 10px;
  font-weight: 500;
  letter-spacing: 0.5px;
}

/* TreeView value types */

.TreeView-null {
  color: #5c6370;
  font-style: italic;
}

.TreeView-undefined {
  color: #5c6370;
  font-style: italic;
}

.TreeView-string {
  color: #98c379;
}

.TreeView-number {
  color: #d19a66;
}

.TreeView-boolean {
  color: #56b6c2;
}

.TreeView-symbol {
  color: #c678dd;
}

.TreeView-function {
  color: #61afef;
  font-style: italic;
}

.TreeView-circular {
  color: #e57373;
  font-style: italic;
}

.TreeView-date {
  color: #e5c07b;
}

.TreeView-collection {
  color: var(--text-dim);
}

.TreeView-iterator {
  color: var(--text-dim);
  font-style: italic;
}

.TreeView-stream {
  color: var(--text-dim);
  font-style: italic;
}

.TreeView-key {
  color: #61afef;
}

.TreeView-empty {
  color: #5c6370;
  font-style: italic;
}

.TreeView-unknown {
  color: var(--text-dim);
}

/* TreeView element */

.TreeView-tag {
  color: #e06c75;
}

.TreeView-clientTag {
  color: #c678dd;
}

.TreeView-reactTag {
  color: #e5c07b;
}

.TreeView-propName {
  color: #61afef;
}

.TreeView-children {
  margin-left: 16px;
  border-left: 1px solid #333;
  padding-left: 12px;
}
/* FlightLog component styles */

.FlightLog {
  flex: 1;
  overflow: auto;
  padding: 8px;
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.FlightLog-output {
  flex: 1;
  min-height: 0;
  margin: 0;
  padding: 12px;
  font-family: var(--font-mono);
  font-size: 12px;
  line-height: 1.6;
  overflow: auto;
  white-space: pre-wrap;
  word-break: break-all;
  background: var(--bg);
  color: var(--text-dim);
}

.FlightLog-output--error {
  color: #e57373;
}

.FlightLog-empty {
  color: var(--text-dim);
  font-style: italic;
}

.FlightLog-empty--waiting::after {
  content: "...";
  animation: flightLogPulse 1.5s ease-in-out infinite;
}

@keyframes flightLogPulse {
  0%,
  100% {
    opacity: 0.3;
  }
  50% {
    opacity: 1;
  }
}

@media (prefers-reduced-motion: reduce) {
  .FlightLog-empty--waiting::after {
    animation: none;
  }
}

/* FlightLog-entry */

.FlightLog-entry {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 4px;
  transition:
    border-color 0.15s ease,
    opacity 0.15s ease;
  border-left: 3px solid #555;
}

.FlightLog-entry + .FlightLog-entry {
  margin-top: 12px;
}

.FlightLog-entry--active {
  border-left-color: #ffd54f;
}

.FlightLog-entry--done {
  border-left-color: #555;
  opacity: 0.8;
}

.FlightLog-entry--pending {
  border-left-color: #333;
  opacity: 0.4;
}

.FlightLog-entry--error {
  border-left-color: #e57373;
}

.FlightLog-entry-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  padding: 6px 10px;
  font-size: 11px;
  border-bottom: 1px solid var(--border);
}

.FlightLog-entry-label {
  color: var(--text);
  font-weight: 500;
}

.FlightLog-entry-headerRight {
  display: flex;
  align-items: center;
  gap: 8px;
}

.FlightLog-entry-deleteBtn {
  background: transparent;
  border: none;
  color: var(--text-dim);
  cursor: pointer;
  font-size: 14px;
  padding: 0 4px;
  line-height: 1;
  opacity: 0.5;
  transition:
    opacity 0.15s,
    color 0.15s;
}

.FlightLog-entry-deleteBtn:hover {
  opacity: 1;
  color: #e57373;
}

.FlightLog-entry-deleteBtn:focus-visible {
  outline: 2px solid #ffd54f;
  outline-offset: 2px;
}

.FlightLog-entry-request {
  padding: 8px 10px;
  background: rgba(0, 0, 0, 0.2);
  border-bottom: 1px solid var(--border);
}

.FlightLog-entry-requestArgs {
  margin: 0;
  font-family: var(--font-mono);
  font-size: 11px;
  line-height: 1.4;
  color: #81c784;
  white-space: pre-wrap;
  word-break: break-all;
}

/* Error display */

.FlightLog-entry-error {
  padding: 8px 10px;
}

.FlightLog-entry-errorMessage {
  margin: 0;
  font-family: var(--font-mono);
  font-size: 11px;
  line-height: 1.4;
  color: #e57373;
  white-space: pre-wrap;
  word-break: break-word;
}

/* FlightLog-renderView */

.FlightLog-renderView {
  border-top: 1px solid var(--border);
  padding: 8px;
}

.FlightLog-renderView-split {
  display: flex;
  gap: 8px;
  align-items: stretch;
}

.FlightLog-linesWrapper {
  flex: 1;
  min-width: 0;
  position: relative;
  min-height: 150px;
}

.FlightLog-lines {
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  margin: 0;
  padding: 6px;
  background: var(--bg);
  border-radius: 3px;
  font-size: 11px;
  line-height: 1.4;
  overflow: auto;
}

.FlightLog-line {
  display: block;
  padding: 6px 8px;
  margin-bottom: 3px;
  border-radius: 4px;
  word-break: break-all;
  white-space: pre-wrap;
  border-left: 2px solid transparent;
  transition:
    background-color 0.15s ease,
    color 0.15s ease,
    border-color 0.15s ease;
}

.FlightLog-line:last-child {
  margin-bottom: 0;
}

.FlightLog-line--done {
  color: #999;
  background: rgba(255, 255, 255, 0.03);
  border-left-color: #555;
}

.FlightLog-line--next {
  color: #e0e0e0;
  background: rgba(255, 213, 79, 0.12);
  border-left-color: #ffd54f;
}

.FlightLog-line--pending {
  color: #444;
  background: transparent;
  border-left-color: #333;
  opacity: 0.4;
}

.FlightLog-hexBytes {
  opacity: 0.7;
}

.FlightLog-tree {
  flex: 1;
  min-width: 0;
  border-radius: 4px;
  overflow: auto;
  border: 1px solid var(--border);
  display: flex;
  flex-direction: column;
}

.FlightLog-tree:has(.TreeView) {
  background: #000;
}

/* FlightLog-rawForm */

.FlightLog-rawForm {
  margin-top: 8px;
  padding: 10px;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 4px;
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.FlightLog-rawForm-textarea {
  width: 100%;
  padding: 8px;
  background: var(--bg);
  border: 1px solid var(--border);
  border-radius: 3px;
  color: var(--text);
  font-family: var(--font-mono);
  font-size: 11px;
  resize: vertical;
  min-height: 100px;
}

.FlightLog-rawForm-textarea:focus {
  outline: none;
  border-color: #ffd54f;
}

.FlightLog-rawForm-buttons {
  display: flex;
  gap: 8px;
}

.FlightLog-rawForm-submitBtn {
  padding: 5px 12px;
  border-radius: 3px;
  font-size: 11px;
  cursor: pointer;
  background: #ffd54f;
  border: none;
  color: #000;
}

.FlightLog-rawForm-submitBtn:disabled {
  background: #555;
  color: #888;
  cursor: not-allowed;
}

.FlightLog-rawForm-submitBtn:focus-visible {
  outline: 2px solid #fff;
  outline-offset: 2px;
}

.FlightLog-rawForm-cancelBtn {
  padding: 5px 12px;
  border-radius: 3px;
  font-size: 11px;
  cursor: pointer;
  background: transparent;
  border: 1px solid var(--border);
  color: var(--text-dim);
}

.FlightLog-rawForm-cancelBtn:hover {
  border-color: #555;
  color: var(--text);
}

.FlightLog-rawForm-cancelBtn:focus-visible {
  outline: 2px solid #ffd54f;
  outline-offset: 2px;
}

/* FlightLog-addButton */

.FlightLog-addButton-wrapper {
  display: flex;
  justify-content: center;
  margin-top: 8px;
}

.FlightLog-addButton {
  width: 24px;
  height: 24px;
  padding: 0;
  background: var(--border);
  border: 1px solid #444;
  border-radius: 50%;
  color: var(--text-dim);
  cursor: pointer;
  font-size: 14px;
  line-height: 22px;
  transition:
    background-color 0.15s,
    border-color 0.15s,
    color 0.15s;
}

.FlightLog-addButton:hover {
  background: #3a3a3a;
  border-color: #666;
  color: var(--text);
}

.FlightLog-addButton:focus-visible {
  outline: 2px solid #ffd54f;
  outline-offset: 2px;
}

/* Responsive */

@media (max-width: 768px) {
  .FlightLog-rawForm-textarea {
    font-size: 16px !important;
  }
}
/* LivePreview component styles */

.LivePreview-playback {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 8px 12px;
  background: var(--surface);
  border-bottom: 1px solid var(--border);
}

.LivePreview-controls {
  display: flex;
  align-items: center;
  gap: 4px;
}

.LivePreview-controlBtn {
  background: transparent;
  border: none;
  color: var(--text);
  width: 44px;
  height: 44px;
  border-radius: 6px;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  transition:
    background-color 0.1s,
    color 0.1s;
}

.LivePreview-controlBtn svg {
  width: 20px;
  height: 20px;
}

.LivePreview-controlBtn:hover:not(:disabled) {
  background: var(--border);
  color: var(--text-bright);
}

.LivePreview-controlBtn:disabled {
  opacity: 0.3;
  cursor: not-allowed;
}

.LivePreview-controlBtn:focus-visible {
  outline: 2px solid #ffd54f;
  outline-offset: -2px;
}

.LivePreview-controlBtn--playing {
  color: #ffd54f;
}

.LivePreview-controlBtn--playing:hover:not(:disabled) {
  color: #ffe566;
}

.LivePreview-controlBtn--step {
  background: #ffd54f;
  color: #000;
  animation: livePreviewPulseStep 1.5s ease-in-out infinite;
}

.LivePreview-controlBtn--step:hover:not(:disabled) {
  background: #ffe566;
  color: #000;
  animation: none;
}

.LivePreview-controlBtn--step:focus-visible {
  outline: 2px solid #fff;
  outline-offset: 2px;
}

.LivePreview-controlBtn--step:disabled {
  background: transparent;
  color: var(--text);
  animation: none;
}

@keyframes livePreviewPulseStep {
  0%,
  100% {
    opacity: 1;
  }
  50% {
    opacity: 0.7;
  }
}

@media (prefers-reduced-motion: reduce) {
  .LivePreview-controlBtn--step {
    animation: none;
  }
}

.LivePreview-slider {
  flex: 1;
  min-width: 0;
  height: 4px;
  -webkit-appearance: none;
  appearance: none;
  background: var(--border);
  border-radius: 2px;
  outline: none;
}

.LivePreview-slider::-webkit-slider-thumb {
  -webkit-appearance: none;
  appearance: none;
  width: 14px;
  height: 14px;
  background: #ffd54f;
  border-radius: 50%;
  cursor: pointer;
  border: none;
}

.LivePreview-slider::-moz-range-thumb {
  width: 14px;
  height: 14px;
  background: #ffd54f;
  border-radius: 50%;
  cursor: pointer;
  border: none;
}

.LivePreview-slider:disabled {
  opacity: 0.5;
}

.LivePreview-stepInfo {
  font-size: 11px;
  color: var(--text-dim);
  font-family: var(--font-mono);
  min-width: 60px;
  text-align: right;
  white-space: nowrap;
}

.LivePreview-container {
  flex: 1;
  padding: 20px;
  background: #fff;
  color: #111;
  overflow: auto;
  font-family: -apple-system, BlinkMacSystemFont, sans-serif;
  font-size: 16px;
  line-height: 1.5;
}

.LivePreview-container h1 {
  font-size: 28px;
  color: #000;
  margin: 0 0 16px;
}

.LivePreview-container h2 {
  font-size: 22px;
  color: #000;
}

.LivePreview-container h3 {
  font-size: 18px;
  color: #000;
}

.LivePreview-container p {
  color: #111;
  margin: 8px 0;
}

.LivePreview-container button {
  background: #333;
  color: #fff;
  border: none;
  padding: 8px 14px;
  border-radius: 4px;
  cursor: pointer;
  font-size: 14px;
}

.LivePreview-container button:hover {
  background: #444;
}

.LivePreview-empty {
  color: #999;
  font-style: italic;
}

.LivePreview-empty--error {
  color: #c0392b;
}

/* Responsive */

@media (max-width: 768px) {
  .LivePreview-slider {
    display: none;
  }

  .LivePreview-stepInfo {
    display: none;
  }
}

@media (max-width: 400px) {
  .LivePreview-playback {
    padding: 6px;
  }

  .LivePreview-controls {
    flex: 1;
    justify-content: space-between;
    gap: 0;
  }

  .LivePreview-controlBtn {
    flex: 1;
    width: auto;
    max-width: 44px;
  }
}
/* ResizablePanes component styles */

.ResizablePanes {
  flex: 1;
  min-height: 0;
  display: grid;
  grid-template-columns: var(--col-percent) calc(100% - var(--col-percent));
  grid-template-rows: var(--row-percent) calc(100% - var(--row-percent));
  overflow: hidden;
  position: relative;
}

/* Pane containers */
.ResizablePanes-pane {
  display: flex;
  min-width: 0;
  min-height: 0;
  overflow: hidden;
}

.ResizablePanes-pane > * {
  flex: 1;
  min-width: 0;
  min-height: 0;
}

.ResizablePanes-topLeft {
  grid-column: 1;
  grid-row: 1;
  border-right: 1px solid var(--border);
  border-bottom: 1px solid var(--border);
}

.ResizablePanes-topRight {
  grid-column: 2;
  grid-row: 1;
  border-bottom: 1px solid var(--border);
}

.ResizablePanes-bottomLeft {
  grid-column: 1;
  grid-row: 2;
  border-right: 1px solid var(--border);
}

.ResizablePanes-bottomRight {
  grid-column: 2;
  grid-row: 2;
}

/* Dividers - continuous handles spanning full height/width */
.ResizablePanes-divider {
  position: absolute;
  z-index: 10;
  background: transparent;
  transition: background-color 0.15s ease;
}

.ResizablePanes-divider:hover,
.ResizablePanes-divider:focus-visible {
  background: var(--border);
}

.ResizablePanes-divider:focus-visible {
  outline: 2px solid #ffd54f;
  outline-offset: -1px;
}

/* Vertical divider (full height) - controls column split */
.ResizablePanes-divider--vertical {
  top: 0;
  bottom: 0;
  left: var(--col-percent);
  width: 5px;
  margin-left: -2px;
  cursor: col-resize;
}

/* Horizontal divider (full width) - controls row split */
.ResizablePanes-divider--horizontal {
  left: 0;
  right: 0;
  top: var(--row-percent);
  height: 5px;
  margin-top: -2px;
  cursor: row-resize;
}

/* Touch device improvements - larger hit targets */
@media (pointer: coarse) {
  .ResizablePanes-divider--vertical {
    width: 16px;
    margin-left: -8px;
  }

  .ResizablePanes-divider--horizontal {
    height: 16px;
    margin-top: -8px;
  }
}
/* Workspace component styles */

.Workspace {
  flex: 1;
  min-height: 0;
  display: flex;
  overflow: hidden;
}

/* Loading states */

.Workspace-loadingOutput {
  flex: 1;
  min-height: 0;
  margin: 0;
  padding: 12px;
  font-family: var(--font-mono);
  font-size: 12px;
  line-height: 1.6;
  overflow: auto;
  white-space: pre-wrap;
  word-break: break-all;
  background: var(--bg);
  color: var(--text-dim);
}

.Workspace-loadingPreview {
  flex: 1;
  padding: 20px;
  background: #fff;
  color: #111;
  overflow: auto;
  font-family: -apple-system, BlinkMacSystemFont, sans-serif;
  font-size: 16px;
  line-height: 1.5;
}

.Workspace-loadingEmpty {
  color: var(--text-dim);
  font-style: italic;
}

.Workspace-loadingEmpty--waiting::after {
  content: "...";
  animation: workspacePulse 1.5s ease-in-out infinite;
}

/* Error states */

.Workspace-errorOutput {
  flex: 1;
  min-height: 0;
  margin: 0;
  padding: 12px;
  font-family: var(--font-mono);
  font-size: 12px;
  line-height: 1.6;
  overflow: auto;
  white-space: pre-wrap;
  word-break: break-all;
  background: var(--bg);
  color: #e57373;
}

.Workspace-errorPreview {
  flex: 1;
  padding: 20px;
  background: #fff;
  color: #111;
  overflow: auto;
  font-family: -apple-system, BlinkMacSystemFont, sans-serif;
  font-size: 16px;
  line-height: 1.5;
}

.Workspace-errorMessage {
  color: #c0392b;
  font-style: italic;
}

@keyframes workspacePulse {
  0%,
  100% {
    opacity: 0.3;
  }
  50% {
    opacity: 1;
  }
}
/* Embed component styles */

.EmbedApp-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0 12px;
  height: 32px;
  background: var(--surface);
  border-bottom: 1px solid var(--border);
  flex-shrink: 0;
}

.EmbedApp-title {
  font-size: 11px;
  font-weight: 600;
  color: var(--text-dim);
  letter-spacing: 0.3px;
}

.EmbedApp-fullscreenLink {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 28px;
  height: 28px;
  margin-right: -10px;
  border-radius: 4px;
  color: var(--text-dim);
  text-decoration: none;
  transition:
    background-color 0.15s,
    color 0.15s;
}

.EmbedApp-fullscreenLink:hover {
  background: var(--border);
  color: var(--text-bright);
}
