/* WP Cookies Consent – style. Kolory ustawiane zmiennymi --wpcc-primary / --wpcc-bg / --wpcc-text */
.wpcc, .wpcc * { box-sizing: border-box; }
.wpcc [hidden], .wpcc[hidden] { display: none !important; }
iframe[data-wpcc-category] { display: none !important; }

.wpcc {
  --wpcc-primary: #1d4ed8; --wpcc-bg: #ffffff; --wpcc-text: #1f2937;
  font: 15px/1.5 -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
  color: var(--wpcc-text);
}

/* Baner */
.wpcc-banner {
  position: fixed; z-index: 2147483000; background: var(--wpcc-bg); color: var(--wpcc-text);
  box-shadow: 0 -2px 24px rgba(0,0,0,.18); padding: 18px 20px;
}
.wpcc--bar .wpcc-banner { left: 0; right: 0; bottom: 0; }
.wpcc--bar .wpcc-banner > * { max-width: 1100px; margin-left: auto; margin-right: auto; }
.wpcc--box_left .wpcc-banner, .wpcc--box_right .wpcc-banner {
  bottom: 16px; width: min(440px, calc(100vw - 32px)); border-radius: 12px; box-shadow: 0 8px 32px rgba(0,0,0,.25);
}
.wpcc--box_left .wpcc-banner { left: 16px; }
.wpcc--box_right .wpcc-banner { right: 16px; }

.wpcc-title { margin: 0 0 6px; font-size: 18px; font-weight: 700; color: inherit; line-height: 1.3; }
.wpcc-text { margin: 0 0 14px; }
.wpcc-text a, .wpcc-link { color: var(--wpcc-primary); text-decoration: underline; }
.wpcc-actions { display: flex; flex-wrap: wrap; gap: 10px; }

/* Przyciski: "Akceptuję" i "Odrzucam" mają identyczny wygląd */
.wpcc-btn {
  appearance: none; cursor: pointer; min-height: 44px; padding: 10px 20px; border-radius: 8px;
  font: inherit; font-weight: 600; border: 2px solid var(--wpcc-primary); flex: 1 1 auto; text-align: center;
}
.wpcc-btn--main { background: var(--wpcc-primary); color: #fff; }
.wpcc-btn--ghost { background: transparent; color: var(--wpcc-primary); }
.wpcc-btn:hover { filter: brightness(1.1); }
.wpcc-btn:focus-visible, .wpcc-link:focus-visible, .wpcc-fab:focus-visible, .wpcc-close:focus-visible,
.wpcc-switch input:focus-visible + .wpcc-slider { outline: 3px solid #f59e0b; outline-offset: 2px; }

.wpcc-link { background: none; border: 0; padding: 4px 0; font: inherit; cursor: pointer; }

/* Okno ustawień */
.wpcc-overlay {
  position: fixed; inset: 0; z-index: 2147483001; background: rgba(0,0,0,.55);
  display: flex; align-items: center; justify-content: center; padding: 16px;
}
.wpcc-modal {
  background: var(--wpcc-bg); color: var(--wpcc-text); width: min(680px, 100%); max-height: calc(100vh - 32px);
  border-radius: 12px; display: flex; flex-direction: column; box-shadow: 0 12px 48px rgba(0,0,0,.35);
}
.wpcc-modal:focus { outline: none; }
.wpcc-modal-head { display: flex; justify-content: space-between; align-items: center; padding: 18px 20px 6px; }
.wpcc-modal-head .wpcc-title { margin: 0; }
.wpcc-close { background: none; border: 0; font-size: 30px; line-height: 1; cursor: pointer; color: inherit; width: 44px; height: 44px; }
.wpcc-modal-body { padding: 8px 20px; overflow-y: auto; }
.wpcc-modal-foot { padding: 14px 20px 18px; border-top: 1px solid rgba(127,127,127,.25); }
.wpcc-cat { padding: 12px 0; border-top: 1px solid rgba(127,127,127,.25); }
.wpcc-cat-head { display: flex; justify-content: space-between; align-items: center; gap: 12px; }
.wpcc-cat-title { font-weight: 700; cursor: pointer; }
.wpcc-cat-desc { margin: 4px 0 6px; font-size: 14px; opacity: .9; }
.wpcc-always { font-size: 13px; font-weight: 600; color: var(--wpcc-primary); }
.wpcc-always input { position: absolute; opacity: 0; pointer-events: none; }

/* Przełącznik */
.wpcc-switch { position: relative; display: inline-block; width: 50px; height: 28px; flex: none; }
.wpcc-switch input { position: absolute; inset: 0; width: 100%; height: 100%; opacity: 0; margin: 0; cursor: pointer; z-index: 1; }
.wpcc-slider { position: absolute; inset: 0; background: #9ca3af; border-radius: 28px; transition: background .2s; }
.wpcc-slider::before {
  content: ""; position: absolute; width: 22px; height: 22px; left: 3px; top: 3px; background: #fff;
  border-radius: 50%; transition: transform .2s;
}
.wpcc-switch input:checked + .wpcc-slider { background: var(--wpcc-primary); }
.wpcc-switch input:checked + .wpcc-slider::before { transform: translateX(22px); }

/* Tabela cookies */
.wpcc-tablewrap { overflow-x: auto; margin-top: 6px; }
.wpcc-table { border-collapse: collapse; width: 100%; font-size: 13px; }
.wpcc-table th, .wpcc-table td { border: 1px solid rgba(127,127,127,.35); padding: 6px 8px; text-align: left; vertical-align: top; }

/* Stały przycisk */
.wpcc-fab {
  position: fixed; left: 16px; bottom: 16px; z-index: 2147482999; background: var(--wpcc-bg); color: var(--wpcc-text);
  border: 2px solid var(--wpcc-primary); border-radius: 999px; padding: 8px 14px; min-height: 40px;
  font: 600 13px/1.2 -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Arial, sans-serif;
  cursor: pointer; box-shadow: 0 2px 10px rgba(0,0,0,.2);
}
.wpcc--box_left .wpcc-fab { left: auto; right: 16px; }

/* Placeholder dla zablokowanej treści zewnętrznej */
.wpcc-embed {
  display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 12px;
  text-align: center; padding: 20px; background: #f3f4f6; color: #1f2937; border: 1px dashed #9ca3af; border-radius: 8px;
  width: 100%;
}
.wpcc-embed p { margin: 0; }
.wpcc-embed .wpcc-btn { flex: none; }

html.wpcc-lock { overflow: hidden; }

@media (max-width: 520px) {
  .wpcc-btn { flex: 1 1 100%; }
  .wpcc-banner { max-height: 80vh; overflow-y: auto; }
}
@media (prefers-reduced-motion: reduce) {
  .wpcc-slider, .wpcc-slider::before { transition: none; }
}
