
.fullpage-mode .wf-prompt-preview {
  display: none;
}

.wf-field-preview,
.wf-prompt-preview {
  background: var(--wf-card);
  border: 1px solid var(--wf-border);
  border-radius: var(--wf-radius);
  overflow: hidden;
}

.wf-field-preview h3,
.wf-field-preview h4,
.wf-prompt-preview h3,
.wf-prompt-preview h4 {
  font-size: 13px;
  font-weight: 600;
  color: var(--wf-text);
  margin: 0;
  padding: 12px 14px;
  border-bottom: 1px solid var(--wf-border);
}

.wf-field-preview-body,
.wf-prompt-preview-body {
  padding: 14px;
  font-size: 14px;
  line-height: 1.6;
  color: var(--wf-text-secondary);
  white-space: pre-wrap;
  word-break: break-word;
}

.wf-prompt-preview-body .wf-var-highlight {
  background: rgba(56, 69, 81, 0.08);
  color: var(--color-text-primary, #384551);
  padding: 1px 6px;
  border-radius: 4px;
  font-weight: 600;
  font-size: 13px;
}

.wf-field-preview-body label {
  display: block;
  font-size: 13px;
  font-weight: 600;
  margin-bottom: 5px;
  color: var(--wf-text);
}
.wf-field-preview-body input,
.wf-field-preview-body textarea,
.wf-field-preview-body select {
  width: 100%;
  padding: 9px 12px;
  border: 1px solid var(--wf-border);
  border-radius: 8px;
  font-size: 14px;
  font-family: inherit;
  color: var(--wf-text-secondary);
  background: var(--wf-bg);
  pointer-events: none;
  box-sizing: border-box;
}

.wf-field-preview-body:empty::after {
  content: "Tilføj felter for at se en forhåndsvisning";
  display: block;
  text-align: center;
  padding: 24px;
  color: var(--wf-text-secondary);
  font-size: 13px;
  opacity: 0.6;
}
.wf-prompt-preview-body:empty::after {
  content: "Skriv en skabelon ovenfor for at se eksempel her";
  display: block;
  text-align: center;
  padding: 24px;
  color: var(--wf-text-secondary);
  opacity: 0.6;
  font-size: 13px;
}

.wf-create-nav {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 16px 0;
  background: transparent;
  border-top: 1px solid var(--wf-border);
  margin-top: 24px;
}
.wf-create-nav .wf-btn {
  min-height: 40px;
  font-size: 14px;
  justify-content: center;
}
.wf-create-nav .wf-btn-primary,
.wf-create-nav #wf-save-final {
  flex: 0 0 auto;
  margin-left: auto;
}
.wf-create-nav .wf-btn-ghost {
  flex: 0 0 auto;
}

.wf-input.wf-error {
  border-color: #ef4444;
  box-shadow: 0 0 0 3px rgba(239, 68, 68, 0.08);
}
.wf-error-msg {
  color: #ef4444;
  font-size: 13px;
  margin-top: 4px;
  display: flex;
  align-items: center;
  gap: 4px;
}
[data-theme="dark"] .wf-error-msg {
  color: #f87171;
}

.wf-btn-skip {
  color: var(--wf-text-secondary);
  background: transparent;
  border: 1px dashed var(--wf-border);
  border-radius: 8px;
  padding: 8px 16px;
  font-size: 14px;
  font-family: inherit;
  cursor: pointer;
  transition: color 150ms ease, border-color 150ms ease, background 150ms ease;
  min-height: 44px;
  display: inline-flex;
  align-items: center;
  gap: 6px;
}
.wf-btn-skip:hover {
  color: var(--wf-text);
  border-color: var(--wf-text-secondary);
}
.wf-btn-skip:focus-visible {
  outline: 2px solid rgba(100, 116, 139, 0.5);
  outline-offset: 2px;
}
[data-theme="dark"] .wf-btn-skip {
  color: var(--wf-text-secondary);
  border-color: var(--wf-border);
}
[data-theme="dark"] .wf-btn-skip:hover {
  color: var(--wf-text);
  border-color: var(--wf-text-secondary);
}

.wf-autosave svg {
  width: 14px;
  height: 14px;
  opacity: 0.6;
}

