/* ScrollToTop — iQBlack/CRIPRO */
.stt-btn {
  position: fixed;
  z-index: 1040; /* por encima de modals backdrop (Bootstrap) */
  width: 40px;
  height: 40px;
  border-radius: 999px;
  border: 1px solid rgba(0,0,0,.08);
  background: #ffffff;
  color: #0d1b2a;
  box-shadow: 0 4px 18px rgba(0,0,0,.14);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  opacity: 0;
  pointer-events: none;
  transition: opacity .2s ease, transform .2s ease, box-shadow .2s ease;
}

.stt-btn:hover {
  transform: translateY(-1px);
  box-shadow: 0 6px 24px rgba(0,0,0,.18);
}

.stt-btn:focus {
  outline: none;
  box-shadow: 0 0 0 3px rgba(31,111,235,.25), 0 6px 24px rgba(0,0,0,.18);
}

.stt-btn.stt-visible {
  opacity: 1;
  pointer-events: auto;
}

/* Icono */
.stt-icon svg { display: block; }
.stt-icon path { fill: currentColor; }

/* Progreso circular opcional */
.stt-ring {
  position: absolute;
  inset: 0;
  pointer-events: none;
}
.stt-ring-svg {
  width: 100%;
  height: 100%;
  transform: rotate(-90deg);
}
.stt-ring-track,
.stt-ring-fill {
  fill: none;
  stroke-width: 3;
  stroke-linecap: round;
}
.stt-ring-track { stroke: rgba(0,0,0,.08); }
.stt-ring-fill  { stroke: #1f6feb; stroke-dasharray: 100; stroke-dashoffset: 100; transition: stroke-dashoffset .12s linear; }

/* Dark mode amistoso (si el proyecto lo usa) */
@media (prefers-color-scheme: dark) {
  .stt-btn {
    background: #0b1220;
    color: #e6edf3;
    border-color: rgba(255,255,255,.08);
    box-shadow: 0 4px 18px rgba(0,0,0,.6);
  }
  .stt-ring-track { stroke: rgba(255,255,255,.14); }
}

/* Accesibilidad: oculto visualmente pero disponible a screen readers */
.stt-sr-only {
  position: absolute !important;
  width: 1px !important;
  height: 1px !important;
  padding: 0 !important;
  margin: -1px !important;
  overflow: hidden !important;
  clip: rect(0,0,0,0) !important;
  white-space: nowrap !important;
  border: 0 !important;
}

/* No imprimir */
@media print {
  .stt-btn { display: none !important; }
}
