/* Mobile UX enhancements: floating nav feedback + table swipe affordance.
   Loaded globally via vite.config.js DASHBOARD_HEAD. */

/* ---------- Floating mobile nav: tap feedback + active indicator ---------- */
.floating-mobile-nav__item {
  position: relative;
  transition: transform 120ms cubic-bezier(.2,.8,.2,1), background-color 140ms ease;
}
.floating-mobile-nav__item:active {
  transform: scale(0.92);
  background: rgba(118,118,128,0.18) !important;
}
.floating-mobile-nav__item[aria-current="page"]::after,
.floating-mobile-nav__item.is-active::after {
  content: "";
  position: absolute;
  left: 50%;
  bottom: 4px;
  width: 18px;
  height: 3px;
  border-radius: 2px;
  background: currentColor;
  opacity: 0.85;
  transform: translateX(-50%);
  pointer-events: none;
}
@keyframes nav-tap-ripple {
  0%   { box-shadow: 0 0 0 0 rgba(0,122,255,0.35); }
  100% { box-shadow: 0 0 0 14px rgba(0,122,255,0); }
}
.floating-mobile-nav__item.is-tapping {
  animation: nav-tap-ripple 360ms ease-out;
}

/* ---------- Table swipe affordance (<768px) ---------- */
.table-swipe {
  position: relative;
  width: 100%;
}
.table-swipe__scroll {
  overflow-x: auto;
  -webkit-overflow-scrolling: touch;
  scrollbar-width: thin;
}
.table-swipe__scroll > table { min-width: 100%; }

/* Edge fades removed — they clipped table text. Swipe hint pill below
   communicates horizontal overflow without obscuring content. */

/* "Swipe →" pill — appears briefly on overflow, fades after first scroll */
.table-swipe__hint {
  position: absolute;
  top: 8px;
  right: 8px;
  z-index: 3;
  display: inline-flex;
  align-items: center;
  gap: 4px;
  padding: 4px 10px;
  font: 500 11px/1 -apple-system, BlinkMacSystemFont, system-ui, sans-serif;
  color: #fff;
  background: rgba(0,0,0,0.55);
  border-radius: 999px;
  pointer-events: none;
  opacity: 0;
  transform: translateY(-4px);
  transition: opacity 220ms ease, transform 220ms ease;
}
.table-swipe[data-show-hint="1"] .table-swipe__hint {
  opacity: 1;
  transform: translateY(0);
  animation: swipe-hint-nudge 1.6s ease-in-out 1;
}
@keyframes swipe-hint-nudge {
  0%, 100% { transform: translate(0, 0); }
  40%      { transform: translate(-6px, 0); }
  70%      { transform: translate(0, 0); }
}
@media (prefers-reduced-motion: reduce) {
  .table-swipe[data-show-hint="1"] .table-swipe__hint { animation: none; }
  .floating-mobile-nav__item { transition: none; }
}

/* Show hint only on touch / narrow viewports */
@media (min-width: 900px) and (hover: hover) {
  .table-swipe__hint { display: none; }
}
