/* ============================================================
   Node Links Modal
   ============================================================ */
.node-links-modal-overlay {
    position: fixed;
    inset: 0;
    z-index: 115;
    background: rgba(15, 23, 42, 0.22);
    backdrop-filter: blur(8px);
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 1.25rem;
}
.node-links-modal-panel {
    width: min(720px, 100%);
    max-height: min(86vh, 840px);
    overflow: hidden;
    background: #ffffff;
    border: 1px solid rgba(226, 232, 240, 0.9);
    border-radius: 1rem;
    box-shadow: 0 24px 70px -24px rgba(15, 23, 42, 0.38);
}
.node-links-modal-header {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 1rem;
    padding: 1.25rem 1.25rem 1rem;
    border-bottom: 1px solid #e2e8f0;
}
.node-links-modal-header-copy {
    display: flex;
    align-items: flex-start;
    gap: 0.85rem;
}
.node-links-modal-icon {
    width: 2.4rem;
    height: 2.4rem;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    border-radius: 0.85rem;
    background: #eff6ff;
    color: #2563eb;
    font-size: 1.1rem;
}
.node-links-modal-title {
    font-size: 1rem;
    font-weight: 600;
    color: #0f172a;
}
.node-links-modal-subtitle {
    margin-top: 0.25rem;
    font-size: 0.8rem;
    color: #64748b;
}
.node-links-modal-close {
    border: none;
    background: transparent;
    color: #94a3b8;
    cursor: pointer;
    transition: color 0.15s ease;
}
.node-links-modal-close:hover {
    color: #334155;
}
.node-links-modal-body {
    padding: 1.25rem;
    max-height: calc(86vh - 88px);
    overflow: auto;
    display: flex;
    flex-direction: column;
    gap: 1rem;
}
.node-links-modal-loading,
.node-links-empty-state,
.node-links-feedback {
    font-size: 0.85rem;
    color: #64748b;
}
.node-links-feedback-error,
.node-links-row-feedback-error {
    color: #b91c1c;
}
.node-links-section {
    display: flex;
    flex-direction: column;
    gap: 0.8rem;
}
.node-links-section-title {
    font-size: 0.74rem;
    font-weight: 700;
    letter-spacing: 0.08em;
    text-transform: uppercase;
    color: #64748b;
}
.node-links-editor-list {
    display: flex;
    flex-direction: column;
    gap: 0.9rem;
}
.node-links-editor-row {
    border: 1px solid #e2e8f0;
    border-radius: 0.65rem;
    background: #f8fafc;
    padding: 0.45rem 0.6rem;
    transition: opacity 0.15s, border-color 0.15s;
    position: relative;
}
.node-links-create-form {
    border: 1px solid #e2e8f0;
    border-radius: 0.9rem;
    background: #f8fafc;
    padding: 0.95rem;
}
.node-links-editor-row-inner {
    display: flex;
    align-items: center;
    gap: 0.45rem;
}
.node-links-editor-grid {
    display: grid;
    grid-template-columns: 1.1fr 1.7fr 1fr;
    gap: 0.7rem;
}
.node-links-input-label {
    width: 8rem;
    flex-shrink: 0;
    min-width: 0;
}
.node-links-input-url {
    flex: 1;
    min-width: 0;
    max-width: 18rem;
}
.node-links-select-inline {
    width: 8rem;
    flex-shrink: 0;
    min-width: 0;
}
.node-links-drag-handle {
    flex-shrink: 0;
    cursor: grab;
    color: #94a3b8;
    background: transparent;
    border: none;
    padding: 0.1rem 0.15rem;
    font-size: 1rem;
    line-height: 1;
    transition: color 0.15s;
    touch-action: none;
    display: flex;
    align-items: center;
}
.node-links-drag-handle:hover {
    color: #475569;
}
.node-links-drag-handle:active {
    cursor: grabbing;
}
.node-links-row-dragging {
    opacity: 0.35;
}
.node-links-drop-before {
    border-top: 2px solid #2563eb;
}
.node-links-drop-after {
    border-bottom: 2px solid #2563eb;
}
.node-links-dnd-ghost {
    background: #1e40af;
    color: #ffffff;
    border-radius: 0.5rem;
    padding: 0.35rem 0.75rem;
    font-size: 0.8rem;
    font-weight: 500;
    box-shadow: 0 4px 14px rgba(15, 23, 42, 0.3);
    pointer-events: none;
    white-space: nowrap;
    max-width: 220px;
    overflow: hidden;
    text-overflow: ellipsis;
}
.node-links-input,
.node-links-select {
    min-width: 0;
    background: #ffffff;
}
.node-links-row-actions {
    display: flex;
    align-items: center;
    gap: 0.65rem;
    justify-content: flex-end;
    margin-top: 0.75rem;
    flex-wrap: wrap;
}
.node-links-editor-row .node-links-save-btn {
    padding: 0.3rem 0.65rem;
    font-size: 0.78rem;
    white-space: nowrap;
    flex-shrink: 0;
}
.node-links-editor-row .node-links-delete-btn {
    flex-shrink: 0;
}
.node-links-scope-chip {
    display: inline-flex;
    align-items: center;
    border-radius: 9999px;
    background: #e2e8f0;
    color: #475569;
    font-size: 0.72rem;
    padding: 0.2rem 0.55rem;
}
.node-links-save-btn {
    background: #2563eb;
    color: #ffffff;
    border: none;
    border-radius: 0.65rem;
    padding: 0.5rem 0.9rem;
    font-size: 0.82rem;
    cursor: pointer;
}
.node-links-save-btn:hover {
    background: #1d4ed8;
}
.node-links-delete-btn {
    border: none;
    background: transparent;
    color: #ef4444;
    font-size: 0.82rem;
    cursor: pointer;
    padding: 0.35rem 0.2rem;
}
.node-links-delete-btn:hover {
    color: #dc2626;
}
.node-links-row-feedback {
    margin-top: 0.55rem;
    font-size: 0.78rem;
    color: #64748b;
}
.node-links-readonly-head {
    display: flex;
    align-items: center;
    gap: 0.55rem;
    flex-wrap: wrap;
}
.node-links-readonly-link {
    font-size: 0.9rem;
    color: #0f172a;
    text-decoration: none;
}
.node-links-readonly-link:hover {
    text-decoration: underline;
}
.node-links-readonly-meta,
.node-links-create-hint {
    font-size: 0.78rem;
    color: #64748b;
}
