/* =========================================================
   CTI SHARED SITE COMPONENTS
   Production Back-to-Top control for desktop and mobile
========================================================= */

.back-to-top {
  position: fixed;
  right: max(18px, env(safe-area-inset-right));
  bottom: max(18px, env(safe-area-inset-bottom));
  z-index: 99999;

  display: inline-flex;
  align-items: center;
  justify-content: center;

  width: 48px;
  height: 48px;
  padding: 0;

  border: 1px solid rgba(212, 175, 55, 0.75);
  border-radius: 50%;
  background: #101820;
  color: #d4af37;
  box-shadow: 0 10px 28px rgba(0, 0, 0, 0.32);

  cursor: pointer;
  opacity: 0;
  visibility: hidden;
  pointer-events: none;
  transform: translateY(14px) scale(0.92);

  transition:
    opacity 180ms ease,
    visibility 180ms ease,
    transform 180ms ease,
    background-color 180ms ease,
    color 180ms ease,
    border-color 180ms ease;
  -webkit-tap-highlight-color: transparent;
  touch-action: manipulation;
}

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

.back-to-top:hover {
  background: #d4af37;
  color: #101820;
  border-color: #d4af37;
}

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

.back-to-top:focus-visible {
  outline: 3px solid rgba(212, 175, 55, 0.42);
  outline-offset: 3px;
}

.back-to-top svg {
  width: 23px;
  height: 23px;
  display: block;
  fill: none;
  stroke: currentColor;
  stroke-width: 2.2;
  stroke-linecap: round;
  stroke-linejoin: round;
  pointer-events: none;
}

@media (max-width: 767px) {
  .back-to-top {
    right: max(14px, env(safe-area-inset-right));
    bottom: max(14px, env(safe-area-inset-bottom));
    width: 46px;
    height: 46px;
  }
}

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

@media print {
  .back-to-top {
    display: none !important;
  }
}
