/* Shimmer skeleton animation */
.skeleton {
  background: linear-gradient(90deg, #1f1f1f 25%, #2a2a2a 50%, #1f1f1f 75%);
  background-size: 200% 100%;
  animation: shimmer 1.5s infinite;
}

/* Scrollbar styling */
::-webkit-scrollbar { width: 6px; }
::-webkit-scrollbar-track { background: #0a0a0a; }
::-webkit-scrollbar-thumb { background: #333; border-radius: 3px; }
::-webkit-scrollbar-thumb:hover { background: #444; }

/* Markdown pre-wrap rendering */
.markdown-body {
  white-space: pre-wrap;
  word-break: break-word;
  font-size: 0.875rem;
  line-height: 1.6;
  color: #d1d5db;
}

/* Toast slide-in */
.toast-enter {
  animation: fadeIn 0.25s ease-out;
}

/* Step pill active state */
.step-active {
  background: #3b82f6;
  color: white;
}

/* Global keyboard-focus indicator. `:focus-visible` only fires for keyboard
   navigation (not mouse clicks), so this won't add noisy outlines around
   freshly-clicked buttons. Tailwind's reset removes the browser default,
   so we restore an explicit blue ring for accessibility. */
:focus-visible {
  outline: 2px solid #3b82f6;
  outline-offset: 2px;
  border-radius: 4px;
}
/* Inputs/textareas already have their own focus styling — don't double up. */
input:focus-visible,
textarea:focus-visible,
select:focus-visible {
  outline: none;
}

/* Card textarea */
.card-textarea {
  resize: none;
  background: #1a1a1a;
  border: 1px solid #333;
  color: #d1d5db;
  font-family: inherit;
  font-size: 0.875rem;
  line-height: 1.6;
  border-radius: 0.375rem;
  padding: 0.75rem;
  width: 100%;
  min-height: 160px;
  outline: none;
  transition: border-color 0.15s;
}

.card-textarea:focus {
  border-color: #3b82f6;
  box-shadow: 0 0 0 2px rgba(59, 130, 246, 0.15);
}

/* Progress bar */
.progress-bar {
  transition: width 0.4s ease;
}

/* Resizable workspace card. Native CSS resize handle in the bottom-right;
   a flex column inside lets the scrollable region grow to fill the height. */
.resizable-card {
  resize: both;
  overflow: hidden;
  min-height: 280px;
  min-width: 220px;
  max-width: 100%;
  display: flex;
  flex-direction: column;
}
.resizable-card > * { min-height: 0; }

/* Internal scroll region with transparent track. Thumb is high-contrast so
   the scrollbar visibly signals "this list is longer than what you see". */
.scroll-transparent {
  overflow-y: auto;
  scrollbar-gutter: stable;
  scrollbar-color: #4a4a4a transparent;       /* Firefox */
  scrollbar-width: thin;
}
.scroll-transparent::-webkit-scrollbar { width: 8px; }
.scroll-transparent::-webkit-scrollbar-track { background: transparent; }
.scroll-transparent::-webkit-scrollbar-thumb {
  background: #4a4a4a;
  border-radius: 4px;
  border: 2px solid transparent;
  background-clip: padding-box;
}
.scroll-transparent::-webkit-scrollbar-thumb:hover { background: #6a6a6a; background-clip: padding-box; border: 2px solid transparent; }

/* JSON tree viewer */
.json-viewer {
  color: #d1d5db;
  line-height: 1.55;
}
.jv-details { display: block; }
.jv-details > summary {
  list-style: none;
  cursor: pointer;
  user-select: none;
  color: #9ca3af;
  padding: 1px 0;
}
.jv-details > summary::-webkit-details-marker { display: none; }
.jv-details > summary::before {
  content: '[+]';
  display: inline-block;
  width: 1.5em;
  color: #6b7280;
  font-weight: 600;
}
.jv-details[open] > summary::before {
  content: '[\2212]'; /* '−' minus sign so [+] / [−] are same width */
  color: #6b7280;
}
.jv-details > summary:hover { color: #e5e7eb; }
.jv-details > summary:hover::before { color: #9ca3af; }
.jv-children {
  padding-left: 1.25rem;
  border-left: 1px solid #262626;
  margin-left: 0.4rem;
}
.jv-row { padding: 1px 0; }
.jv-key { color: #c4b5fd; }
.jv-string { color: #6ee7b7; word-break: break-word; }
.jv-number { color: #93c5fd; }
.jv-bool { color: #fbbf24; }
.jv-null { color: #6b7280; font-style: italic; }
.jv-bracket { color: #6b7280; }
