/* ============================================================
   Lebenslauf Generator — templates.css
   Echte Layout-Unterschiede pro Vorlage (DOM kommt aus templates.js).
   Basis (.cv-Größe, --accent-Variablen, Foto-Kreis, .xp, .skill,
   .lang, .cv-hobby) stammt aus styles.css.
   ============================================================ */

/* Gemeinsame Foto-/Initialen-Größen je Vorlage (überschreibt styles.css-Kreise) */
.cv .cv-photo,
.cv .cv-initials { object-fit: cover; }

/* ---------- 1 · modern (Seitenleiste links) — nutzt Basis aus styles.css ---------- */
.cv[data-template="modern"] { display: flex; }
.cv[data-template="modern"] .cv-photo,
.cv[data-template="modern"] .cv-initials {
  width: 138px; height: 138px; border-radius: 50%;
  border: 4px solid rgba(255, 255, 255, 0.28);
}
.cv[data-template="modern"] .cv-initials { display: grid; place-items: center; background: var(--accent); font-size: 44px; font-weight: 800; }

/* ---------- 2 · duo (Seitenleiste rechts — gespiegeltes modern) ---------- */
.cv[data-template="duo"] { display: flex; flex-direction: row-reverse; }
.cv[data-template="duo"] .cv-photo,
.cv[data-template="duo"] .cv-initials {
  width: 138px; height: 138px; border-radius: 50%;
  border: 4px solid rgba(255, 255, 255, 0.28);
}
.cv[data-template="duo"] .cv-initials { display: grid; place-items: center; background: var(--accent); font-size: 44px; font-weight: 800; }
.cv[data-template="duo"] .cv-side { border-radius: 0; }

