body {
    margin: 0;
    padding: 0;
    font-family: Arial, sans-serif;
    overflow: hidden;
    height: 100vh;
    width: 100vw;
}
.header {
    background-color: #FFA500;
    color: white;
    height: 50px;
    display: flex;
    align-items: center;
    flex-direction: row;

    /* put the header to the left */
    /* align-items: flex-end;
    justify-content: flex-start; */
}

#logo {
    width: 100px;
}

.title-container {
    display: flex;
    align-items: center;
    flex-grow: 1;
    flex-direction: column;
    margin-left: 100px;
}

.title {
    /* font-size: 1.8rem; */
    font-size: 1.4rem;
    font-weight: 700;
    line-height: 1.6rem;
    margin-left: 10px;
}
.subtitle {
    font-size: 0.8rem;
    margin-left: 5px;
}

/**
 * styles for form panel at the left
 */

#sidebar {
    background-color: #F8F9FA;
    /* padding: 20px; */
    height: 95vh;
    overflow-y: auto;
    width: 19%;
    /* transition: width 0.5s ease;  */
}
#fold-sidebar-btn {
    float: right;
    margin: 5px 0;
    border: none;
    padding: 2px;
}
#expand-sidebar-btn {
    display: none;
    position: absolute;
    border: none;
    left: 0px;
    padding: 2px;
    margin: 5px 0;
}
.bi-arrow-bar-left, .bi-arrow-bar-right{
    font-size: 18px;
}
#sidebar.folded {
    width: 0;
    overflow: hidden; 
    /* transition: width 0.5s ease;  */
}

/* .sidebar-main-content{
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    height: 90%;
} */
.filter-form{
    display: flex;
    flex-direction: column;
    overflow-y: auto;
    height: 77vh;
    
}
.form-text {
    margin: 5px 0;
    border: var(--bs-border-width) solid var(--bs-border-color);
    font-size: 14px;
    width: 100%;
}
.form-label {
    margin-bottom: 0 ;
    font-size: 14px ;
    font-weight: 600 ;
}
/* Style for the nav-tabs */
.nav-tabs {
    margin-bottom: 10px;
    background-color: #FBF8F1;
}

/* Style for the nav-item */
.nav-item {
    position: relative; /* Allows absolute positioning inside the li */
}

/* Style for the close button inside the tab */
.nav-item .btn-close {
    position: absolute;
    right: 0;
    top: 50%;
    transform: translateY(-50%);
    z-index: 2;
    font-size: 0.5rem;
}


/* Active tab link styling */
.nav-link.active {
    background-color: transparent !important; 
    border-color: transparent !important; 
    /* border-bottom: 2px solid #B10026;  */
    color: #B10026 !important; 
}

#add-dataset-btn {
    display: block;
    padding: 8px 16px;
    cursor: pointer;
}

#extra-functions {
    position: absolute;
    bottom: 0.5rem;
}
.btn-sm {
    font-size: 12px;
}

#visualization-content {
    /* padding: 5px; */
    height: 95vh;
    display: flex;
    flex-direction: column;
    flex: 1;
}

#filterByNumber{
    font-size: 12px;
}

/**
 * styles for the extra-info panel at the right
 */
#extra-info {
    /* background-color: #F8F9FA; */
    width: 250px;
    height: 120px;
    overflow-y: auto;
    /* display: flex; */
    /* flex-direction: column; */
    /* float: left; */
    position: absolute;
    bottom: 320px;
    right: 7px;
    font-size: 14px;
    z-index: 1000;
}


.dialog {
    display: none; /* Hidden by default */
    position: fixed; /* Stay in place */
    z-index: 1000; /* Sit on top */
    left: 0;
    top: 0;
    width: 100%; /* Full width */
    height: 100%; /* Full height */
    overflow: auto; /* Enable scroll if needed */
    background-color: rgb(0,0,0); /* Fallback color */
    background-color: rgba(0,0,0,0.4); /* Black w/ opacity */
}

.dialog-content {
    background-color: #fefefe;
    margin: 15% auto; /* 15% from the top and centered */
    padding: 20px;
    border: 1px solid #888;
    width: 40%;
    border-radius: 10px;
}

#export-map-btn,#export-csv-btn {
    background-color: #FFA500;
    border: #FFA500;
}
.close-button {
    color: #aaa;
    float: right;
    font-size: 22px;
    font-weight: bold;
}
.chart-close-button {
    color: #aaa;
    float: right;
    font-size: 18px;
    font-weight: bold;
}

.close-button:hover,
.close-button:focus,
.chart-close-button:hover,
.chart-close-button:focus {
    color: black;
    text-decoration: none;
    cursor: pointer;
}


/**
 * styles for the map
 */
