/* LOGIN / POPUP */
	
	dialog{
		box-shadow: rgba(0, 0, 0, 0.15) 0px 5px 15px 0px;
		border-radius: 5px;
		position: fixed;
		top: 50%;
		left: 50%;
		transform: translate(-50%,-50%);
	}
	dialog::backdrop{
		background-color: #1e1e1edd;
	}

	dialog#modalBoxContainer{
		padding: 0; 
		border: 0;
		background-color: transparent;
		box-shadow: rgba(0, 0, 0, 0.3) 0px 19px 38px, rgba(0, 0, 0, 0.22) 0px 15px 12px;
		overflow: hidden;
	}
    
	dialog #dialogClose{
        display: block;
		position: absolute;
        z-index: 9999;
		top: 0;
		right: 0;
		border: 0;
		outline: 0;
		margin: .5em;
		cursor: pointer;
        content: '';
        width: 1.5rem;
        height: 1.5rem;
        background-color: transparent;
        background-image: url("data:image/svg+xml;utf8,<svg id='Layer_1' xmlns='http://www.w3.org/2000/svg' version='1.1' viewBox='0 0 50 50'> <path id='Caminho_1' d='M5.71,39.79l4.57,4.57L44.29,10.35l-4.57-4.57L5.71,39.79Z'/> <path id='Caminho_11' d='M10.28,5.78l-4.57,4.57,34.01,34.01,4.57-4.57L10.28,5.78Z'/> </svg>");
        background-size: contain;
        background-repeat: no-repeat;
	}



