/* ==========================================================================
   Studio Widok — wycena.css
   Style kreatora bezpłatnej wyceny (11 etapów).
   ========================================================================== */

/* --- Header ---------------------------------------------------------------- */
.wizard-header {
  position: sticky; top: 0; z-index: 50;
  background: rgba(20,18,15,.76);
  backdrop-filter: blur(12px); -webkit-backdrop-filter: blur(12px);
  border-bottom: 1px solid var(--border);
}
.wizard-header-inner { display: flex; align-items: center; justify-content: space-between; padding-block: 16px; }
.wizard-header-back {
  display: flex; align-items: center; gap: 6px;
  font-size: .9rem; font-weight: 600; color: var(--text-soft);
  transition: color var(--transition);
}
.wizard-header-back:hover { color: var(--text); }

/* --- Footer ------------------------------------------------------------------- */
.wizard-footer { border-top: 1px solid var(--border); padding-block: 26px; }
.wizard-footer p { text-align: center; font-size: .84rem; color: var(--text-soft); }
.wizard-footer a { color: var(--text-soft); transition: color var(--transition); }
.wizard-footer a:hover { color: var(--accent); }

/* --- Policy / legal content ----------------------------------------------------- */
.policy-section { padding-block: 64px 90px; }
.policy-content h1 { font-size: clamp(2rem, 4vw, 2.6rem); margin-bottom: 8px; }
.policy-updated { color: var(--text-soft); font-size: .88rem; margin-bottom: 40px; }
.policy-content h2 { font-size: 1.2rem; margin-top: 36px; margin-bottom: 12px; }
.policy-content p { color: var(--text-soft); margin-bottom: 14px; max-width: 68ch; }
.policy-content ul { display: flex; flex-direction: column; gap: 8px; margin: 0 0 14px; padding-left: 20px; list-style: disc; max-width: 68ch; }
.policy-content li { color: var(--text-soft); }
.policy-content li strong { color: var(--text); }
.policy-content a { color: var(--accent); text-decoration: underline; text-underline-offset: 2px; }
.policy-content code { background: var(--bg-alt); padding: 2px 6px; border-radius: 4px; font-size: .88em; }

/* --- Section / background --------------------------------------------------- */
.wizard-section { position: relative; padding-block: 56px 90px; overflow: hidden; }
.wizard-blob { position: absolute; z-index: 0; border-radius: 50%; filter: blur(80px); pointer-events: none; }
.wizard-blob.blob-1 { width: 460px; height: 460px; background: var(--accent-soft); top: -180px; right: -140px; }
.wizard-blob.blob-2 { width: 360px; height: 360px; background: rgba(255,255,255,.04); bottom: -140px; left: -120px; }

.wizard-container { position: relative; z-index: 1; max-width: 760px; margin-inline: auto; }

/* --- Intro ------------------------------------------------------------------- */
.wizard-intro { text-align: center; margin-bottom: 36px; }
.wizard-intro h1 { font-size: clamp(1.9rem, 4vw, 2.6rem); margin-bottom: 14px; }
.wizard-lead { color: var(--text-soft); font-size: 1.08rem; max-width: 52ch; margin-inline: auto; margin-bottom: 18px; }
.wizard-meta { display: flex; flex-direction: column; gap: 4px; color: var(--text-soft); font-size: .88rem; }

/* --- Glass card --------------------------------------------------------------- */
.wizard-card {
  position: relative;
  background: rgba(32, 28, 23, .55);
  backdrop-filter: blur(24px) saturate(140%);
  -webkit-backdrop-filter: blur(24px) saturate(140%);
  border: 1px solid rgba(255,255,255,.09);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-lg);
  padding: 40px;
  overflow: hidden;
}

/* --- Progress ------------------------------------------------------------------ */
.wizard-progress { display: flex; align-items: center; gap: 16px; margin-bottom: 32px; }
.wizard-progress-track { flex: 1; height: 6px; border-radius: 999px; background: rgba(255,255,255,.08); overflow: hidden; }
.wizard-progress-fill { height: 100%; width: 9.09%; background: var(--accent); border-radius: 999px; transition: width .45s var(--ease-out); }
.wizard-progress-label { flex-shrink: 0; font-size: .82rem; font-weight: 700; color: var(--text-soft); font-variant-numeric: tabular-nums; }

