.ev-back-to-top {
  position: fixed;
  z-index: 90;
  right: calc(16px + var(--ev-back-to-top-rail, 0px) + env(safe-area-inset-right, 0px));
  bottom: calc(16px + var(--ev-back-to-top-bar, env(safe-area-inset-bottom, 0px)));
  pointer-events: none;
}

/* The account rail already contributes to the fixed inset above. */
body.ev-has-account-rail > .ev-back-to-top { padding: 0 !important; }

.ev-back-to-top__button {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  min-height: 44px;
  padding: 8px 14px;
  border: 1px solid var(--ev-action-green, #35d07f);
  border-radius: 999px;
  background: #14241b;
  color: #e6faed;
  box-shadow: 0 4px 18px #0008;
  font: 700 13px/1.3 var(--ev-font);
  white-space: nowrap;
  cursor: pointer;
  pointer-events: auto;
  opacity: 1;
  visibility: visible;
  transition: transform .2s ease, opacity .2s ease, visibility .2s;
}

.ev-back-to-top__button:disabled {
  transform: translateY(12px);
  opacity: 0;
  visibility: hidden;
  pointer-events: none;
}

.ev-back-to-top__button svg { transform: rotate(-90deg); }
.ev-back-to-top__button:hover { background: #213a2a; }
.ev-back-to-top__button:focus-visible { outline: 2px solid #fff; outline-offset: 3px; }

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