/* Kreator zgłoszeń — wspólny dla wszystkich landingów Digan.
   Strona ustawia tylko zmienne z bloku :root poniżej. */

.dw-root {
  --dw-accent: #16A34A;
  --dw-accent-2: #22C55E;
  --dw-accent-dark: #15803D;
  --dw-accent-tint: rgba(22, 163, 74, .08);
  --dw-accent-line: rgba(22, 163, 74, .22);
  --dw-font: 'Inter', system-ui, sans-serif;
  --dw-font-display: var(--dw-font);
  --dw-ink: #0d1117;
  --dw-ink-2: #374151;
  --dw-muted: #6b7280;
  --dw-muted-2: #9ca3af;
  --dw-placeholder: #858c9c;
  --dw-line: rgba(13, 17, 23, .10);
  --dw-field: #f8fafb;
}

/* ── nakładka i pudełko ── */
.dw-ov {
  position: fixed; inset: 0; z-index: 900;
  display: none; align-items: center; justify-content: center;
  padding: 20px;
  background: rgba(8, 10, 16, .55);
  -webkit-backdrop-filter: blur(6px); backdrop-filter: blur(6px);
}
.dw-ov.dw-open { display: flex; }

.dw-box {
  position: relative;
  width: 100%; max-width: 580px;
  max-height: calc(100dvh - 40px); overflow-y: auto;
  background: #fff; border-radius: 18px;
  padding: 34px 34px 30px;
  font-family: var(--dw-font);
  color: var(--dw-ink);
  box-shadow: 0 40px 100px rgba(17, 24, 39, .3), 0 8px 24px rgba(17, 24, 39, .1);
  animation: dwIn .38s cubic-bezier(.34, 1.4, .64, 1) both;
}
@keyframes dwIn { from { opacity: 0; transform: translateY(14px) scale(.98) } to { opacity: 1; transform: none } }

.dw-x {
  position: absolute; top: 16px; right: 16px;
  width: 34px; height: 34px; border-radius: 50%;
  display: flex; align-items: center; justify-content: center;
  border: 0; cursor: pointer;
  background: rgba(17, 24, 39, .05); color: var(--dw-muted);
  transition: background .18s, color .18s;
}
.dw-x:hover { background: rgba(17, 24, 39, .09); color: var(--dw-ink-2); }

/* ── nagłówek ── */
.dw-icon {
  width: 46px; height: 46px; border-radius: 13px;
  display: flex; align-items: center; justify-content: center;
  background: var(--dw-accent); color: #fff;
  margin-bottom: 18px;
}
.dw-eyebrow {
  font-size: 13px; font-weight: 700; letter-spacing: .09em;
  text-transform: uppercase; color: var(--dw-accent);
  margin-bottom: 8px;
}
.dw-title {
  font-family: var(--dw-font-display);
  font-size: 24px; font-weight: 700; letter-spacing: -.025em;
  line-height: 1.22; margin: 0;
}
.dw-sub {
  font-size: 15.5px; line-height: 1.65; color: var(--dw-muted);
  margin: 10px 0 0;
}

/* ── pasek postępu ── */
.dw-progress { display: flex; align-items: center; gap: 9px; margin: 22px 0 26px; }
.dw-bar { flex: 1; height: 4px; border-radius: 99px; background: rgba(13, 17, 23, .09); overflow: hidden; }
.dw-bar i {
  display: block; height: 100%; width: 0; border-radius: 99px;
  background: var(--dw-accent);
  transition: width .45s cubic-bezier(.22, 1, .36, 1);
}
.dw-bar.dw-filled i { width: 100%; }
.dw-count {
  font-size: 13px; font-weight: 700; letter-spacing: .07em;
  text-transform: uppercase; color: var(--dw-muted); white-space: nowrap;
}

/* ── kroki ── */
.dw-pane { display: none; }
.dw-pane.dw-on { display: block; animation: dwSlide .34s cubic-bezier(.22, 1, .36, 1) both; }
@keyframes dwSlide { from { opacity: 0; transform: translateX(12px) } to { opacity: 1; transform: none } }

.dw-q { font-family: var(--dw-font-display); font-size: 16px; font-weight: 600; letter-spacing: -.015em; margin: 0 0 5px; }
.dw-hint { font-size: 15px; line-height: 1.5; color: var(--dw-muted); margin: 0 0 15px; }
.dw-group + .dw-group { margin-top: 26px; }

