/* Scroll cue for the wide tables in the firm reviews (rules / plans /
   comparison). On mobile those tables keep a 520-760px floor
   (review.css "Wider floor the more columns a table has") and scroll
   inside their wrapper, but nothing told the reader there was more to
   the right. table-scroll-hint.js wraps every wrapper that actually
   overflows in:

     .scroll-hint            margins of the original wrapper
       .scroll-hint-label    "Desliza para ver más →" (aria-hidden)
       .scroll-hint-frame    position context for the edge fades
         <original wrapper>  untouched, still the scroller

   and keeps .is-scrollable / .can-left / .can-right / .has-scrolled in
   sync with the scroll position. Tables that fit get no wrapper, so
   desktop is unchanged. */

.scroll-hint-label {
  display: none;
  justify-content: flex-end;
  align-items: center;
  gap: 0.35rem;
  margin: 0 0 0.45rem;
  font-size: 0.75rem;
  font-weight: 600;
  letter-spacing: 0.01em;
  line-height: 1.2;
  color: var(--text-muted);
  transition: opacity 0.2s ease;
}

.scroll-hint.is-scrollable .scroll-hint-label {
  display: flex;
}

/* Reached the right edge: the label fades but keeps its height, so the
   table never jumps while the reader is scrolling it. */
.scroll-hint.is-scrollable:not(.can-right) .scroll-hint-label {
  opacity: 0;
}

.scroll-hint-arrow {
  display: inline-block;
  color: var(--accent);
  font-weight: 700;
  animation: scroll-hint-nudge 1.8s ease-in-out infinite;
}

.scroll-hint.has-scrolled .scroll-hint-arrow {
  animation: none;
}

@keyframes scroll-hint-nudge {
  0%, 100% { transform: translateX(0); }
  50% { transform: translateX(3px); }
}

@media (prefers-reduced-motion: reduce) {
  .scroll-hint-arrow {
    animation: none;
  }
}

.scroll-hint-frame {
  position: relative;
}

/* Edge fades over the hidden part of the table. Inset by 1px so the
   wrapper's own border and 12px radius stay visible. */
.scroll-hint-frame::before,
.scroll-hint-frame::after {
  content: "";
  position: absolute;
  top: 1px;
  bottom: 1px;
  width: 36px;
  z-index: 2;
  pointer-events: none;
  opacity: 0;
  transition: opacity 0.2s ease;
}

.scroll-hint-frame::before {
  left: 1px;
  border-radius: 11px 0 0 11px;
  background: linear-gradient(to right, rgba(10, 13, 20, 0.92), rgba(10, 13, 20, 0));
}

.scroll-hint-frame::after {
  right: 1px;
  border-radius: 0 11px 11px 0;
  background: linear-gradient(to left, rgba(10, 13, 20, 0.92), rgba(10, 13, 20, 0));
}

.scroll-hint.can-left .scroll-hint-frame::before,
.scroll-hint.can-right .scroll-hint-frame::after {
  opacity: 1;
}
