/* ==================== COLUMN RESIZER ==================== */

/* Handle an der rechten Kante jeder Spaltenüberschrift */
.col-resize-handle {
    position: absolute;
    top: 0;
    right: -4px;
    width: 8px;
    height: 100%;
    cursor: col-resize;
    z-index: 10;
    background: transparent;
    touch-action: none; /* Wichtig für Touch-Geräte */
    -webkit-touch-callout: none;
}

/* Desktop: schmaler Hover-Indikator */
.col-resize-handle::after {
    content: '';
    position: absolute;
    top: 20%;
    bottom: 20%;
    left: 50%;
    width: 2px;
    transform: translateX(-50%);
    background: transparent;
    border-radius: 1px;
    transition: background-color 0.15s ease;
}

.col-resize-handle:hover::after {
    background-color: rgba(13, 110, 253, 0.5);
}

/* Aktiver Zustand (Drag läuft) */
.col-resize-handle-active::after,
.col-resize-handle:active::after {
    background-color: rgba(13, 110, 253, 0.8);
}

/* Mobil: Breiterer Touch-Bereich + sichtbarerer Indikator */
@media (max-width: 767.98px) {
    .col-resize-handle {
        width: 16px;
        right: -8px;
    }

    .col-resize-handle::after {
        width: 3px;
        top: 15%;
        bottom: 15%;
        background-color: rgba(13, 110, 253, 0.2);
    }

    .col-resize-handle:active::after,
    .col-resize-handle-active::after {
        background-color: rgba(13, 110, 253, 0.8);
        width: 4px;
    }
}

/* Overlay während Mouse-Drag (verhindert Textselektion) */
.col-resize-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: 9999;
    cursor: col-resize;
}

/* Tabelle während Resize */
table.col-resizing {
    user-select: none;
    -webkit-user-select: none;
}

table.col-resizing th a,
table.col-resizing th span,
table.col-resizing th button {
    pointer-events: none;
}

/* Reset-Button */
.col-resize-reset-btn {
    font-size: 0.7rem;
    padding: 0.1rem 0.4rem;
    opacity: 0.6;
    transition: opacity 0.2s;
}

.col-resize-reset-btn:hover {
    opacity: 1;
}

/* Toolbar */
.col-resize-toolbar {
    min-height: 0;
}

/* Dark Mode */
body.dark-mode .col-resize-handle:hover::after {
    background-color: rgba(110, 168, 254, 0.5);
}

body.dark-mode .col-resize-handle:active::after,
body.dark-mode .col-resize-handle-active::after {
    background-color: rgba(110, 168, 254, 0.8);
}

@media (max-width: 767.98px) {
    body.dark-mode .col-resize-handle::after {
        background-color: rgba(110, 168, 254, 0.15);
    }
}