/**
 * Resizable Divider Styles
 * Unified styling for draggable panel dividers across the application
 */

/* ============================================
   HORIZONTAL DIVIDER (for vertical resizing - row-resize)
   Used between stacked panels (top/bottom)
   ============================================ */

.resizable-divider-horizontal {
    height: 8px;
    background-color: #e5e7eb;
    cursor: row-resize;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: background-color 0.15s ease;
    margin: 2px 0;
    border-radius: 4px;
    flex-shrink: 0;
    user-select: none;
    position: relative;
    z-index: 10;
}

.resizable-divider-horizontal:hover {
    background-color: #93c5fd;
}

.resizable-divider-horizontal.dragging {
    background-color: #60a5fa;
}

.resizable-divider-horizontal .divider-handle {
    width: 48px;
    height: 4px;
    background-color: #9ca3af;
    border-radius: 9999px;
    transition: background-color 0.15s ease, width 0.15s ease;
}

.resizable-divider-horizontal:hover .divider-handle {
    background-color: #3b82f6;
    width: 56px;
}

.resizable-divider-horizontal.dragging .divider-handle {
    background-color: #2563eb;
    width: 64px;
}

/* ============================================
   VERTICAL DIVIDER (for horizontal resizing - col-resize)
   Used between side-by-side panels (left/right)
   ============================================ */

.resizable-divider-vertical {
    width: 8px;
    background-color: #e5e7eb;
    cursor: col-resize;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: background-color 0.15s ease;
    margin: 0 2px;
    border-radius: 4px;
    flex-shrink: 0;
    user-select: none;
    position: relative;
    z-index: 10;
    /* Ensure it stretches full height of flex container */
    align-self: stretch;
}

.resizable-divider-vertical:hover {
    background-color: #93c5fd;
}

.resizable-divider-vertical.dragging {
    background-color: #60a5fa;
}

.resizable-divider-vertical .divider-handle {
    width: 4px;
    height: 48px;
    background-color: #9ca3af;
    border-radius: 9999px;
    transition: background-color 0.15s ease, height 0.15s ease;
}

.resizable-divider-vertical:hover .divider-handle {
    background-color: #3b82f6;
    height: 56px;
}

.resizable-divider-vertical.dragging .divider-handle {
    background-color: #2563eb;
    height: 64px;
}

/* ============================================
   EDGE RESIZE HANDLE (for panel edges)
   Used on the edge of panels, like properties panel left edge
   ============================================ */

.resizable-edge-handle {
    position: absolute;
    top: 0;
    bottom: 0;
    width: 8px;
    cursor: col-resize;
    z-index: 20;
    transition: background-color 0.15s ease;
    background-color: #e5e7eb;
    display: flex;
    align-items: center;
    justify-content: center;
}

.resizable-edge-handle.edge-left {
    left: -4px;
    border-radius: 4px 0 0 4px;
}

.resizable-edge-handle.edge-right {
    right: -4px;
    border-radius: 0 4px 4px 0;
}

.resizable-edge-handle:hover {
    background-color: #93c5fd;
}

.resizable-edge-handle.dragging {
    background-color: #60a5fa;
}

/* Visual indicator inside the edge handle */
.resizable-edge-handle .edge-indicator {
    position: absolute;
    left: 50%;
    top: 50%;
    transform: translate(-50%, -50%);
    width: 4px;
    height: 48px;
    background-color: #9ca3af;
    border-radius: 9999px;
    transition: background-color 0.15s ease, height 0.15s ease;
}

.resizable-edge-handle:hover .edge-indicator {
    background-color: #3b82f6;
    height: 56px;
}

.resizable-edge-handle.dragging .edge-indicator {
    background-color: #2563eb;
    height: 64px;
}

/* ============================================
   GLOBAL STYLES DURING DRAG
   ============================================ */

body.resizing-horizontal {
    cursor: row-resize !important;
    user-select: none !important;
}

body.resizing-vertical {
    cursor: col-resize !important;
    user-select: none !important;
}

/* Prevent text selection during resize */
body.resizing-horizontal *,
body.resizing-vertical * {
    user-select: none !important;
}

/* ============================================
   RESIZABLE PANEL CONTAINER
   Helper class for panels that can be resized
   ============================================ */

.resizable-panel {
    position: relative;
    overflow: hidden;
    display: flex;
    flex-direction: column;
}

.resizable-panel-content {
    flex: 1;
    overflow: auto;
    min-height: 0;
}
