/* ============================================================
   Lebenslauf Generator — Builder/Wizard Theme (Verxa AI)
   Lädt NACH styles.css und überlagert die Editor-Optik
   ============================================================ */

:root {
  --wz-bg: #0a0a0c;
  --wz-bg-soft: #101014;
  --wz-surface: #141419;
  --wz-surface-2: #1a1a21;
  --wz-line: rgba(255, 255, 255, 0.08);
  --wz-line-soft: rgba(255, 255, 255, 0.05);
  --wz-text: #f4f4f6;
  --wz-muted: #9d9da8;
  --wz-muted-2: #6e6e78;
  --wz-brand: #6d7cf5;
  --wz-brand-strong: #4f46e5;
  --wz-brand-soft: rgba(109, 124, 245, 0.14);
  --wz-danger: #f87171;
  --wz-font-display: "Space Grotesk", "Inter", -apple-system, "Segoe UI", sans-serif;
  --wz-font-body: "Inter", -apple-system, "Segoe UI", Roboto, sans-serif;
}

* { box-sizing: border-box; }

html, body { height: 100%; }

body.wz-body {
  background: var(--wz-bg);
  color: var(--wz-text);
  font-family: var(--wz-font-body);
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
}

body.wz-body::before {
  content: "";
  position: fixed;
  inset: 0;
  background:
    radial-gradient(640px 420px at 12% -8%, rgba(99, 102, 241, 0.16), transparent 65%),
    radial-gradient(520px 420px at 95% 110%, rgba(56, 189, 248, 0.08), transparent 65%);
  pointer-events: none;
  z-index: 0;
}

