/**
 * Horizontal table scroll discoverability — fade + directional cue overlay.
 * Opt-in via [data-scroll-affordance] on scroll containers.
 */

.table-scroll-affordance-host {
  position: relative;
}

.table-scroll-affordance-host .table-scroll-affordance {
  position: absolute;
  top: 0;
  right: 0;
  bottom: 0;
  width: 44px;
  max-width: 18%;
  pointer-events: none;
  z-index: 20;
  opacity: 0;
  visibility: hidden;
  transition: opacity 0.28s ease, visibility 0.28s ease;
}

.table-scroll-affordance-host.is-scroll-affordance-visible .table-scroll-affordance {
  opacity: 1;
  visibility: visible;
}

.table-scroll-affordance-host.is-scroll-affordance-dismissed .table-scroll-affordance {
  opacity: 0;
  visibility: hidden;
}

.table-scroll-affordance__fade {
  position: absolute;
  inset: 0;
  background: linear-gradient(
    to right,
    transparent 0%,
    color-mix(in srgb, var(--match-card-bg, #1a1a1a) 55%, transparent) 45%,
    color-mix(in srgb, var(--match-card-bg, #1a1a1a) 92%, transparent) 100%
  );
}

[data-theme="light"] .table-scroll-affordance__fade {
  background: linear-gradient(
    to right,
    transparent 0%,
    color-mix(in srgb, var(--match-card-bg, #ffffff) 55%, transparent) 45%,
    color-mix(in srgb, var(--match-card-bg, #ffffff) 92%, transparent) 100%
  );
}

.table-scroll-affordance__cue {
  position: absolute;
  right: 5px;
  top: 50%;
  transform: translateY(-50%);
  font-size: 15px;
  line-height: 1;
  font-weight: 600;
  color: var(--text-secondary, #ccc);
  opacity: 0.85;
  text-shadow: 0 0 6px color-mix(in srgb, var(--match-card-bg, #1a1a1a) 80%, transparent);
}

[data-theme="light"] .table-scroll-affordance__cue {
  text-shadow: 0 0 6px color-mix(in srgb, var(--match-card-bg, #ffffff) 80%, transparent);
}

@keyframes table-scroll-affordance-nudge {
  0%,
  100% {
    transform: translateY(-50%) translateX(0);
  }
  50% {
    transform: translateY(-50%) translateX(5px);
  }
}

.table-scroll-affordance-host.is-scroll-affordance-nudge .table-scroll-affordance__cue {
  animation: table-scroll-affordance-nudge 0.55s ease-in-out 1;
}

@media (prefers-reduced-motion: reduce) {
  .table-scroll-affordance-host.is-scroll-affordance-nudge .table-scroll-affordance__cue {
    animation: none;
  }

  .table-scroll-affordance-host .table-scroll-affordance {
    transition: none;
  }
}

.table-scroll-affordance-sr {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}
