/************CRIMINAL CHECKS*******/
.flex-mapicon-container {
    display: flex;
    flex-wrap: wrap; /* Allows items to wrap on smaller screens */
    align-items: flex-start; /* Aligns items at the top */
    padding: 10px;
    background: #fff;
    gap: 10px; /* Increased gap for better spacing */
    box-sizing: border-box; /* Ensures padding is included in width calculations */
}

.flex-mapicon-container .crim-filter-div {
    flex: 1 1 300px; /* Allows flexible resizing with a minimum width */
    max-width: 100%; /* Prevents the div from overflowing */
    height: 475px;
    border-radius: 2px;
    border: 1px solid #D9D9D9;
    padding: 10px;
    line-height: 25px;
    box-sizing: border-box;
}

.flex-mapicon-container .crim-map-div {
    flex: 2 1 800px; /* Allows resizing but prioritizes this div for space */
    max-width: 100%; /* Prevents the div from overflowing */
    height: auto; /* Let the height adapt naturally */
    min-height: 430px; /* Ensure a minimum height */
    border: 1px solid #D9D9D9;
    padding: 10px;
    background-color: #ffffff;
    box-sizing: border-box;
}

.map-header {
    color: #000;
    font-size: 12px;
    font-style: normal;
    font-weight: 600;
    line-height: 30px;
    /* margin-left: 10px; */
}
.pr-map-header{
    display: flex;
    justify-content: space-between;
    align-items: center;
    color: #000;
    font-size: 12px;
    font-style: normal;
    font-weight: 600;
    line-height: 30px;

}
.download-link img {
    width: 20px;
    height: 20px;
    transition: transform 0.2s ease;
}

.download-link img:hover {
    transform: scale(1.25); /* Grows to 25x25 smoothly */
}
.dirlink {
    color: #000000;
    text-decoration: none;
    font-size: 12px;
    font-weight: normal;
    line-height: 20px;
}

 
/************CRIMINAL CHECKS*******/
/*********GRD**********/
.flex-grd-container{
    display: flex;
    align-items: stretch;
    padding: 10px;
    background: #fff;
    width:100%;
    gap:5px;
}
.flex-grd-container .filter-div{
    border-radius: 2px;
    width: 200px;
    min-height:460px; 
    border: 1px solid #D9D9D9;
    padding:10px;
    line-height:25px;
}
.flex-grd-container .map-div{
    border: 1px solid #D9D9D9;
    width: 800px;
    height: 500px;
    flex-shrink: 0;
    padding:10px;
}

.flex-resmapicon-container{
    display: flex;
    align-items: stretch;
    padding-left: 10px;
    padding-right:10px;
    background: #fff;
    width:100%;
    gap:5px;
}
.flex-resmapicon-container .res-scroll-div{
    min-height: 200px;
    max-height:430px;
    overflow-x:hidden;
    overflow-y:auto;
    border: 1px solid #D9D9D9;
    padding:10px;
    width:100%;
}

.flex-resmapicon-container .chart-scroll-div {
    min-height: 200px;
    max-height: 430px;
    display: flex;
    align-items: center;justify-content: center;
    border: 1px solid #D9D9D9;
    padding: 10px;
    width: 100%;
    box-sizing: border-box;
    overflow: hidden; /* Prevent content overflow */
    position: relative; /* Ensure positioning context for child elements */
}

.flex-resmapicon-container .chart-scroll-div canvas, 
.flex-resmapicon-container .chart-scroll-div svg {
    max-width: 100%; /* Prevent chart from overflowing horizontally */
    max-height: 100%; /* Prevent chart from overflowing vertically */
    object-fit: contain; /* Maintain aspect ratio while fitting */
    display: block; /* Avoid inline element spacing issues */
    margin: auto; /* Center the chart within the container */
}
.flex-resmapicon-container .res-filter-div{
    border-radius: 2px;
    /* height:460px; */
    width: 200px;
    /* border: 1px solid #D9D9D9; */
    /* padding:10px; */
    line-height:25px;
}
.flex-resmapicon-container .res-map-div{
    /* border: 1px solid #D9D9D9; */
    width: 800px; 
    /* height: 460px; */
    flex-shrink: 0;
    /* padding:10px; */
}
.flex-mapicon-container .notesfilter-div{
    border-radius: 2px;
    min-height:460px; 
    /* border: 1px solid #D9D9D9; */
    padding:10px;
    line-height:25px;
}

