.nodeRow {
    position: relative;
    background: linear-gradient(
        135deg,
        var(--mantine-color-dark-6) 0%,
        var(--mantine-color-dark-7) 100%
    );
    border: 1px solid light-dark(var(--mantine-color-gray-2), var(--mantine-color-dark-4));
    border-radius: var(--mantine-radius-md);
    padding: 12px 48px 12px 16px;
    margin-bottom: 8px;
    cursor: pointer;
}

.nodeRow:hover {
    border-color: light-dark(var(--mantine-color-blue-3), var(--mantine-color-blue-5)) !important;
}

.nodeRowDragging {
    box-shadow: 0 8px 24px rgba(0, 0, 0, 0.15);
    border-color: light-dark(var(--mantine-color-blue-4), var(--mantine-color-blue-4));
    z-index: 1000;
    background: light-dark(var(--mantine-color-white), var(--mantine-color-dark-7));
}

.dragHandle {
    position: absolute;
    top: 50%;
    right: 6px;
    transform: translateY(-50%);
    cursor: grab;
    color: var(--mantine-color-gray-5);
    padding: 8px;
    border-radius: 4px;
    transition: all 0.15s ease;
    opacity: 1;
    display: flex;
    align-items: center;
    justify-content: center;
}

.nodeRow:hover .dragHandle {
    opacity: 1;
}

.dragHandle:hover {
    color: var(--mantine-color-gray-7);
    background: light-dark(var(--mantine-color-gray-1), var(--mantine-color-dark-5));
}

.dragHandle:active {
    cursor: grabbing;
}

.dragHandleActive {
    color: var(--mantine-color-gray-7);
    background: light-dark(var(--mantine-color-gray-1), var(--mantine-color-dark-5));
    opacity: 1 !important;
    cursor: grabbing;
}

/* DragOverlay styles */
.nodeRow[data-dnd-overlay='true'] {
    box-shadow: 0 12px 32px rgba(0, 0, 0, 0.2);
    border-color: light-dark(var(--mantine-color-blue-4), var(--mantine-color-blue-4));
    z-index: 9999;
    background: light-dark(var(--mantine-color-white), var(--mantine-color-dark-6));
}

.desktopGrid {
    display: grid;
}

.mobileLayout {
    display: none;
}

.nameContainer {
    min-width: 0;
    flex: 1;
}

.nodeName {
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
    min-width: 0;
}

.addressText {
    font-family: var(--mantine-font-family-monospace);
    transition: color 0.15s ease;
    cursor: copy;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
    min-width: 0;
}

.addressText:hover {
    color: var(--mantine-color-blue-6) !important;
}

.icon {
    color: var(--mantine-color-dimmed);
    flex-shrink: 0;
}

.iconActive {
    color: var(--mantine-color-teal-6);
}

[data-mantine-color-scheme='dark'] .nodeRowDragging {
    border-color: var(--mantine-color-blue-4);
    box-shadow: 0 8px 24px rgba(0, 0, 0, 0.4);
}

[data-mantine-color-scheme='dark'] .dragHandle {
    color: var(--mantine-color-dark-2);
}

[data-mantine-color-scheme='dark'] .dragHandle:hover {
    color: var(--mantine-color-gray-3);
    background: var(--mantine-color-dark-5);
}

[data-mantine-color-scheme='dark'] .dragHandleActive {
    color: var(--mantine-color-gray-3);
}

[data-mantine-color-scheme='dark'] .nodeRow[data-dnd-overlay='true'] {
    border-color: var(--mantine-color-blue-4);
    box-shadow: 0 12px 32px rgba(0, 0, 0, 0.4);
    background: var(--mantine-color-dark-6);
}

[data-mantine-color-scheme='dark'] .iconActive {
    color: var(--mantine-color-teal-4);
}

/* Mobile Layout */
@media (max-width: 48em) {
    .desktopGrid {
        display: none;
    }

    .mobileLayout {
        display: block;
    }

    .nodeRow {
        padding: 10px 36px 10px 10px;
        margin-bottom: 6px;
    }

    .dragHandle {
        right: 8px;
        padding: 6px;
        opacity: 1;
    }

    .dragHandleActive {
        opacity: 1 !important;
    }

    .nodeName {
        max-width: calc(100vw - 180px);
    }

    .addressText {
        max-width: calc(100vw - 80px);
    }
}

@media (max-width: 480px) {
    .nodeRow {
        padding: 10px 36px 10px 10px;
        margin-bottom: 6px;
    }

    .dragHandle {
        right: 6px;
        padding: 4px;
    }

    .nodeName {
        font-size: 0.9rem;
        max-width: calc(100vw - 160px);
    }

    .addressText {
        font-size: 0.8rem;
        max-width: calc(100vw - 60px);
    }
}
