/* --- BIRD Design Tokens --- */
:root {
    --eviden-navy: #002D58;
    --eviden-cyan: #00A3A3;
    --eviden-cyan-light: #E0F7FA;
    --bird-bg-app: #f4f6f8;
    --bird-bg-surface: #ffffff;
    --bird-border: #d1d5db;
    --bird-text-primary: #1f2937;
    --bird-text-secondary: #6b7280;
    --header-height: 56px; 
    --footer-height: 32px;
    --sidenav-width: 280px;
    
    /* Status Colors */
    --status-ok: #6A8759;
    --status-warn: #BBB529;
    --status-crit: #d32f2f;
    --status-offline: #9e9e9e;

    /* Terminal Colors */
    --term-bg: #1e1e1e;
    --term-text: #cccccc;
    --term-green: #6A8759;
    --term-yellow: #BBB529;
    --term-red: #d32f2f;
    --term-cyan: #00A3A3;
}

* { box-sizing: border-box; }

body {
    margin: 0;
    font-family: 'Segoe UI', 'Roboto', Helvetica, Arial, sans-serif;
    background-color: var(--bird-bg-app);
    color: var(--bird-text-primary);
    height: 100vh;
    display: flex;
    flex-direction: column;
    overflow: hidden;
}

/* --- Global Header --- */
.bird-header {
    height: var(--header-height);
    background-color: var(--eviden-navy);
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
    display: flex;
    align-items: center;
    padding: 0 16px;
    z-index: 20;
    box-shadow: 0 1px 4px rgba(0,0,0,0.2);
    flex-shrink: 0;
    color: white;
}

.bird-brand-area {
    display: flex;
    align-items: center;
    width: var(--sidenav-width);
    border-right: 1px solid transparent;
}

.bird-app-title {
    font-size: 18px;
    font-weight: 600;
    color: white;
    letter-spacing: -0.5px;
}

.bird-header-actions { margin-left: auto; display: flex; gap: 8px; align-items: center; }

