@font-face {
    font-family: 'Baskervville';
    src: url('../../Baskervville-VariableFont_wght.ttf') format('truetype');
    font-weight: normal;
    font-style: normal;
}
html, body {
    font-family: 'Baskervville', Arial, sans-serif;
    height: 100%;
    margin: 0;
    overflow: hidden; /* remove scroll do body */
}

.col-md-12 {
    height: 100%;       /* ocupe toda a altura */
    overflow: hidden;   /* evita scroll aqui */
}

.modal-xl{
    min-width: 100%;
    min-height: 100%;
    margin: 0;
}

label{
    font-weight: 700;
}

#Arvore .genealogy {
  height: 100%;       /* ocupe toda a altura do pai */
  overflow: auto;     /* scroll interno */
  background-image: url('../../img/fundo.jpg');
    background-repeat: repeat;
}

#ArvoreFilho .genealogy{
    overflow:hidden !important; 
    max-height: 500px;
    cursor: grab;
}
.genealogy:active {
  cursor: grabbing;
}
/* Change css variables below according to your theme */
:root {
    /* --connection-line-color: #696969;  */
    /*--connection-line-color: orange; */
    --connection-line-color: #000000;
    --hover-color: #fedf98;
    --bottom-text-color: brown;
    --user-icon-color: orange;
    --box-border-color: orange;
}
.genealogy * {
    margin: 0;
    padding: 0;
}

.genealogy ul {
    padding-top: 20px;
    position: relative;
    -transition: all 0.5s;
    -webkit-transition: all 0.5s;
    -moz-transition: all 0.5s;
    display: flex;

}

.genealogy li {
    float: left;
    text-align: center;
    list-style-type: none;
    position: relative;
    padding: 20px 5px 0 5px;
    -transition: all 0.5s;
    -webkit-transition: all 0.5s;
    -moz-transition: all 0.5s;
}

/*We will use ::before and ::after to draw the connectors*/
.genealogy li::before,
.genealogy li::after {
    content: '';
    position: absolute;
    top: 0;
    right: 50%;
    border-top: 2px solid var(--connection-line-color);
    width: 50%;
    height: 18px;
}

.genealogy li::after {
    right: auto;
    left: 50%;
    border-left: 2px solid var(--connection-line-color);
}

/*We need to remove left-right connectors from elements without
any siblings*/
.genealogy li:only-child::after,
.genealogy li:only-child::before {
    display: none;
}

/*Remove space from the top of single children*/
.genealogy li:only-child {
    padding-top: 0;
}

/*Remove left connector from first child and
right connector from last child*/
.genealogy li:first-child::before,
.genealogy li:last-child::after {
    border: 0 none;
}

/*Adding back the vertical connector to the last nodes*/
.genealogy li:last-child::before {
    border-right: 2px solid var(--connection-line-color);
    border-radius: 0 5px 0 0;
    -webkit-border-radius: 0 5px 0 0;
    -moz-border-radius: 0 5px 0 0;
}

.genealogy li:first-child::after {
    border-radius: 5px 0 0 0;
    -webkit-border-radius: 5px 0 0 0;
    -moz-border-radius: 5px 0 0 0;
}

/*Time to add downward connectors from parents*/
.genealogy ul ul::before {
    content: '';
    position: absolute;
    top: 0;
    left: 50%;
    border-left: 2px solid var(--connection-line-color);
    width: 0;
    height: 20px;
}