.wf-step1-ai {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 10px;
  margin-top: 16px;
  padding-top: 16px;
  border-top: 1px solid var(--wf-border);
}
.wf-step1-generate-btn {
  gap: 8px;
  font-size: 15px;
  font-weight: 600;
  height: 44px;
  padding: 0 28px;
}
.wf-step1-generate-btn svg {
  width: 18px;
  height: 18px;
  flex-shrink: 0;
}
.wf-step1-skip-link {
  font-size: 13px;
  color: var(--wf-text-secondary);
  text-decoration: none;
  transition: color 150ms ease;
}
.wf-step1-skip-link:hover {
  color: var(--color-text-primary, #384551);
}
.wf-step1-ai-status {
  font-size: 14px;
  line-height: 1.5;
  color: var(--wf-text-secondary);
  min-height: 0;
}
.wf-step1-ai-status:empty { display: none; }
.wf-step1-ai-status.wf-status-success {
  color: var(--color-success, #28a745);
  font-weight: 500;
}
.wf-step1-ai-status.wf-status-error {
  color: var(--color-danger, #dc3545);
  font-weight: 500;
}
.wf-step1-ai-status.wf-status-loading {
  color: var(--color-text-primary, #384551);
  font-weight: 500;
}

.wf-ai-badge {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  font-size: 11px;
  font-weight: 600;
  color: var(--color-text-primary, #384551);
  background: rgba(56, 69, 81, 0.08);
  padding: 2px 8px;
  border-radius: 10px;
  margin-left: 8px;
}

.wf-section-nav {
  display: flex;
  gap: 8px;
  padding: 10px 0;
  margin-bottom: 16px;
}
.wf-section-nav-btn {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 6px 14px;
  border-radius: 50rem;
  font-size: 13px;
  font-weight: 600;
  font-family: inherit;
  border: 1.5px solid var(--wf-border);
  background: var(--wf-card);
  color: var(--wf-text-secondary);
  cursor: pointer;
  transition: border-color 150ms ease, color 150ms ease, background 150ms ease;
}
.wf-section-nav-btn:hover {
  border-color: var(--color-text-primary, #384551);
  color: var(--color-text-primary, #384551);
}
.wf-section-nav-btn.active {
  border-color: var(--color-text-primary, #384551);
  background: rgba(56,69,81,0.06);
  color: var(--color-text-primary, #384551);
}
.wf-section-nav-badge {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 20px;
  height: 20px;
  padding: 0 6px;
  border-radius: 10px;
  font-size: 11px;
  font-weight: 700;
  background: rgba(56,69,81,0.08);
  color: var(--color-text-primary, #384551);
}
.wf-section-nav-dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: var(--color-text-primary, #384551);
  flex-shrink: 0;
  opacity: 0;
  transition: opacity 200ms ease;
}
.wf-section-nav-dot.visible {
  opacity: 1;
}

.wf-section-divider {
  border: none;
  border-top: 1.5px solid var(--wf-border);
  margin: 24px 0;
}

.wf-section-header {
  font-size: 16px;
  font-weight: 700;
  color: var(--wf-text);
  margin: 0 0 16px;
  scroll-margin-top: 56px;
}

.wf-ai-fields-banner {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 10px 14px;
  background: rgba(128,128,128,0.04);
  border: 1px solid var(--wf-border);
  border-radius: 8px;
  font-size: 13px;
  color: var(--wf-text-secondary);
  margin-bottom: 16px;
}
.wf-ai-fields-banner svg {
  flex-shrink: 0;
  width: 16px;
  height: 16px;
}
.wf-ai-fields-banner-dismiss {
  margin-left: auto;
  background: none;
  border: none;
  color: var(--wf-text-secondary);
  cursor: pointer;
  padding: 4px;
  font-size: 16px;
  line-height: 1;
  border-radius: 4px;
}
.wf-ai-fields-banner-dismiss:hover {
  color: var(--wf-text);
  background: rgba(0, 0, 0, 0.05);
}

[data-theme="dark"] .wf-step1-ai {
  border-top-color: var(--wf-border);
}
[data-theme="dark"] .wf-step1-skip-link:hover {
  color: #e2e8f0;
}
[data-theme="dark"] .wf-section-nav-btn {
  background: var(--wf-card);
  border-color: var(--wf-border);
}
[data-theme="dark"] .wf-section-nav-btn:hover,
[data-theme="dark"] .wf-section-nav-btn.active {
  border-color: var(--wf-text, #e2e8f0);
}
[data-theme="dark"] .wf-ai-fields-banner {
  background: rgba(255,255,255,0.04);
  border-color: var(--wf-border);
}
[data-theme="dark"] .wf-ai-fields-banner-dismiss:hover {
  background: rgba(255, 255, 255, 0.08);
}

@media (max-width: 767px) {
  .wf-step1-ai {
    align-items: stretch;
  }
  .wf-step1-generate-btn {
    width: 100%;
    justify-content: center;
  }
  .wf-step1-skip-link {
    text-align: center;
  }
}

.wf-mobile-progress {
  display: none; 
  flex-direction: column;
  gap: 6px;
  margin-bottom: 20px;
}
.wf-mobile-progress-text {
  font-size: 13px;
  font-weight: 600;
  color: var(--wf-muted);
}
.wf-mobile-progress-bar {
  height: 4px;
  background: var(--wf-border);
  border-radius: 2px;
  overflow: hidden;
}
.wf-mobile-progress-fill {
  height: 100%;
  background: var(--color-text-primary, #384551);
  border-radius: 2px;
  transition: width 300ms ease;
}

.wf-confirm-overlay {
  position: fixed;
  inset: 0;
  z-index: 9999;
  display: flex;
  align-items: center;
  justify-content: center;
  background: rgba(0,0,0,0.4);
}
[data-theme="dark"] .wf-confirm-overlay { background: rgba(0,0,0,0.6); }

.wf-confirm-overlay > .wf-confirm-dialog {
  position: relative;
  background: var(--wf-bg, #fff);
  border-radius: 12px;
  padding: 28px;
  max-width: 400px;
  width: 90%;
  box-shadow: 0 8px 32px rgba(0,0,0,0.15);
  text-align: center;
}
[data-theme="dark"] .wf-confirm-overlay > .wf-confirm-dialog { background: #1a2035; box-shadow: 0 8px 32px rgba(0,0,0,0.4); border: 1px solid #334155; }

.wf-confirm-icon { display: flex; justify-content: center; }
.wf-confirm-icon svg { width: 40px; height: 40px; color: var(--wf-error, #ef4444); margin-bottom: 12px; }
.wf-confirm-title { font-size: 18px; font-weight: 700; color: var(--wf-text, #2b3147); margin: 0 0 8px; }
[data-theme="dark"] .wf-confirm-title { color: #e2e8f0; }
.wf-confirm-message { font-size: 14px; color: var(--wf-muted, #8e94a4); margin: 0 0 20px; line-height: 1.5; }
[data-theme="dark"] .wf-confirm-message { color: #94a3b8; }
.wf-confirm-actions { display: flex; gap: 10px; justify-content: center; }
.wf-confirm-actions .wf-btn-ghost { color: #64748b; background: transparent; border: 1px solid #e2e8f0; }
.wf-confirm-actions .wf-btn-ghost:hover { background: #f1f5f9; color: #2b3147; }
[data-theme="dark"] .wf-confirm-actions .wf-btn-ghost { color: #94a3b8; border-color: #334155; }
[data-theme="dark"] .wf-confirm-actions .wf-btn-ghost:hover { background: #1e293b; color: #e2e8f0; }
.wf-btn-danger { background: var(--wf-error, #ef4444); color: #fff; border: none; }
.wf-btn-danger:hover { background: #c93d5c; }
[data-theme="dark"] .wf-btn-danger { background: #f43f5e; color: #fff; }
[data-theme="dark"] .wf-btn-danger:hover { background: #e11d48; }

.wf-confirm-dialog[id] {
  position: fixed;
  inset: 0;
  z-index: 9999;
  display: flex;
  align-items: center;
  justify-content: center;
}

.wf-confirm-dialog-backdrop {
  position: absolute;
  inset: 0;
  background: rgba(0,0,0,0.4);
}
[data-theme="dark"] .wf-confirm-dialog-backdrop { background: rgba(0,0,0,0.6); }

.wf-confirm-dialog-content {
  position: relative;
  z-index: 1;
  background: var(--wf-bg, #fff);
  border-radius: 12px;
  padding: 28px;
  max-width: 400px;
  width: 90%;
  box-shadow: 0 8px 32px rgba(0,0,0,0.15);
  text-align: center;
}
[data-theme="dark"] .wf-confirm-dialog-content { background: #1a2035; box-shadow: 0 8px 32px rgba(0,0,0,0.4); border: 1px solid #334155; }

.wf-confirm-dialog-content h3 {
  font-size: 18px;
  font-weight: 700;
  color: var(--wf-text, #2b3147);
  margin: 0 0 8px;
}
[data-theme="dark"] .wf-confirm-dialog-content h3 { color: #e2e8f0; }

.wf-confirm-dialog-content p {
  font-size: 14px;
  color: var(--wf-muted, #8e94a4);
  margin: 0 0 20px;
  line-height: 1.5;
}
[data-theme="dark"] .wf-confirm-dialog-content p { color: #94a3b8; }

.wf-confirm-dialog-actions {
  display: flex;
  gap: 10px;
  justify-content: center;
}
.wf-confirm-dialog-actions .wf-btn-ghost { color: #64748b; background: transparent; border: 1px solid #e2e8f0; }
.wf-confirm-dialog-actions .wf-btn-ghost:hover { background: #f1f5f9; color: #2b3147; }
[data-theme="dark"] .wf-confirm-dialog-actions .wf-btn-ghost { color: #94a3b8; border-color: #334155; }
[data-theme="dark"] .wf-confirm-dialog-actions .wf-btn-ghost:hover { background: #1e293b; color: #e2e8f0; }

.wf-slide-forward {
  animation: wf-slide-in-right 200ms ease-out;
}
.wf-slide-backward {
  animation: wf-slide-in-left 200ms ease-out;
}
@keyframes wf-slide-in-right {
  from { opacity: 0.7; transform: translateX(24px); }
  to { opacity: 1; transform: translateX(0); }
}
@keyframes wf-slide-in-left {
  from { opacity: 0.7; transform: translateX(-24px); }
  to { opacity: 1; transform: translateX(0); }
}
@media (prefers-reduced-motion: reduce) {
  .wf-slide-forward,
  .wf-slide-backward { animation: none; }
}
