@import url('https://fonts.googleapis.com/css2?family=Young+Serif&display=swap');
html, body {
    height: 100%;
    margin: 0;
    font-family: 'Young Serif', serif;
    background-color: #cbeaf7;
    color: #0a4a7a;
}

text {
    fill: #0a4a7a;
    font-size: 12px;
}

select {
    color: #0a4a7a;
}

button {
    color: #0a4a7a;
}

body {
    width: 100%;
    height: 100%;
    display: flex;
    flex-direction: column;
    border: 12px solid #0a4a7a;
    box-sizing: border-box;
}

#processbook {
    width: 70%;
    display: block;
    margin-left: auto;
    margin-right: auto;
    height: auto;
}

#link-to-map {
    text-align: center;
}

.border-style {
    border: 2px solid #0a4a7a;
    border-radius: 16px;
    background-color: #cbeaf7;
}


h2 {
    font-weight: 700;
    margin: 0 0 0;
    color: #0a4a7a;
    text-align: center;
}


h3 {
    text-align: center;
    margin: 0 0 0;
    color: #0a4a7a;
    font-weight: 700;
}

h4 {
    margin: 0 0 1px;
}


.section {
    border: 3px solid #0a4a7a;
    border-radius: 16px;
    padding: 10px;
    margin-bottom: 20px;
    background-color: #cbeaf7;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.08);
}
.section p {
    margin: 8px 0 12px;
}


a {
    color: #0a4a7a;
    text-decoration-color: #0a4a7a;
    text-underline-offset: 2px;
    font-size: 1.1em;
    font-weight: 600;
}

.filter-group {
    margin-bottom: 18px;
    align-items: center;
    display: flex;
    flex-direction: column;
}

.filter-group label {
    font-weight: 600;
    margin-bottom: 2px;
    font-size: 1.4em;
}

.filter-group select {
    width: 100%;
    padding: 4px;
    border-radius: 6px;
    font-size: 1.3em;
    background-color: #ffffff;
    text-align: center;
    font-family: 'Young Serif', serif;
}

button {
    background-color: #ffffff;
    padding: 8px;
    border-radius: 6px;
    border: 1px solid black;
    font-size: 1.3em;
    text-align: center;
}

img {
    display: block;
    margin: 10px auto;
    width: 60%;
    max-width: 600px;
    height: auto;
    border-radius: 6px;
}

table {
    width: 100%;
    border-collapse: collapse;
    margin: 15px 0;
}

table, th, td {
    border: 1px solid black;
}

#processbook {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
}


#header h1 {
    text-align: center;
    color: #0a4a7a;
    margin: 0 0 10px;
    font-size: 3.5em;
    font-weight: 900;
}


#dashboard-container {
    align-items: center;
    display: flex;
    flex-direction: column;
    height: 100%;
    margin: 5px;
    background-color: #cbeaf7;
}

#controls {
    display: flex;
    flex-direction: row;
    align-items: center;
    height: 10%;
    gap: 10px;
    justify-content: center;
    width: 100%;
    font-size: 12px;
    gap: 6px;
}

#filters {
    display: flex;
    flex-direction: row;
    gap: 5px;
}

#controls h2 {
    color: black;
    margin-top: 0;
    font-size: 1.3em;
    align-items: center;
}

#map {
    height: 100%;
    width: 57%;
    border-radius: 8px;
    margin-bottom: 10px;
    background-color: white;
}

#map-and-charts {
    display: flex;
    flex-direction: row;
    align-items: center;
    width: 100%;
    height: 100%;
}

#map-and-charts {
    display: flex;
    flex-direction: row;
    align-items: center;
    width: 100%;
    height: 100%;
}

.milestone img {
    width: 100%;
    max-width: 1400px;
    height: auto;
    margin: 0 auto;
    display: block;
}


#line-graph-container {
    text-align: center;
    display: flex;
    flex-direction: column;
    align-items: center;
    width: 100%;
    height: 35%;
    background-color: #cbeaf7;
}


#bar-title-and-controls {
    display: flex;
    flex-direction: row;
    justify-content: center;
    align-items: center;
    gap: 10px;
    width: 100%;
    height: 12%;
    background-color: #cbeaf7;
}


#bar-chart-container {
    text-align: center;
    display: flex;
    flex-direction: column;
    align-items: center;
    width: 100%;
    height: 65%;
    background-color: #cbeaf7;
}

#bar-chart-controls label {
    font-weight: 600;
    margin-bottom: 2px;
    font-size: 1em;
    color: #0a4a7a;
}

#bar-chart-controls select {
    padding: 4px;
    border-radius: 6px;
    font-size: 1em;
    background-color: #ffffff;
    text-align: center;
    border: none;
    font-family: 'Young Serif', serif
}