/* Gerações 4-6: Tons de verde (raízes) */
.geracao-4 { background-color: #2E7D32; color: white; border: 2px solid #2E7D32; } /* Verde floresta */
.geracao-5 { background-color: #689F38; color: white; border: 2px solid #689F38; } /* Verde médio */
.geracao-6 { background-color: #9CCC65; color: black; border: 2px solid #9CCC65; } /* Verde claro */

/* Gerações 7-9: Tons de azul (transição) */
.geracao-7 { background-color: #1565C0; color: white; border: 2px solid #1565C0; } /* Azul royal */
.geracao-8 { background-color: #42A5F5; color: black; border: 2px solid #42A5F5; } /* Azul céu */
.geracao-9 { background-color: #81D4FA; color: black; border: 2px solid #81D4FA; } /* Azul gelo */

/* Gerações 10-12: Tons de terracota (destaque) */
.geracao-10 { background-color: #D84315; color: white; border: 2px solid #D84315; } /* Vermelho-terra */
.geracao-11 { background-color: #FF7043; color: black; border: 2px solid #FF7043; } /* Coral */
.geracao-12 { background-color: #FFAB91; color: black; border: 2px solid #FFAB91; } /* Salmão */

/* Gerações 13-15: Tons neutros (atuais) */
.geracao-13 { background-color: #78909C; color: white; border: 2px solid #78909C; } /* Cinza-azulado */
.geracao-14 { background-color: #B0BEC5; color: black; border: 2px solid #B0BEC5; } /* Cinza-claro */
.geracao-15 { background-color: #ECEFF1; color: black; border: 2px solid #ECEFF1; } /* Off-white */

/* Casamentos - Contraste máximo */
.casamento {
  background-color: #7b1fa2c9;/*#7B1FA2; /* Roxo profundo */
  color: white;
  border: 2px dashed #4A148C ;
}

/* Bordas consistentes */
[class^="geracao-"] {
  border: 1px solid rgba(0,0,0,0.2);
  border-radius: 4px;
}


.genealogy li a {
    height: auto;
    width: 220px !important;/*65px !important;*/
    padding: 2px 5px;
    text-decoration: none;
    /*0background-color: white;*/
    /* color: #8b8b8b; */
    /*font-family: arial, verdana, tahoma;*/
    font-size: 11px;
    display: inline-block;
    box-shadow: 0 1px 2px rgba(0, 0, 0, 0.1);
    -transition: all 0.5s;
    -webkit-transition: all 0.5s;
    -moz-transition: all 0.5s;
    border-radius: 5px;
    min-height: 110px;
    /*0border: 1px solid var(--box-border-color);*/

}

/*Time for some hover effects*/
/*We will apply the hover effect the the lineage of the element also*/
/* .genealogy li a:hover+ul li a {  // to select all child on hovering root*/
.genealogy li a:hover,
.genealogy li a:hover {
    /* background: #cbcbcb; */
    background: var(--hover-color);
    /* color: #000; */
}

/*Connector styles on hover*/
.genealogy li a:hover+ul li::after,
.genealogy li a:hover+ul li::before,
.genealogy li a:hover+ul::before,
.genealogy li a:hover+ul ul::before {
    border-color: var(--connection-line-color);
}

/*#endregion*/
.genealogy>ul>li>ul>li>a {
    width: auto;
}

.genealogy>ul>li>a {
    width: auto;
}

.genealogy li li li a {
    width: auto;
}

.user-icon {
    font-size: 30px;
    padding: 5px;
    color:var(--user-icon-color);
}


.bottom-text,
.Estado-Civil{
    /*color: var(--bottom-text-color);*/
    font-weight: bold;
    word-break: break-word;
    margin-bottom: 5px;
}
.Estado-Civil{
    font-weight: 800;
    text-decoration: underline;
}
.genealogy a > div.container-fluid{
    /*width: 100px;*/
    display: inline-block;
    vertical-align: top;
}

@media only screen and (max-width: 850px) {

    #minimap-sidebar {
        display: none !important;
    }

    .genealogy {
        font-size: 8px !important;
        margin-left: 0 !important;
    }

    /*.genealogy li span {
        padding: 5px !important;
        height: 45px !important;
        width: 45px !important;
    }

    
    .genealogy li {
        padding: 20px 2px 0px 2px !important;
    }

    .genealogy li a {
        height: auto;
        width: 60px !important;
        padding: 2px 5px;
        text-decoration: none;
        background-color: white;
        font-family: arial, verdana, tahoma;
        font-size: 10px;
        display: inline-block;
        box-shadow: 0 1px 2px rgba(0, 0, 0, 0.1);
        -transition: all 0.5s;
        -webkit-transition: all 0.5s;
        -moz-transition: all 0.5s;
        border-radius: 5px;
        border: 1px solid #000
    }*/

}

#Arvore .genealogy-inner {
    transform-origin: 0 0;
  
    /* largura e altura padrão, serão alteradas via JS */
    width: max-content; /* para expandir conforme conteúdo */
    height: max-content;

    padding: 20px;
    min-height: 100vh;
    /*font-family: Georgia, serif;*/
    color: rgb(51, 51, 51);
}


/* animação de espera na tela */
    .zoom-in-out-box {
        animation: zoom-in-zoom-out 1s ease infinite;
    }

    @keyframes zoom-in-zoom-out {
        0% {
            transform: scale(1, 1);
        }
        50% {
            transform: scale(1.5, 1.5);
        }
        100% {
            transform: scale(1, 1);
        }
    }
    .carregandoPAI{
        width: 100%;
        height: 100%;
        /*background: #ffffff8c url("../../img/arvore.jpg") no-repeat scroll center center;
        background-size: 150px;*/
        background: #ffffff8c;
        position: fixed;
        left: 0px;
        top: 0;
        z-index: 99999;
        overflow: hidden;
    }
    .carregandoPAI::before {
        content: '';
        position: absolute;
        top: 50%;
        left: 50%;
        width: 150px;   /* tamanho do círculo da imagem */
        height: 150px;
        transform: translate(-50%, -50%);
        border-radius: 50%;
        background: #ffffff8c url(../../img/arvore.jpg) no-repeat scroll center center;
        background-size: cover;
        opacity: .9;
    }

/* Estilo do botão flutuante */
    .Novo-btn {
        position: fixed;
        top: 20px;
        right: 20px;
        background-color: #4CAF50; /* verde bonito */
        color: white;
        border: none;
        border-radius: 50%;
        width: 50px;
        height: 50px;
        font-size: 20px;
        cursor: pointer;
        box-shadow: 0 4px 6px rgba(0,0,0,0.3);
        display: flex;
        align-items: center;
        justify-content: center;
        transition: all 0.3s ease;
        z-index: 1;
    }

    .Novo-btn:hover {
        background-color: #45a049;
        transform: scale(1.1);
    }

    /* Esconde em telas menores que 850px */
    @media (max-width: 850px) {
        .Novo-btn {
            display: none;
        }
    }