/* -------------------------------------------------------------------------- */
/* Global Layout                                                               */
/* -------------------------------------------------------------------------- */
html,
body {
    height: 100%;
    margin: 0;
}

body {
    display: flex;
    flex-direction: column;
}

#main-content {
    flex: 1;
}

svg {
    width: 100%;
    height: 100%;
    display: block;
}

/* -------------------------------------------------------------------------- */
/* Buttons                                                                    */
/* -------------------------------------------------------------------------- */
.selectAllBtn {
    padding: 2px 6px;
    border: 1px solid #9ca3af;
    background: white;
    font-size: 1rem;
    cursor: pointer;
    transition: all 0.2s;
}

.selectAllBtn.active {
    background: #111827;
    color: white;
    border-color: #111827;
}

/* -------------------------------------------------------------------------- */
/* Map Containers                                                             */
/* -------------------------------------------------------------------------- */
#mapContainer {
    flex: 1;
    min-height: 0;
    position: relative;
}

#map {
    width: 100%;
    height: 100%;
}

/* -------------------------------------------------------------------------- */
/* Map Legend                                                                 */
/* -------------------------------------------------------------------------- */
#mapLegend {
    position: absolute;
    bottom: 6px;
    right: 8px;
    border-radius: 6px;
    padding: 4px 8px;
    font-size: 0.6rem;
    border: 1px solid #e5e7eb;
}

#mapLegendGradient {
    width: 140px;
    height: 10px;
    margin: 3px 0;
    border-radius: 999px;
    border: 1px solid #e5e7eb;
}

/* -------------------------------------------------------------------------- */
/* D3 Chart Elements                                                          */
/* -------------------------------------------------------------------------- */
.axis path,
.axis line {
    stroke: #9ca3af;
    shape-rendering: crispEdges;
}

.axis text {
    fill: #fff;
    font-size: 0.6rem;
}

.map-province {
    stroke: #9ca3af;
    stroke-width: 0.7;
    cursor: pointer;
}

.map-province:hover {
    stroke: #111827;
    stroke-width: 1;
}

.line-point {
    cursor: pointer;
}

.line-point.selected {
    stroke: #111827;
    stroke-width: 2;
    r: 4;
}

/* -------------------------------------------------------------------------- */
/* Tooltip                                                                    */
/* -------------------------------------------------------------------------- */
#tooltip {
    position: absolute;
    z-index: 1000;
    pointer-events: none;
    background: #000;
    border: 1px solid #ccc;
    padding: 5px;
    border-radius: 4px;
    font-size: 0.8rem;
    box-shadow: 0 2px 4px rgba(0,0,0,0.1);
}