::selection { background: rgba(109, 124, 245, 0.35); color: #fff; }

/* ---------- Topbar ---------- */
.wz-topbar {
  position: fixed;
  top: 0; left: 0; right: 0;
  z-index: 60;
  display: flex;
  align-items: center;
  gap: 22px;
  padding: 13px 26px;
  background: rgba(10, 10, 12, 0.82);
  backdrop-filter: blur(14px);
  -webkit-backdrop-filter: blur(14px);
  border-bottom: 1px solid var(--wz-line-soft);
}

.wz-brand {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  font-family: var(--wz-font-display);
  font-weight: 700;
  font-size: 16px;
  letter-spacing: -0.01em;
  white-space: nowrap;
}
.wz-brand-mark { display: inline-flex; filter: drop-shadow(0 4px 12px rgba(99, 102, 241, 0.5)); }

.wz-progress { flex: 1; max-width: 520px; margin: 0 auto; }
.wz-progress-meta {
  display: flex;
  justify-content: space-between;
  font-size: 12.5px;
  font-weight: 600;
  color: var(--wz-muted);
  margin-bottom: 6px;
  letter-spacing: 0.02em;
}
#wzPct { color: var(--wz-brand); font-variant-numeric: tabular-nums; }

.wz-progress-track {
  height: 6px;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.08);
  overflow: hidden;
}
.wz-progress-fill {
  height: 100%;
  width: 0%;
  border-radius: 999px;
  background: linear-gradient(90deg, #7c8cf8, #a78bfa);
  box-shadow: 0 0 14px rgba(124, 140, 248, 0.55);
  transition: width 0.45s cubic-bezier(0.22, 0.61, 0.36, 1);
}

.wz-preview-toggle {
  display: none;
  align-items: center;
  gap: 8px;
  padding: 9px 15px;
  border-radius: 11px;
  background: rgba(255, 255, 255, 0.05);
  border: 1px solid var(--wz-line);
  color: var(--wz-text);
  font-family: var(--wz-font-body);
  font-size: 13.5px;
  font-weight: 600;
  cursor: pointer;
  transition: background 0.2s ease, border-color 0.2s ease;
}
.wz-preview-toggle:hover { background: rgba(255, 255, 255, 0.09); }

/* ---------- Layout ---------- */
.wz-layout {
  position: relative;
  z-index: 1;
  display: grid;
  grid-template-columns: minmax(380px, 500px) 1fr;
  gap: 28px;
  max-width: 1460px;
  margin: 0 auto;
  padding: 92px 26px 40px;
  min-height: 100vh;
}

/* ---------- Wizard panel ---------- */
.wz-panel {
  display: flex;
  flex-direction: column;
  background: linear-gradient(180deg, var(--wz-surface) 0%, var(--wz-bg-soft) 100%);
  border: 1px solid var(--wz-line-soft);
  border-radius: 22px;
  padding: 30px 30px 22px;
  box-shadow: 0 30px 70px -30px rgba(0, 0, 0, 0.65);
  height: calc(100vh - 132px);
  position: sticky;
  top: 92px;
}

.wz-step-wrap {
  flex: 1;
  overflow-y: auto;
  padding-right: 6px;
}
.wz-step-wrap::-webkit-scrollbar { width: 8px; }
.wz-step-wrap::-webkit-scrollbar-thumb { background: rgba(255, 255, 255, 0.12); border-radius: 8px; }

/* Step transitions */
#wzStepContent { transition: opacity 0.22s ease, transform 0.22s ease; }
#wzStepContent.wz-leave { opacity: 0; transform: translateX(-14px); }
#wzStepContent.wz-leave-back { opacity: 0; transform: translateX(14px); }
#wzStepContent.wz-enter { opacity: 0; transform: translateX(14px); }

/* Step header */
.wz-step-kicker {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-size: 12px;
  font-weight: 600;
  letter-spacing: 0.13em;
  text-transform: uppercase;
  color: var(--wz-brand);
  background: var(--wz-brand-soft);
  border: 1px solid rgba(109, 124, 245, 0.26);
  padding: 6px 13px;
  border-radius: 999px;
  margin-bottom: 16px;
}
.wz-step-kicker .dot {
  width: 6px; height: 6px; border-radius: 50%;
  background: var(--wz-brand);
  box-shadow: 0 0 10px 2px rgba(109, 124, 245, 0.7);
}
.wz-step-title {
  font-family: var(--wz-font-display);
  font-size: clamp(22px, 2.6vw, 28px);
  font-weight: 700;
  letter-spacing: -0.02em;
  line-height: 1.16;
  margin-bottom: 8px;
}
.wz-step-sub { color: var(--wz-muted); font-size: 15px; margin-bottom: 24px; }

/* Fields (override styles.css light form look) */
.wz-field { margin-bottom: 16px; }
.wz-field label {
  display: block;
  font-size: 13px;
  font-weight: 600;
  color: var(--wz-muted);
  margin-bottom: 7px;
  letter-spacing: 0.02em;
}
.wz-field label .opt { color: var(--wz-muted-2); font-weight: 500; }
.wz-field input,
.wz-field textarea,
.wz-field select {
  width: 100%;
  background: var(--wz-surface-2);
  border: 1px solid var(--wz-line);
  border-radius: 12px;
  color: var(--wz-text);
  font-family: var(--wz-font-body);
  font-size: 15px;
  padding: 12px 14px;
  outline: none;
  transition: border-color 0.2s ease, box-shadow 0.2s ease, background 0.2s ease;
}
.wz-field textarea { resize: vertical; min-height: 96px; line-height: 1.55; }
.wz-field input::placeholder, .wz-field textarea::placeholder { color: var(--wz-muted-2); }
.wz-field input:focus, .wz-field textarea:focus, .wz-field select:focus {
  border-color: rgba(124, 140, 248, 0.65);
  box-shadow: 0 0 0 4px rgba(99, 102, 241, 0.18);
  background: #1d1d25;
}
.wz-field input[type="date"] { color-scheme: dark; min-height: 47px; }
.wz-field select { min-height: 47px; cursor: pointer; }

.wz-grid-2 { display: grid; grid-template-columns: 1fr 1fr; gap: 14px; }

.wz-error {
  color: var(--wz-danger);
  font-size: 13px;
  font-weight: 500;
  margin: -6px 0 12px;
  display: none;
}
.wz-error.show { display: block; animation: wzShake 0.3s ease; }
.wz-field.invalid input { border-color: rgba(248, 113, 113, 0.7); }
@keyframes wzShake {
  0%, 100% { transform: translateX(0); }
  33% { transform: translateX(-4px); }
  66% { transform: translateX(4px); }
}

/* Entries (dynamic lists inside wizard) */
.wz-entries { display: flex; flex-direction: column; gap: 14px; margin-bottom: 14px; }
.wz-entry {
  position: relative;
  background: var(--wz-surface-2);
  border: 1px solid var(--wz-line);
  border-radius: 14px;
  padding: 16px 16px 4px;
}
.wz-entry-remove {
  position: absolute;
  top: 10px; right: 10px;
  width: 30px; height: 30px;
  border-radius: 9px;
  border: 1px solid var(--wz-line);
  background: rgba(255, 255, 255, 0.04);
  color: var(--wz-muted);
  font-size: 17px;
  line-height: 1;
  cursor: pointer;
  transition: color 0.2s, background 0.2s, border-color 0.2s;
}
.wz-entry-remove:hover { color: var(--wz-danger); background: rgba(248, 113, 113, 0.1); border-color: rgba(248, 113, 113, 0.4); }

.wz-btn-add {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  width: 100%;
  justify-content: center;
  padding: 12px;
  border-radius: 12px;
  border: 1.5px dashed rgba(124, 140, 248, 0.4);
  background: rgba(109, 124, 245, 0.07);
  color: var(--wz-brand);
  font-family: var(--wz-font-body);
  font-size: 14px;
  font-weight: 600;
  cursor: pointer;
  transition: background 0.2s ease, border-color 0.2s ease;
}
.wz-btn-add:hover { background: rgba(109, 124, 245, 0.14); border-color: rgba(124, 140, 248, 0.65); }

.wz-empty {
  color: var(--wz-muted-2);
  font-size: 14px;
  text-align: center;
  padding: 18px 12px;
  border: 1px dashed var(--wz-line);
  border-radius: 12px;
  margin-bottom: 14px;
}

/* File inputs */
.wz-file { position: relative; }
.wz-file input[type="file"] {
  width: 100%;
  padding: 11px;
  background: var(--wz-surface-2);
  border: 1px dashed var(--wz-line);
  border-radius: 12px;
  color: var(--wz-muted);
  font-size: 14px;
  cursor: pointer;
}
.wz-file input[type="file"]::file-selector-button {
  margin-right: 12px;
  padding: 8px 14px;
  border-radius: 9px;
  border: none;
  background: linear-gradient(135deg, #7c8cf8, var(--wz-brand-strong));
  color: #fff;
  font-family: var(--wz-font-body);
  font-size: 13px;
  font-weight: 600;
  cursor: pointer;
}
.wz-file-note { margin-top: 8px; font-size: 13px; color: var(--wz-muted-2); }
.wz-file-note button {
  background: none; border: none; color: var(--wz-danger);
  font-size: 13px; font-weight: 600; cursor: pointer; padding: 0 0 0 6px;
  font-family: var(--wz-font-body);
}

/* Swatches */
.wz-swatches { display: flex; gap: 13px; flex-wrap: wrap; }
.wz-swatch {
  width: 46px; height: 46px;
  border-radius: 14px;
  border: 2px solid transparent;
  cursor: pointer;
  position: relative;
  transition: transform 0.18s ease, border-color 0.2s ease, box-shadow 0.2s ease;
}
.wz-swatch:hover { transform: translateY(-3px); }
.wz-swatch.is-active {
  border-color: #fff;
  box-shadow: 0 0 0 4px rgba(255, 255, 255, 0.12), 0 10px 24px -8px rgba(0, 0, 0, 0.6);
}
.wz-swatch.is-active::after {
  content: "";
  position: absolute; inset: 0;
  margin: auto;
  width: 16px; height: 9px;
  border-left: 2.6px solid #fff;
  border-bottom: 2.6px solid #fff;
  transform: rotate(-45deg) translateY(-2px);
}

/* Checkbox */
.wz-check {
  display: flex;
  align-items: center;
  gap: 11px;
  padding: 13px 15px;
  border: 1px solid var(--wz-line);
  border-radius: 12px;
  background: var(--wz-surface-2);
  cursor: pointer;
  font-size: 14.5px;
  color: var(--wz-text);
  user-select: none;
}
.wz-check input { width: 17px; height: 17px; accent-color: var(--wz-brand-strong); cursor: pointer; }

/* Review summary */
.wz-review { display: flex; flex-direction: column; gap: 12px; }
.wz-review-group {
  background: var(--wz-surface-2);
  border: 1px solid var(--wz-line);
  border-radius: 14px;
  padding: 14px 16px;
}
.wz-review-group h4 {
  font-size: 12px;
  font-weight: 600;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--wz-brand);
  margin-bottom: 6px;
}
.wz-review-group p { font-size: 14.5px; color: var(--wz-text); white-space: pre-line; }
.wz-review-group p.muted { color: var(--wz-muted-2); font-style: italic; }

/* ---------- Nav ---------- */
.wz-nav {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding-top: 18px;
  margin-top: 16px;
  border-top: 1px solid var(--wz-line-soft);
}
.wz-nav-right { display: flex; gap: 10px; margin-left: auto; }

.wz-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 12px 20px;
  border-radius: 12px;
  font-family: var(--wz-font-body);
  font-size: 14.5px;
  font-weight: 600;
  cursor: pointer;
  border: 1px solid transparent;
  transition: transform 0.18s ease, box-shadow 0.25s ease, background 0.2s ease, border-color 0.2s ease, opacity 0.2s ease;
}
.wz-btn:active { transform: translateY(1px) scale(0.99); }

