/* =============================================================================
   RozliczeniaNiemcy.pl (KADOM) – baner zgody na cookies (assets/k2/cookies.js, wczytuje go zgoda.php).
   Wszystkie reguły w .khz – nie gryzą się z Bootstrapem (formularz), stylami strony ani czatem.
   Telefon: arkusz na dole ekranu. Komputer (od 720 px): karta w lewym dolnym rogu (czat jest po prawej).
   Kolory i kroje jak na stronie głównej (home.css): zieleń #198754, Plus Jakarta Sans.
   „Akceptuję wszystkie” i „Odrzucam” mają ten sam wygląd – tak wymaga prawo (równie łatwa odmowa).
   ============================================================================= */
.khz {
  --khz-green: #198754;
  --khz-green-600: #157347;
  --khz-green-800: #0f5d3a;
  --khz-mint: #edf8f2;
  --khz-mint-2: #d5efe0;
  --khz-ink: #0f1a15;
  --khz-ink-2: #2c3a33;
  --khz-muted: #55635b;
  --khz-line: #e1e8e4;
  --khz-soft: #f5f8f6;
  position: fixed; left: 0; right: 0; bottom: 0; z-index: 2147483100;   /* nad paskiem CTA i przyciskiem czatu */
  margin: 0; padding: 0;
  font-family: 'Plus Jakarta Sans', 'KH Fallback', 'KH Fallback R', system-ui, -apple-system, 'Segoe UI', Roboto, Arial, sans-serif;
  font-size: 15.5px; line-height: 1.5; font-weight: 400; letter-spacing: normal; text-align: left;
  color: var(--khz-ink);
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}
.khz[hidden], .khz [hidden] { display: none !important; }
.khz *, .khz *::before, .khz *::after { box-sizing: border-box; }

.khz__box {
  background: #fff;
  border: 1px solid var(--khz-line); border-bottom: 0;
  border-radius: 22px 22px 0 0;
  box-shadow: 0 -2px 4px rgba(15, 26, 21, .04), 0 -20px 50px -20px rgba(10, 63, 40, .4);
  padding: 18px 16px calc(14px + env(safe-area-inset-bottom, 0px));
  max-height: 88vh; max-height: 88dvh;
  overflow-y: auto; overscroll-behavior: contain;
}
@media (min-width: 720px) {
  .khz { left: 24px; right: auto; bottom: 24px; width: 440px; max-width: calc(100vw - 48px); }
  .khz__box {
    border-bottom: 1px solid var(--khz-line); border-radius: 22px;
    box-shadow: 0 2px 4px rgba(15, 26, 21, .05), 0 30px 60px -24px rgba(10, 63, 40, .45);
    padding: 22px 22px 18px;
    max-height: calc(100vh - 48px);
  }
}

/* --- nagłówek i tekst --- */
.khz .khz__head { display: flex; align-items: flex-start; justify-content: space-between; gap: 12px; }
.khz .khz__t {
  display: flex; align-items: center; gap: 10px;
  margin: 0 0 8px; padding: 0;
  font-family: inherit; font-size: 1.14rem; font-weight: 800; line-height: 1.25; letter-spacing: -.01em;
  color: var(--khz-ink); text-transform: none;
}
.khz .khz__t:focus { outline: none; }
.khz .khz__t:focus-visible { outline: 3px solid var(--khz-green-800); outline-offset: 3px; border-radius: 6px; }
.khz .khz__ico {
  flex: none; display: inline-grid; place-items: center; width: 34px; height: 34px; border-radius: 11px;
  background: var(--khz-mint); color: var(--khz-green-800);
}
.khz .khz__d { margin: 0 0 14px; color: var(--khz-ink-2); font-size: .95rem; line-height: 1.55; }
.khz .khz__d b { font-weight: 700; color: var(--khz-ink); }
.khz a { color: var(--khz-green-800); font-weight: 600; text-decoration: underline; text-underline-offset: 3px; }
.khz a:hover { color: var(--khz-ink); }

