/* MAP CONTAINER */
#app-container {
    padding: 40px;
    background-color: #fff;
    border-radius: 20px;
    font-family: var(--e-global-typography-text-font-family);
    margin-top: 20px;
    position: relative;


    /*  SVG MAPS */
    svg {
        width: 100%;
        max-height: 750px;
    }
    path {
        /* fill: #E4E4E4; */
        stroke: #B7B7B7;
        /* cursor: pointer; */
        stroke-width: 1;
        transition: fill 0.5s;
        position: relative;
    }
    path[id]:hover {
        fill: var(--e-global-color-primary);
        cursor:pointer;
        /* border: solid 1px red */
    }
    path:not([id]){
        fill: #fafafae8;
    }

    .map-container{
        position: relative;
        width: 100%;
        min-height: 814px;
        display: flex;
        flex-direction: column;
        opacity: 1;
        transition: opacity 0.5s;

        .co{
            position: relative;
            display: flex;
            opacity: 0;
            transition: opacity 0.5s, filter 0.5s;
            align-items: center;
            justify-content: center;
            height: 100%;
        }
        .departaments{
            width: 100%;
            height: 100%;
            position: absolute;
            left: 0px;
            align-content: center;
            opacity:0;
            display: flex;
            transition: opacity 0.5s, filter 0.5s;
            align-items: center;
            justify-content: center;

            svg{
                height: 740px;
                width: 680px;
                 path{
                    stroke-width: 1;
                    stroke: #B7B7B7;
                 }
            }
        }
        .municipalities{
            width: 100%;
            height: 100%; 
            position: absolute;
            left: 0px;
            opacity:0;
            display: flex;
            transition: opacity 0.5s, filter 0.5s;
            align-items: center;
            justify-content: center;
            
            svg{
                height: 440px;
                width: 530px;
                
                path {
                    fill: #E4E4E4;
                    stroke-width: 1.5;
                }
            }
        }
        .error-message{
            display: none;
            justify-content: center;
            align-items: center;
            height: 100%;
            width: 100%;
            position: absolute;
        }
    }

    .list-container{
        position: relative;
        width: 100%;
        min-height: 814px;
        display: none;
        flex-direction: column;
        opacity: 1;
        transition: opacity 0.5s;

        .entities-list{
            max-height: 630px;
            overflow: auto;

            .title{
                font-weight: 700;
            }
            ul{
                list-style: none;
                padding: 0px;
            }
            li{
                border-top: solid 1px lightgray;
                padding: 5px 0px;
                display: flex;
                justify-content: space-between;

                &:hover{
                    background-color: lightgray;
                }
            }
            .action{
                color: var(--e-global-color-primary);
                font-weight: 600;
                cursor: pointer;
                font-size: small;

                &:hover{
                    color: var(--e-global-color-accent);
                }
            }
        }
    }

    .search-form{
        margin-bottom: 40px;
        
        .search-container{
            display: flex;

            input{
                border-color: lightgray;
            }

            button{
                padding: 5px 20px;
                border: none;
                background-color: var(--e-global-color-primary);
                color: white;

                &:hover{
                    background-color: var(--e-global-color-accent);
                }
            }
        }
    }

    .start-sesion {
        position:absolute;
        width: 100%;
        height: 100%;
        background-color: rgba(0, 0, 0, 0.2);
        top: 0;
        left: 0px;
        display: none;
        z-index: 110;
        border-radius: 20px;
        justify-content: center;
        align-items: center;

        .start-sesion-info-box{
            padding:40px;
            background-color: white;
            border-radius: 10px;
            width:400px;
        }

        a {
            padding: 10px 20px;
            border: none;
            background-color: var(--e-global-color-primary);
            color: white;
            border-radius: 10px;
            width: 100%;
            display: block;
            text-align: center;

            &:hover{
                background-color: var(--e-global-color-accent);
            }
        } 
    }
}

#app-nav, #map-nav{
    display: flex;
    list-style: none;
    padding: 0;
    margin: 0;
    z-index: 100;
}

#app-nav{
    li{
        margin-right: 10px;
        padding-bottom: 10px;
        font-weight: 700;
        font-size: var(--e-global-typography-202c620-font-size);
        color: #5F6368;

        &:hover{
            color: var(--e-global-color-text);
            cursor: pointer;
        }

        &.active {
            border-bottom: solid var(--e-global-color-primary) 3px;
            color: var(--e-global-color-text);
            cursor: text;
        }
    }
}