.wz-btn-primary {
  background: linear-gradient(135deg, #7c8cf8 0%, var(--wz-brand-strong) 100%);
  color: #fff;
  box-shadow: 0 10px 26px -10px rgba(99, 102, 241, 0.6), inset 0 1px 0 rgba(255, 255, 255, 0.18);
}
.wz-btn-primary:hover:not(:disabled) { transform: translateY(-2px); box-shadow: 0 14px 34px -10px rgba(99, 102, 241, 0.7); }
.wz-btn-primary:disabled { opacity: 0.45; cursor: not-allowed; box-shadow: none; }

.wz-btn-ghost {
  background: rgba(255, 255, 255, 0.04);
  border-color: var(--wz-line);
  color: var(--wz-text);
}
.wz-btn-ghost:hover { background: rgba(255, 255, 255, 0.08); }

.wz-btn-skip { background: none; color: var(--wz-muted); border: none; }
.wz-btn-skip:hover { color: var(--wz-text); }

.wz-btn-lg { padding: 15px 28px; font-size: 16px; border-radius: 14px; }

.wz-hint {
  min-height: 20px;
  margin-top: 10px;
  font-size: 13px;
  color: var(--wz-muted-2);
  text-align: center;
}

.wz-foot {
  margin-top: 14px;
  padding-top: 14px;
  border-top: 1px solid var(--wz-line-soft);
  font-size: 12.5px;
  color: var(--wz-muted-2);
  text-align: center;
}
.wz-foot a { color: var(--wz-muted); font-weight: 600; }
.wz-foot a:hover { color: var(--wz-brand); }

/* ---------- Done screen ---------- */
.wz-done {
  position: fixed;
  inset: 0;
  z-index: 80;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 24px;
  background:
    radial-gradient(700px 480px at 50% -10%, rgba(99, 102, 241, 0.22), transparent 60%),
    var(--wz-bg);
}
.wz-done[hidden] { display: none; }

.wz-done-card {
  max-width: 560px;
  width: 100%;
  text-align: center;
  background: linear-gradient(180deg, var(--wz-surface) 0%, var(--wz-bg-soft) 100%);
  border: 1px solid var(--wz-line-soft);
  border-radius: 26px;
  padding: 52px 40px 40px;
  box-shadow: 0 40px 100px -30px rgba(0, 0, 0, 0.8);
  animation: wzPop 0.5s cubic-bezier(0.22, 0.61, 0.36, 1);
}
@keyframes wzPop {
  from { opacity: 0; transform: translateY(22px) scale(0.97); }
  to { opacity: 1; transform: none; }
}

.wz-done-check {
  width: 76px; height: 76px;
  margin: 0 auto 26px;
  border-radius: 50%;
  display: flex; align-items: center; justify-content: center;
  color: #fff;
  background: linear-gradient(135deg, #34d399, #059669);
  box-shadow: 0 0 0 10px rgba(52, 211, 153, 0.12), 0 18px 40px -12px rgba(16, 185, 129, 0.6);
}

.wz-done-card h1 {
  font-family: var(--wz-font-display);
  font-size: clamp(26px, 3.4vw, 36px);
  font-weight: 700;
  letter-spacing: -0.025em;
  margin-bottom: 12px;
}
.wz-done-sub { color: var(--wz-muted); font-size: 16px; max-width: 420px; margin: 0 auto 32px; }

.wz-done-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 13px;
  justify-content: center;
  margin-bottom: 26px;
}

.wz-done-foot { font-size: 13.5px; color: var(--wz-muted-2); }
.wz-done-foot a { color: var(--wz-brand); font-weight: 600; }
.wz-done-foot a:hover { text-decoration: underline; }

/* ---------- Preview column ---------- */
.wz-preview {
  display: flex;
  flex-direction: column;
  min-width: 0;
}

.wz-preview-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 4px 6px 12px;
  font-size: 12px;
  font-weight: 600;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--wz-muted-2);
}
.wz-preview-close { display: none; }