#middle-content {
    display: flex;
    flex-direction: column;
    align-items: center;
    margin-top: 10px;
}
#map {
    height: 60vh;
    width: 100%;
}
.leaflet-container {
    background-color: #ffffff;
}
.leaflet-touch .leaflet-control-layers, .leaflet-touch .leaflet-bar {
    border: 1px solid #ccc;
}
.leaflet-touch .leaflet-control-layers-toggle {
    width: 30px;
    height: 30px;
}
.leaflet-retina .leaflet-control-layers-toggle {
    background-size: 20px 20px;
}
.leaflet-bottom{
    z-index: 999;
}
#map-title{
    font-size: 18px;
    font-weight: 600;
    /* color: #FFA500; */
}
.leaflet-control {
    margin-top: 0.3rem !important;
}
.leaflet-right.leaflet-top{
    display: flex;
}
.leaflet-control-layers,.map-tool-container{
    width: 30px;
    height: 30px;
    background-color: #ffffff;
    z-index: 1000;
}
.leaflet-control-attribution{
    overflow-y: auto;
    max-height: 14px;
    font-size: 10px;
}
.map-tool-container {
    display: flex;
    justify-content: center;
    align-items: center;
    border: 1px solid #ccc;
    border-radius: 4px;
    cursor: pointer;
}
.map-tool-container.active {
    background-color: #ddd;
}
/* #map-color-tool {
    position: absolute;
    left: 10px;
    top: 80px;
} */
#color-theme-box,.leaflet-control-layers-list{
    position: absolute !important;
    top: 0px;
    right: 0px;
    background-color: rgb(255, 255, 255);
    border: 1px solid #ccc;
    padding: 10px 15px;
    z-index: 1000;
    width: 10rem;
    border-radius: 4px;
}
#close-color-theme-box {
    position: absolute;
    top: 5px;
    right: 5px; 
}
.box-title {
    margin-bottom: 10px;
    font-size: 14px;
    font-weight: 600;  
}
#color-theme-select {
    padding-top: .25rem;
    padding-bottom: .25rem;
    padding-left: .5rem;
    font-size: .875rem;
    border-radius: #ccc;
    width: 100%;
}
#gradient-color-box {
    width: 100%;
    height: 20px;
    margin-top: 10px;
    border: 1px solid #ccc;
}

.bi-palette{
    font-size: 16px;
}

#map-legend {
    display: flex;
    flex-direction: column;
    max-height: 14rem;
    min-width: 9rem;
    /* width: 200px; */
    overflow-y: auto;
    line-height: 18px;
    color: #555;
}

.legend-group {
    margin: 8px 0;
}
.legend-item {
    display: flex;
    align-items: center;
    margin-bottom: 3px;
}
.map-legend i {
    width: 18px;
    height: 18px;
    float: left;
    margin-right: 8px;
    opacity: 0.7;
}

.legend-divider {
    display: flex;
    height: 10px;
    align-items: center;
    margin-bottom: 3px;
}
.divider-line {
    width: 40%;
    height: 2px;
    background-color: #ccc;
    margin-right: 3px;
}
.divider-text {
    color: #777;
    font-size: 10px;
}

.map-info {
    font: 14px/16px Arial, Helvetica, sans-serif;
    /* width: 18rem; */
    text-align: left;
}
.map-info h4 {
    margin: 0 0 5px;
    color: #777;
}
.map-info, .map-explanation, .map-title, .map-legend{
    padding: 6px 8px;
    background: rgba(255,255,255,0.8);
    border-radius: 5px;
}

.map-explanation {
    width: 16rem;
    max-height: 12rem;
    overflow-y: auto;
}

.data-source {
    position: absolute;
    bottom: 10px;
    left: 30px;
    font-size: 10px;
    padding: 6px 8px;
    background: rgba(255, 255, 255, 0.8);
    border-radius: 5px;
    z-index: 1000;
}
/**
 * styles for the histogram at the bottom
 */

#bottom-content{
    height: 26vh;
    display: flex;
}
#chart-container{
    height: 100%;
    /* width: 30%; */
    /* overflow-y: auto; */
    /* margin-top: 25px; */
    padding: 5px;
}
#histogram-canvas{
    width: 100%;
    height: 100%;
}
/**
 * styles for the table at the bottom
 */
#table-container {
    overflow-y: auto;
    overflow-x: hidden;
    width: 100%;
}
.dataTables_length {
    font-size: 12px;
    float: none !important;
    padding: .5em 0 0 1em;
    display: inline-block;
}
.dataTables_filter {
    font-size: 14px;
    margin: 5px 0;
    float: left !important;
}
.dataTables_filter input {
    height: 25px;
    width: 100px;
}

.table-responsive {
    height: 100%;
    overflow-y: auto;
}

#data-table {
    width: 100%;
    border-collapse: collapse;
    border-spacing: 0;
    border: 1px solid #ddd;
    margin-bottom: 0;
    font-size: 12px;
}

#data-table > thead > tr > th, #data-table > tbody > tr > td {
    text-align: center;
    vertical-align: middle;
}
.dataTables_info {
    font-size: 12px;
}
.dataTables_paginate{
    font-size: 12px;

}