#line-graph-container > svg {
    background-color: white;
}

#bar-chart {
    width: 97%;
    height: 100%;
    background-color: white;
}

#charts-div {
    display: flex;
    flex-direction: column;
    justify-content: center;
    width: 50%;
    height: 100%;
}

.crime-cluster {
    border-radius: 50%;
    text-align: center;
    color: white;
    font-weight: bold;
    font-size: 1.2em;
    border: 3px solid #fff;
    display: flex;
    align-items: center;
    justify-content: center;
}

#maps-and-charts {
    display: flex;
    flex-direction: row;
    align-items: center;
    width: 100%;
    gap: 20px;
}

#loading-overlay {
    position: fixed;
    inset: 0;
    background: rgba(255, 255, 255, 0.9);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 2000;
}

#loading-overlay.hidden {
    display: none;
}

.loading-content {
    text-align: center;
}

#loading-text {
    margin-bottom: 12px;
    font-size: 3.0rem;
    color: black;
}

.loading-bar {
    width: 360px;
    height: 8px;
    background: white;
    border-radius: 999px;
    overflow: hidden;
    margin: 0 auto;
}

.loading-bar-inner {
    width: 30%;
    height: 100%;
    background: #0a4a7a;
    border-radius: 999px;
    animation: loadingBarMove 1.1s infinite ease-in-out;
}

@keyframes loadingBarMove {
    0% {
        transform: translateX(-100%);
    }
    50% {
        transform: translateX(0%);
    }
    100% {
        transform: translateX(100%);
    }
}

#choropleth-loading {
    margin-top: 8px;
    font-size: 1.4em;
    font-weight: bold;
}

#choropleth-loading.hidden {
    display: none;
}

.small-loading-bar {
    width: 200px;
    height: 6px;
    background: white;
    border-radius: 999px;
    overflow: hidden;
    margin-top: 4px;
}

.small-loading-inner {
    width: 30%;
    height: 100%;
    background: #0a4a7a;
    border-radius: 999px;
    animation: loadingBarMove 1s infinite ease-in-out;
}

.legend-row {
    display: flex;
    align-items: center;
    gap: 8px;
    margin: 4px 0;
}

.legend-icon {
    display: inline-block;
    margin: 0;
    width: 24px;
    height: 24px;
    flex-shrink: 0;
}

.choropleth-color-bar {
    display: flex;
    gap: 4px;
    margin: 8px 0;
}

.choropleth-color-bar span {
    flex: 1;
    height: 22px;
    border-radius: 4px;
}

.choropleth-legend-labels {
    display: flex;
    justify-content: space-between;
    font-size: 0.9rem;
    margin-top: 4px;
    font-family: 'Young Serif', serif;
}

.info.legend {
    background: white;
    border-radius: 8px;
    padding: 12px 16px;
    box-shadow: 0 2px 6px #0a4a7a;
    font-size: 0.95rem;
    min-width: 180px;
    font-family: 'Young Serif', serif;
}
#bar-tooltip {
    position: fixed;          
    padding: 6px 10px;
    font-size: 12px;
    background: white;
    border: 2px solid #0a4a7a;
    border-radius: 6px;
    pointer-events: none;     
    display: none;            
    color: #0a4a7a;
    font-weight: bold;
    z-index: 9999;           
    box-shadow: 0px 2px 6px rgba(0,0,0,0.15);  
}

#help-popup {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.25);  
    display: flex;
    justify-content: center;
    align-items: center;
    z-index: 3000;
}

#help-popup-content {
    background: rgba(255, 255, 255, 0.9);  
    color: #0a4a7a;
    border: 2px solid #0a4a7a;
    border-radius: 14px;
    padding: 16px 20px;
    width: 320px;          
    max-width: 85%;
    box-shadow: 0px 4px 10px rgba(0,0,0,0.18);
    font-size: 0.95em;
    position: relative;
}

#help-popup-content h3 {
    margin-top: 0;
    font-size: 1.25em;
    font-weight: 700;
    text-align: center;
}

#help-popup-content p {
    font-size: 1em;
    line-height: 1.4em;
    margin-bottom: 0.6em;
}

#help-close-btn {
    position: absolute;
    top: 6px;
    right: 10px;
    background: none;
    border: none;
    font-size: 1.2em;
    color: #0a4a7a;
    cursor: pointer;
    font-weight: bold;
}
#help-close-btn:hover {
    color: red;      
}

#help-close-btn:active {
    color: white;     
    background: #0a4a7a;
    border-radius: 4px;
    padding: 2px 6px;
}

.leaflet-tooltip {
    font-family: 'Young Serif', serif;
}

