﻿/* simplefamilytree.css */
.sft-root {
    position: relative;
    width: 100%;
    height: 100%;
    overflow: hidden;
    user-select: none;
    background: #fff;
}

.sft-lines {
    position: absolute;
    left: 0;
    top: 0;
    overflow: visible;
    pointer-events: none;
    z-index: 0; /* ADD */
}

.sft-node {
    position: absolute;
    z-index: 2; /* ADD */
    width: 210px;
    height: 110px;
    border: 1px solid rgba(0,0,0,.15);
    border-radius: 12px;
    background: #ffffff;
    box-shadow: 0 6px 18px rgba(0,0,0,.08);
    display: grid;
    grid-template-columns: 70px 1fr;
    gap: 10px;
    padding: 10px;
    cursor: pointer;
}

.sft-stage {
    position: absolute;
    left: 0;
    top: 0;
    transform-origin: 0 0;
    will-change: transform;
    z-index: 0; /* ADD */
}

.sft-photo {
    width: 70px;
    height: 90px;
    border-radius: 10px;
    background: #f1f1f1;
    object-fit: cover;
}

.sft-text {
    overflow: hidden;
}

.sft-name {
    font-weight: 700;
    font-size: 14px;
    line-height: 1.2;
    margin-bottom: 4px;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.sft-born,
.sft-title {
    font-size: 12px;
    line-height: 1.2;
    color: rgba(0,0,0,.70);
    margin-bottom: 3px;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.sft-hint {
    position: absolute;
    left: 10px;
    bottom: 10px;
    font-size: 12px;
    color: rgba(0,0,0,.55);
    background: rgba(255,255,255,.85);
    border: 1px solid rgba(0,0,0,.10);
    border-radius: 10px;
    padding: 6px 10px;
}

/* context menu */
.sft-menu {
    position: absolute;
    z-index: 9999;
    min-width: 140px;
    background: #fff;
    border: 1px solid rgba(0,0,0,.15);
    border-radius: 10px;
    box-shadow: 0 10px 24px rgba(0,0,0,.12);
    padding: 6px;
}

    .sft-menu button {
        width: 100%;
        border: 0;
        background: transparent;
        text-align: left;
        padding: 8px 10px;
        border-radius: 8px;
        cursor: pointer;
        font-size: 13px;
    }

        .sft-menu button:hover {
            background: rgba(0,0,0,.06);
        }