/* ── kafelki ── */
.dw-tiles { display: grid; grid-template-columns: 1fr 1fr; gap: 11px; }
.dw-tiles.dw-3 { grid-template-columns: repeat(3, 1fr); }
.dw-tile { position: relative; cursor: pointer; }
.dw-tile input { position: absolute; opacity: 0; pointer-events: none; }
.dw-tile span {
  display: flex; flex-direction: column; gap: 5px;
  padding: 15px 16px; border-radius: 14px; height: 100%;
  background: var(--dw-field); border: 1.5px solid var(--dw-line);
  font-size: 15px; font-weight: 600; line-height: 1.3; color: var(--dw-ink-2);
  transition: border-color .18s, background .18s, box-shadow .18s;
}
.dw-tile span small { font-size: 13.5px; font-weight: 500; line-height: 1.4; color: var(--dw-muted); }
.dw-tile:hover span { border-color: var(--dw-accent-line); background: #fff; }
.dw-tile input:checked + span {
  border-color: var(--dw-accent); background: var(--dw-accent-tint); color: var(--dw-ink);
  box-shadow: 0 4px 14px var(--dw-accent-tint);
}
.dw-tile input:focus-visible + span { outline: 2px solid var(--dw-accent); outline-offset: 2px; }

/* ── podsumowanie wyborów ── */
.dw-summary {
  display: flex; flex-wrap: wrap; gap: 7px;
  padding: 13px 15px; border-radius: 13px; margin-bottom: 22px;
  background: var(--dw-accent-tint); border: 1px solid var(--dw-accent-line);
}
.dw-chip {
  font-size: 13px; font-weight: 600; color: var(--dw-accent-dark);
  background: #fff; border: 1px solid var(--dw-accent-line);
  padding: 5px 11px; border-radius: 99px;
}

/* ── pola ── */
.dw-fields { display: flex; flex-direction: column; gap: 17px; }
.dw-row { display: grid; grid-template-columns: 1fr 1fr; gap: 13px; }
.dw-fld { display: flex; flex-direction: column; gap: 7px; min-width: 0; }
.dw-fld label { font-size: 13.5px; font-weight: 600; color: var(--dw-ink-2); }
.dw-fld label em { font-style: normal; font-weight: 500; color: var(--dw-muted); }
.dw-fld input, .dw-fld textarea {
  font-family: inherit; font-size: 15px; color: var(--dw-ink);
  padding: 13px 15px; border-radius: 12px;
  background: var(--dw-field); border: 1.5px solid var(--dw-line);
  transition: border-color .18s, background .18s, box-shadow .18s;
}
.dw-fld textarea { resize: none; line-height: 1.55; }
.dw-fld input::placeholder, .dw-fld textarea::placeholder { color: var(--dw-placeholder); }
.dw-fld input:focus, .dw-fld textarea:focus {
  outline: none; background: #fff;
  border-color: var(--dw-accent); box-shadow: 0 0 0 4px var(--dw-accent-tint);
}
.dw-fld.dw-bad input, .dw-fld.dw-bad textarea { border-color: #dc2626; }
.dw-err { display: none; font-size: 13px; color: #dc2626; }
.dw-fld.dw-bad .dw-err { display: block; }

.dw-consent {
  display: flex; align-items: flex-start; gap: 13px; cursor: pointer;
  padding: 14px 16px; border-radius: 13px;
  background: var(--dw-field); border: 1.5px solid transparent;
  transition: background .18s, border-color .18s;
}
.dw-consent:hover { background: #fff; border-color: var(--dw-line); }
.dw-consent:has(input:checked) { background: var(--dw-accent-tint); border-color: var(--dw-accent-line); }
.dw-consent input {
  appearance: none; -webkit-appearance: none;
  position: relative; flex-shrink: 0;
  width: 22px; height: 22px; margin: 0; border-radius: 7px;
  background: #fff; border: 1.5px solid var(--dw-line);
  cursor: pointer;
  transition: background .18s, border-color .18s, box-shadow .18s;
}
.dw-consent:hover input { border-color: var(--dw-accent-line); }
.dw-consent input:checked { background: var(--dw-accent); border-color: var(--dw-accent); }
.dw-consent input::after {
  content: ''; position: absolute; left: 7px; top: 3px;
  width: 5px; height: 10px;
  border: solid #fff; border-width: 0 2px 2px 0;
  transform: rotate(45deg) scale(.4); opacity: 0;
  transition: opacity .15s, transform .18s cubic-bezier(.34, 1.6, .64, 1);
}
.dw-consent input:checked::after { opacity: 1; transform: rotate(45deg) scale(1); }
.dw-consent input:focus-visible { outline: 2px solid var(--dw-accent); outline-offset: 3px; }
.dw-consent span { font-size: 13.5px; line-height: 1.6; color: var(--dw-muted); padding-top: 1px; }
.dw-consent a { color: var(--dw-accent); text-decoration: underline; text-underline-offset: 2px; }
.dw-consent a:hover { text-decoration-thickness: 2px; }
.dw-consent.dw-bad { background: #fef2f2; border-color: #dc2626; }
.dw-consent.dw-bad input { border-color: #dc2626; }
.dw-consent.dw-bad span { color: #b91c1c; }

.dw-hp { position: absolute; left: -9999px; width: 1px; height: 1px; overflow: hidden; }

/* ── nawigacja ── */
.dw-nav { display: flex; gap: 11px; align-items: stretch; margin-top: 24px; }
.dw-back {
  display: inline-flex; align-items: center; gap: 8px;
  padding: 0 20px; border-radius: 13px; cursor: pointer;
  background: #fff; border: 1.5px solid var(--dw-line);
  font-family: inherit; font-size: 15px; font-weight: 600; color: var(--dw-ink-2);
  transition: border-color .18s, background .18s;
}
.dw-back:hover { background: #f9fafb; border-color: rgba(13, 17, 23, .18); }
.dw-next {
  flex: 1; display: inline-flex; align-items: center; justify-content: center; gap: 10px;
  min-height: 54px; padding: 0 22px; border-radius: 13px; cursor: pointer; border: 0;
  background: linear-gradient(180deg, var(--dw-accent-2), var(--dw-accent)); color: #fff;
  font-family: var(--dw-font-display); font-size: 15.5px; font-weight: 600;
  transition: filter .18s, transform .18s, opacity .18s;
}
.dw-next:hover:not(:disabled) { filter: brightness(1.07); transform: translateY(-1px); }
.dw-next:disabled { opacity: .4; cursor: not-allowed; transform: none; }

.dw-status { font-size: 13.5px; line-height: 1.5; text-align: center; color: #dc2626; margin: 14px 0 0; }

.dw-trust {
  display: flex; flex-wrap: wrap; align-items: center; justify-content: center; gap: 14px;
  margin-top: 18px; font-size: 13px; color: var(--dw-muted);
}
.dw-trust span { display: inline-flex; align-items: center; gap: 6px; }
.dw-trust svg { color: var(--dw-accent); }

/* ── potwierdzenie ── */
.dw-done { text-align: center; padding: 10px 0 6px; }
.dw-done-ic {
  width: 60px; height: 60px; border-radius: 50%; margin: 0 auto 20px;
  display: flex; align-items: center; justify-content: center;
  background: var(--dw-accent-tint); border: 1px solid var(--dw-accent-line);
  color: var(--dw-accent);
}
.dw-done h4 { font-family: var(--dw-font-display); font-size: 21px; font-weight: 700; letter-spacing: -.02em; margin: 0; }
.dw-done p {
  font-size: 15px; line-height: 1.65; color: var(--dw-muted);
  margin: 10px auto 0; max-width: 40ch;
}
.dw-done .dw-next { margin: 24px auto 0; max-width: 220px; }

/* ── telefon i mniejsze ekrany ── */
@media (max-width: 560px) {
  .dw-ov { padding: 12px; align-items: flex-start; }
  .dw-box { padding: 26px 20px 24px; border-radius: 16px; max-height: calc(100dvh - 24px); }
  .dw-title { font-size: 21px; }
  .dw-tiles, .dw-tiles.dw-3 { grid-template-columns: 1fr 1fr; }
  .dw-row { grid-template-columns: 1fr; gap: 17px; }
  .dw-nav { flex-wrap: wrap; }
  .dw-back { padding: 14px 18px; }
}