/* TO DO: UNIFY SELECTOR IN JS */
#map-nav, .map-nav{
    position: relative;
    li{
        color: var(--e-global-color-text);
        border-bottom: solid 1px;
        color: var(--e-global-color-primary);
        position: relative;
        margin-right: 18px;
        font-weight: 600;
        margin-bottom: 40px;
        cursor: pointer;
        display: none;

        &.show{
            display: block;
        }
        
        &:after{
            content: ">";
            position: absolute;
            right: -15px;
            border-bottom:none;
            cursor:text;
        }
        &.active{
            border: none;
            color: var(--e-global-color-accent);
            cursor:text;

            &:after{
                content: "";
            }
        }

        /* TO DO: UNIFY SELECTOR IN JS */
        &#back, &.back{
            position: absolute;
            margin-right: 0px;
            right: 0;
            color: #5F6368;
            border: none;
            cursor:text;
            display:block;

            &.active{
                color: var(--e-global-color-primary);
                cursor: pointer;
                text-decoration: underline;
            }

            &:after{
                content: "";
            }

            
        }
    }
}

/* INFO CONTAINER */
#info-container {
    background-color: #FBFBFF;
    border-radius: 20px;
    border: solid 1px #BABABA;
    padding: 40px;
    height: 100%;
    font-size: 15px;
    position: relative;

    h2 {font-size: inherit; margin: 0px; margin-bottom: 0px; font-weight: 400;}

    .title {
        font-size: 22px;
        font-weight: 700;
        color: var(--e-global-color-accent);
        margin-bottom:20px;
    }

    .default {
		display: block;
		max-height: 727px;
    	overflow: auto;
	}
    .entity-data{
        display: none;
        flex-direction: column;
        height: 100%;

        .description{
            max-height: 140px;
            overflow: auto;
            margin-bottom: 20px;
        }

        h3 {
            font-weight: 700;
            font-size: var(--e-global-typography-202c620-font-size);
            border-bottom: solid 1px #BABABA;
            padding-bottom: 16px;
            margin-bottom: 25px 0px 16px 0px;
        }
        .data{
            height: 100%;
            display: flex;
            flex-direction: column;
            justify-content: space-between;

            .stats{
                margin-bottom: 20px;

                .section-list {
                    margin: 0px;
                    padding: 0px;
                    list-style: none;
                    height: 320px;
                    overflow: auto;
        
                    .section{
                        height: 26px;
                        overflow: hidden;
                        transition: all 0.5s;
                        cursor: pointer;
    
                        &.active {
                            height: 150px;
                            overflow: auto;
                            margin-bottom: 10px;
    
                            .arrow {
                                border-top: none;
                                border-bottom: 5px solid grey;
                            }
                        }
                        
                        .arrow{
                            width: 0;
                            height: 0;
                            border-left: 5px solid transparent;
                            border-right: 5px solid transparent;
                            border-top: 5px solid grey;
                            display: block;
                            float: right;
                            margin-top: 5px;
                        }
    
                        .bullet {
                            width: 10px;
                            height: 10px;
                            display: inline-block;
                            background-color: var(--e-global-color-accent);;
                            border-radius: 50px;
                            vertical-align: sub;
                            margin-right: 5px;
                        }
                        h4 {
                            font-weight: 700;
                            margin: 0px 0px 10px 0px;
                            font-size: var(--e-global-typography-202c620-font-size);
                            line-height: 16px;
                            text-transform: capitalize;
                        }
                        .list{
                            padding: 0px;
                            list-style: none;
                            &>li{
                                padding: 4px 8px;
                                background-color: rgb(230, 230, 230);
    
                                &:nth-child(odd){
                                    background-color: rgb(209, 209, 209);;
                                }
                            }
    
                        }
                    }
                }
            }

            .sale{
                display: flex;
                justify-content: space-between;
                align-items: center;
                flex-wrap: wrap;
                
                .item{
                    font-weight: 700;
                    display: flex;
                    justify-content: start;
                    align-items: center;
                    line-height: 20px;
                    width: 64%;

                    .icon{margin-right: 10px;}

                    .entity{
                        text-overflow: ellipsis;
                        max-width: 49%;
                        display: inline-block;
                        white-space: nowrap;
                        overflow: hidden;
                        vertical-align: middle;
                    }

                    .price {
                        color: var(--e-global-color-accent);
                        &::before{
                            content: '$';
                        }
                    }
                }
                .submit {
                    padding: 12px 17px;
                    background-color: var(--e-global-color-primary);
                    border-radius: 5px;
                    font-weight: 700;
                    color: white;
                    cursor: pointer;

                    &:hover{
                        background-color: var(--e-global-color-accent);
                    }
                }
                .note {
                    font-size: 11px;
                    font-weight: 700;
                    margin-top: 20px;
                }
            }
        }
        /* display: none; */
    }
    .no-data{
        display: none;
        justify-content: center;
        align-items: center;
        height: 100%;
    }
}