/* --- Steps + transitions -------------------------------------------------------- */
.wizard-steps { position: relative; }
.wizard-step {
  display: none;
  animation: step-in .4s var(--ease-out);
}
.wizard-step.is-active { display: block; }
.wizard-step.is-leaving-back { animation: step-in-back .4s var(--ease-out); }
@keyframes step-in { from { opacity: 0; transform: translateX(24px); } to { opacity: 1; transform: translateX(0); } }
@keyframes step-in-back { from { opacity: 0; transform: translateX(-24px); } to { opacity: 1; transform: translateX(0); } }

.wizard-step-eyebrow {
  display: inline-block; color: var(--accent); font-weight: 700; font-size: .8rem;
  letter-spacing: .06em; text-transform: uppercase; margin-bottom: 14px;
}
.wizard-question { font-size: clamp(1.3rem, 2.6vw, 1.6rem); margin-bottom: 10px; }
.wizard-hint { color: var(--text-soft); font-size: .9rem; margin-bottom: 22px; }

/* --- Option grid (checkbox / radio tiles) ---------------------------------------- */
.option-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(210px, 1fr)); gap: 12px; margin-bottom: 8px; }
.option-card { position: relative; }
.option-card input { position: absolute; opacity: 0; width: 100%; height: 100%; margin: 0; cursor: pointer; z-index: 1; }
.option-card-body {
  display: flex; align-items: center; gap: 12px; min-height: 54px;
  padding: 14px 16px; border-radius: var(--radius-sm);
  border: 1.5px solid var(--border); background: rgba(255,255,255,.03);
  font-weight: 600; font-size: .93rem; color: var(--text-soft);
  transition: all var(--transition);
}
.option-check {
  width: 20px; height: 20px; border-radius: 6px; flex-shrink: 0;
  border: 1.5px solid var(--border-strong);
  display: flex; align-items: center; justify-content: center;
  transition: all var(--transition);
}
.option-card:has(input[type="radio"]) .option-check { border-radius: 50%; }
.option-card input:checked + .option-card-body { border-color: var(--accent); background: var(--accent-soft); color: var(--text); }
.option-card input:checked + .option-card-body .option-check { background: var(--accent); border-color: var(--accent); }
.option-card input:checked + .option-card-body .option-check::after {
  content: ""; width: 5px; height: 9px; border: solid #fff; border-width: 0 2px 2px 0;
  transform: rotate(45deg) translate(-1px, -1px);
}
.option-card:has(input[type="radio"]) input:checked + .option-card-body .option-check::after {
  width: 8px; height: 8px; border: none; border-radius: 50%; background: #fff; transform: none;
}
.option-card:hover .option-card-body { border-color: var(--border-strong); }
.option-card input:focus-visible + .option-card-body { outline: 2px solid var(--accent); outline-offset: 2px; }

