/* ═══════════════════════════════════════════════════════════════
   ANFRAGE — 4-Step Wizard (Apple Style)
   Prefix: af-   — vollständig eigenständig
═══════════════════════════════════════════════════════════════ */

/* ── Inter (lokal) ────────────────────────────────────────── */
@font-face {
  font-family: 'Inter';
  font-style: normal;
  font-weight: 100 900;
  font-display: swap;
  src: url('../fonts/inter-latin-ext.woff2') format('woff2');
  unicode-range: U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF,
    U+0304, U+0308, U+0329, U+1D00-1DBF, U+1E00-1E9F, U+1EF2-1EFF, U+2020,
    U+20A0-20AB, U+20AD-20C0, U+2113, U+2C60-2C7F, U+A720-A7FF;
}
@font-face {
  font-family: 'Inter';
  font-style: normal;
  font-weight: 100 900;
  font-display: swap;
  src: url('../fonts/inter-latin.woff2') format('woff2');
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA,
    U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193,
    U+2212, U+2215, U+FEFF, U+FFFD;
}

/* ── BASE ──────────────────────────────────────────────────── */
.af-body {
  font-family: 'Inter', system-ui, -apple-system, sans-serif;
  background: #F5F5F7;
  min-height: 100vh;
  color: #1D1D1F;
}

/* Skip-Link: nur bei Tastatur-Fokus sichtbar */
.skip-link {
  position: absolute;
  top: -100px; left: 8px;
  z-index: 100000;
  padding: 12px 18px;
  background: #1D1D1F; color: #FFFFFF;
  border-radius: 8px;
  font-weight: 600;
  text-decoration: none;
  transition: top 0.15s ease;
}
.skip-link:focus { top: 8px; }

/* ── HEADER ────────────────────────────────────────────────── */
.af-header {
  position: sticky;
  top: 0;
  z-index: 100;
  background: rgba(255,255,255,.92);
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  border-bottom: 1px solid #E8E8ED;
}
.af-header-inner {
  max-width: 1160px;
  margin: 0 auto;
  padding: 0 24px;
  height: 64px;
  display: grid;
  grid-template-columns: 160px 1fr 160px;
  align-items: center;
}
.af-logo img { display: block; }
.af-header-right { display: flex; justify-content: flex-end; }

