/* ================================
   PANEL NARZĘDZI DOSTĘPNOŚCI
================================= */
#accessibility-tools {
  position: fixed;
  bottom: 20px;
  right: 20px;
  background-color: #007acc; /* jednolite tło */
  padding: 12px;
  border-radius: 12px;
  border: 2px solid #005fa3; /* widoczna ramka */
  box-shadow: 0 4px 15px rgba(0, 0, 0, 0.25);
  display: flex;
  flex-direction: column;
  gap: 10px;
  z-index: 10000;
  font-size: 1rem;
  max-width: 100vw;
  box-sizing: border-box;
  overflow: hidden;
  color: #fff;
  transition: background 0.3s, transform 0.3s;
  filter: none !important; /* ignoruje invert */
  position: fixed;
}

/* Pseudo-element jako niezależna ramka (zawsze widoczna) */
#accessibility-tools::before {
  content: "";
  position: absolute;
  top: 0; left: 0; right: 0; bottom: 0;
  border: 2px solid #005fa3;
  border-radius: 12px;
  pointer-events: none;
}

/* Przyciski panelu */
#accessibility-tools button {
  font-size: 16px;
  padding: 8px 16px;
  border: none;
  border-radius: 8px;
  background-color: #008cff; /* jednolity kolor */
  color: #fff;
  cursor: pointer;
  transition: all 0.2s ease-in-out;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  box-shadow: 0 2px 6px rgba(0, 0, 0, 0.2);
  filter: none !important;
}

#accessibility-tools button:hover {
  background-color: #005fa3;
  transform: translateY(-2px);
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.3);
}

/* Mobile – układ poziomy */
@media (max-width: 768px) {
  #accessibility-tools {
    flex-direction: row;
    bottom: 0;
    left: 0;
    right: 0;
    border-radius: 0;
    border: none;
    justify-content: space-around;
    padding: 10px;
  }

  #accessibility-tools button {
    flex: 1;
    margin: 0 4px;
    border-radius: 6px;
    font-size: 14px;
    padding: 10px;
  }
}

/* ================================
   HIGH CONTRAST
================================= */
body.high-contrast,
body.high-contrast * {
  background-color: black !important;
  color: yellow !important;
  border-color: yellow !important;
}

body.high-contrast a {
  color: cyan !important;
}

body.high-contrast button {
  background-color: #444 !important;
  color: #FFD700 !important;
  border: 1px solid #FFD700 !important;
}

/* ================================
   INVERT CAŁEJ STRONY
================================= */
body.invert-colors {
  filter: invert(1) hue-rotate(180deg);
}

/* Panel ignoruje invert */
body.invert-colors #accessibility-tools {
  filter: none !important;
  background-color: #007acc !important;
  color: #fff !important;
  border: 2px solid #005fa3 !important;
  box-shadow: 0 4px 15px rgba(0,0,0,0.25) !important;
  z-index: 10000;
}

/* Obrazy w invert pozostają normalne */
body.invert-colors img {
  filter: invert(1) hue-rotate(180deg);
}

/* ================================
   POWIĘKSZANIE TEKSTU
================================= */
html {
  --font-scale: 1;
}

body {
  font-size: calc(16px * var(--font-scale));
  line-height: 1.5;
  transition: filter 0.3s, background-color 0.3s, color 0.3s;
}

body * {
  font-size: inherit;
}

.node__content,
.node__content * {
  font-size: calc(16px * var(--font-scale));
  line-height: 1.5;
  word-break: break-word;
  overflow-wrap: break-word;
}

.node__content img,
.lista-wpisow img {
  max-width: 100%;
  height: auto;
}

.lista-wpisow {
  width: 100%;
  box-sizing: border-box;
  word-break: break-word;
  overflow-wrap: break-word;
}

/* Ukrywanie panelu */
#accessibility-tools.hidden {
  display: none !important;
}