.bird-header .bird-icon-btn { color: white; }
.bird-header .bird-icon-btn:hover:not(:disabled) { 
    background-color: rgba(255, 255, 255, 0.1);
    color: var(--eviden-cyan);
}
.bird-header .bird-icon-btn:disabled { color: #555; }

/* --- Sidenav --- */
.bird-sidenav {
    width: var(--sidenav-width);
    background-color: var(--bird-bg-surface);
    border-right: 1px solid var(--bird-border);
    display: flex;
    overflow-y: auto;
    flex-direction: column;
    transition: width 0.3s ease;
    flex-shrink: 0;
}
.bird-sidenav.collapsed { width: 64px; }

.bird-nav-section { padding: 16px 0; border-bottom: 1px solid var(--bird-bg-app); }
.bird-nav-section-title { padding: 0 24px; font-size: 11px; text-transform: uppercase; color: var(--bird-text-secondary); font-weight: 700; margin-bottom: 8px; cursor: pointer; display: flex; justify-content: space-between; align-items: center; user-select: none; }
.bird-nav-section-title::after {
    content: '\e5cf'; /* expand_more */
    font-family: 'Material Icons';
    font-weight: normal;
    font-style: normal;
    font-size: 16px;
    transition: transform 0.2s;
}
.bird-nav-section.section-collapsed .bird-nav-section-title::after { transform: rotate(-90deg); }
/* Only hide items if sidebar is NOT collapsed */
.bird-sidenav:not(.collapsed) .bird-nav-section.section-collapsed .bird-nav-item { display: none; }
.bird-nav-item { display: flex; align-items: center; padding: 12px 24px; cursor: pointer; color: var(--bird-text-primary); font-size: 14px; border-left: 3px solid transparent; transition: all 0.2s; text-decoration: none; position: relative; padding-right: 40px; }
.bird-nav-item:hover { background-color: var(--bird-bg-app); color: var(--eviden-cyan); }
.bird-nav-item.active { background-color: var(--eviden-cyan-light); color: var(--eviden-navy); border-left-color: var(--eviden-cyan); font-weight: 600; }
.bird-nav-item.inactivated { opacity: 0.5; cursor: not-allowed; pointer-events: none; filter: grayscale(1); }
.bird-nav-icon { margin-right: 12px; font-size: 20px; color: var(--bird-text-secondary); width: 24px; text-align: center; display: flex; align-items: center; justify-content: center; }
.collapsed .bird-nav-text, .collapsed .bird-nav-section-title { display: none; }
.collapsed .bird-nav-item { padding: 12px 0; justify-content: center; border-left: none; }
.collapsed .bird-nav-icon { margin-right: 0; }

/* Pin Button in Sidebar */
.pin-btn { position: absolute; right: 8px; top: 50%; transform: translateY(-50%); background: none; border: none; color: var(--bird-text-secondary); cursor: pointer; padding: 4px; border-radius: 50%; display: none; align-items: center; justify-content: center; transition: all 0.2s; z-index: 5; }
.bird-nav-item:hover .pin-btn, .pin-btn.pinned { display: flex; }
.pin-btn:hover { background-color: rgba(0,0,0,0.1); color: var(--eviden-navy); }
.pin-btn.pinned { color: var(--eviden-cyan); }
.pin-btn .material-icons { font-size: 16px; transform: rotate(45deg); }
.bird-sidenav.collapsed .pin-btn { display: none !important; }
.favorites-section { background-color: #fafafa; border-bottom: 1px solid #e0e0e0; }
.favorites-section .bird-nav-section-title { color: var(--eviden-cyan); }

/* --- Main Layout --- */
.bird-layout-container { display: flex; flex: 1; height: calc(100vh - var(--header-height) - var(--footer-height)); overflow: hidden; position: relative; }
.bird-main { flex: 1; background-color: var(--bird-bg-app); padding: 24px; overflow-y: hidden; display: flex; flex-direction: column; min-width: 0; position: relative; }

/* --- Common Components --- */
.bird-paper { background: white; border: 1px solid var(--bird-border); border-radius: 4px; display: flex; flex-direction: column; overflow: hidden; flex: 1; min-height: 0; box-shadow: 0 1px 3px rgba(0,0,0,0.05); }
.bird-paper-header { padding: 12px 16px; border-bottom: 1px solid var(--bird-border); display: flex; align-items: center; background-color: #fafafa; font-size: 13px; font-weight: 700; color: var(--eviden-navy); height: 50px; flex-shrink: 0; gap: 12px; }

.bird-toolbar { display: flex; justify-content: space-between; align-items: center; margin-bottom: 20px; flex-shrink: 0; }
.bird-breadcrumb { font-size: 14px; color: var(--bird-text-secondary); display: flex; align-items: center; gap: 8px; }
.bird-breadcrumb strong { color: var(--eviden-navy); }

.bird-footer { height: var(--footer-height); background-color: var(--bird-bg-surface); border-top: 1px solid var(--bird-border); display: flex; align-items: center; padding: 0 24px; font-size: 11px; color: var(--bird-text-secondary); flex-shrink: 0; z-index: 20; justify-content: center; }

/* Buttons */
.bird-icon-btn { background: none; border: none; color: var(--bird-text-secondary); cursor: pointer; padding: 8px; border-radius: 50%; display: flex; align-items: center; justify-content: center; transition: background 0.2s ease; outline: none; }
.bird-icon-btn:hover:not(:disabled) { background-color: rgba(0,0,0,0.05); color: var(--eviden-navy); }
.bird-icon-btn:disabled { color: #ddd; cursor: default; }
.bird-icon-btn-sm { padding: 4px; font-size: 16px; }
.bird-icon-btn-sm .material-icons { font-size: 16px; }

.bird-btn { background-color: var(--eviden-cyan); color: white; border: none; padding: 8px 16px; border-radius: 4px; font-weight: 600; font-size: 13px; cursor: pointer; display: flex; align-items: center; gap: 6px; }
.bird-btn:disabled { background-color: #b0e0e0; cursor: not-allowed; }
.bird-btn-secondary { background-color: #e0e0e0; color: var(--bird-text-primary); border: none; padding: 8px 16px; border-radius: 4px; font-weight: 600; font-size: 13px; cursor: pointer; display: flex; align-items: center; gap: 6px; }
.bird-btn-secondary:hover { background-color: #ccc; }
.bird-btn-danger { background-color: #d32f2f; color: white; border: none; padding: 8px 16px; border-radius: 4px; font-weight: 600; font-size: 13px; cursor: pointer; display: flex; align-items: center; gap: 6px; }
.btn-toolbar { display: flex; align-items: center; gap: 8px; padding: 8px 16px; background: white; border: 1px solid var(--bird-border); border-radius: 4px; font-size: 13px; cursor: pointer; transition: background 0.2s; }
.btn-toolbar:hover { background: #f9f9f9; }
.action-btn-sm { background: none; border: 1px solid #ddd; border-radius: 4px; padding: 4px; font-size: 11px; cursor: pointer; display: inline-flex; align-items: center; justify-content: center; transition: all 0.15s; color: var(--bird-text-secondary); margin-left: 4px; }
.action-btn-sm:hover { background: #f0f0f0; color: var(--eviden-navy); border-color: #ccc; }
.action-btn-sm.terminate:hover { color: var(--status-crit); background: #ffebee; border-color: #ef9a9a; }

/* Tabs */
.bird-paper-tabs { border-bottom: 1px solid var(--bird-border); background-color: #fcfcfc; display: flex; flex-shrink: 0; padding: 0 4px; }
.tab-btn { padding: 8px 15px; border: none; background: none; cursor: pointer; font-size: 13px; color: var(--bird-text-secondary); border-bottom: 3px solid transparent; transition: all 0.15s ease; margin-right: 4px; margin-top: 2px; }
.tab-btn:hover { background-color: #eee; }
.tab-btn.active { color: var(--eviden-navy); font-weight: 600; border-bottom-color: var(--eviden-cyan); background-color: white; }
.bird-editor-tabs-content { flex: 1; position: relative; overflow: hidden; }
.tab-content { position: absolute; inset: 0; display: none; flex-direction: column; height: 100%; overflow-y: auto; overflow-x: hidden; }
.tab-content.active { display: flex; }

/* Split Layout & Explorer */
.bird-editor-split { display: flex; flex: 1; overflow: hidden; transition: all 0.3s ease; position: relative; }
.bird-explorer-pane { width: 300px; min-width: 0; background-color: #f9fafb; border-right: 1px solid var(--bird-border); display: flex; flex-direction: column; overflow-y: hidden; transition: width 0.3s ease, padding 0.3s ease; flex-shrink: 0; }
.bird-editor-split.explorer-collapsed .bird-explorer-pane { width: 0 !important; padding: 0; border-right: none; opacity: 0; }
.bird-editor-pane { flex: 1; position: relative; display: flex; flex-direction: column; overflow: hidden; background-color: #fff; }

/* Resizer */
.bird-resizer { width: 4px; cursor: col-resize; background: transparent; z-index: 10; flex-shrink: 0; margin-left: -2px; transition: background 0.2s; }
.bird-resizer:hover, .bird-resizer.active { background: var(--eviden-cyan); }
.bird-explorer-pane.resizing { transition: none; user-select: none; pointer-events: none; }

/* Tree View */
.bird-tree-header { padding: 10px 16px; font-size: 11px; font-weight: 700; text-transform: uppercase; color: var(--bird-text-secondary); border-bottom: 1px solid var(--bird-border); background-color: #fff; position: sticky; top: 0; z-index: 5; display: flex; align-items: center; justify-content: space-between; flex-shrink: 0; }
.bird-tree-row { padding: 4px 8px; display: flex; align-items: center; cursor: pointer; font-size: 13px; color: var(--bird-text-primary); white-space: nowrap; min-width: fit-content; }
.bird-tree-row:hover { background-color: #eee; }
.bird-tree-row.active { background-color: #e0f2f1; color: var(--eviden-navy); font-weight: 600; }
.bird-tree-children { margin-left: 18px; border-left: 1px solid #e0e0e0; display: none; }
.bird-tree-node.expanded > .bird-tree-children { display: block; }
.bird-tree-icon { font-size: 16px; margin-right: 6px; color: var(--bird-text-secondary); }
.bird-tree-toggle { font-size: 16px; width: 16px; margin-right: 2px; color: #999; transform: rotate(0deg); transition: transform 0.2s; }
.bird-tree-node.expanded > .bird-tree-row > .bird-tree-toggle { transform: rotate(90deg); }
.bird-tree-log-file { opacity: 0.6; font-style: italic; color: var(--bird-text-secondary) !important; cursor: help !important; }
.bird-tree-spacer { width: 18px; display: inline-block; }
.bird-tree-actions { margin-left: auto; display: none; padding-left: 8px; }
.bird-tree-row:hover .bird-tree-actions { display: flex; }
/* Favorite Toggle (Shared) */
.favorite-toggle-btn {
    display: none;
    margin-left: auto; /* Push to right */
}
.bird-tree-row:hover .favorite-toggle-btn,
.favorite-toggle-btn.favorited {
    display: flex;
}
.favorite-toggle-btn .material-icons { color: #ccc; transition: color 0.2s; }
.favorite-toggle-btn:hover .material-icons, .favorite-toggle-btn.favorited .material-icons { color: #FFC107; }
/* Ensure actions sit next to favorite button if both present */
.favorite-toggle-btn + .bird-tree-actions { margin-left: 0; }

/* Metadata Panel */
.bird-file-metadata { background-color: #f8f9fa; border-bottom: 1px solid var(--bird-border); padding: 12px 16px; font-size: 12px; display: grid; grid-template-columns: repeat(auto-fit, minmax(140px, 1fr)); gap: 12px; align-items: start; flex-shrink: 0; min-height: 60px; }
.bird-meta-item { display: flex; flex-direction: column; }
.bird-meta-label { color: var(--bird-text-secondary); font-size: 10px; text-transform: uppercase; font-weight: 700; letter-spacing: 0.5px; margin-bottom: 3px; }
.bird-meta-value { color: var(--bird-text-primary); font-weight: 500; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }

/* Modals */
.bird-modal-overlay { position: fixed; top: 0; left: 0; right: 0; bottom: 0; background-color: rgba(0, 0, 0, 0.6); display: none; align-items: center; justify-content: center; z-index: 1000; animation: overlayFadeIn 0.3s ease; }
.bird-modal-content { background-color: var(--bird-bg-surface); border-radius: 8px; width: 90%; max-width: 600px; box-shadow: 0 8px 25px rgba(0, 0, 0, 0.3); overflow: hidden; animation: modalSlideIn 0.3s ease-out; }
.bird-modal-header { background-color: var(--eviden-navy); color: white; padding: 16px 20px; display: flex; align-items: center; justify-content: space-between; gap: 12px; }
.bird-modal-header h3 { margin: 0; font-size: 18px; font-weight: 600; }
.bird-modal-body { padding: 20px; font-size: 14px; max-height: 60vh; overflow-y: auto; }
.bird-modal-footer { display: flex; justify-content: flex-end; gap: 10px; padding: 16px 20px; border-top: 1px solid #f0f0f0; background-color: #fcfcfc; }
@keyframes overlayFadeIn { from { opacity: 0; } to { opacity: 1; } }
@keyframes modalSlideIn { from { opacity: 0; transform: translateY(-20px); } to { opacity: 1; transform: translateY(0); } }

/* Toasts */
.bird-toast { position: fixed; bottom: 48px; right: 24px; background: #323232; color: white; padding: 12px 24px; border-radius: 4px; font-size: 14px; display: none; z-index: 100; }

/* Loading & Spinners */
.api-loading-overlay { position: fixed; inset: 0; z-index: 2000; display: none; align-items: center; justify-content: center; backdrop-filter: blur(2px); }
.api-loading-overlay.active { display: flex; }
.spin { animation: bird-spin 1s linear infinite; }
@keyframes bird-spin { from { transform: rotate(0deg); } to { transform: rotate(360deg); } }
.scrollable { overflow-y: auto; flex: 1; }

/* --- Profile Dropdown --- */
.profile-container { position: relative; }
.profile-dropdown { position: absolute; top: calc(var(--header-height) - 4px); right: 0; width: 250px; background-color: var(--bird-bg-surface); border: 1px solid var(--bird-border); border-radius: 4px; box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1); z-index: 50; display: none; transform-origin: top right; }
.profile-dropdown.visible { display: block; animation: scaleIn 0.15s ease-out; }
@keyframes scaleIn { from { opacity: 0; transform: scale(0.95) translateY(-5px); } to { opacity: 1; transform: scale(1) translateY(0); } }
.profile-header { padding: 12px 16px; border-bottom: 1px solid var(--bird-border); background-color: #fcfcfc; }
.profile-username { font-weight: 600; color: var(--eviden-navy); display: block; margin-bottom: 2px; font-size: 14px; }
.profile-role { font-size: 11px; color: var(--bird-text-secondary); }
.profile-menu-item { display: flex; align-items: center; padding: 10px 16px; font-size: 14px; color: var(--bird-text-primary); text-decoration: none; transition: background-color 0.15s, color 0.15s; }
.profile-menu-item:hover { background-color: var(--eviden-cyan-light); color: var(--eviden-cyan); }
.profile-menu-item.logout { color: #d32f2f; }
.profile-menu-item.logout:hover { background-color: #ffebee; }
.profile-divider { height: 1px; background-color: var(--bird-border); margin: 4px 0; }

/* --- Quick Actions Dropdown --- */
.quick-actions-container { position: relative; }
.quick-actions-dropdown { position: absolute; top: calc(var(--header-height) - 4px); right: 0; width: 200px; background-color: var(--bird-bg-surface); border: 1px solid var(--bird-border); border-radius: 4px; box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1); z-index: 50; display: none; transform-origin: top right; }
.quick-actions-dropdown.visible { display: block; animation: scaleIn 0.15s ease-out; }
.quick-action-item { display: flex; align-items: center; padding: 10px 16px; font-size: 13px; color: var(--bird-text-primary); text-decoration: none; transition: background-color 0.15s; }
.quick-action-item:hover { background-color: var(--eviden-cyan-light); color: var(--eviden-cyan); }
.quick-action-item .material-icons { font-size: 18px; margin-right: 8px; color: var(--bird-text-secondary); }
.quick-action-item:hover .material-icons { color: var(--eviden-cyan); }

/* --- Context Menu --- */
.context-menu { position: fixed; background-color: var(--bird-bg-surface); border: 1px solid var(--bird-border); border-radius: 4px; box-shadow: 0 2px 8px rgba(0, 0, 0, 0.15); z-index: 100; padding: 4px 0; min-width: 180px; display: none; }
.context-menu-item { display: flex; align-items: center; padding: 8px 12px; font-size: 13px; cursor: pointer; color: var(--bird-text-primary); }
.context-menu-item:hover { background-color: var(--eviden-cyan-light); color: var(--eviden-cyan); }
.context-menu-item .material-icons { font-size: 18px; margin-right: 8px; }
.context-menu-divider { height: 1px; background-color: #eee; margin: 4px 0; }

/* --- Tooltips --- */
.bird-tooltip { position: fixed; background-color: var(--eviden-navy); color: white; padding: 8px 12px; border-radius: 8px; font-size: 12px; max-width: 300px; pointer-events: none; opacity: 0; transition: opacity 0.1s ease; z-index: 2000; box-shadow: none; line-height: 1.4; border: none; }
.bird-tooltip.visible { opacity: 1; }

/* --- Menu Dropdown --- */
#menu-dropdown {
    background-color: var(--bird-bg-surface);
    border: 1px solid var(--bird-border);
    box-shadow: 0 4px 12px rgba(0,0,0,0.1);
}

/* --- Canvas Specifics --- */
#canvas-container {
    background-color: var(--bird-bg-app);
}

/* Node Styles Override for BIRD */
.node-element {
    background-color: var(--bird-bg-surface);
    border-color: var(--bird-border);
    box-shadow: 0 2px 4px rgba(0,0,0,0.05);
}
.node-element.selected {
    border-color: var(--eviden-cyan);
    box-shadow: 0 0 0 2px rgba(0, 163, 163, 0.2);
}

.node-element.highlighted-connection {
    /* A glowing effect to highlight the connected node */
    --highlight-color: var(--eviden-cyan);
    box-shadow: 0 0 0 3px var(--highlight-color), 0 0 12px 3px var(--highlight-color);
    z-index: 25 !important;
}

/* Legend */
#legend {
    background-color: var(--bird-bg-surface);
    border: 1px solid var(--bird-border);
}

/* Toolbar Floating */
#toolbar {
    background-color: var(--bird-bg-surface);
    border: 1px solid var(--bird-border);
}

/* Custom Scrollbar */
.custom-scrollbar::-webkit-scrollbar { width: 4px; }
.custom-scrollbar::-webkit-scrollbar-track { background: transparent; }
.custom-scrollbar::-webkit-scrollbar-thumb { background: var(--bird-border); border-radius: 4px; }

/* Utilities */
.no-select { user-select: none; -webkit-user-select: none; }
.fade-in { animation: fadeIn 0.2s ease-in-out; }
@keyframes fadeIn { from { opacity: 0; transform: translateY(5px); } to { opacity: 1; transform: translateY(0); } }

.node-detail-panel { 
    position: absolute; 
    top: 80px; 
    left: 16px; 
    bottom: 16px; 
    width: 320px; 
    background-color: var(--bird-bg-surface); 
    border: 1px solid var(--bird-border); 
    border-radius: 8px;
    box-shadow: 0 4px 20px rgba(0,0,0,0.15); 
    transform: translateX(-360px); 
    transition: transform 0.3s cubic-bezier(0.4, 0.0, 0.2, 1); 
    z-index: 40; 
    display: flex; 
    flex-direction: column; 
    overflow: hidden;
}

.node-detail-panel.open {
    transform: translateX(0);
}

.detail-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 12px 16px;
    border-bottom: 1px solid var(--bird-border);
    background-color: #fafafa;
    color: var(--eviden-navy);
    flex-shrink: 0;
}

.detail-close {
    background: none;
    border: none;
    cursor: pointer;
    color: var(--bird-text-secondary);
    display: flex;
    align-items: center;
    justify-content: center;
}

.detail-content {
    flex: 1;
    overflow-y: auto;
    padding: 16px;
}

.bird-input {
    width: 100%;
    border: 1px solid var(--bird-border);
    border-radius: 4px;
    padding: 6px 8px;
    font-size: 13px;
    background-color: var(--bird-bg-surface);
    color: var(--bird-text-primary);
    outline: none;
    transition: border-color 0.2s;
}

.bird-input:focus {
    border-color: var(--eviden-cyan);
}

/* Custom Utilities for JS Rendering */
.bg-bird-app { background-color: var(--bird-bg-app); }
.bg-bird-surface { background-color: var(--bird-bg-surface); }
.border-bird { border-color: var(--bird-border); }
.text-bird-primary { color: var(--bird-text-primary); }
.selection-box {
    position: absolute;
    border: 1px solid var(--eviden-cyan);
    background-color: rgba(0, 163, 163, 0.1);
    pointer-events: none;
    z-index: 1000;
}

#minimap {
    position: absolute;
    bottom: 16px;
    right: 16px;
    width: 240px;
    height: 160px;
    background-color: var(--bird-bg-surface);
    border: 1px solid var(--bird-border);
    border-radius: 8px;
    box-shadow: 0 4px 12px rgba(0,0,0,0.15);
    z-index: 50;
    overflow: hidden;
}
#legend {
    right: 270px !important;
}
.minimap-node {
    position: absolute;
    border-radius: 2px;
}
.minimap-viewport {
    position: absolute;
    border: 1px solid var(--eviden-cyan);
    background-color: rgba(0, 163, 163, 0.2);
    cursor: move;
}
.text-bird-secondary { color: var(--bird-text-secondary); }
.hover-bg-app:hover { background-color: var(--bird-bg-app); }
.hover-text-red-500:hover { color: #ef4444; }

/* Incompatible Fabric Style */
.incompatible-fabric {
    filter: grayscale(80%);
    opacity: 0.6;
}
.incompatible-fabric:hover, .incompatible-fabric.selected {
    opacity: 1; /* Restore opacity on hover/selection */
}

/* Flash Highlight Animation for Auto-Focus */
@keyframes flashHighlight {
    0% { box-shadow: 0 0 0 2px var(--eviden-cyan); border-color: var(--eviden-cyan); background-color: var(--eviden-cyan-light); }
    100% { box-shadow: none; border-color: var(--bird-border); background-color: var(--bird-bg-app); }
}
.flash-highlight {
    animation: flashHighlight 2s ease-out;
}

/* Group Collapse/Expand Animations */
.node-collapsing {
    animation: scaleOut 0.3s ease-in forwards;
    pointer-events: none !important;
}
.node-expanding {
    animation: scaleIn 0.3s ease-out forwards;
}
@keyframes borderPulse {
    0% { box-shadow: 0 0 0 0px rgba(0, 163, 163, 0.7); border-color: var(--eviden-cyan); }
    100% { box-shadow: 0 0 0 10px rgba(0, 163, 163, 0); border-color: var(--eviden-cyan); }
}
.pulsing-border {
    animation: borderPulse 1.5s infinite;
    z-index: 5 !important;
    border-color: var(--eviden-cyan) !important;
}
@keyframes scaleOut { from { transform: scale(1); opacity: 1; } to { transform: scale(0.5); opacity: 0; } }
@keyframes scaleIn { from { transform: scale(0.5); opacity: 0; } to { transform: scale(1); opacity: 1; } }

.minimap-viewport {
    position: absolute;
    border: 2px solid rgba(0, 122, 255, 0.8);
    cursor: move;
    transition: background-color 0.2s, border-color 0.2s;
    z-index: 10;
}
.minimap-viewport:hover {
    background-color: rgba(0, 122, 255, 0.2);
    border-color: #0056b3;
}

.minimap-resize-handle {
    position: absolute;
    top: 0;
    left: 0;
    width: 16px;
    height: 16px;
    cursor: nwse-resize;
    z-index: 60;
    background: linear-gradient(135deg, var(--bird-border) 50%, transparent 50%);
    transition: background 0.2s;
}
.minimap-resize-handle:hover {
    background: linear-gradient(135deg, var(--eviden-cyan) 50%, transparent 50%);
}
