/* Pionowa belka dostępności */
.contrast-belka {
  position: fixed;
  top: 50%;
  right: 16px;
  z-index: 999;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 10px;
  width: 64px;
  height: auto;
  margin: 0;
  padding: 8px;
  box-sizing: border-box;
  transform: translateY(-50%);
  overflow: visible;
  border: 2px solid #767676;
  border-radius: 14px;
  background: #fff;
  box-shadow: 0 6px 22px rgba(0, 0, 0, .14);
}

.contrast-belka > a,
.contrast-belka > button {
  appearance: none;
  -webkit-appearance: none;
  display: flex;
  flex: 0 0 48px;
  align-items: center;
  justify-content: center;
  width: 48px;
  min-width: 48px;
  max-width: 48px;
  height: 48px;
  min-height: 48px;
  max-height: 48px;
  margin: 0;
  padding: 0;
  box-sizing: border-box;
  overflow: hidden;
  border: 0;
  border-radius: 9px;
  background: #151517;
  color: #fff !important;
  text-decoration: none;
  line-height: 1;
  cursor: pointer;
}

.contrast-belka > a:hover,
.contrast-belka > button:hover {
  background: #303034;
}

.contrast-belka > a:focus-visible,
.contrast-belka > button:focus-visible {
  outline: 4px solid #005fcc !important;
  outline-offset: 3px !important;
  background: #151517 !important;
  color: #fff !important;
  border-radius: 9px !important;
  animation: none !important;
}

.contrast-belka svg {
  display: block;
  flex: 0 0 34px;
  width: 34px;
  height: 34px;
  margin: 0;
  padding: 0;
  border: 0;
  border-radius: 0;
  background: transparent;
  fill: currentColor;
}

.contrast-belka img {
  display: block;
  width: 38px;
  height: 38px;
  margin: 0;
  padding: 0;
  object-fit: contain;
  border: 0;
  border-radius: 0;
  box-shadow: none;
}

.contrast-belka button[aria-pressed="true"] {
  background: #005fcc;
}

body.accessibility-contrast .contrast-belka {
  border-color: #fff;
  background: #000;
}

body.accessibility-contrast .contrast-belka > a,
body.accessibility-contrast .contrast-belka > button {
  border: 2px solid #fff;
  background: #000;
  color: #fff !important;
}

body.accessibility-contrast .contrast-belka button[aria-pressed="true"] {
  background: #fff;
  color: #000 !important;
}

/* Większe odstępy tekstu zgodne z wartościami testowymi WCAG 1.4.12. */
body.accessibility-spacing :where(p, li, blockquote, dd, dt, address, figcaption, label, h1, h2, h3, h4, h5, h6, a, button, input, textarea, select) {
  line-height: 1.5 !important;
  letter-spacing: .12em !important;
  word-spacing: .16em !important;
}

body.accessibility-spacing :where(p, blockquote) {
  margin-bottom: 2em !important;
}

/* Wyraźne podkreślenie wszystkich hiperłączy poza ikonami panelu WCAG. */
body.accessibility-links a {
  text-decoration-line: underline !important;
  text-decoration-thickness: .12em !important;
  text-underline-offset: .2em !important;
}

body.accessibility-links .contrast-belka > a {
  text-decoration: none !important;
}

@media (max-width: 700px) {
  .contrast-belka {
    top: auto;
    right: auto;
    bottom: 10px;
    left: 50%;
    flex-direction: row;
    width: auto;
    height: 60px;
    gap: 6px;
    padding: 8px;
    transform: translateX(-50%);
  }

  .contrast-belka > a,
  .contrast-belka > button {
    flex-basis: 44px;
    width: 44px;
    min-width: 44px;
    max-width: 44px;
    height: 44px;
    min-height: 44px;
    max-height: 44px;
  }

  body {
    padding-bottom: 74px;
  }
}

@media (prefers-reduced-motion: reduce) {
  .contrast-belka,
  .contrast-belka * {
    animation: none !important;
    transition: none !important;
  }
}
