/* Baner zgód i okno ustawień prywatności */

.consent-banner {
  position: fixed; left: 16px; right: 16px; bottom: 16px; z-index: 3000;
  max-width: 1080px; margin: 0 auto;
  background: #fff; color: #0A1B3D;
  border: 1px solid #D7E2F0; border-radius: 16px;
  box-shadow: 0 12px 40px rgba(10, 27, 61, .18);
  font-family: "Archivo", system-ui, sans-serif;
}
.consent-banner[hidden] { display: none; }
.consent-inner { display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: 16px 32px; align-items: center; padding: 22px 26px; }
.consent-title { margin: 0 0 6px; font-size: 1.0625rem; line-height: 1.3; }
.consent-text p { margin: 0; font-size: .9375rem; line-height: 1.55; color: #3D4D69; max-width: 70ch; }
.consent-text a, .consent-form a { color: #1E5BE0; }

.consent-actions { display: flex; flex-wrap: wrap; gap: 8px; }
.consent-btn {
  min-height: 44px; padding: 0 18px;
  font: 600 .9375rem/1 "Archivo", system-ui, sans-serif;
  border-radius: 999px; cursor: pointer;
  transition: background-color .2s, border-color .2s, color .2s;
}
/* „Akceptuj” i „Odrzuć” wyglądają tak samo: żaden wybór nie jest wizualnie podsuwany */
.consent-btn[data-consent="accept"],
.consent-btn[data-consent="reject"] { color: #fff; background: #0A1B3D; border: 2px solid #0A1B3D; }
.consent-btn[data-consent="accept"]:hover,
.consent-btn[data-consent="reject"]:hover { background: #1E5BE0; border-color: #1E5BE0; }
.consent-btn[data-consent="settings"],
.consent-btn[data-consent="save"] { color: #0A1B3D; background: #fff; border: 2px solid #D7E2F0; }
.consent-btn[data-consent="settings"]:hover,
.consent-btn[data-consent="save"]:hover { border-color: #1E5BE0; color: #1E5BE0; }
.consent-btn:focus-visible, .consent-switch input:focus-visible + span { outline: 3px solid #7FD8F5; outline-offset: 2px; }

/* okno ustawień */
.consent-dialog {
  width: min(560px, calc(100vw - 32px)); max-height: calc(100vh - 32px);
  padding: 0; border: 0; border-radius: 18px;
  color: #0A1B3D; background: #fff;
  box-shadow: 0 20px 60px rgba(10, 27, 61, .3);
  font-family: "Archivo", system-ui, sans-serif;
}
.consent-dialog::backdrop { background: rgba(10, 27, 61, .55); }
.consent-form { padding: 28px; }
.consent-form h2 { margin: 0; font-size: 1.375rem; }
.consent-lead { margin: 8px 0 0; font-size: .9375rem; color: #5A6A85; }
.consent-list { list-style: none; margin: 20px 0 24px; padding: 0; }
.consent-list li { padding: 16px 0; border-top: 1px solid #D7E2F0; }
.consent-list li:last-child { border-bottom: 1px solid #D7E2F0; }
.consent-list p { margin: 6px 0 0; font-size: .875rem; line-height: 1.55; color: #5A6A85; }
.consent-row { display: flex; justify-content: space-between; align-items: center; gap: 16px; }
.consent-name { font-weight: 600; }
.consent-always { font-size: .875rem; color: #1E5BE0; font-weight: 500; }

.consent-switch { position: relative; flex: none; width: 48px; height: 28px; }
.consent-switch input { position: absolute; inset: 0; width: 100%; height: 100%; margin: 0; opacity: 0; cursor: pointer; z-index: 1; }
.consent-switch span { position: absolute; inset: 0; border-radius: 999px; background: #C3CEDF; transition: background-color .2s; }
.consent-switch span::after {
  content: ""; position: absolute; top: 3px; left: 3px; width: 22px; height: 22px; border-radius: 50%;
  background: #fff; box-shadow: 0 1px 3px rgba(10, 27, 61, .3); transition: transform .2s;
}
.consent-switch input:checked + span { background: #1E5BE0; }
.consent-switch input:checked + span::after { transform: translateX(20px); }

.consent-dialog .consent-actions { justify-content: flex-end; }

/* link „Ustawienia cookies” w stopce */
.consent-link { padding: 0; font: inherit; color: inherit; background: none; border: 0; text-decoration: underline; text-underline-offset: 3px; cursor: pointer; }

@media (max-width: 760px) {
  .consent-banner { left: 8px; right: 8px; bottom: 8px; }
  .consent-inner { grid-template-columns: 1fr; padding: 18px; }
  .consent-actions .consent-btn { flex: 1 1 auto; }
  .consent-form { padding: 22px 18px; }
}

@media (prefers-reduced-motion: reduce) {
  .consent-btn, .consent-switch span, .consent-switch span::after { transition: none; }
}
