/* ========================================= */
/* SPECIAL NODES: Стили для кастомных типов нод */
/* ========================================= */

/* --- Нода-Фон (Background Area Node) --- */
.node.bg-area-node {
    z-index: 1 !important; /* Гарантированно ниже всех остальных нод и макарон */
    background: rgba(255, 255, 255, 0.02) !important;
    border: 2px dashed var(--grey) !important; /* Оранжевая пунктирная рамка */
    box-shadow: none !important;
}

.node.bg-area-node.selected {
    border-color: var(--red) !important; /* Подсветка при выделении */
}

/* Настройка текстового поля внутри ноды-фона */
.node.bg-area-node textarea {
    background: transparent;
    border: none;
    height: auto !important;
    resize: none;
    flex-grow: 0 !important;
    font-weight: bold;
    font-size: 14px;
    color: #b7b7b7;
    text-transform: uppercase;
    letter-spacing: 1px;
    border-bottom: 1px dashed rgba(255, 170, 0, 0.2);
    padding-bottom: 4px;
    margin-bottom: 6px;
}

/* Скрываем порты для соединения у ноды-фона */
.node.bg-area-node .port {
    display: none !important;
}


/* --- Нода-Двойник (Twin Node) --- */
.node.twin-node {
    border: 3.5px solid #ffd700 !important; /* Жирный золотой border */
    box-shadow: 0 0 15px rgba(255, 215, 0, 0.2) !important;
}

.node.twin-node.selected {
    border-color: #00ff88 !important; /* Подсветка при выделении */
    box-shadow: 0 0 20px rgba(0, 255, 136, 0.5) !important;
}

.node.twin-node textarea {
    color: #ffd700;
    font-weight: bold;
}

/* Скрытие портов в зависимости от роли двойника */
.node.twin-left-only .port.input { display: none !important; }
.node.twin-right-only .port.output { display: none !important; }

/* Настройка направления флекса для двойников */
.node.twin-left-only{ 
    flex-direction: row;
    gap: 10px;
}
.node.twin-right-only{ 
    flex-direction: row-reverse;
    gap: 10px;
}

/* Кнопка мгновенного прыжка внутри ноды */
.twin-teleport-btn {
    background: #ffd700;
    color: #111;
    border: none;
    padding: 3px 6px;
    font-size: 10px;
    font-weight: bold;
    cursor: pointer;
    border-radius: 3px;
    margin-top: 5px;
    align-self: flex-start;
    text-transform: uppercase;
    transition: background 0.2s;
    width: 150px;
    font-size: 80%;
}
.twin-teleport-btn:hover {
    background: #fff;
}
