/* 15 – Menu boczne (skróty) i przycisk dostępności: styl pływającej ikonki z focus.html
   (półprzezroczyste koło w kolorze dolnego paska banera, obwódka 6 px, delikatne „unoszenie się”, powiększenie po najechaniu). */
@keyframes sidefloat {
  50% { translate: 0 -5px; }
}
#side {
  position: fixed;
  right: 30px;
  top: 150px;
  z-index: 15;
  display: flex;
  flex-direction: column;
  gap: 20px;
  width: 66px;
  padding: 0;
  overflow: visible;
}
#side a.ic,
#uw {
  position: relative;
  display: grid;
  place-items: center;
  box-sizing: border-box;
  width: 66px;
  height: 66px;
  padding: 0;
  margin: 0;
  border-radius: 50%;
  background: rgba(255,255,255,.24);
  border: 1px solid rgba(255,255,255,.32);
  -webkit-backdrop-filter: blur(10px);
  backdrop-filter: blur(10px);
  box-shadow: 0 0 0 6px rgba(255,255,255,.24), 0 6px 24px rgba(0,0,0,.14);
  transform: none;
  right: auto;
  top: auto;
  overflow: visible;
  cursor: pointer;
  flex: none;
  transition: transform .3s;
  animation: sidefloat 3.2s ease-in-out infinite;
  animation-delay: var(--fd,0s);
}
#side a.ic:nth-child(2) {
  --fd: -.8s;
}
#side a.ic:nth-child(3) {
  --fd: -1.6s;
}
#side a.ic:nth-child(4) {
  --fd: -2.4s;
}
#side a.ic:nth-child(5) {
  --fd: -3s;
}
#uw {
  position: fixed;
  right: 30px;
  top: var(--uwt,400px);
  z-index: 16;
  --fd: -1.2s;
}
#side a.ic:hover,
#side a.ic:focus-visible,
#uw:hover,
#uw:focus-visible,
#uw[aria-expanded="true"] {
  transform: scale(1.12);
  filter: none;
}
#side a.ic:focus-visible,
#uw:focus-visible {
  outline: 3px solid #0B2A55;
  outline-offset: 9px;
}
#side a.ic img,
#uw img {
  width: 48px;
  height: 48px;
  display: block;
  border-radius: 50%;
  pointer-events: none;
}
#uwp {
  right: 120px;
}
@media (max-width: 1180px) {
  /* na węższych ekranach skróty leżą w rzędzie nad stopką, a przycisk dostępności pływa w prawym dolnym rogu */
  #side {
    position: static;
    flex-direction: row;
    flex-wrap: wrap;
    justify-content: center;
    width: auto;
    gap: 22px;
    padding: 26px 20px;
  }
  #uw {
    top: auto;
    bottom: calc(24px + env(safe-area-inset-bottom,0px));
    right: 24px;
    width: 56px;
    height: 56px;
  }
  #uw img {
    width: 40px;
    height: 40px;
  }
  #uwp {
    right: 12px;
    left: auto;
    top: 6vh;
  }
}
/* Wlot przycisków z prawej strony (kaskada), tylko przy pierwszym pojawieniu się – klasa .fx jest nadawana
   w render() wyłącznie pierwszym przyciskom, a klasa .in dodawana jest przez nfShow() po wejściu menu w widok. */
@keyframes sideIn {
  0% { opacity: 0; transform: translateX(var(--sx,150px)); }
  35% { opacity: 1; }
  100% { opacity: 1; transform: none; }
}
#side:not(.in) a.ic.fx {
  opacity: 0;
}
#side.in a.ic.fx {
  animation: sideIn .95s cubic-bezier(.16,1,.3,1) backwards, sidefloat 3.2s ease-in-out infinite;
  animation-delay: calc(.45s + var(--si,0) * 90ms), var(--fd,0s);
}
@media (min-width: 1181px) {
  #side:not(.in) ~ #uw.fx {
    opacity: 0;
  }
  #side.in ~ #uw.fx {
    animation: sideIn .95s cubic-bezier(.16,1,.3,1) backwards, sidefloat 3.2s ease-in-out infinite;
    animation-delay: calc(.45s + var(--si,0) * 90ms), var(--fd,0s);
  }
}
@media (max-width: 1180px) {
  #side {
    --sx: 56px;
  }
}
@media (prefers-reduced-motion: reduce) {
  #side a.ic,
  #side.in a.ic.fx,
  #side.in ~ #uw.fx,
  #uw {
    animation: none;
    transition: none;
  }
  #side:not(.in) a.ic.fx,
  #side:not(.in) ~ #uw.fx {
    opacity: 1;
  }
}
html.a-noanim #side a.ic,
html.a-noanim #uw {
  animation: none !important;
  transition: none !important;
}
html.a-noanim #side a.ic.fx,
html.a-noanim #uw.fx {
  opacity: 1 !important;
}
html.a-noimg #side a.ic img,
html.a-noimg #uw img {
  display: block !important;
}
/* logo w lewym górnym rogu: to samo „unoszenie się” co przyciski boczne (wygląd logo bez zmian) */
.logo img#lgo {
  animation: sidefloat 3.2s ease-in-out infinite;
  animation-delay: -.4s;
}
@media (prefers-reduced-motion: reduce) {
  .logo img#lgo {
    animation: none;
  }
}
html.a-noanim .logo img#lgo {
  animation: none !important;
}
