/* ============================================================
   FTE TABLE SCROLL — v1.0.0
   Scroll horizontal moderne : drag, ombres, scrollbar fine.
   Structure: .fte-tscroll-wrap > .fte-tscroll + 2x .fte-tscroll-shadow
   ============================================================ */

/* --- Outer wrapper (holds shadow overlays) --- */
.fte-tscroll-wrap {
  position: relative;
  margin: 24px 0;
  border-radius: 10px;
  max-width: 100%;
}

/* --- Scroll container --- */
.fte-tscroll {
  overflow-x: auto !important;
  overflow-y: visible !important;
  -webkit-overflow-scrolling: touch;
  border-radius: 10px;
  cursor: grab;
  user-select: none;
  -webkit-user-select: none;
}

.fte-tscroll.is-dragging {
  cursor: grabbing;
  scroll-behavior: auto !important;
}

/* Force table width — trigger scroll */
.fte-tscroll table {
  min-width: 640px;
  width: 100%;
  pointer-events: auto;
}

/* Re-enable text selection when NOT dragging */
.fte-tscroll:not(.is-dragging) table {
  user-select: text;
  -webkit-user-select: text;
  cursor: auto;
}

/* --- Scrollbar — Webkit --- */
.fte-tscroll::-webkit-scrollbar {
  height: 5px;
}

.fte-tscroll::-webkit-scrollbar-track {
  background: #F7F8FA;
  border-radius: 3px;
}

.fte-tscroll::-webkit-scrollbar-thumb {
  background: #cbd5e1;
  border-radius: 3px;
  transition: background 0.2s;
}

.fte-tscroll::-webkit-scrollbar-thumb:hover {
  background: #94a3b8;
}

/* --- Scrollbar — Firefox --- */
.fte-tscroll {
  scrollbar-width: thin;
  scrollbar-color: #cbd5e1 #F7F8FA;
}

/* --- Shadow overlays (absolute on wrap, outside scroll) --- */
.fte-tscroll-shadow {
  position: absolute;
  top: 0;
  width: 48px;
  height: calc(100% - 5px);
  pointer-events: none;
  z-index: 3;
  opacity: 0;
  transition: opacity 0.3s ease;
}

.fte-tscroll-shadow.left {
  left: 0;
  background: linear-gradient(to right, rgba(255,255,255,0.95) 0%, transparent 100%);
  border-radius: 10px 0 0 10px;
}

.fte-tscroll-shadow.right {
  right: 0;
  background: linear-gradient(to left, rgba(255,255,255,0.95) 0%, transparent 100%);
  border-radius: 0 10px 10px 0;
}

/* --- Mobile --- */
@media (max-width: 768px) {
  .fte-tscroll table {
    min-width: 480px;
  }

  .fte-tscroll-shadow {
    width: 32px;
  }
}