/* TOOLTIP */
#mapToolTip {
    position: absolute;
    background: #FFF;
    color: var(--e-global-color-text);
    padding: 15px;
    border-radius: 10px;
    font-size: 14px;
    pointer-events: none;
    box-shadow: 0 0 10px rgba(0, 0, 0, 0.2);
    display: none;
    z-index: 100;
    height: 170px;
    width: 250px;
    align-items: center;
    justify-content:center;
    opacity: 0;
    transition: opacity 0.5s;
    

    .tooltip-container{
        width: 250px;
        display: flex;
        /* justify-content:center; */
        align-items: center;
        flex-wrap: wrap;

        .thumb {
            width: 79px;
            height: 79px;
            padding:12px;
            border-radius: 10px;
            border:solid 1px #BABABA;
            margin-right: 10px;

            svg {
                width: 100%;
                height: 100%;

                path{
                    fill: var(--e-global-color-primary) !important;
                    /* stroke: var(--e-global-color-primary) !important; */
                    stroke-width: 0;
                }
            }
        }

        .info {
            width: calc(100% - 89px);
            &>.description{
                font-weight: 600;
                font-size: 16px;
            }
        }

        .data {
            width: 100%;
            display: flex;
            justify-content: space-around;
            margin-top: 12px;

            .title{
                font-weight: 600;
            }
        }
    }

    .notFound{
        display: none;
        margin:0;
    }
}

#pointer{
    position: absolute;
    z-index: 101;
    display: none;

    &:hover{
        cursor: pointer;
    }
}

#map-messages{
    position: fixed;
    z-index: 1000;
    top: 20px;
    left: 0px;
    width: 100%;

    .container{
        margin: auto;
        width: 1440px;
    }

    .message-box{
        margin-top: 5px;
        padding: 15px;
        background-color: white;
        border:solid 1px lightgrey;
        display: none;
        justify-content: space-between;
        align-items: center;
        box-shadow: 2px 2px 10px lightgrey;

        &[data-type='success']{
            border-left: solid 5px var(--e-global-color-accent);
        }

        &[data-type='error']{
            border-left: solid 5px red;
        }

        &[data-type='info']{
            border-left: solid 5px var(--e-global-color-primary);
        }

        p{margin: 0px;}
        .close-btn{
            cursor:pointer;
            padding:4px 5px;
            cursor: pointer;
            padding: 1px 12px;
            font-size: 17px;
            color: var(--e-global-color-primary);

            &:hover{
                color: var(--e-global-color-accent);
            }
        }
    }
}

/* BASIC GRID SYSTEM */
#app-container {
    .container {
        width: 100%;
        display: flex;
        flex-wrap: wrap;
    }

    .row {
        width: calc(100% + 30px);
        display: flex;
        flex-wrap: wrap;
        margin: -15px;
    }

    [class*="col-"] {
        padding: 15px;
        flex: 1;
        min-width: 0;
    }

    /* Define 12 Columns */
    .col-1 { width: auto; max-width: 8.33%; }
    .col-2 {  width: auto; max-width: 16.66%; }
    .col-3 { width: auto; max-width: 25%; }
    .col-4 {  width: auto; max-width: 33.33%; }
    .col-5 {  width: auto; max-width: 41.66%; }
    .col-6 { width: auto;max-width: 50%; }
    .col-7 {  width: auto; max-width: 58.33%; }
    .col-8 {  width: auto; max-width: 66.66%; }
    .col-9 { width: auto; max-width: 75%; }
    .col-10 {  width: auto; max-width: 83.33%; }
    .col-11 {  width: auto; max-width: 91.66%; }
    .col-12 { width: auto; max-width: 100%; }



    /* Responsive Breakpoints */
    @media (max-width: 768px) {
        [class*="col-"] {
            flex: 0 0 100%;
            max-width: 100%;
        }
    }
}

/* VARIOUS */

.lds-ring,
.lds-ring div {
    box-sizing: border-box;
}
.lds-ring {
    display: inline-block;
    position: relative;
    width: 80px;
    height: 80px;
}
.lds-ring div {
    box-sizing: border-box;
    display: block;
    position: absolute;
    width: 64px;
    height: 64px;
    margin: 8px;
    border: 8px solid var(--e-global-color-primary);
    border-radius: 50%;
    animation: lds-ring 1.2s cubic-bezier(0.5, 0, 0.5, 1) infinite;
border-color: var(--e-global-color-primary) transparent transparent transparent;
}
.lds-ring div:nth-child(1) {
    animation-delay: -0.45s;
}
.lds-ring div:nth-child(2) {
    animation-delay: -0.3s;
}
.lds-ring div:nth-child(3) {
    animation-delay: -0.15s;
}
@keyframes lds-ring {
    0% {
        transform: rotate(0deg);
    }
    100% {
        transform: rotate(360deg);
    }
}

.info-loader{
    display: none;
    justify-content: center;
    align-items: center;
    height: 100%;
    width: 100%;
    position: absolute;
    top: 0px;
    left: 0px;
    z-index: 50;
}