/* ============================================================
   TALVEN — Ankieta potrzeb (blok). Styl scope'owany do .ankieta-potrzeb
   ============================================================ */
.ankieta-potrzeb{
  --ap-bg:#0e1013; --ap-panel:#181b21; --ap-panel-2:#1e222a; --ap-border:#2a2f38;
  --ap-blue:#1E9DD9; --ap-blue-glow:rgba(30,157,217,.35); --ap-amber:#E8B33A;
  --ap-text:#eef1f5; --ap-muted:#8b95a3; --ap-muted-2:#5d6673; --ap-radius:14px;

  font-family:'Montserrat',sans-serif;
  color:var(--ap-text);
}
.ankieta-potrzeb *{ box-sizing:border-box; }

/* wariant "sekcja" — pełne tło i wyśrodkowanie na stronie */
.ankieta-potrzeb--sekcja{
  background:
    radial-gradient(1200px 600px at 15% -10%, rgba(30,157,217,.10), transparent 60%),
    radial-gradient(900px 500px at 110% 10%, rgba(30,157,217,.06), transparent 55%),
    var(--ap-bg);
  display:flex; align-items:flex-start; justify-content:center;
  padding:56px 14px 64px;
}
.ankieta-potrzeb .wrap{ width:100%; max-width:620px; }