.wz-preview-scroll {
  flex: 1;
  overflow: auto;
  display: flex;
  justify-content: center;
  padding: 10px 4px 30px;
  border-radius: 18px;
  scrollbar-width: thin;
  scrollbar-color: rgba(255, 255, 255, 0.15) transparent;
}
.wz-preview-scroll::-webkit-scrollbar { width: 8px; height: 8px; }
.wz-preview-scroll::-webkit-scrollbar-thumb { background: rgba(255, 255, 255, 0.12); border-radius: 8px; }

/* CV paper — styles.css liefert das Papier, wir rahmen es dunkel ein */
.wz-preview-scroll .cv {
  transform-origin: top center;
  box-shadow:
    0 0 0 1px rgba(255, 255, 255, 0.09),
    0 40px 90px -25px rgba(0, 0, 0, 0.85),
    0 0 80px -35px rgba(99, 102, 241, 0.45);
}

/* Preview während des PDF-Exports: sichtbar & fixed overlay */
body.wz-exporting { overflow: hidden; }
body.wz-exporting .wz-preview {
  position: fixed;
  inset: 0;
  z-index: 2000;
  background: #ffffff;
  display: flex;
  padding: 18px;
}
body.wz-exporting .wz-preview-head { display: none; }
body.wz-exporting .wz-preview-scroll {
  overflow: visible;
  padding: 0;
  align-items: flex-start;
}
body.wz-exporting .wz-preview-scroll .cv { box-shadow: none; }

