/* TCC - Mobilidade no Atendimento de Doenças Infecciosas - Styles */

body {
    font-family: 'Arial', sans-serif;
    display: flex;
    justify-content: center;
    align-items: center;
    flex-direction: column;
    background-color: #f0f0f0;
    color: #333;
}

h1, h4 {
    text-align: center;
    color: #333;
}

h2 {
    border-top: 2px solid #e0e0e0;
    padding-top: 40px;
    margin-top: 40px;
    width: 800px;
}

/* --- Navigation Styles --- */
.navigation {
    position: fixed;
    top: 20px;
    right: 20px;
    z-index: 1000;
}

.nav-button {
    padding: 10px 20px;
    font-size: 14px;
    cursor: pointer;
    border: 2px solid #0074D9;
    background-color: #0074D9;
    color: white;
    border-radius: 6px;
    text-decoration: none;
    display: inline-block;
    transition: all 0.3s ease;
    font-weight: bold;
}

.nav-button:hover {
    background-color: #fff;
    color: #0074D9;
}

/* --- Intro text styles --- */
.intro-text {
    max-width: 800px;
    margin: 20px auto 30px auto;
    text-align: justify;
    line-height: 1.6;
    color: #444;
}

.intro-text h3 {
    color: #333;
    border-bottom: 1px solid #ccc;
    padding-bottom: 5px;
    margin-top: 25px;
    margin-bottom: 15px;
    font-size: 1.3em;
}

.intro-text ul {
    list-style-position: inside;
    padding-left: 10px;
}

.intro-text li {
    margin-bottom: 10px;
}

/* --- Map and chart styles --- */
#map, #histogram, #choropleth {
    border: 1px solid #ccc;
    background-color: #fff;
}

.municipality {
    stroke: #fff;
    stroke-width: 0.5px;
    cursor: pointer;
}

.community-municipality.selected,
.selected {
    fill: #0074D9 !important;
    stroke: #fff;
    stroke-width: 1.5px;
}

.community-municipality.selected {
    stroke: #000;
    stroke-width: 1.5px;
    stroke-opacity: 1;
    fill-opacity: 1;
}

.community-municipality:not(.selected).dimmed {
    fill-opacity: 0.3;
}

.municipality:hover {
    fill: #f2a03d;
}

.connection-line {
    stroke: #ff4136;
    stroke-opacity: 0.6;
    stroke-width: 1.5;
    fill: none;
    pointer-events: none;
}

/* --- Controls styles --- */
.controls {
    margin-bottom: 15px;
    text-align: center;
}

.controls button {
    padding: 8px 15px;
    font-size: 14px;
    cursor: pointer;
    border: 1px solid #aaa;
    background-color: #eee;
    border-radius: 4px;
    margin: 0 5px;
}

.controls button.active {
    background-color: #0074D9;
    color: white;
    border-color: #0074D9;
}

/* --- Container styles --- */
.map-container {
    position: relative;
    width: 800px;
    height: 600px;
    margin-top: 24px;
    margin-bottom: 24px;
}

.map-container .controls {
    position: absolute;
    margin: 0;
    z-index: 10;
    background: rgba(255,255,255,0.9);
    border-radius: 6px;
    box-shadow: 0 2px 6px rgba(0,0,0,0.07);
    padding: 5px 10px;
}

.map-container .controls-left {
    top: 10px;
    left: 10px;
}

.map-container .controls-right {
    top: 10px;
    right: 10px;
}

.histogram-container {
    position: relative;
    width: 800px;
    height: 400px;
    margin-top: 24px;
    margin-bottom: 24px;
}

.histogram-container .controls-right {
    position: absolute;
    top: 10px;
    right: 10px;
    z-index: 10;
    background: rgba(255,255,255,0.9);
    border-radius: 6px;
    padding: 5px 10px;
    display: flex;
    align-items: center;
    gap: 8px;
}

/* --- Community info styles --- */
#community-info {
    margin-top: 20px;
    padding: 10px;
    background: #f8f8f8;
    border: 1px solid #ddd;
    border-radius: 5px;
}

/* =========================================
   MULTI-SELECT DROPDOWN STYLES
   ========================================= */

/* The main container for the dropdown */
.multiselect {
    position: relative;
    font-family: 'Arial', sans-serif;
    width: 250px; /* Fixed width for the dropdown */
    user-select: none;
    background-color: white;
}

/* The box you click to open the menu */
.selectBox {
    position: relative;
    cursor: pointer;
    border: 1px solid #ccc;
    border-radius: 4px;
    background-color: #fff;
    padding: 8px;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

/* The text inside the box */
.multiselect-display {
    font-size: 14px;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    color: #333;
    max-width: 220px;
}

/* The down arrow */
.selectBox::after {
    content: "▼";
    font-size: 10px;
    color: #666;
    margin-left: 8px;
}

/* The hidden list of checkboxes */
.checkboxes {
    display: none; /* Hidden by default */
    border: 1px solid #ccc;
    border-top: none;
    position: absolute;
    top: 100%; /* Push it exactly below the selectBox */
    left: 0;
    right: 0;
    background-color: white;
    z-index: 10000; /* Ensure it floats on top of maps/charts */
    max-height: 300px;
    overflow-y: auto;
    box-shadow: 0 4px 8px rgba(0,0,0,0.15);
    border-radius: 0 0 4px 4px;
}

/* When the .show class is added via JS, make it visible */
.checkboxes.show {
    display: block !important;
}

/* The individual items in the list */
.checkboxes label {
    display: block; /* Force vertical list */
    padding: 8px 10px;
    cursor: pointer;
    border-bottom: 1px solid #eee;
    font-size: 13px;
    margin: 0;
    text-align: left;
    color: #333;
}

.checkboxes label:hover {
    background-color: #f0f7ff;
    color: #0074D9;
}

.checkboxes label input {
    margin-right: 8px;
    transform: scale(1.1); /* Make checkboxes slightly larger */
}