/* ---------- 3 · professional (Kopf + Meta-/Inhaltsspalte) ---------- */
.cv[data-template="professional"] { display: block; }
.cv[data-template="professional"] .cv-pro-head {
  display: flex; align-items: center; gap: 26px;
  padding: 40px 44px 30px;
  background: linear-gradient(120deg, var(--accent-dark), var(--accent-darker));
  color: #fff;
}
.cv[data-template="professional"] .cv-pro-photo .cv-photo,
.cv[data-template="professional"] .cv-pro-photo .cv-initials {
  width: 104px; height: 104px; border-radius: 16px; flex-shrink: 0;
  border: 3px solid rgba(255, 255, 255, 0.3);
}
.cv[data-template="professional"] .cv-pro-photo .cv-initials { display: grid; place-items: center; background: var(--accent); font-size: 34px; font-weight: 800; }
.cv[data-template="professional"] .cv-pro-id h2 { margin: 0; font-size: 30px; font-weight: 800; letter-spacing: -0.5px; }
.cv[data-template="professional"] .cv-jobtitle { margin: 3px 0 0; font-size: 14px; font-weight: 600; color: var(--accent-light); }
.cv[data-template="professional"] .cv-pro-contact {
  list-style: none; margin: 12px 0 0; padding: 0;
  display: flex; flex-wrap: wrap; gap: 6px 20px; font-size: 12px;
}
.cv[data-template="professional"] .cv-pro-contact li { display: inline-flex; align-items: center; gap: 6px; color: rgba(255, 255, 255, 0.9); }
.cv[data-template="professional"] .cv-pro-contact svg { width: 13px; height: 13px; color: var(--accent-light); }
.cv[data-template="professional"] .cv-pro-body { display: flex; gap: 30px; padding: 30px 44px 36px; }
.cv[data-template="professional"] .cv-pro-meta { width: 214px; flex-shrink: 0; }
.cv[data-template="professional"] .cv-pro-main { flex: 1; min-width: 0; }
.cv[data-template="professional"] .cv-block { margin-bottom: 22px; }
.cv[data-template="professional"] .cv-pro-meta h3 {
  margin: 0 0 10px; font-size: 11px; font-weight: 700; text-transform: uppercase;
  letter-spacing: 1.4px; color: var(--accent); border-bottom: 1px solid var(--accent-soft); padding-bottom: 5px;
}
.cv[data-template="professional"] .skill-bar { background: var(--accent-soft); }
.cv[data-template="professional"] .skill-bar i { background: var(--accent); }
.cv[data-template="professional"] .cv-contact, .cv[data-template="professional"] .cv-block { color: var(--text); }
.cv[data-template="professional"] .cv-pro-meta .lang-name,
.cv[data-template="professional"] .cv-pro-meta .skill-name { color: #0f172a; }
.cv[data-template="professional"] .cv-pro-meta .lang-level { color: #64748b; }
.cv[data-template="professional"] .cv-hobby { background: var(--accent-soft); border-color: transparent; color: var(--accent-dark); }
.cv[data-template="professional"] .cv-pro-main section { margin-bottom: 24px; }
.cv[data-template="professional"] .cv-pro-main h2 {
  display: flex; align-items: center; gap: 10px; margin: 0 0 14px;
  font-size: 13px; font-weight: 800; text-transform: uppercase; letter-spacing: 1.8px; color: var(--accent);
}
.cv[data-template="professional"] .cv-pro-main h2::before { content: ""; width: 22px; height: 3px; border-radius: 2px; background: var(--accent); }
.cv[data-template="professional"] .cv-signature { margin-top: 24px; }

/* ---------- 4 · classic (zentriert, Foto unter Name) ---------- */
.cv[data-template="classic"] { display: block; }
.cv[data-template="classic"] .cv-classic { padding: 46px 52px 40px; }
.cv[data-template="classic"] .cv-classic-head { text-align: center; }
.cv[data-template="classic"] .cv-classic-head h2 { margin: 0; font-size: 32px; font-weight: 800; letter-spacing: 3px; text-transform: uppercase; color: var(--accent-dark); }
.cv[data-template="classic"] .cv-classic-job { margin: 6px 0 16px; font-size: 14px; font-weight: 600; color: #475569; letter-spacing: 1px; }
.cv[data-template="classic"] .cv-classic-head .cv-photo,
.cv[data-template="classic"] .cv-classic-head .cv-initials {
  width: 108px; height: 108px; border-radius: 50%; margin: 0 auto 14px; display: block;
}
.cv[data-template="classic"] .cv-initials { display: grid; place-items: center; background: var(--accent-soft); color: var(--accent-dark); font-size: 34px; font-weight: 800; }
.cv[data-template="classic"] .cv-classic-contact { list-style: none; margin: 0 0 8px; padding: 0; font-size: 12.5px; color: #475569; }
.cv[data-template="classic"] .cv-classic-head::after { content: ""; display: block; width: 120px; height: 2px; background: var(--accent); margin: 16px auto 0; }
.cv[data-template="classic"] .cv-classic-body { margin-top: 26px; }
.cv[data-template="classic"] .cv-classic-body section { margin-bottom: 22px; }
.cv[data-template="classic"] .cv-classic-body h2, .cv[data-template="classic"] .cv-classic-h {
  text-align: center; margin: 0 0 14px; font-size: 13px; font-weight: 800;
  text-transform: uppercase; letter-spacing: 2.4px; color: var(--accent-dark);
}
.cv[data-template="classic"] .xp { border-left: none; margin-left: 0; padding-left: 0; }
.cv[data-template="classic"] .xp::before { display: none; }
.cv[data-template="classic"] .xp-head { justify-content: space-between; }
.cv[data-template="classic"] .xp-period { color: var(--accent-dark); }
.cv[data-template="classic"] .cv-about { text-align: center; }
.cv[data-template="classic"] .cv-classic-skills { text-align: center; font-size: 12.5px; color: #475569; }
.cv[data-template="classic"] .cv-classic-lvl { color: var(--accent); font-weight: 600; }

/* ---------- 5 · executive (dunkle Banner-Kopfzeile) ---------- */
.cv[data-template="executive"] { display: block; }
.cv[data-template="executive"] .cv-exec-banner {
  display: flex; align-items: center; justify-content: space-between; gap: 24px;
  padding: 44px 48px; background: linear-gradient(120deg, var(--accent-dark), var(--accent-darker)); color: #fff;
}
.cv[data-template="executive"] .cv-exec-id h2 { margin: 0; font-size: 34px; font-weight: 800; letter-spacing: -0.5px; }
.cv[data-template="executive"] .cv-exec-id p { margin: 6px 0 0; font-size: 15px; color: var(--accent-light); font-weight: 600; letter-spacing: 0.5px; }
.cv[data-template="executive"] .cv-exec-photo .cv-photo,
.cv[data-template="executive"] .cv-exec-photo .cv-initials { width: 96px; height: 96px; border-radius: 12px; flex-shrink: 0; }
.cv[data-template="executive"] .cv-exec-photo .cv-initials { display: grid; place-items: center; background: var(--accent); font-size: 32px; font-weight: 800; }
.cv[data-template="executive"] .cv-exec-contact {
  list-style: none; margin: 0; padding: 14px 48px; display: flex; flex-wrap: wrap; gap: 8px 26px;
  background: var(--accent-soft); font-size: 12px; color: var(--accent-darker);
}
.cv[data-template="executive"] .cv-exec-contact li { display: inline-flex; align-items: center; gap: 7px; }
.cv[data-template="executive"] .cv-exec-contact svg { width: 14px; height: 14px; color: var(--accent); }
.cv[data-template="executive"] .cv-exec-body { padding: 30px 48px 34px; }
.cv[data-template="executive"] .cv-exec-body section { margin-bottom: 24px; }
.cv[data-template="executive"] .cv-exec-body h2 {
  margin: 0 0 14px; font-size: 14px; font-weight: 800; text-transform: uppercase; letter-spacing: 2px;
  color: var(--accent-dark); padding-bottom: 7px; border-bottom: 2px solid var(--accent);
}
.cv[data-template="executive"] .cv-hobby { background: var(--accent-soft); border-color: transparent; color: var(--accent-dark); }
.cv[data-template="executive"] .skill-bar { background: var(--accent-soft); }
.cv[data-template="executive"] .skill-bar i { background: var(--accent); }
.cv[data-template="executive"] .cv-exec-body .cv-lang-inline { font-size: 13px; color: #475569; }

/* ---------- 6 · creative (kräftige Panels, Skills als Tags) ---------- */
.cv[data-template="creative"] { display: block; }
.cv[data-template="creative"] .cv-creative { display: flex; min-height: 1123px; }
.cv[data-template="creative"] .cv-cre-side {
  width: 300px; flex-shrink: 0; padding: 46px 30px;
  background: linear-gradient(165deg, var(--accent) 0%, var(--accent-dark) 100%); color: #fff;
}
.cv[data-template="creative"] .cv-cre-photo .cv-photo,
.cv[data-template="creative"] .cv-cre-photo .cv-initials { width: 168px; height: 168px; border-radius: 24px; }
.cv[data-template="creative"] .cv-cre-photo .cv-initials { display: grid; place-items: center; background: rgba(255, 255, 255, 0.18); font-size: 52px; font-weight: 800; }
.cv[data-template="creative"] .cv-cre-side h2 { margin: 22px 0 0; font-size: 27px; font-weight: 800; line-height: 1.15; }
.cv[data-template="creative"] .cv-cre-job { margin: 6px 0 26px; font-size: 14px; font-weight: 600; color: rgba(255, 255, 255, 0.85); }
.cv[data-template="creative"] .cv-cre-tags { margin-bottom: 22px; }
.cv[data-template="creative"] .cv-cre-tags h3 { margin: 0 0 10px; font-size: 11px; letter-spacing: 1.6px; text-transform: uppercase; opacity: 0.85; }
.cv[data-template="creative"] .cv-cre-tag { display: inline-block; margin: 0 6px 6px 0; padding: 5px 12px; border-radius: 999px; font-size: 12px; font-weight: 600; background: rgba(255, 255, 255, 0.16); border: 1px solid rgba(255, 255, 255, 0.28); }
.cv[data-template="creative"] .cv-cre-tag.soft { background: rgba(255, 255, 255, 0.1); }
.cv[data-template="creative"] .cv-cre-main { flex: 1; min-width: 0; padding: 40px 38px; }
.cv[data-template="creative"] .cv-cre-contact { list-style: none; margin: 0 0 22px; padding: 0 0 16px; display: flex; flex-wrap: wrap; gap: 8px 22px; font-size: 12px; color: #475569; border-bottom: 2px solid var(--accent-soft); }
.cv[data-template="creative"] .cv-cre-contact li { display: inline-flex; align-items: center; gap: 6px; }
.cv[data-template="creative"] .cv-cre-contact svg { width: 14px; height: 14px; color: var(--accent); }
.cv[data-template="creative"] .cv-cre-main section { margin-bottom: 24px; }
.cv[data-template="creative"] .cv-cre-main h2 { margin: 0 0 12px; font-size: 15px; font-weight: 800; text-transform: uppercase; letter-spacing: 1px; color: var(--accent); }
.cv[data-template="creative"] .xp { border-left-color: var(--accent-soft); }
.cv[data-template="creative"] .xp::before { background: var(--accent); }
.cv[data-template="creative"] .cv-lang-inline { font-size: 13px; color: #475569; }
.cv[data-template="creative"] .cv-signature { margin-top: 20px; }

/* ---------- 7 · elegant (feiner Sidebar, ruhige Typo) ---------- */
.cv[data-template="elegant"] { display: flex; }
.cv[data-template="elegant"] .cv-el-side {
  width: 258px; flex-shrink: 0; padding: 52px 28px; text-align: center;
  background: #f4f5f8; border-inline-end: 1px solid var(--accent-soft);
}
.cv[data-template="elegant"] .cv-el-ring { width: 132px; height: 132px; margin: 0 auto 22px; border-radius: 50%; padding: 6px; border: 2px solid var(--accent-light); }
.cv[data-template="elegant"] .cv-el-ring .cv-photo,
.cv[data-template="elegant"] .cv-el-ring .cv-initials { width: 100%; height: 100%; border-radius: 50%; }
.cv[data-template="elegant"] .cv-el-ring .cv-initials { display: grid; place-items: center; background: var(--accent-soft); color: var(--accent-dark); font-size: 38px; font-weight: 700; }
.cv[data-template="elegant"] .cv-el-side h2 { margin: 0; font-size: 23px; font-weight: 700; color: var(--accent-dark); letter-spacing: 0.5px; }
.cv[data-template="elegant"] .cv-el-job { margin: 6px 0 24px; font-size: 12.5px; text-transform: uppercase; letter-spacing: 1.5px; color: #64748b; }
.cv[data-template="elegant"] .cv-el-contact { list-style: none; margin: 0; padding: 0; font-size: 12px; color: #475569; line-height: 1.9; word-break: break-word; }
.cv[data-template="elegant"] .cv-el-main { flex: 1; min-width: 0; padding: 52px 42px 40px; }
.cv[data-template="elegant"] .cv-el-main section { margin-bottom: 26px; }
.cv[data-template="elegant"] .cv-el-main h2 {
  margin: 0 0 14px; font-size: 13px; font-weight: 700; text-transform: uppercase; letter-spacing: 3px;
  color: var(--accent); padding-bottom: 8px; border-bottom: 1px solid var(--accent-soft);
}
.cv[data-template="elegant"] .xp { border-left: none; margin-left: 0; padding-left: 0; }
.cv[data-template="elegant"] .xp::before { display: none; }
.cv[data-template="elegant"] .xp-role { font-weight: 700; color: var(--accent-dark); }
.cv[data-template="elegant"] .xp-period { color: #94a3b8; font-weight: 500; }
.cv[data-template="elegant"] .skill-bar { background: var(--accent-soft); height: 4px; }
.cv[data-template="elegant"] .skill-bar i { background: var(--accent-light); }
.cv[data-template="elegant"] .skill-name { color: #334155; }
.cv[data-template="elegant"] .cv-lang-inline { font-size: 13px; color: #475569; }
.cv[data-template="elegant"] .cv-hobbies .cv-hobby { background: #fff; border: 1px solid var(--accent-soft); color: var(--accent-dark); }

/* ---------- 8 · minimal (eine Spalte, viel Weißraum) ---------- */
.cv[data-template="minimal"] { display: block; }
.cv[data-template="minimal"] .cv-minimal { padding: 60px 58px 44px; }
.cv[data-template="minimal"] .cv-min-head { display: flex; align-items: flex-start; justify-content: space-between; gap: 20px; }
.cv[data-template="minimal"] .cv-min-id h2 { margin: 0; font-size: 34px; font-weight: 800; letter-spacing: -1px; color: #0f172a; }
.cv[data-template="minimal"] .cv-min-id p { margin: 6px 0 0; font-size: 15px; color: var(--accent); font-weight: 600; }
.cv[data-template="minimal"] .cv-min-photo .cv-photo,
.cv[data-template="minimal"] .cv-min-photo .cv-initials { width: 84px; height: 84px; border-radius: 50%; flex-shrink: 0; }
.cv[data-template="minimal"] .cv-min-photo .cv-initials { display: grid; place-items: center; background: #0f172a; color: #fff; font-size: 26px; font-weight: 700; }
.cv[data-template="minimal"] .cv-min-contact { margin-top: 16px; font-size: 12.5px; color: #475569; display: flex; flex-wrap: wrap; align-items: center; gap: 8px; }
.cv[data-template="minimal"] .cv-min-contact i { color: var(--accent); font-style: normal; }
.cv[data-template="minimal"] .cv-min-rule { border: none; height: 2px; background: #0f172a; margin: 22px 0 26px; }
.cv[data-template="minimal"] .cv-minimal section { margin-bottom: 26px; }
.cv[data-template="minimal"] .cv-minimal h2 { margin: 0 0 14px; font-size: 11px; font-weight: 700; text-transform: uppercase; letter-spacing: 3px; color: #94a3b8; }
.cv[data-template="minimal"] .xp { border-left: none; margin-left: 0; padding: 0 0 14px; }
.cv[data-template="minimal"] .xp::before { display: none; }
.cv[data-template="minimal"] .xp-role { font-size: 15px; }
.cv[data-template="minimal"] .xp-period { color: #94a3b8; }
.cv[data-template="minimal"] .cv-about { color: #334155; }
.cv[data-template="minimal"] .skill-bar { background: #e2e8f0; }
.cv[data-template="minimal"] .skill-bar i { background: #0f172a; }
.cv[data-template="minimal"] .skill-name { color: #334155; }
.cv[data-template="minimal"] .cv-lang-inline, .cv[data-template="minimal"] .cv-min-hob { font-size: 13px; color: #475569; }

/* ---------- Auswahl-Kärtchen (Thumbnail) ---------- */
.tpl-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 14px; }
.tpl-card {
  position: relative; cursor: pointer; text-align: start;
  background: var(--wz-surface-2, #1a1a21);
  border: 2px solid var(--wz-line, rgba(255, 255, 255, 0.08));
  border-radius: 16px; padding: 12px; overflow: hidden;
  transition: border-color 0.2s ease, transform 0.15s ease, box-shadow 0.2s ease;
}
.tpl-card:hover { transform: translateY(-3px); border-color: rgba(124, 140, 248, 0.5); }
.tpl-card.is-active { border-color: #7c8cf8; box-shadow: 0 12px 30px -12px rgba(99, 102, 241, 0.6); }
.tpl-card.is-active::after {
  content: "✓"; position: absolute; top: 10px; inset-inline-end: 10px; z-index: 2;
  width: 24px; height: 24px; border-radius: 50%; background: #7c8cf8; color: #fff;
  display: grid; place-items: center; font-size: 14px; font-weight: 700;
}
.tpl-thumb { position: relative; width: 100%; aspect-ratio: 210 / 297; overflow: hidden; border-radius: 8px; background: #fff; pointer-events: none; }
.tpl-thumb .cv {
  position: absolute; top: 0; inset-inline-start: 0;
  width: 794px; height: 1123px; min-height: 0;
  transform: scale(var(--tpl-scale, 0.24)); transform-origin: top left; box-shadow: none; margin: 0;
}
.tpl-meta { margin-top: 10px; }
.tpl-name { font-size: 14px; font-weight: 700; color: var(--wz-text, #f4f4f6); }
.tpl-desc { font-size: 11.5px; color: var(--wz-muted, #9d9da8); line-height: 1.4; margin-top: 2px; }
[dir="rtl"] .tpl-thumb .cv { transform-origin: top right; }
[dir="rtl"] .tpl-card { text-align: right; }
