/* =============================================================================
 * SciTeX Shell — Resizer (draggable panel divider)
 * =============================================================================
 * Prefix: stx-shell-resizer
 * Requires: shell/theme.css
 * ============================================================================= */

.stx-shell-resizer {
  position: relative;
  flex-shrink: 0;
  z-index: 10;
}

/* --- Horizontal (left/right) --- */

.stx-shell-resizer--horizontal {
  width: 2px;
  cursor: col-resize;
  background: var(--border-subtle, rgba(0, 0, 0, 0.06));
}

.stx-shell-resizer--horizontal::before {
  content: "";
  position: absolute;
  top: 0;
  bottom: 0;
  left: -4px;
  width: 10px;
}

.stx-shell-resizer--horizontal:hover,
.stx-shell-resizer--horizontal.stx-shell-resizer--active {
  background: var(--stx-app-accent, var(--workspace-icon-primary, #059669));
}

/* --- Vertical (top/bottom) --- */

.stx-shell-resizer--vertical {
  height: 2px;
  cursor: row-resize;
  background: var(--border-subtle, rgba(0, 0, 0, 0.06));
}

.stx-shell-resizer--vertical::before {
  content: "";
  position: absolute;
  left: 0;
  right: 0;
  top: -4px;
  height: 10px;
}

.stx-shell-resizer--vertical:hover,
.stx-shell-resizer--vertical.stx-shell-resizer--active {
  background: var(--stx-app-accent, var(--workspace-icon-primary, #059669));
}

/* --- Toggle button --- */

.stx-shell-resizer__toggle {
  position: absolute;
  display: flex;
  align-items: center;
  justify-content: center;
  width: 20px;
  height: 20px;
  border: 1px solid var(--border-subtle, rgba(0, 0, 0, 0.06));
  border-radius: 50%;
  background: var(--workspace-bg-secondary, #f5f5f5);
  color: var(--text-muted, #777777);
  font-size: 10px;
  cursor: pointer;
  z-index: 11;
  transition:
    background 0.15s ease,
    color 0.15s ease;
}

.stx-shell-resizer--horizontal .stx-shell-resizer__toggle {
  top: 12px;
  left: 50%;
  transform: translateX(-50%);
}

.stx-shell-resizer--vertical .stx-shell-resizer__toggle {
  left: 12px;
  top: 50%;
  transform: translateY(-50%);
}

.stx-shell-resizer__toggle:hover {
  background: var(--stx-app-accent, var(--workspace-icon-primary, #059669));
  color: #ffffff;
  border-color: transparent;
}