.ankieta-potrzeb .brandbar{ display:flex; align-items:center; justify-content:space-between; margin-bottom:18px; }
.ankieta-potrzeb .brand{ display:flex; align-items:center; gap:10px; }
.ankieta-potrzeb .bolt{ width:20px; height:26px; }
.ankieta-potrzeb .brand-word{ font-weight:800; font-size:19px; letter-spacing:.02em; color:#fff; }
.ankieta-potrzeb .brand-word span{ color:var(--ap-blue); }
.ankieta-potrzeb .kicker-top{ font-size:11px; color:var(--ap-muted); letter-spacing:.06em; text-transform:uppercase; }

.ankieta-potrzeb .stepper{ position:relative; margin:6px 2px 26px; }
.ankieta-potrzeb .stepper-track{ position:relative; height:3px; background:var(--ap-border); border-radius:3px; overflow:hidden; }
.ankieta-potrzeb .stepper-fill{
  position:absolute; left:0; top:0; height:100%;
  background:linear-gradient(90deg, var(--ap-blue), #6fd0ff);
  box-shadow:0 0 10px var(--ap-blue-glow); border-radius:3px;
  transition:width .45s cubic-bezier(.4,0,.2,1); width:0%;
}
.ankieta-potrzeb .stepper-meta{ display:flex; justify-content:space-between; align-items:baseline; margin-top:9px; }
.ankieta-potrzeb .stepper-label{ font-size:12.5px; color:var(--ap-muted); }
.ankieta-potrzeb .stepper-label b{ color:var(--ap-text); font-weight:700; }
.ankieta-potrzeb .stepper-pct{ font-size:11px; color:var(--ap-muted-2); font-variant-numeric:tabular-nums; }

.ankieta-potrzeb .card{
  background:var(--ap-panel); border:1px solid var(--ap-border); border-radius:var(--ap-radius);
  padding:26px 24px 22px; min-height:260px; display:flex; flex-direction:column;
  animation:ap-rise .32s cubic-bezier(.2,.7,.3,1);
}
@keyframes ap-rise{ from{opacity:0; transform:translateY(8px);} to{opacity:1; transform:none;} }
@media (prefers-reduced-motion: reduce){ .ankieta-potrzeb .card{animation:none;} .ankieta-potrzeb .stepper-fill{transition:none;} }

.ankieta-potrzeb .eyebrow{ font-size:11px; font-weight:700; color:var(--ap-blue); letter-spacing:.09em; text-transform:uppercase; margin-bottom:8px; }
.ankieta-potrzeb h1.q{ font-size:20px; font-weight:700; margin:0 0 4px; line-height:1.3; color:#fff; }
.ankieta-potrzeb p.hint{ font-size:13px; color:var(--ap-muted); margin:0 0 20px; line-height:1.5; }
.ankieta-potrzeb .body-scroll{ flex:1; }

.ankieta-potrzeb .opts{ display:grid; gap:10px; }
.ankieta-potrzeb .opts.two-col{ grid-template-columns:1fr 1fr; }
@media (max-width:480px){ .ankieta-potrzeb .opts.two-col{ grid-template-columns:1fr; } }

.ankieta-potrzeb .opt{
  display:flex; align-items:center; gap:12px;
  background:var(--ap-panel-2); border:1.5px solid var(--ap-border); border-radius:10px;
  padding:13px 14px; cursor:pointer; user-select:none;
  transition:border-color .15s, background .15s, transform .1s;
}
.ankieta-potrzeb .opt:hover{ border-color:#3a4150; }
.ankieta-potrzeb .opt:active{ transform:scale(.99); }
.ankieta-potrzeb .opt.sel{ border-color:var(--ap-blue); background:rgba(30,157,217,.10); box-shadow:0 0 0 1px var(--ap-blue) inset; }
.ankieta-potrzeb .opt .ico{ font-size:19px; width:24px; text-align:center; flex-shrink:0; }
.ankieta-potrzeb .opt .label{ font-size:13.5px; font-weight:600; color:var(--ap-text); line-height:1.35; }
.ankieta-potrzeb .opt .sub{ font-size:11.5px; color:var(--ap-muted); margin-top:1px; font-weight:400; }
.ankieta-potrzeb .opt .check{
  margin-left:auto; width:18px; height:18px; border-radius:50%; border:1.5px solid var(--ap-muted-2);
  flex-shrink:0; position:relative;
}
.ankieta-potrzeb .opt.sel .check{ border-color:var(--ap-blue); background:var(--ap-blue); }
.ankieta-potrzeb .opt.sel .check::after{
  content:""; position:absolute; left:5px; top:2px; width:4px; height:8px;
  border:solid #0e1013; border-width:0 2px 2px 0; transform:rotate(45deg);
}

.ankieta-potrzeb .group-title{ display:flex; align-items:center; font-size:11.5px; font-weight:700; color:var(--ap-muted); text-transform:uppercase; letter-spacing:.06em; margin:20px 0 8px; }
.ankieta-potrzeb .group-title:first-child{ margin-top:0; }
.ankieta-potrzeb .group-title .ico{ margin-right:6px; font-size:13px; }

.ankieta-potrzeb .field{ margin-bottom:14px; }
.ankieta-potrzeb label.flabel{ display:block; font-size:12.5px; font-weight:600; color:var(--ap-muted); margin-bottom:6px; }
.ankieta-potrzeb input[type=text],
.ankieta-potrzeb input[type=tel],
.ankieta-potrzeb input[type=email],
.ankieta-potrzeb input[type=number],
.ankieta-potrzeb textarea{
  width:100%; background:var(--ap-panel-2); border:1.5px solid var(--ap-border); border-radius:9px;
  color:var(--ap-text); font-family:inherit; font-size:14px; padding:11px 13px; outline:none;
  transition:border-color .15s;
}
.ankieta-potrzeb input:focus, .ankieta-potrzeb textarea:focus{ border-color:var(--ap-blue); }
.ankieta-potrzeb textarea{ resize:vertical; min-height:74px; line-height:1.5; }
.ankieta-potrzeb .row2{ display:grid; grid-template-columns:1fr 1fr; gap:10px; }
@media (max-width:480px){ .ankieta-potrzeb .row2{ grid-template-columns:1fr; } }

.ankieta-potrzeb .unit-toggle{ display:flex; gap:6px; margin-top:8px; }
.ankieta-potrzeb .unit-btn{
  flex:1; text-align:center; padding:8px; border-radius:8px; border:1.5px solid var(--ap-border);
  background:var(--ap-panel-2); font-size:12.5px; color:var(--ap-muted); cursor:pointer; font-weight:600;
}
.ankieta-potrzeb .unit-btn.sel{ border-color:var(--ap-blue); color:#fff; background:rgba(30,157,217,.12); }

.ankieta-potrzeb .idk{ display:flex; align-items:flex-start; gap:8px; margin-top:10px; font-size:12.5px; color:var(--ap-muted); cursor:pointer; line-height:1.4; }
.ankieta-potrzeb .idk input{ width:16px; height:16px; accent-color:var(--ap-blue); margin-top:1px; flex-shrink:0; }
.ankieta-potrzeb .idk .idk-sub{ display:block; font-size:11px; color:var(--ap-muted-2); margin-top:1px; }

.ankieta-potrzeb .divider{ height:1px; background:var(--ap-border); margin:20px 0; }

.ankieta-potrzeb .nav{ display:flex; align-items:center; justify-content:space-between; margin-top:22px; gap:10px; }
.ankieta-potrzeb .btn{
  font-family:inherit; font-size:14px; font-weight:700; border-radius:10px; padding:12px 20px;
  cursor:pointer; border:none; transition:filter .15s, opacity .15s, transform .1s;
}
.ankieta-potrzeb .btn:active{ transform:scale(.98); }
.ankieta-potrzeb .btn-primary{ background:var(--ap-blue); color:#0b0d10; flex:1; }
.ankieta-potrzeb .btn-primary:hover{ filter:brightness(1.08); }
.ankieta-potrzeb .btn-primary:disabled{ opacity:.35; cursor:not-allowed; }
.ankieta-potrzeb .btn-ghost{ background:transparent; color:var(--ap-muted); border:1.5px solid var(--ap-border); }
.ankieta-potrzeb .btn-ghost:hover{ color:var(--ap-text); border-color:#3a4150; }

.ankieta-potrzeb .sumbox{ background:var(--ap-panel-2); border:1px solid var(--ap-border); border-radius:10px; padding:14px 16px; margin:16px 0; }
.ankieta-potrzeb .sumrow{ display:flex; justify-content:space-between; gap:12px; padding:7px 0; border-bottom:1px solid var(--ap-border); font-size:12.5px; }
.ankieta-potrzeb .sumrow:last-child{ border-bottom:none; }
.ankieta-potrzeb .sumrow .k{ color:var(--ap-muted); flex-shrink:0; }
.ankieta-potrzeb .sumrow .v{ color:var(--ap-text); font-weight:600; text-align:right; }

.ankieta-potrzeb .consent{ display:flex; gap:10px; align-items:flex-start; font-size:11.5px; color:var(--ap-muted); line-height:1.5; margin:4px 0 4px; }
.ankieta-potrzeb .consent input{ margin-top:2px; width:15px; height:15px; accent-color:var(--ap-blue); flex-shrink:0; }

.ankieta-potrzeb .ankieta-error{
  background:rgba(220,70,70,.12); border:1px solid rgba(220,70,70,.4); color:#ffb4b4;
  font-size:12.5px; border-radius:9px; padding:10px 13px; margin:14px 0 0; line-height:1.45;
}

.ankieta-potrzeb .done{ text-align:center; padding:30px 8px 10px; }
.ankieta-potrzeb .done .ring{
  width:64px; height:64px; border-radius:50%; background:rgba(30,157,217,.12); border:1.5px solid var(--ap-blue);
  display:flex; align-items:center; justify-content:center; margin:0 auto 18px; font-size:28px; color:var(--ap-blue);
}
.ankieta-potrzeb .done h2{ font-size:19px; margin:0 0 8px; color:#fff; }
.ankieta-potrzeb .done p{ font-size:13.5px; color:var(--ap-muted); line-height:1.6; max-width:400px; margin:0 auto; }
.ankieta-potrzeb .done .leadid{ margin-top:18px; font-size:11px; color:var(--ap-muted-2); letter-spacing:.05em; }

.ankieta-potrzeb .foot-note{ text-align:center; font-size:11px; color:var(--ap-muted-2); margin-top:16px; line-height:1.6; }

/* ============================================================
   Tryb POPUP
   ============================================================ */
.ankieta-potrzeb--popup .ap-trigger-wrap{ text-align:center; padding:8px 0; }
.ankieta-potrzeb--popup .ap-trigger{
  font-family:'Montserrat',sans-serif; font-size:15px; font-weight:700; border:none; cursor:pointer;
  background:#1E9DD9; color:#0b0d10; border-radius:12px; padding:14px 30px;
  box-shadow:0 8px 20px -8px rgba(30,157,217,.6); transition:filter .15s, transform .1s;
}
.ankieta-potrzeb--popup .ap-trigger:hover{ filter:brightness(1.08); }
.ankieta-potrzeb--popup .ap-trigger:active{ transform:scale(.985); }

/* overlay/dialog — samodzielne klasy (overlay portalowany do <body>,
   dlatego nie może zależeć od zagnieżdżenia; sam nosi klasę .ankieta-potrzeb
   dla zmiennych i scope'u stylów kreatora) */
.ap-overlay{
  position:fixed; inset:0; z-index:2000000000; /* ponad header#masthead (999999999 !important) */
  display:flex; align-items:flex-start; justify-content:center;
  padding:40px 14px; overflow-y:auto;
  background:rgba(6,8,11,.66); backdrop-filter:blur(3px);
  opacity:0; transition:opacity .22s ease;
}
.ap-overlay.is-open{ opacity:1; }
.ap-overlay[hidden]{ display:none !important; }

.ap-dialog{
  position:relative; width:100%; max-width:648px; margin:auto;
  background:#12151b; border:1px solid var(--ap-border); border-radius:16px;
  padding:22px 22px 20px; box-shadow:0 26px 64px -22px rgba(0,0,0,.7);
  transform:translateY(12px) scale(.985); transition:transform .22s cubic-bezier(.2,.7,.3,1);
}
.ap-overlay.is-open .ap-dialog{ transform:none; }
/* wewnątrz dialogu wrap nie ogranicza szerokości */
.ap-dialog .wrap{ max-width:none; }

.ap-close{
  position:absolute; top:14px; right:14px; z-index:2;
  width:34px; height:34px; border-radius:9px; border:1px solid var(--ap-border);
  background:var(--ap-panel-2); color:var(--ap-muted); font-size:22px; line-height:1; cursor:pointer;
  display:flex; align-items:center; justify-content:center; transition:background .15s, color .15s;
}
.ap-close:hover{ background:#242a33; color:#fff; }

@media (prefers-reduced-motion: reduce){
  .ap-overlay, .ap-dialog{ transition:none; }
}