/* --- przyciski: „Akceptuję wszystkie” i „Odrzucam” wyglądają tak samo --- */
.khz .khz__btns { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; margin: 0; }
.khz .khz__btn {
  -webkit-appearance: none; appearance: none;
  display: inline-flex; align-items: center; justify-content: center;
  min-height: 50px; margin: 0; padding: 10px 12px;
  border: 2px solid var(--khz-green); border-radius: 14px;
  background: var(--khz-green); color: #fff;
  font-family: inherit; font-size: 1rem; font-weight: 700; line-height: 1.2; text-align: center; text-transform: none; letter-spacing: normal;
  box-shadow: none; cursor: pointer;
  transition: background-color .15s ease, border-color .15s ease, transform .15s ease;
}
.khz .khz__btn:hover { background: var(--khz-green-600); border-color: var(--khz-green-600); color: #fff; }
.khz .khz__btn:active { transform: translateY(1px); }
.khz .khz__btn--alt { background: #fff; color: var(--khz-green-800); }
.khz .khz__btn--alt:hover { background: var(--khz-mint); border-color: var(--khz-green); color: var(--khz-green-800); }
.khz .khz__btns--ust .khz__btn--main { grid-column: 1 / -1; }
.khz .khz__more {
  -webkit-appearance: none; appearance: none;
  display: block; min-height: 44px; margin: 6px auto 0; padding: 8px 14px;
  border: 0; border-radius: 10px; background: transparent;
  font-family: inherit; font-size: .98rem; font-weight: 700; line-height: 1.2;
  color: var(--khz-green-800); text-decoration: underline; text-underline-offset: 3px; cursor: pointer;
}
.khz .khz__more:hover { background: var(--khz-soft); }
.khz .khz__x {
  -webkit-appearance: none; appearance: none;
  flex: none; display: inline-grid; place-items: center; width: 40px; height: 40px; margin: -4px -6px 0 0; padding: 0;
  border: 0; border-radius: 50%; background: var(--khz-soft); color: var(--khz-ink-2); cursor: pointer;
}
.khz .khz__x:hover { background: var(--khz-line); }
.khz button:focus-visible, .khz a:focus-visible, .khz .khz__sw:focus-visible {
  outline: 3px solid var(--khz-green-800); outline-offset: 2px;
}

/* --- kategorie z przełącznikami --- */
.khz .khz__cats { display: grid; gap: 8px; margin: 0 0 14px; padding: 0; list-style: none; }
.khz .khz__cat { margin: 0; padding: 12px 14px; border: 1px solid var(--khz-line); border-radius: 14px; background: var(--khz-soft); }
.khz .khz__row { display: flex; align-items: center; gap: 10px; margin: 0; cursor: pointer; font-weight: 700; }
.khz .khz__row--stale { cursor: default; }
.khz .khz__name { flex: 1 1 auto; min-width: 0; color: var(--khz-ink); font-size: 1rem; line-height: 1.3; }
.khz .khz__name small { display: block; margin-top: 1px; color: var(--khz-muted); font-size: .84rem; font-weight: 600; }
.khz .khz__st { flex: none; color: var(--khz-muted); font-size: .8rem; font-weight: 700; }
.khz .khz__sw {
  -webkit-appearance: none; appearance: none;
  flex: none; position: relative; width: 52px; height: 30px; margin: 0; padding: 0;
  border: 0; border-radius: 999px; background: #a9b6af; cursor: pointer;
  transition: background-color .15s ease;
}
.khz .khz__sw::after {
  content: ''; position: absolute; top: 3px; left: 3px; width: 24px; height: 24px; border-radius: 50%;
  background: #fff; box-shadow: 0 1px 3px rgba(0, 0, 0, .25); transition: transform .15s ease;
}
.khz .khz__sw:checked { background: var(--khz-green); }
.khz .khz__sw:checked::after { transform: translateX(22px); }
.khz .khz__sw:disabled { opacity: .6; cursor: default; }
.khz .khz__info { margin: 6px 0 0; color: var(--khz-muted); font-size: .88rem; line-height: 1.5; }
.khz .khz__foot { margin: 12px 0 0; font-size: .9rem; text-align: center; }

/* --- bardzo wąskie telefony: przyciski jeden pod drugim --- */
@media (max-width: 340px) {
  .khz .khz__btns { grid-template-columns: 1fr; }
}

/* --- pojawienie się --- */
.khz--in .khz__box { animation: khz-in .28s ease-out both; }
@keyframes khz-in { from { transform: translateY(24px); opacity: 0; } to { transform: none; opacity: 1; } }
@media (prefers-reduced-motion: reduce) {
  .khz--in .khz__box { animation: none; }
  .khz .khz__btn, .khz .khz__sw, .khz .khz__sw::after { transition: none; }
}

/* pusty pas na końcu strony (wysokość banera) – stopka nie chowa się pod banerem */
.khz-odstep { display: block; width: 100%; margin: 0; padding: 0; pointer-events: none; }

@media print { .khz, .khz-odstep { display: none !important; } }