/* ---------- Responsive ---------- */
@media (max-width: 1080px) {
  .wz-layout { grid-template-columns: minmax(340px, 460px) 1fr; gap: 20px; }
}

@media (max-width: 900px) {
  .wz-preview-toggle { display: inline-flex; }
  .wz-layout { grid-template-columns: 1fr; padding: 84px 16px 30px; }
  .wz-panel { position: static; height: auto; min-height: calc(100vh - 120px); }

  .wz-preview {
    position: fixed;
    inset: 0;
    z-index: 90;
    background: rgba(8, 8, 10, 0.97);
    backdrop-filter: blur(10px);
    padding: 70px 14px 14px;
    display: none;
  }
  body.wz-preview-open .wz-preview { display: flex; }
  .wz-preview-head { padding: 0 4px 12px; }
  .wz-preview-head span { color: var(--wz-muted); }
  .wz-preview-close {
    display: inline-flex;
    width: 38px; height: 38px;
    align-items: center; justify-content: center;
    border-radius: 11px;
    border: 1px solid var(--wz-line);
    background: rgba(255, 255, 255, 0.05);
    color: var(--wz-text);
    font-size: 22px;
    line-height: 1;
    cursor: pointer;
  }
  .wz-topbar { padding: 11px 16px; gap: 14px; }
  .wz-brand-text { display: none; }
  .wz-progress-meta { font-size: 11.5px; }
}

@media (max-width: 520px) {
  .wz-grid-2 { grid-template-columns: 1fr; }
  .wz-panel { padding: 22px 18px 16px; }
  .wz-nav { flex-wrap: wrap; }
  .wz-done-card { padding: 40px 22px 30px; }
}

/* ---------- Print fallback ---------- */
@media print {
  body.wz-body { background: #ffffff; }
  body.wz-body::before { display: none; }
  .wz-topbar, .wz-panel, .wz-done { display: none !important; }
  .wz-layout { display: block; padding: 0; margin: 0; max-width: none; }
  .wz-preview {
    position: static !important;
    inset: auto;
    display: block !important;
    padding: 0;
    background: #ffffff;
  }
  .wz-preview-head { display: none; }
  .wz-preview-scroll {
    overflow: visible;
    padding: 0;
    display: block;
  }
  .cv { box-shadow: none !important; margin: 0 auto; }
}
