/* ====================== 06-NODE-MENU.CSS ====================== */
/* Выпадающее меню узла — современный деловой стиль с идеальным выравниванием */

.node-menu-btn {
    width: 34px;
    height: 34px;
    border: none;
    background: #f1f5f9;
    color: #64748b;
    font-size: 19px;
    border-radius: 10px;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
    transition: all 0.2s cubic-bezier(0.4, 0, 0.2, 1);
}

.node-menu-btn:hover {
    background: #e2e8f0;
    color: #334155;
    transform: scale(1.08);
}

body.theme-dark .node-menu-btn {
    background: #334155;
    color: #94a3b8;
}

body.theme-dark .node-menu-btn:hover {
    background: #475569;
    color: #e2e8f0;
}

/* ====================== САМО ВЫПАДАЮЩЕЕ МЕНЮ ====================== */

.node-menu {
    display: none;
    position: absolute;
    top: 100%;
    right: 0;
    margin-top: 4px;
    background: white;
    border: 1px solid #e2e8f0;
    border-radius: 12px;
    box-shadow: 0 10px 25px rgba(0, 0, 0, 0.12);
    z-index: 150;
    min-width: 215px;
    padding: 8px 0;
    overflow: hidden;
}

body.theme-dark .node-menu {
    background: #1e2937;
    border-color: #334155;
    box-shadow: 0 10px 25px rgba(0, 0, 0, 0.45);
}

/* Пункты меню */
.node-menu .menu-item {
    width: 100%;
    padding: 13px 20px;
    border: none;
    background: none;
    text-align: left;
    cursor: pointer;
    font-size: 15.2px;
    font-weight: 500;
    color: #1e2937;
    display: flex;
    align-items: center;
    gap: 16px;
    transition: all 0.15s;
}

.node-menu .menu-item:hover {
    background: #f8fafc;
    color: #0f172a;
}

body.theme-dark .node-menu .menu-item {
    color: #e2e8f0;
}

body.theme-dark .node-menu .menu-item:hover {
    background: #334155;
    color: #f1f5f9;
}

/* Фиксированная область под иконку — решает проблему выравнивания */
.node-menu .menu-item > span:first-child {
    display: inline-flex;
    width: 26px;           /* фиксированная ширина */
    justify-content: center;
    flex-shrink: 0;
    font-size: 17.5px;     /* чуть увеличил для визуальной гармонии */
    line-height: 1;
}

/* Специальные цвета действий */
.node-menu .menu-item[data-action="delete"] {
    color: #ef4444;
}
.node-menu .menu-item[data-action="delete"]:hover {
    background: #fee2e2;
    color: #b91c1c;
}

body.theme-dark .menu-item[data-action="delete"] {
    color: #f87171;
}
body.theme-dark .menu-item[data-action="delete"]:hover {
    background: #7f1d1d;
}

.node-menu .menu-item[data-action="move"]   { color: #ea580c; }
.node-menu .menu-item[data-action="create"] { color: #16a34a; }
.node-menu .menu-item[data-action="capture"]{ color: #f59e0b; }

/* Отключённый пункт */
.menu-disabled {
    padding: 13px 20px;
    color: #94a3b8;
    font-style: italic;
    font-size: 14.5px;
    cursor: default;
}

body.theme-dark .menu-disabled {
    color: #64748b;
}