/* =========================================================
   NEZNI — GLOBAL BACK TO TOP
   Isolated global navigation helper.
   ========================================================= */
.nz-back-to-top {
  width: 46px;
  height: 46px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  position: fixed;
  left: max(22px, env(safe-area-inset-left));
  bottom: max(22px, calc(env(safe-area-inset-bottom) + 22px));
  z-index: 900;
  margin: 0;
  padding: 0;
  border: 1px solid #c8d0d8;
  border-radius: 999px;
  color: var(--nz-color-primary, #009ee3);
  background: rgba(255, 255, 255, .96);
  box-shadow: 0 10px 28px rgba(15, 23, 42, .14);
  opacity: 0;
  visibility: hidden;
  pointer-events: none;
  transform: translateY(10px);
  cursor: pointer;
  -webkit-tap-highlight-color: transparent;
  -webkit-backdrop-filter: blur(8px);
  backdrop-filter: blur(8px);
  transition:
    opacity 180ms ease,
    visibility 180ms ease,
    transform 180ms ease,
    color 180ms ease,
    border-color 180ms ease,
    background-color 180ms ease,
    box-shadow 180ms ease;
}

.nz-back-to-top.is-visible {
  opacity: 1;
  visibility: visible;
  pointer-events: auto;
  transform: translateY(0);
}

.nz-back-to-top svg {
  width: 19px;
  height: 19px;
  fill: none;
  stroke: currentColor;
  stroke-width: 2.15;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.nz-back-to-top:focus,
.nz-back-to-top:focus-visible {
  outline: none !important;
}

.nz-back-to-top:focus-visible {
  outline: 2px solid var(--nz-color-primary, #009ee3) !important;
  outline-offset: 3px;
}

.nz-back-to-top:active {
  transform: translateY(1px) scale(.97);
}

@media (hover: hover) {
  .nz-back-to-top:hover {
    color: var(--nz-color-primary, #009ee3);
    border-color: rgba(0, 158, 227, .52);
    background: #ffffff;
    box-shadow: 0 12px 32px rgba(15, 23, 42, .17);
    transform: translateY(-2px);
  }
}

@media (min-width: 768px) and (max-width: 1199px) {
  .nz-back-to-top {
    width: 48px;
    height: 48px;
    left: max(20px, env(safe-area-inset-left));
    bottom: max(20px, calc(env(safe-area-inset-bottom) + 20px));
  }
}

@media (max-width: 767px) {
  .nz-back-to-top {
    width: 50px;
    height: 50px;
    left: max(18px, env(safe-area-inset-left));
    bottom: max(18px, calc(env(safe-area-inset-bottom) + 18px));
  }
}

@media (max-width: 390px) {
  .nz-back-to-top {
    left: max(14px, env(safe-area-inset-left));
    bottom: max(14px, calc(env(safe-area-inset-bottom) + 14px));
  }
}

@media (prefers-reduced-motion: reduce) {
  .nz-back-to-top {
    transition: none;
  }
}
