/**
 * Estilos para a árvore genealógica expandida
 * Versão com suporte para até 5 gerações e controles de expansão
 */

/* Contêiner principal */
.simple-family-tree-container {
    width: 100%;
    height: 800px;
    position: relative;
    margin: 20px 0;
    border: 1px solid #ddd;
    border-radius: 5px;
    overflow: hidden;
    background-color: #f9f9f9;
}

/* Área de visualização da árvore */
#family-tree-visualization {
    width: 100%;
    height: 100%;
    overflow: hidden;
}

/* Controles de navegação */
.tree-controls {
    position: absolute;
    top: 10px;
    right: 10px;
    z-index: 100;
    background-color: rgba(255, 255, 255, 0.8);
    border-radius: 5px;
    padding: 5px;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.2);
}

.tree-control-btn {
    width: 30px;
    height: 30px;
    margin: 0 2px;
    background-color: #fff;
    border: 1px solid #ddd;
    border-radius: 3px;
    cursor: pointer;
    font-size: 16px;
    font-weight: bold;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    transition: all 0.2s ease;
}

.tree-control-btn:hover {
    background-color: #f0f0f0;
    border-color: #ccc;
}

.tree-control-btn:focus {
    outline: none;
    box-shadow: 0 0 0 2px rgba(66, 153, 225, 0.5);
}

/* Controles de expansão */
.expansion-controls {
    position: absolute;
    top: 10px;
    left: 10px;
    z-index: 100;
    background-color: rgba(255, 255, 255, 0.9);
    border-radius: 5px;
    padding: 10px;
    box-shadow: 0 2px 5px rgba(0, 0, 0, 0.2);
    max-width: 200px;
}

.expansion-control {
    margin-bottom: 8px;
}

.expansion-control label {
    display: flex;
    align-items: center;
    font-size: 14px;
    cursor: pointer;
}

.expansion-control input[type="checkbox"] {
    margin-right: 8px;
}

/* Nós da árvore */
.node rect {
    stroke-width: 1px;
    transition: all 0.3s ease;
}

.node:hover rect {
    stroke-width: 2px;
    filter: brightness(0.95);
    box-shadow: 0 0 5px rgba(0, 0, 0, 0.3);
}

.node text {
    font-family: Arial, sans-serif;
    pointer-events: none;
}

.node-name {
    font-size: 12px;
    font-weight: bold;
}

.node-dates {
    font-size: 10px;
}

/* Links entre nós */
.link {
    fill: none;
    stroke-width: 1.5px;
    stroke-opacity: 0.6;
}

/* Responsividade */
@media (max-width: 768px) {
    .simple-family-tree-container {
        height: 600px;
    }
    
    .expansion-controls {
        max-width: 150px;
        font-size: 12px;
        padding: 5px;
    }
    
    .expansion-control {
        margin-bottom: 4px;
    }
    
    .expansion-control label {
        font-size: 12px;
    }
}