/* ── STEPPER ───────────────────────────────────────────────── */
.af-stepper {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0;
}
.af-step {
  display: flex;
  align-items: center;
  gap: 8px;
  white-space: nowrap;
}
.af-step-dot {
  width: 28px;
  height: 28px;
  border-radius: 50%;
  border: 1.5px solid #C7C7CC;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 12px;
  font-weight: 700;
  color: #8E8E93;
  flex-shrink: 0;
  transition: transform .25s ease, opacity .25s ease, background .25s ease, color .25s ease, border-color .25s ease, box-shadow .25s ease;
}
.af-step-label {
  font-size: 13px;
  font-weight: 500;
  color: #8E8E93;
  transition: color .25s ease;
}
.af-step-active .af-step-dot {
  background: #1D1D1F;
  border-color: #1D1D1F;
  color: #FFFFFF;
}
.af-step-active .af-step-label { color: #1D1D1F; font-weight: 700; }
.af-step-done .af-step-dot {
  background: #1D1D1F;
  border-color: #1D1D1F;
  color: #FFFFFF;
}
.af-step-done .af-step-dot span { display: none; }
.af-step-done .af-step-dot::after {
  content: '';
  display: block;
  width: 10px;
  height: 6px;
  border-left: 2px solid #FFF;
  border-bottom: 2px solid #FFF;
  transform: rotate(-45deg) translate(1px,-1px);
}
.af-step-done .af-step-label { color: #1D1D1F; }
.af-step-line {
  width: 32px;
  height: 1px;
  background: #D2D2D7;
  flex-shrink: 0;
  margin: 0 6px;
  transition: background .25s ease;
}
.af-line-done { background: #1D1D1F; }

/* ── PAGE / LAYOUT ─────────────────────────────────────────── */
.af-page {
  max-width: 1160px;
  margin: 0 auto;
  padding: 40px 24px 80px;
}
.af-layout {
  display: grid;
  grid-template-columns: 1fr 320px;
  gap: 32px;
  align-items: start;
}

/* ── STEP PANELS ───────────────────────────────────────────── */
.af-panel { display: none; }
.af-active { display: block; }
@keyframes afSlideIn {
  from { opacity: 0; transform: translateX(24px); }
  to   { opacity: 1; transform: translateX(0); }
}
.af-panel.af-active { animation: afSlideIn .35s cubic-bezier(.25,.46,.45,.94); }
@keyframes afShake {
  0%,100% { transform: translateX(0); }
  20%      { transform: translateX(-8px); }
  40%      { transform: translateX(8px); }
  60%      { transform: translateX(-6px); }
  80%      { transform: translateX(6px); }
}
.af-shake { animation: afShake .5s ease; }

/* Animationen für Nutzer mit prefers-reduced-motion deaktivieren */
@media (prefers-reduced-motion: reduce) {
  .af-panel.af-active { animation: none; }
  .af-shake { animation: none; }
  .af-cal-day,
  .af-input,
  .af-chip,
  .af-pkg-card,
  .af-btn-next,
  .af-btn-back,
  .af-submit-btn { transition: none; }
}

/* ── STEP HEAD ─────────────────────────────────────────────── */
.af-step-head { margin-bottom: 32px; }
.af-h1 {
  font-size: clamp(1.9rem, 4vw, 2.8rem);
  font-weight: 900;
  letter-spacing: -.04em;
  line-height: 1.08;
  color: #1D1D1F;
  margin: 0 0 10px;
}
.af-sub {
  font-size: 15px;
  line-height: 1.6;
  color: #1D1D1F;
  margin: 0;
  max-width: 520px;
}

/* ── CALENDAR ──────────────────────────────────────────────── */
.af-cal-wrap {
  background: #FFFFFF;
  border-radius: 20px;
  padding: 24px;
  box-shadow: 0 2px 12px rgba(0,0,0,.06);
}
.af-cal-topbar {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 20px;
  flex-wrap: wrap;
  gap: 12px;
}
.af-cal-nav-row {
  display: flex;
  align-items: center;
  gap: 16px;
}
.af-cal-month {
  font-size: 15px;
  font-weight: 700;
  color: #1D1D1F;
  min-width: 130px;
  text-align: center;
}
.af-cal-nav-btn {
  width: 32px;
  height: 32px;
  border-radius: 50%;
  border: 1px solid #D2D2D7;
  background: #FFF;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  color: #1D1D1F;
  transition: transform .2s, opacity .2s, background .2s, color .2s, border-color .2s, box-shadow .2s;
}
.af-cal-nav-btn:hover:not(:disabled) { background: #F5F5F7; }
.af-cal-nav-btn:disabled { opacity: .3; cursor: default; }
.af-cal-wds {
  display: grid;
  grid-template-columns: repeat(7, 1fr);
  text-align: center;
  font-size: 11px;
  font-weight: 700;
  color: #1D1D1F;
  letter-spacing: .05em;
  margin-bottom: 8px;
}
.af-cal-grid {
  display: grid;
  grid-template-columns: repeat(7, 1fr);
  gap: 4px;
}
.af-cal-day {
  aspect-ratio: 1;
  border-radius: 10px;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  font-size: 14px;
  font-weight: 500;
  cursor: default;
  position: relative;
  padding: 0;
  font-family: inherit;
  background: transparent;
  border: 1px solid transparent;
  color: inherit;
  transition: background-color .15s, border-color .15s, color .15s;
  touch-action: manipulation;
  -webkit-tap-highlight-color: transparent;
}
button.af-cal-day { appearance: none; }
.af-cal-empty { opacity: 0; pointer-events: none; }
.af-cal-past  { color: #C7C7CC; }
.af-cal-free {
  background: #FFFFFF;
  border: 1px solid #E8E8ED;
  color: #1D1D1F;
  cursor: pointer;
}
.af-cal-free:hover { border-color: #1D1D1F; background: #F5F5F7; }
.af-cal-free:focus-visible { outline: 3px solid #2D9CDB; outline-offset: 2px; }
.af-cal-selected {
  background: #1D1D1F !important;
  border-color: #1D1D1F !important;
  color: #FFFFFF !important;
}
.af-cal-selected span::after {
  content: '';
  position: absolute;
  bottom: 6px;
  left: 50%;
  transform: translateX(-50%);
  width: 4px;
  height: 4px;
  border-radius: 50%;
  background: rgba(255,255,255,.5);
}

/* ── PACKAGE CARDS ─────────────────────────────────────────── */
.af-pkg-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 16px;
  margin-bottom: 32px;
}
.af-pkg-card {
  position: relative;
  background: #FFFFFF;
  border: 1.5px solid #E8E8ED;
  border-radius: 20px;
  padding: 24px;
  cursor: pointer;
  display: flex;
  flex-direction: column;
  gap: 0;
  transition: border-color .2s, box-shadow .2s;
}
.af-pkg-card:hover { border-color: #1D1D1F; transform: none !important; box-shadow: 0 4px 20px rgba(0,0,0,.10) !important; }
.af-pkg-card input[type="radio"] { position: absolute; opacity: 0; width: 0; height: 0; }
.af-pkg-card:has(input:checked) {
  border-color: #1D1D1F;
  box-shadow: 0 0 0 1px #1D1D1F;
}
.af-pkg-premium {
  background: #1D1D1F;
  border-color: #1D1D1F;
  color: #FFFFFF;
}
.af-pkg-premium:hover { border-color: #1D1D1F; box-shadow: 0 4px 24px rgba(0,0,0,.3) !important; transform: none !important; }
.af-pkg-premium:has(input:checked) {
  border-color: #1D1D1F;
  box-shadow: 0 4px 24px rgba(0,0,0,.25), 0 0 0 2px #1D1D1F;
}
.af-pkg-badge {
  position: absolute;
  top: 20px;
  right: 20px;
  background: #FFFFFF;
  color: #1D1D1F;
  font-size: 11px;
  font-weight: 700;
  padding: 4px 10px;
  border-radius: 999px;
  letter-spacing: .02em;
}
.af-pkg-radio {
  width: 18px;
  height: 18px;
  border-radius: 50%;
  border: 1.5px solid #C7C7CC;
  margin-bottom: 16px;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: border-color .2s;
}
.af-pkg-premium .af-pkg-radio { border-color: rgba(255,255,255,.3); }
.af-pkg-radio-dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: transparent;
  transition: background .2s;
}
.af-pkg-card:has(input:checked) .af-pkg-radio { border-color: #1D1D1F; }
.af-pkg-card:has(input:checked) .af-pkg-radio-dot { background: #1D1D1F; }
.af-pkg-premium:has(input:checked) .af-pkg-radio { border-color: #FFFFFF; }
.af-pkg-premium:has(input:checked) .af-pkg-radio-dot { background: #FFFFFF; }
.af-pkg-name { font-size: 22px; font-weight: 800; letter-spacing: -.02em; margin-bottom: 2px; }
.af-pkg-sub  { font-size: 13px; color: #1D1D1F; margin-bottom: 16px; }
.af-pkg-premium .af-pkg-sub { color: rgba(255,255,255,.5); }
.af-pkg-price-row { display: flex; align-items: baseline; gap: 8px; margin-bottom: 4px; }
.af-pkg-old   { font-size: 14px; color: #6E6E73; text-decoration: line-through; }
.af-pkg-price { font-size: 28px; font-weight: 900; letter-spacing: -.03em; color: #1D1D1F; }
.af-pkg-premium .af-pkg-price { color: #FFFFFF; }
.af-pkg-note  { font-size: 11px; color: #1D1D1F; margin-bottom: 16px; }
.af-pkg-premium .af-pkg-note { color: rgba(255,255,255,.4); }
.af-pkg-divider { height: 1px; background: #E5E5EA; margin-bottom: 16px; }
.af-pkg-premium .af-pkg-divider { background: rgba(255,255,255,.12); }
.af-pkg-list {
  list-style: none;
  padding: 0;
  margin: 0;
  display: flex;
  flex-direction: column;
  gap: 8px;
}
.af-pkg-list li {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 13px;
  color: #1D1D1F;
}
.af-pkg-list li::before {
  content: '';
  width: 14px;
  height: 14px;
  border-radius: 50%;
  background: #F5F5F7;
  flex-shrink: 0;
  background-image: url("data:image/svg+xml,%3Csvg width='8' height='6' viewBox='0 0 8 6' fill='none' xmlns='http://www.w3.org/2000/svg'%3E%3Cpath d='M1 3L3 5L7 1' stroke='%231D1D1F' stroke-width='1.4' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: center;
}
.af-pkg-premium .af-pkg-list li { color: rgba(255,255,255,.75); }
.af-pkg-premium .af-pkg-list li::before {
  background-color: rgba(255,255,255,.15);
  background-image: url("data:image/svg+xml,%3Csvg width='8' height='6' viewBox='0 0 8 6' fill='none' xmlns='http://www.w3.org/2000/svg'%3E%3Cpath d='M1 3L3 5L7 1' stroke='%23FFFFFF' stroke-width='1.4' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E");
}

/* ── DETAIL FORM CARDS ─────────────────────────────────────── */
.af-card {
  background: #FFFFFF;
  border-radius: 16px;
  padding: 24px;
  margin-bottom: 16px;
  box-shadow: 0 1px 6px rgba(0,0,0,.04);
}
.af-card-head {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 11px;
  font-weight: 700;
  letter-spacing: .08em;
  color: #1D1D1F;
  text-transform: uppercase;
  margin-bottom: 20px;
}
.af-row { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }
.af-field { margin-bottom: 16px; }
.af-field:last-child { margin-bottom: 0; }
.af-label {
  display: block;
  font-size: 12px;
  font-weight: 600;
  color: #1D1D1F;
  margin-bottom: 6px;
  letter-spacing: .01em;
}
.af-req { color: #1D1D1F; }
.af-opt { font-weight: 400; color: #1D1D1F; }
.af-input {
  width: 100%;
  padding: 10px 14px;
  border: 1.5px solid #E8E8ED;
  border-radius: 10px;
  font-family: inherit;
  font-size: 14px;
  color: #1D1D1F;
  background: #FFFFFF;
  outline: 2px solid transparent;
  outline-offset: 2px;
  transition: border-color .2s, outline-color .2s;
  box-sizing: border-box;
}
.af-input:focus-visible { border-color: #1D1D1F; outline-color: #2D9CDB; }
.af-input:focus:not(:focus-visible) { border-color: #1D1D1F; outline: none; }
.af-input.af-invalid { border-color: #FF3B30; background: #FFF5F5; }
.af-textarea { resize: vertical; min-height: 96px; }

/* ── CHIPS (Anlass) ────────────────────────────────────────── */
.af-chips {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}
.af-chip {
  display: flex;
  align-items: center;
  gap: 6px;
  padding: 8px 16px;
  border-radius: 999px;
  border: 1.5px solid #E8E8ED;
  background: #FFFFFF;
  font-family: inherit;
  font-size: 13px;
  font-weight: 500;
  color: #1D1D1F;
  cursor: pointer;
  transition: transform .2s, opacity .2s, background .2s, color .2s, border-color .2s, box-shadow .2s;
}
.af-chip:hover { border-color: #1D1D1F; }
.af-chip.af-chip-active {
  background: #1D1D1F;
  border-color: #1D1D1F;
  color: #FFFFFF;
}

/* ── STEP FOOTER NAVIGATION ────────────────────────────────── */
.af-step-foot {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-top: 28px;
  gap: 12px;
}
.af-btn-next {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 14px 28px;
  background: #1D1D1F;
  color: #FFFFFF;
  border: none;
  border-radius: 999px;
  font-family: inherit;
  font-size: 15px;
  font-weight: 700;
  cursor: pointer;
  transition: opacity .2s;
  letter-spacing: -.01em;
}
.af-btn-next:hover   { opacity: .85; transform: none !important; }
.af-btn-next:disabled { opacity: .35; cursor: default; }
.af-btn-back {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 14px 24px;
  background: transparent;
  color: #1D1D1F;
  border: 1.5px solid #E8E8ED;
  border-radius: 999px;
  font-family: inherit;
  font-size: 14px;
  font-weight: 600;
  cursor: pointer;
  transition: border-color .2s;
}
.af-btn-back:hover { border-color: #1D1D1F; transform: none !important; }

/* ── SUMMARY CARDS (Step 4) ────────────────────────────────── */
.af-summary-card {
  background: #FFFFFF;
  border-radius: 16px;
  padding: 24px;
  margin-bottom: 16px;
  box-shadow: 0 1px 6px rgba(0,0,0,.04);
}
.af-summary-head {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 15px;
  font-weight: 700;
  color: #1D1D1F;
  margin-bottom: 16px;
}
.af-edit-btn {
  margin-left: auto;
  display: flex;
  align-items: center;
  gap: 5px;
  padding: 5px 12px;
  border: 1px solid #E8E8ED;
  border-radius: 999px;
  background: transparent;
  font-family: inherit;
  font-size: 12px;
  font-weight: 600;
  color: #3D3D40;
  cursor: pointer;
  transition: transform .2s, opacity .2s, background .2s, color .2s, border-color .2s, box-shadow .2s;
}
.af-edit-btn:hover { border-color: #1D1D1F; color: #1D1D1F; }
.af-summary-rows { display: flex; flex-direction: column; gap: 10px; }
.af-summary-row {
  display: flex;
  justify-content: space-between;
  font-size: 14px;
}
.af-summary-row > span:first-child { color: #1D1D1F; }
.af-summary-row > span:last-child  { color: #1D1D1F; font-weight: 500; text-align: right; max-width: 60%; }

/* ── SUBMIT CARD ───────────────────────────────────────────── */
.af-submit-card {
  background: #1D1D1F;
  border-radius: 20px;
  padding: 28px;
  margin-bottom: 16px;
  color: #FFFFFF;
}
.af-submit-head {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 11px;
  font-weight: 700;
  letter-spacing: .08em;
  color: rgba(255,255,255,.7);
  text-transform: uppercase;
  margin-bottom: 20px;
}
.af-submit-rows { margin-bottom: 24px; display: flex; flex-direction: column; gap: 10px; }
.af-submit-row {
  display: flex;
  justify-content: space-between;
  font-size: 14px;
  color: #FFFFFF;
}
.af-dsgvo {
  display: flex;
  align-items: flex-start;
  gap: 10px;
  font-size: 12px;
  color: #FFFFFF;
  margin-bottom: 20px;
  line-height: 1.5;
}
.af-dsgvo input[type="checkbox"] {
  width: 16px;
  height: 16px;
  flex-shrink: 0;
  margin-top: 1px;
  accent-color: #FFFFFF;
}
.af-dsgvo a { color: rgba(255,255,255,.8); text-decoration: underline; }
.af-submit-btn {
  width: 100%;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  padding: 16px;
  background: #FFFFFF;
  color: #1D1D1F;
  border: none;
  border-radius: 999px;
  font-family: inherit;
  font-size: 16px;
  font-weight: 700;
  cursor: pointer;
  transition: opacity .2s;
  letter-spacing: -.01em;
}
.af-submit-btn:hover { opacity: .9; transform: none !important; }
.af-submit-btn:disabled { opacity: .5; cursor: default; }
.af-submit-note {
  text-align: center;
  font-size: 12px;
  color: rgba(255,255,255,.4);
  margin: 10px 0 0;
}
.af-form-msg {
  font-size: 13px;
  color: #FF6B6B;
  margin: 0 0 12px;
  min-height: 16px;
}

/* ── SIDEBAR ───────────────────────────────────────────────── */
.af-sidebar { position: sticky; top: 80px; }
.af-sb-inner {
  background: #FFFFFF;
  border-radius: 20px;
  padding: 24px;
  box-shadow: 0 2px 16px rgba(0,0,0,.06);
}
.af-sb-eyebrow {
  display: flex;
  align-items: center;
  gap: 7px;
  font-size: 10px;
  font-weight: 700;
  letter-spacing: .1em;
  color: #8E8E93;
  text-transform: uppercase;
  margin-bottom: 20px;
}
.af-sb-dot {
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: #34C759;
  flex-shrink: 0;
}
.af-sb-rows { display: flex; flex-direction: column; gap: 12px; }
.af-sb-row {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: 12px;
  font-size: 13px;
}
.af-sb-key { color: #1D1D1F; white-space: nowrap; }
.af-sb-val { color: #1D1D1F; font-weight: 600; text-align: right; }
.af-sb-note {
  font-size: 11px;
  line-height: 1.55;
  color: #1D1D1F;
  margin: 16px 0 0;
}

/* ── FOOTER ────────────────────────────────────────────────── */
.af-footer {
  max-width: 1160px;
  margin: 0 auto;
  padding: 24px 24px 40px;
  display: flex;
  justify-content: space-between;
  align-items: center;
  font-size: 12px;
  color: #1D1D1F;
  border-top: 1px solid #E8E8ED;
}
.af-footer nav { display: flex; gap: 20px; }
.af-footer a { color: #1D1D1F; text-decoration: none; }
.af-footer a:hover { color: #6E6E73; }

/* ── ZURÜCK-LINK ───────────────────────────────────────────── */
.af-back-link {
  display: flex;
  align-items: center;
  gap: 6px;
  font-size: 13px;
  font-weight: 600;
  color: #1D1D1F;
  text-decoration: none;
  padding: 8px 16px;
  border: 1.5px solid #E8E8ED;
  border-radius: 999px;
  transition: border-color .2s;
  white-space: nowrap;
}
.af-back-link:hover { border-color: #1D1D1F; }

/* ── RESPONSIVE ────────────────────────────────────────────── */
@media (max-width: 900px) {
  .af-layout { grid-template-columns: 1fr; }
  .af-sidebar { position: static; }
  .af-sb-inner { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; }
  .af-sb-eyebrow { grid-column: 1/-1; margin-bottom: 0; }
  .af-sb-rows { grid-column: 1/-1; }
  .af-sb-note { grid-column: 1/-1; }
}
@media (max-width: 640px) {
  .af-header {
    padding-top: 0;
  }
  .af-header-inner {
    grid-template-columns: auto 1fr;
    padding: 0 16px;
    height: 52px;
  }
  .af-header-right { display: none; }
  /* Stepper: kompakt, alle Labels ausblenden */
  .af-stepper { gap: 0; justify-content: flex-end; }
  .af-step-label { display: none; }
  .af-step-dot { width: 22px; height: 22px; font-size: 11px; }
  .af-step-line { width: 12px; margin: 0 3px; }
  .af-pkg-grid { grid-template-columns: 1fr; }
  .af-row { grid-template-columns: 1fr; }
  .af-page { padding: 24px 16px 60px; }
  .af-sb-inner { grid-template-columns: 1fr; }
}