/* --- Feature card (Etap 7) ----------------------------------------------------- */
.wizard-feature-card {
  display: flex; gap: 18px; align-items: flex-start;
  background: var(--accent-soft); border: 1px solid rgba(232,96,12,.3);
  border-radius: var(--radius-md); padding: 22px; margin-bottom: 26px;
}
.wizard-feature-card .card-icon { background: var(--accent); color: #fff; }
.wizard-feature-card h3 { font-size: 1.1rem; margin-bottom: 6px; }
.wizard-feature-card p { color: var(--text-soft); font-size: .92rem; }
.wizard-feature-price { color: var(--text) !important; font-weight: 700; margin-top: 6px; }
.wizard-feature-price strong { color: var(--accent); font-family: var(--font-display); font-size: 1.05em; }

/* --- Textarea (Etap 8) ---------------------------------------------------------- */
.wizard-textarea {
  width: 100%; min-height: 160px; padding: 16px; border-radius: var(--radius-sm);
  border: 1px solid var(--border); background: var(--bg); color: var(--text);
  font: inherit; resize: vertical; transition: border-color var(--transition), background var(--transition);
}
.wizard-textarea::placeholder { color: var(--text-soft); opacity: .7; }
.wizard-textarea:focus { outline: none; border-color: var(--accent); background: var(--bg-alt); }

/* --- Contact fields (Etap 9) ----------------------------------------------------- */
.wizard-fields { display: flex; flex-direction: column; gap: 18px; }
.wizard-optional { font-weight: 400; color: var(--text-soft); text-transform: none; letter-spacing: 0; }

/* --- Error state ------------------------------------------------------------------ */
.wizard-error { color: #F87171; font-size: .86rem; margin-top: 14px; min-height: 1.2em; display: none; }
.wizard-error.is-visible { display: block; }
.wizard-step.has-error .option-grid,
.wizard-step.has-error .wizard-fields,
.wizard-step.has-error .wizard-rodo { animation: shake .4s; }
@keyframes shake {
  10%, 90% { transform: translateX(-2px); }
  20%, 80% { transform: translateX(4px); }
  30%, 50%, 70% { transform: translateX(-6px); }
  40%, 60% { transform: translateX(6px); }
}
.wizard-step.has-error .option-card-body.is-invalid,
.wizard-step.has-error input.is-invalid,
.wizard-step.has-error textarea.is-invalid { border-color: #F87171 !important; }

/* --- Summary (Etap 11) --------------------------------------------------------------- */
.summary-content { display: flex; flex-direction: column; gap: 14px; margin-bottom: 28px; }
.summary-item {
  display: flex; justify-content: space-between; align-items: flex-start; gap: 16px;
  background: rgba(255,255,255,.03); border: 1px solid var(--border);
  border-radius: var(--radius-sm); padding: 16px 18px;
}
.summary-item-body h4 { font-size: .82rem; text-transform: uppercase; letter-spacing: .04em; color: var(--accent); font-weight: 700; margin-bottom: 6px; }
.summary-item-body p { font-size: .93rem; color: var(--text); line-height: 1.5; }
.summary-edit {
  flex-shrink: 0; font-size: .82rem; font-weight: 700; color: var(--text-soft);
  border: 1px solid var(--border); border-radius: 999px; padding: 6px 14px;
  transition: all var(--transition); white-space: nowrap;
}
.summary-edit:hover { color: var(--text); border-color: var(--border-strong); }
.wizard-rodo { margin-top: 10px; }

/* --- Nav buttons ------------------------------------------------------------------------ */
.wizard-nav { display: flex; justify-content: space-between; gap: 12px; margin-top: 32px; }
.wizard-nav #wizardBack { flex: 0 0 auto; }
.wizard-nav #wizardBack.is-hidden { visibility: hidden; }
.wizard-nav #wizardNext { flex: 1; }

/* --- Success screen -------------------------------------------------------------------- */
.wizard-success {
  text-align: center; max-width: 560px; margin-inline: auto;
  background: rgba(32, 28, 23, .55);
  backdrop-filter: blur(24px) saturate(140%);
  -webkit-backdrop-filter: blur(24px) saturate(140%);
  border: 1px solid rgba(255,255,255,.09);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-lg);
  padding: 48px 40px;
}
.wizard-success-icon { display: flex; justify-content: center; margin-bottom: 22px; }
.wizard-success-icon svg circle { transform-origin: center; animation: success-circle .5s var(--ease-out) both; }
.wizard-success-icon svg path { stroke-dasharray: 60; stroke-dashoffset: 60; animation: success-check .4s .35s var(--ease-out) both; }
@keyframes success-circle { from { transform: scale(0); opacity: 0; } to { transform: scale(1); opacity: 1; } }
@keyframes success-check { to { stroke-dashoffset: 0; } }
.wizard-success h2 { font-size: clamp(1.5rem, 3vw, 1.9rem); margin-bottom: 12px; }
.wizard-success > p { color: var(--text-soft); margin-bottom: 28px; }
.wizard-success-list { text-align: left; background: rgba(255,255,255,.03); border: 1px solid var(--border); border-radius: var(--radius-md); padding: 22px; margin-bottom: 30px; }
.wizard-success-list h3 { font-size: .95rem; margin-bottom: 14px; }
.wizard-success-list ul { display: flex; flex-direction: column; gap: 10px; }
.wizard-success-list li {
  position: relative; padding-left: 28px; font-size: .92rem; color: var(--text-soft);
}
.wizard-success-list li::before {
  content: ""; position: absolute; left: 0; top: 3px; width: 18px; height: 18px; border-radius: 50%;
  background: var(--accent-soft);
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 16 16' fill='none'%3E%3Cpath d='M3.5 8.2 6.3 11l6-6.5' stroke='%23E8600C' stroke-width='1.6' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E");
  background-repeat: no-repeat; background-position: center;
}

/* --- Responsive ------------------------------------------------------------------------- */
@media (max-width: 640px) {
  .wizard-card { padding: 26px 20px; }
  .wizard-section { padding-block: 32px 56px; }
  .option-grid { grid-template-columns: 1fr; }
  .wizard-feature-card { flex-direction: column; }
  .summary-item { flex-direction: column; }
  .summary-edit { align-self: flex-start; }
  .wizard-success { padding: 34px 22px; }
}

@media (prefers-reduced-motion: reduce) {
  .wizard-step, .wizard-step.is-leaving-back { animation: none; }
  .wizard-success-icon svg circle, .wizard-success-icon svg path { animation: none; opacity: 1; stroke-dashoffset: 0; }
}