.notepopup {
    position: fixed;
    display:block;
    background-color: #fff;
    border: 1px solid #ccc;
    padding: 10px;
    box-shadow: 0 0 10px rgba(0, 0, 0, 0.1);
    z-index: 1000;
    width: 500px;
    border-radius: 5px;
    min-height: auto;   /* Minimum height */
    max-height: 400px;   /* Maximum height */
    overflow-y: auto; 
}

.notepopup .note-footer{
    text-align: right;
    margin-top:10px;
}

.notes-scroll{
    padding-top:5px;
    min-height:auto;
    max-height:100px;
    overflow-x:hidden;
    overflow-y:auto;
}

/* canvas#radarChart {
    max-width: 100%;
    height: auto; 
    display: block; 
} */
/* Responsive styling */


@media (max-width: 1200px) {
    .flex-mapicon-container {
        flex-direction: column;
        width: 100%;
    }

    .flex-mapicon-container .crim-filter-div,
    .flex-mapicon-container .crim-map-div {
        width: 100%; /* Ensures full width for smaller screens */
    }
    #vmap{ width: 100%; height: auto;}
}

@media (max-width: 800px) {
    .flex-mapicon-container {
        flex-direction: column;
        gap: 5px; /* Reduced gap for smaller screens */
    }

    .flex-mapicon-container .crim-filter-div {
        height: auto; /* Makes height flexible for smaller screens */
    }

    .flex-mapicon-container .crim-map-div {
        height: 400px; /* Slightly adjusted height for smaller screens */
    }

    .map-header {
        font-size: 0.9rem; /* Scaled down font size */
    }

    .dirlink {
        font-size: 0.8rem; /* Scaled down link font size */
    }
   
    .flex-grd-container,
    .flex-resmapicon-container {
        flex-direction: column;
    }

    .flex-grd-container .filter-div,
    .flex-resmapicon-container .res-filter-div,
    .flex-grd-container .notesfilter-div,
    .flex-resmapicon-container .res-scroll-div {
        width: 100%; /* Full width for smaller screens */
        margin-top: 5px;
        flex-direction: column;
    }

    .flex-grd-container .map-div,
    .flex-resmapicon-container .res-map-div {
        width: 100%;
        height: auto; /* Adjust height for smaller screens */
        margin-top: 5px;
    }

    .flex-grd-container .notesfilter-div {
        margin-bottom: 5px;
    }

    #vmap {
        max-width: 100%; /* Full width for smaller screens */
        aspect-ratio: 1 / 1; /* Slightly adjusted aspect ratio */
        height : auto;
    }
    .flex-url-container{
        width: 100%;
        height: auto; /* Adjust height for smaller screens */
        flex-direction: column;
    }
}

@media (max-width: 480px) {
    .flex-mapicon-container {
        flex-direction: column;
        width: 100%;
        padding: 5px; /* Reduced padding for very small screens */
    }

    .map-header {
        font-size: 0.8rem; /* Further scaled down font size */
    }

    .dirlink {
        font-size: 0.7rem; /* Smallest font size for compact displays */
    }
    #vmap {
        border: none; 
        aspect-ratio: 1 / 1;
    }
    .flex-grd-container,
    .flex-resmapicon-container {
        padding: 5px; /* Reduced padding for smaller screens */
    }

    .notepopup {
        max-width: 90%; /* Ensure it fits within smaller screens */
    }
    .flex-url-container{
        width: 100%;
        height: auto; /* Adjust height for smaller screens */
        flex-direction: column;
    }
}
