/* ==========================================================================
   KüstenKlick Tool Engine – Calculator FX (Wizard, Fortschritt, Schimmer)
   Geladen NACH kk-tool-engine.css. Animationen: nur transform + opacity.
   ========================================================================== */

/* ---- Vor-Initialisierung: nur Schritt 1 zeigen (verhindert Layout-Sprung/CLS) ---- */
.kk-wiz-pending .kw-calc-card > .kw-calc-step ~ .kw-calc-step,
.kk-wiz-pending .kw-calc-card > .kw-result-box { display: none; }
.kk-wizard [hidden] { display: none !important; }
.kk-wizard .kw-calc-step { border-bottom: 0; margin-bottom: 0; padding-bottom: 6px; }
.kw-calc-step:focus, .kw-result-box:focus { outline: none; }

/* ---- Honeypot (unsichtbar für Menschen, Bots füllen es aus) ---------------- */
.kw-hp { position: absolute !important; left: -9999px !important; top: auto !important; width: 1px !important; height: 1px !important; overflow: hidden !important; }

/* ---- Fortschritt ------------------------------------------------------------ */
.kk-wiz-progress { margin: 0 0 26px; }
.kk-wiz-meta {
  display: flex; align-items: baseline; gap: 10px;
  font-size: 0.88rem; font-weight: 700; margin-bottom: 10px;
}
.kk-wiz-label { color: #00828a; white-space: nowrap; }
.kk-wiz-title { flex: 1; min-width: 0; color: #102127; font-weight: 600; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.kk-wiz-pct { color: #64748b; font-variant-numeric: tabular-nums; }
.kk-wiz-track { position: relative; height: 9px; border-radius: 99px; background: #e2e8f0; overflow: hidden; }
.kk-wiz-bar {
  position: absolute; inset: 0; border-radius: inherit;
  background: linear-gradient(90deg, #00a8b2 0%, #00828a 60%, #006a70 100%);
  transform-origin: 0 50%;
  transform: scale3d(0.14, 1, 1);
  transition: transform 0.75s cubic-bezier(0.16, 1, 0.3, 1);
  will-change: transform;
  overflow: hidden;
}
.kk-wiz-bar::after {                      /* wandernder Glanz im Balken */
  content: ""; position: absolute; inset: 0;
  background: linear-gradient(100deg, transparent 30%, rgba(255, 255, 255, 0.55) 50%, transparent 70%);
  transform: translate3d(-100%, 0, 0);
  animation: kkw-bar-glint 2.6s ease-in-out infinite;
}
@keyframes kkw-bar-glint { 0% { transform: translate3d(-100%, 0, 0); } 60%, 100% { transform: translate3d(100%, 0, 0); } }

.kk-wiz-dots {
  list-style: none; display: flex; gap: 8px; margin: 14px 0 0; padding: 2px 2px 4px;
  overflow-x: auto; scrollbar-width: none;
}
.kk-wiz-dots::-webkit-scrollbar { display: none; }
.kk-wiz-dot {
  appearance: none; position: relative; cursor: pointer;
  width: 30px; height: 30px; border-radius: 50%;
  border: 2px solid #cbd5e1; background: #ffffff; color: #64748b;
  font: inherit; font-size: 0.74rem; font-weight: 800; line-height: 1;
  display: grid; place-items: center; padding: 0;
  transition: transform 0.3s cubic-bezier(0.16, 1, 0.3, 1), background-color 0.25s ease, border-color 0.25s ease, color 0.25s ease;
  -webkit-tap-highlight-color: transparent;
}
.kk-wiz-dot:disabled { cursor: default; opacity: 0.7; }
.kk-wiz-dot.is-done { background: #00828a; border-color: #00828a; color: #ffffff; }
.kk-wiz-dot.is-current { border-color: #00828a; background: #ffffff; color: #00828a; transform: scale3d(1.14, 1.14, 1); }
.kk-wiz-dot.is-current::after {
  content: ""; position: absolute; inset: -2px; border-radius: 50%; border: 2px solid #00828a;
  animation: kkw-ring 2.4s ease-out infinite; pointer-events: none;
}
@keyframes kkw-ring { 0% { transform: scale3d(1, 1, 1); opacity: 0.55; } 100% { transform: scale3d(1.7, 1.7, 1); opacity: 0; } }

/* ---- Schritt-Übergänge ------------------------------------------------------ */
.kk-wiz-in { animation: kkw-in-next 0.55s cubic-bezier(0.16, 1, 0.3, 1) both; }
.kk-wiz-in[data-dir="prev"] { animation-name: kkw-in-prev; }
.kk-wiz-out { animation: kkw-out-next 0.17s ease-in both; }
.kk-wiz-out[data-dir="prev"] { animation-name: kkw-out-prev; }
@keyframes kkw-in-next  { from { opacity: 0; transform: translate3d(38px, 0, 0); }  to { opacity: 1; transform: translate3d(0, 0, 0); } }
@keyframes kkw-in-prev  { from { opacity: 0; transform: translate3d(-38px, 0, 0); } to { opacity: 1; transform: translate3d(0, 0, 0); } }
@keyframes kkw-out-next { from { opacity: 1; transform: translate3d(0, 0, 0); } to { opacity: 0; transform: translate3d(-24px, 0, 0); } }
@keyframes kkw-out-prev { from { opacity: 1; transform: translate3d(0, 0, 0); } to { opacity: 0; transform: translate3d(24px, 0, 0); } }
.kw-result-box.kk-wiz-in { animation-name: kkw-result-in; animation-duration: 0.75s; }
@keyframes kkw-result-in {
  from { opacity: 0; transform: translate3d(0, 28px, 0) scale3d(0.97, 0.97, 1); }
  to   { opacity: 1; transform: translate3d(0, 0, 0) scale3d(1, 1, 1); }
}
.kk-wiz-in .kw-live-price-hero,
.kk-wiz-in .kw-price-val { animation: kkw-pop 0.8s cubic-bezier(0.34, 1.56, 0.64, 1) 0.2s both; transform-origin: left center; }
@keyframes kkw-pop { from { opacity: 0; transform: scale3d(0.85, 0.85, 1); } to { opacity: 1; transform: scale3d(1, 1, 1); } }

/* ---- Sticky Navigation (daumenfreundlich, mit Live-Preis) ------------------- */
.kk-wiz-nav {
  position: sticky; bottom: 0; z-index: 20;
  display: flex; align-items: center; gap: 12px;
  margin: 18px -6px 0;
  padding: 22px 6px calc(12px + env(safe-area-inset-bottom, 0px));
  background: linear-gradient(180deg, rgba(255, 255, 255, 0) 0%, #ffffff 34%);
}
.kk-wiz-nav.is-result { position: static; padding: 4px 6px 0; background: none; margin-top: 8px; }
.kk-wiz-btn {
  appearance: none; border: 0; cursor: pointer; font: inherit; font-weight: 700;
  border-radius: 12px; padding: 13px 20px; min-height: 50px;
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  transition: transform 0.25s cubic-bezier(0.16, 1, 0.3, 1), opacity 0.2s ease;
  -webkit-tap-highlight-color: transparent;
}
.kk-wiz-btn:active { transform: scale3d(0.96, 0.96, 1); }
.kk-wiz-back { background: #eef2f6; color: #334155; }
.kk-wiz-next {
  flex: 1; font-size: 1.02rem; color: #ffffff;
  background: linear-gradient(135deg, #00939c 0%, #00828a 45%, #005c62 100%);
  box-shadow: 0 8px 22px rgba(0, 130, 138, 0.35);
}
.kk-wiz-next-ico { display: inline-block; transition: transform 0.3s cubic-bezier(0.16, 1, 0.3, 1); }
.kk-wiz-next.is-final { font-size: 1.06rem; }
.kk-wiz-live { display: flex; flex-direction: column; line-height: 1.1; min-width: 86px; }
.kk-wiz-live-lbl { font-size: 0.68rem; font-weight: 700; text-transform: uppercase; letter-spacing: 0.06em; color: #64748b; }
.kk-wiz-live-val { font-size: 1.12rem; color: #00828a; font-variant-numeric: tabular-nums; transform-origin: left center; }
.kk-bump { animation: kkw-bump 0.5s cubic-bezier(0.34, 1.56, 0.64, 1); }
@keyframes kkw-bump { 0% { transform: scale3d(1, 1, 1); } 40% { transform: scale3d(1.16, 1.16, 1); } 100% { transform: scale3d(1, 1, 1); } }
.kk-wiz-nav.is-result .kk-wiz-live { display: none; }

.kk-wiz-next.is-busy { pointer-events: none; }
.kk-wiz-next.is-busy::before {
  content: ""; width: 16px; height: 16px; border-radius: 50%;
  border: 2.5px solid rgba(255, 255, 255, 0.35); border-top-color: #ffffff;
  animation: kkw-spin 0.7s linear infinite;
}
@keyframes kkw-spin { to { transform: rotate(360deg); } }

@media (hover: hover) and (pointer: fine) {
  .kk-wiz-btn:hover { transform: translate3d(0, -2px, 0); }
  .kk-wiz-next:hover .kk-wiz-next-ico { transform: translate3d(4px, 0, 0); }
}
@media (max-width: 520px) {
  .kk-wiz-back-txt { display: none; }
  .kk-wiz-back { padding: 13px 16px; }
  .kk-wiz-nav { gap: 10px; }
  .kk-wiz-live { min-width: 78px; }
  .kk-wiz-next { padding-inline: 14px; font-size: 0.98rem; }
}

/* Schwebende Hinweisleiste/Radar der Website überdecken sonst die Sticky-Navigation */
html.kk-has-wizard #kk69-floating-trust-bar,
html.kk-has-wizard #kk-live-lead-radar { display: none !important; }

/* ---- Licht-Schimmer auf Haupt-Buttons (nur transform) ----------------------- */
.kk-shine { position: relative; overflow: hidden; isolation: isolate; }
.kk-shine::after {
  content: ""; position: absolute; inset: 0; z-index: 2; pointer-events: none;
  background: linear-gradient(105deg, transparent 38%, rgba(255, 255, 255, 0.42) 50%, transparent 62%);
  transform: translate3d(-130%, 0, 0);
  animation: kkw-shine 3.8s cubic-bezier(0.45, 0, 0.2, 1) infinite;
}
@keyframes kkw-shine { 0% { transform: translate3d(-130%, 0, 0); } 42%, 100% { transform: translate3d(130%, 0, 0); } }
.kk-shine.kk-offscreen::after, .kk-shine:disabled::after { animation-play-state: paused; }
.kw-btn-submit, .kw-submit-btn { position: relative; overflow: hidden; }

/* ---- Bestehende paint-lastige Effekte durch GPU-Varianten ersetzen ------------ */
.kw-step-num { animation: none !important; position: relative; }
.kw-step-num::after {
  content: ""; position: absolute; inset: 0; border-radius: 50%; border: 2px solid #00828a;
  animation: kkw-ring 3s ease-out infinite; pointer-events: none;
}
.kw-check-card, .kw-radio-card, .kw-tile, .kw-chip {
  transition: transform 0.25s cubic-bezier(0.16, 1, 0.3, 1), border-color 0.2s ease, background-color 0.2s ease !important;
}
.kw-check-card:hover, .kw-radio-card:hover { box-shadow: none !important; }
.kw-tile:active, .kw-chip:active, .kw-check-card:active { transform: scale3d(0.975, 0.975, 1); }
.kw-calc-card input[type="range"] { accent-color: #00828a; }

/* ---- Reduced Motion ---------------------------------------------------------- */
@media (prefers-reduced-motion: reduce) {
  .kk-wiz-bar { transition: none; }
  .kk-wiz-bar::after, .kk-shine::after, .kk-wiz-dot.is-current::after, .kw-step-num::after,
  .kk-wiz-in, .kk-wiz-out, .kk-bump, .kk-wiz-in .kw-live-price-hero, .kk-wiz-in .kw-price-val { animation: none !important; }
}
