
.wf-runner .wf-form {
  background: var(--wf-card);
  border: 1.5px solid var(--wf-border);
  border-radius: 16px;
  padding: 28px 32px 0;
  box-shadow: 0 1px 3px rgba(0,0,0,0.04), 0 4px 16px rgba(0,0,0,0.04);
}
[data-theme="dark"] .wf-runner .wf-form {
  box-shadow: 0 1px 3px rgba(0,0,0,0.2), 0 4px 16px rgba(0,0,0,0.15);
  border-color: rgba(255,255,255,0.06);
}

.wf-page-header {
  display: flex;
  flex-direction: column;
  gap: 0;
  margin-bottom: 20px;
  padding: 4px 0 12px;
}
.wf-back-link {
  background: none;
  border: none;
  cursor: pointer;
  color: var(--wf-text-secondary);
  padding: 6px 12px 6px 0;
  font-size: 13px;
  font-weight: 600;
  font-family: inherit;
  display: inline-flex;
  align-items: center;
  gap: 4px;
  width: fit-content;
  margin-bottom: 4px;
  transition: color 200ms ease, transform 200ms ease;
}
.wf-back-link:hover {
  color: var(--color-text-primary, #384551);
  transform: translateX(-2px);
}

.wf-runner-title-row {
  display: flex;
  align-items: center;
  gap: 14px;
}

.wf-page-title {
  font-size: 22px;
  font-weight: 800;
  color: var(--wf-text);
  letter-spacing: -0.3px;
  margin: 0;
}
.wf-page-desc {
  font-size: 14px;
  color: var(--wf-text-secondary);
  margin: 4px 0 0;
  line-height: 1.5;
}

.wf-runner-header {
  background: var(--wf-runner-header-bg, rgba(128,128,128,0.03));
  border: 1px solid var(--wf-runner-header-border, var(--wf-border));
  border-radius: var(--wf-radius);
  padding: 20px 24px 16px;
  margin-bottom: 20px;
  border-bottom: 2px solid var(--wf-runner-header-border, var(--wf-border));
}
[data-theme="dark"] .wf-runner-header {
  background: rgba(255,255,255,0.03);
  border-color: rgba(255,255,255,0.08);
  border-bottom-color: rgba(255,255,255,0.10);
}

.wf-runner-desc.wf-clamped {
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}
.wf-runner-desc.wf-expanded {
  display: block;
  -webkit-line-clamp: unset;
  overflow: visible;
}
.wf-runner-desc-toggle {
  background: none;
  border: none;
  cursor: pointer;
  color: var(--color-text-secondary, #646e78);
  font-size: 13px;
  font-weight: 600;
  font-family: inherit;
  padding: 2px 0;
  margin-top: 2px;
  display: none;
}
.wf-runner-desc-toggle:hover {
  text-decoration: underline;
}

.wf-btn-loading {
  pointer-events: none;
  opacity: 0.85;
}
.wf-btn-loading .wf-spinner {
  width: 16px;
  height: 16px;
  border-width: 2px;
  vertical-align: middle;
  margin-right: 6px;
  display: inline-block;
}
.wf-btn-success {
  background: var(--color-text-primary, #384551) !important;
  color: #fff !important;
  pointer-events: none;
}
.wf-btn-success svg {
  width: 16px;
  height: 16px;
  vertical-align: middle;
  margin-right: 4px;
}

.wf-runner-settings .wf-field textarea {
  max-height: 72px;
  resize: none;
  overflow-y: auto;
}
.wf-runner-settings .wf-stt-btn {
  display: none;
}

.wf-form {
  display: flex;
  flex-direction: column;
  gap: 20px;
  background: var(--wf-card);
  border: 1px solid var(--wf-border);
  border-radius: var(--wf-radius);
  padding: 20px;
}
.wf-field label {
  display: block;
  font-size: 14px;
  font-weight: 700;
  margin-bottom: 8px;
  color: var(--wf-text);
  letter-spacing: -0.1px;
}

.wf-field label.wf-multiselect-option {
  display: flex;
  margin-bottom: 0;
}
.wf-field label .wf-required { color: #e05252; margin-left: 2px; font-weight: 400; }

.wf-field input,
.wf-field textarea,
.wf-field select {
  width: 100%;
  height: 44px;
  padding: 0 14px;
  border: 1.5px solid var(--wf-border);
  border-radius: 8px;
  font-size: 15px;
  font-family: inherit;
  color: var(--wf-text);
  background: var(--wf-bg);
  transition: border-color 200ms ease, box-shadow 200ms ease;
  box-sizing: border-box;
}
.wf-field input:focus,
.wf-field textarea:focus,
.wf-field select:focus {
  outline: none;
  border-color: var(--wf-border);
  box-shadow: none;
}

.wf-field select {
  appearance: none;
  -webkit-appearance: none;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' viewBox='0 0 24 24' fill='none' stroke='%238e94a4' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpolyline points='6 9 12 15 18 9'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right 14px center;
  padding-right: 38px;
  cursor: pointer;
}
.wf-field textarea {
  height: auto;
  padding: 12px 14px;
  resize: vertical;
  min-height: 80px;
}
.wf-field textarea.wf-raw-textarea {
  min-height: 200px;
}

.wf-field input::placeholder,
.wf-field textarea::placeholder {
  color: var(--wf-text-secondary);
  opacity: 0.6;
}

.wf-submit-row {
  display: flex;
  gap: 10px;
  margin-top: 8px;
  padding-top: 0;
  padding-bottom: 24px;
  justify-content: center;
  border-top: none;
}
.wf-submit-row .wf-btn {
  flex: 0 1 auto;
  justify-content: center;
  padding: 14px 48px;
  font-size: 16px;
  font-weight: 700;
  height: 52px;
  border-radius: 12px;
  letter-spacing: 0.2px;
  box-shadow: 0 4px 14px rgba(34,48,62,0.18);
  transition: all 250ms cubic-bezier(.4,0,.2,1);
}
.wf-submit-row .wf-btn:hover {
  box-shadow: 0 6px 20px rgba(34,48,62,0.22);
  transform: translateY(-2px);
}
.wf-submit-row .wf-btn:active {
  transform: translateY(0);
  box-shadow: 0 2px 8px rgba(34,48,62,0.15);
}

.wf-output {
  display: none;
  margin-top: 28px;
  background: #f0f0f0;
  border: none;
  border-radius: 4px;
  overflow: hidden;
}
.wf-output.active {
  display: block;
  animation: wfOutputIn 400ms cubic-bezier(.4,0,.2,1);
}
@keyframes wfOutputIn {
  from { opacity: 0; transform: translateY(16px); }
  to   { opacity: 1; transform: translateY(0); }
}

.wf-output-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 8px 16px;
  border-bottom: 1px solid #dadce0;
  background: #fff;
}
.wf-output-label {
  font-size: 13px;
  font-weight: 600;
  color: var(--wf-text-secondary, #5f6368);
  display: flex;
  align-items: center;
  gap: 6px;
  letter-spacing: 0.01em;
}
.wf-output-label svg {
  opacity: 0.6;
}
.wf-output-actions { display: flex; gap: 4px; flex-wrap: wrap; }
.wf-output-actions .wf-btn {
  transition: all 120ms ease;
  font-size: 13px;
  padding: 6px 10px;
  border-radius: 4px;
  color: #5f6368;
  height: 32px;
}
.wf-output-actions .wf-btn:hover {
  background: #f1f3f4;
  color: #202124;
}
.wf-output-actions .wf-btn:active {
  background: #e8eaed;
}

.wf-output-body {
  padding: 48px 56px;
  font-size: 16px;
  line-height: 1.8;
  white-space: pre-wrap;
  color: var(--wf-text);
  position: relative;
  background: #fff;
  margin: 16px;
  border-radius: 2px;
  box-shadow: 0 1px 3px rgba(0,0,0,0.12), 0 1px 2px rgba(0,0,0,0.06);
  min-height: 400px;
}

[data-theme="dark"] .wf-output {
  background: #1a1a2e;
}
[data-theme="dark"] .wf-output-header {
  background: var(--wf-card, #1e293b);
  border-bottom-color: rgba(255,255,255,0.08);
}
[data-theme="dark"] .wf-output-label {
  color: var(--wf-text-secondary, #94a3b8);
}
[data-theme="dark"] .wf-output-actions .wf-btn {
  color: var(--wf-text-secondary, #94a3b8);
}
[data-theme="dark"] .wf-output-actions .wf-btn:hover {
  background: rgba(255,255,255,0.06);
  color: #e2e8f0;
}
[data-theme="dark"] .wf-output-body {
  background: var(--wf-card, #1e293b);
  box-shadow: 0 1px 3px rgba(0,0,0,0.3);
}
.wf-output-body h1, .wf-output-body h2, .wf-output-body h3 { margin: 20px 0 10px; font-weight: 700; color: var(--wf-text); }
.wf-output-body h2 { font-size: 17px; }
.wf-output-body h3 { font-size: 15px; }
.wf-output-body p { margin: 0 0 12px; }
.wf-output-body ul, .wf-output-body ol { margin: 0 0 12px; padding-left: 20px; }
.wf-output-body strong { font-weight: 650; }

.wf-loading {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 16px;
  padding: 48px 20px;
  color: var(--wf-text-secondary);
  font-size: 14px;
}
.wf-loading-text {
  font-weight: 700;
  font-size: 15px;
  color: var(--wf-text);
  animation: loadingTextPulse 2s ease-in-out infinite;
}
@keyframes loadingTextPulse {
  0%, 100% { opacity: 1; }
  50% { opacity: 0.6; }
}
.wf-spinner {
  width: 28px;
  height: 28px;
  border: 3px solid var(--wf-border);
  border-top-color: var(--color-text-primary, #384551);
  border-radius: 50%;
  animation: wf-spin 0.7s linear infinite;
}

.wf-output-skeleton {
  display: flex;
  flex-direction: column;
  gap: 14px;
  padding: 32px 36px;
}
.wf-output-skeleton-line {
  height: 14px;
  border-radius: 8px;
  background: linear-gradient(90deg,
    var(--wf-neutral-bg, #f1f5f9) 25%,
    rgba(56, 69, 81, 0.06) 50%,
    var(--wf-neutral-bg, #f1f5f9) 75%
  );
  background-size: 200% 100%;
  animation: skeletonShimmer 1.8s ease-in-out infinite;
}
@keyframes skeletonShimmer {
  0%   { background-position: 200% 0; }
  100% { background-position: -200% 0; }
}
.wf-output-skeleton-line:nth-child(1) { width: 40%; height: 20px; border-radius: 10px; }
.wf-output-skeleton-line:nth-child(2) { width: 95%; animation-delay: 0.1s; }
.wf-output-skeleton-line:nth-child(3) { width: 88%; animation-delay: 0.2s; }
.wf-output-skeleton-line:nth-child(4) { width: 70%; animation-delay: 0.3s; }
.wf-output-skeleton-line:nth-child(5) { width: 92%; animation-delay: 0.4s; }
.wf-output-skeleton-line:nth-child(6) { width: 60%; animation-delay: 0.5s; }
[data-theme="dark"] .wf-output-skeleton-line {
  background: linear-gradient(90deg,
    rgba(255,255,255,0.04) 25%,
    rgba(255,255,255,0.08) 50%,
    rgba(255,255,255,0.04) 75%
  );
  background-size: 200% 100%;
}

.wf-btn-copied {
  color: #10b981 !important;
  border-color: #10b981;
  background: rgba(16, 185, 129, 0.06);
  animation: wfCopyPulse 600ms cubic-bezier(.4, 0, .2, 1);
}
@keyframes wfCopyPulse {
  0%   { box-shadow: 0 0 0 0 rgba(16, 185, 129, 0.35); }
  60%  { box-shadow: 0 0 0 8px rgba(16, 185, 129, 0); }
  100% { box-shadow: none; }
}

.wf-toast {
  position: fixed;
  bottom: 28px;
  left: 50%;
  transform: translateX(-50%) translateY(80px);
  background: var(--color-text-primary, #384551);
  color: #fff;
  padding: 12px 24px;
  border-radius: 12px;
  font-size: 14px;
  font-weight: 600;
  z-index: 9999;
  opacity: 0;
  transition: opacity 300ms cubic-bezier(.4,0,.2,1), transform 300ms cubic-bezier(.4,0,.2,1);
  pointer-events: none;
  box-shadow: 0 8px 32px rgba(0,0,0,0.15);
  max-width: 400px;
}
.wf-toast.active {
  transform: translateX(-50%) translateY(0);
  opacity: 1;
  pointer-events: auto;
}
.wf-toast-action {
  background: none;
  border: none;
  color: inherit;
  font: inherit;
  font-weight: 700;
  text-decoration: underline;
  cursor: pointer;
  margin-left: 12px;
  padding: 2px 4px;
  border-radius: 4px;
  opacity: 0.9;
  transition: opacity 150ms;
}
.wf-toast-action:hover {
  opacity: 1;
}
.wf-toast.wf-toast-error {
  background: #d32f2f;
  color: #fff;
}
[data-theme="dark"] .wf-toast {
  background: #e2e8f0;
  color: #0f172a;
}
[data-theme="dark"] .wf-toast.wf-toast-error {
  background: #ef4444;
  color: #fff;
}

/* ══════════════════════════════════════════════════════════════
   5b. [MANGLER] PLACEHOLDER PILL
   Highlights safety sentinels the AI emits when information is missing
   (e.g. [MANGLER], [MANGLER DATO], [EFTERNAVN MANGLER]). Wrapped by
   highlightManglerPlaceholders() in runner.js after Quill init.
   ══════════════════════════════════════════════════════════════ */
.wf-mangler-pill {
  display: inline-block;
  padding: 1px 8px;
  margin: 0 1px;
  border-radius: 999px;
  background: #fef3c7;
  color: #92400e;
  font-size: 0.92em;
  font-weight: 600;
  letter-spacing: 0.1px;
  border: 1px solid #fcd34d;
  line-height: 1.4;
  white-space: nowrap;
  cursor: help;
  vertical-align: baseline;
}
[data-theme="dark"] .wf-mangler-pill {
  background: rgba(251, 191, 36, 0.18);
  color: #fcd34d;
  border-color: rgba(251, 191, 36, 0.4);
}

/* ══════════════════════════════════════════════════════════════
   6. CREATION WIZARD — Steps, Form Sections, Inputs
