﻿/* lineage.css */

/* Tree container */
.lineage-tree {
    display: flex;
    flex-direction: column;
    align-items: center;
    width: 100%;
    margin: 0 auto;
    padding: 1rem;
}

/* Wrapper for each generation */
.lineage-generation-wrapper {
    width: 100%;
    max-width: 600px;
    margin-bottom: 1.5rem;
    text-align: center;
    animation: fadeInUp 0.6s ease-out forwards;
    opacity: 0;
}

/* Generation label (e.g., You, Parents) */
.lineage-label {
    font-weight: bold;
    font-size: 1rem;
    margin-bottom: 0.5rem;
    color: #555;
}

/* Row of member + optional spouse */
.lineage-generation {
    display: flex;
    justify-content: center;
    align-items: flex-start;
    gap: 1rem;
}

/* Person block (image + caption) */
.lineage-person {
    display: flex;
    flex-direction: column;
    align-items: center;
    width: 120px;
    min-width: 120px;
}

    .lineage-person img {
        width: 80px;
        height: 80px;
        object-fit: cover;
        border-radius: 50%;
        border: 2px solid #ccc;
        box-shadow: 0 2px 4px rgba(0,0,0,0.3);
        background: #fff;
    }

    .lineage-person .caption {
        margin-top: 0.3rem;
        font-size: 0.9rem;
        font-weight: 500;
        text-align: center;
        word-break: break-word;
    }

/* Plus sign between spouses */
.lineage-plus {
    font-size: 2rem;
    color: green;
    margin: 0 10px;
    font-weight: bold;
    user-select: none;
    align-self: center;
    line-height: 1;
    position: relative;
    top: 6px;
}

/* Vertical connector line between generations */
.lineage-vertical {
    position: relative;
    width: 2px;
    height: 100px;
    background-color: blue;
    margin: -10px auto 20px auto;
    animation: growLine 1.2s ease-out forwards;
}

.lineage-vertical::after {
    content: "";
    position: absolute;
    top: 100%;
    left: 50%;
    transform: translateX(-50%);
    width: 0;
    height: 0;
    border-left: 6px solid transparent;
    border-right: 6px solid transparent;
    border-top: 10px solid blue;
}

/* Animations */
@keyframes growLine {
    from {
        height: 0;
    }

    to {
        height: 30px;
    }
}

@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(20px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}
