/**
 * WSTables CSS
 * Styling for frozen columns, resize handles, and drag-and-drop
 */

.wstables-wrapper {
  position: relative;
  overflow-x: auto;
  overflow-y: visible;
  width: 100%;
  max-width: 100%;
}

.wstables-wrapper table {
  border-collapse: separate;
  border-spacing: 0;
  position: relative;
  table-layout: fixed;
}

/* Frozen column styling */
.wstables-frozen {
  position: sticky !important;
  background-color: var(--color-offbody, #f5f5f5) !important;
  box-shadow: 2px 0 4px rgba(0, 0, 0, 0.1);
  z-index: 100 !important;
}

/* Resize handle */
.wstables-resize-handle {
  position: absolute;
  top: 0;
  right: -5px;
  width: 10px;
  height: 100%;
  cursor: col-resize !important;
  user-select: none;
  z-index: 1000;
  pointer-events: auto !important;
}

.wstables-resize-handle:hover {
  background-color: rgba(0, 0, 0, 0.15);
}

.wstables-resize-handle:active {
  background-color: rgba(0, 0, 0, 0.25);
}

/* Draggable columns - show move cursor except on resize handle */
.wstables-wrapper th[draggable="true"] {
  cursor: move;
}

.wstables-wrapper th[draggable="true"]:hover {
  background-color: rgba(0, 0, 0, 0.05);
}

.wstables-wrapper th.wstables-dragging {
  opacity: 0.5;
}

.wstables-wrapper th.wstables-drag-over {
  border-left: 3px solid var(--color-primary, #3273dc);
}

/* Prevent text selection during resize/drag */
.wstables-wrapper.wstables-resizing,
.wstables-wrapper.wstables-dragging {
  user-select: none;
  -webkit-user-select: none;
  -moz-user-select: none;
  -ms-user-select: none;
}