/* MAP / POPUP */

    dialog#dialog{

		width: 85%;
		height: 85%;
		padding: 0; 
		border: 0;
		box-shadow: rgba(0, 0, 0, 0.3) 0px 19px 38px, rgba(0, 0, 0, 0.22) 0px 15px 12px;
		overflow: hidden;
	}

	#map-loader.visible{

		position: absolute;
		inset: 0 0 0 0;
		content: '';
		z-index: 5;
        
        &::after{
            background-color: transparent;
            position: absolute;
            top: 50%;
            left: 50%;
            transform: translate(-50%,-50%);
            content: '';
            border-width: 5px;
            border-style: solid;
            border-color: #CCC transparent #CCC transparent;
            border-radius: 50%;
            width: 2rem;
            height: 2rem;
            z-index: 5;
            
            animation: rotateLoader .75s linear;
            animation-iteration-count: infinite;
        }
	}
	
    #map-alert{

        width: 100%;
        height: 100%;
        display: flex;
        align-items: center;
        justify-content: center;
        
        &::before{
            content: 'visualização indisponível';
            color: var(--color-gray-400);
            font-size: 2.5em;
            font-weight: 600;
        }
    }

    .leaflet-container {
        
        width: 100%;
        height: 100%;
        background-color: var(--color-gray-200);

        .leaflet-popup-content-wrapper{
            
            width: 300px;
            max-width: 80vw;
            padding: 0;
            margin: 0;
            border-radius: 0;

            .leaflet-popup-content{

                padding: 0;
                margin: 0;
                display: flex;
        
                .popup-img {
                    img{
                        width: 100px;
                    }
                }

                .popup-content{
                    padding: 1.5em 2.5em 1em 1.5em;
                }
            }
        }
        
    }

	@keyframes rotateLoader {
		0% { transform: translateY(-50%) rotate(0turn); }
		100% { transform: translateY(-50%) rotate(1turn); }
	}

    #timeline{
        font-family: inherit !important;
    }
    
    .tl-timeline p,
    .tl-timeline h1, 
    .tl-timeline h2,
    .tl-timeline h3,
    .tl-timeline h4,
    .tl-timeline h5,
    .tl-timeline h6 {
        font-family: inherit !important;
        text-transform: none !important;
    }
    
    .tl-timeline .tl-headline-date,
    .tl-timeline h3.tl-headline-date {
        color: var(--color-theme);
        font-family: inherit !important;
    }

    .tl-text h2.tl-headline-title, 
    .tl-text h2.tl-headline {
        font-size: 2em !important;
        line-height: 1em !important;
    }
    .tl-slide .tl-slide-scrollable-container {
        display: flex !important;
        align-items: center ;
        height: 100%;
    }

    .tl-slide .tl-slide-content-container {
        display: flex !important;
        align-items: center ;
        height: 100%;
    }
    
    .tl-slide .tl-slide-content {
        display: flex !important;
        gap: 2em;
        max-height: 100%;
        align-items: center;
    }

    .tl-slide .timeline-link:link,
    .tl-slide .timeline-link:visited,
    .tl-slide .timeline-link:active {
        background-color: var(--color-gray-300);
        color: var(--color-gray-500);
        display: inline-block;
        padding: .25em 1em;
        margin-top: 1em;
        font-weight: 600;
        text-decoration: none;
        transition: all .3s ease;
        font-size: 0.9em;
    }
    
    .tl-slide .timeline-link span{
        display: none;
    }
    
    .tl-slide .timeline-link::before{
        content: 'ver item';
    }
    
    .tl-slide .timeline-link:hover {
        background-color: var(--color-theme);
        color: var(--color-white);
        text-decoration: none;
    }

    .tl-media-shadow {
        box-shadow: 0 !important;
    }

 /*   ---- MAPA ---- */


    /* main#timeline > div{
        position: relative;
    }
    main#timeline #controls{
        position: sticky;
        top: 7.5em;
        width: max-content;
        margin-left: auto;
    } */





    main#graph{
        height: 80vh;
    }

	#graph-container{
		position: relative;
	}
	svg#graph-stage{
		width: 100%;
        height: 80vh;
	}

    line {
        stroke: var(--color-gray-400);
        stroke-opacity: 0.5;
        transition: stroke .2s ease;

        &.highlighted{
            stroke-opacity: .8;
        }

        &:hover{
            stroke: var(--color-theme);
            stroke-opacity: 1;
            cursor: pointer
        }

        &.faded{
            stroke-opacity: 0;
        }
    }

    .node-group {

        & circle {
            fill: var(--color-white);
            stroke: var(--color-gray-400);
            pointer-events: all;
            transition: fill .3s ease, stroke .3s ease;
            cursor: pointer;            
        }

        & rect {
            display: none;
            fill: #00000088;
            transition: fill .3s ease, stroke .3s ease;
            pointer-events: none;
            user-select: none;
            /* rx: 1; ry: 1; rounded corners */
        }

        & text {
            text-anchor: middle;
            fill: var(--color-black);
            cursor: pointer;
            font-weight: 400;
        }

    }

    .node-group:hover {
        & circle {
            stroke: var(--color-black);
        }
        & rect {
            fill:  var(--color-black);
        }
        & text {
            fill:  var(--color-black);
        }
    }
    
    .related circle{
        fill: var(--color-theme) !important;
        stroke: var(--color-theme);
    }
    
    .relatedByLink circle{
        fill: var(--color-theme) !important;
        stroke: var(--color-black);
    }
    
    .faded {
        opacity: .2;
        transition: opacity 2s ease;
    }
    


  #controls {
		position: fixed;
		top: 7em;
		right: 1.5em;
        z-index: 100;
		background-color: color-mix(in srgb, var(--color-black), transparent 50%);
        border-radius: 5px;
        box-shadow: 0 0 10px rgba(0, 0, 0, 0.1);

		display: flex;
		gap: .5rem;
		padding: .5rem;
        z-index: 2;

        & button {
			background-color: #ffffff;
            border: none;
			padding: .25em .5em;
			cursor: pointer;
			font-size: .75em;
			width: 1.75em;
			height: 1.75em;
			display: block;

			& span{
				display: none;
			}
        }

        & button:hover {
            background-color: var(--color-theme);
			background-position: center;
			background-size: cover;
			background-repeat: no-repeat;
        }

        & button.btn-left { background-image: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' version='1.1' viewBox='0 0 60 60'> <polygon points='19.98,27.18 50.98,27.18 50.98,32.9 19.98,32.9 33.55,46.43 29.46,50.48 9.02,30.04 29.54,9.52 33.55,13.57'/></svg>"); }
        & button.btn-right { background-image: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' version='1.1' viewBox='0 0 60 60'> <polygon points='40.02,32.82 9.02,32.82 9.02,27.1 40.02,27.1 26.45,13.57 30.54,9.52 50.98,29.96 30.46,50.48 26.45,46.43 '/></svg>"); }
        & button.btn-zoom-out { background-image: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' version='1.1' viewBox='0 0 60 60'> <path d='M49.93,27.15v5.69H10.07v-5.69H49.93z'/></svg>"); }
        & button.btn-zoom-in { background-image: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' version='1.1' viewBox='0 0 60 60'> <path d='M27.15,27.15V10.07h5.69v17.08h17.08v5.69H32.85v17.08h-5.69V32.85H10.07v-5.69H27.15z'/></svg>"); }
        & button.btn-fit { background-image: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' version='1.1' viewBox='0 0 60 60'> <g> <polygon points='46.94,30 52.61,30 52.61,7.39 30,7.39 30,13.06 46.94,13.06'/> <polygon points='7.39,52.61 30,52.61 30,46.94 13.06,46.94 13.06,30 7.39,30'/> </g></svg>"); }
    }
