/* css/splitter.css */

.splitter {
    flex-shrink: 0;
    background-color: var(--md-background-color);
    position: relative;
    user-select: none;
    -webkit-user-select: none;
    touch-action: none;
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 10;
    transition: background-color 0.2s ease;
}

.splitter::before {
    content: '';
    position: absolute;
    background-color: var(--md-border-color);
    border-radius: 2px;
    transition: background-color 0.2s ease;
}

.splitter:hover::before,
.container.resizing .splitter::before {
    background-color: var(--md-primary-color);
}

/* Default (Desktop) */
.splitter {
    width: 8px;
    cursor: col-resize;
}
.splitter::before {
    width: 4px;
    height: 40px;
}

/* Mobile (Portrait) */
@media (max-width: 768px) and (orientation: portrait) {
    .splitter {
        width: 100%;
        height: 16px; /* Larger touch area */
        cursor: row-resize;
    }
    .splitter::before {
        width: 40px;
        height: 4px;
    }
}

/* Mobile (Landscape) */
@media (max-width: 768px) and (orientation: landscape) {
    .splitter {
        width: 24px; /* Even larger touch area */
        height: 100%;
        cursor: col-resize;
    }
    .splitter::before {
        width: 6px; /* Thicker handle */
        height: 50px;
    }
}


/* Make content unselectable while dragging */
.dragging {
    cursor: col-resize !important;
}
@media (max-width: 768px) and (orientation: portrait) {
    .dragging {
        cursor: row-resize !important;
    }
}

.dragging * {
    pointer-events: none;
    user-select: none;
    -webkit-user-select: none;
}