.container {
    max-width: 1400px;
    margin: 0 auto;
    padding: 20px;
}

.dashboard {
    display: flex;
    flex-direction: column;
    gap: 20px;
    height: auto;
    min-height: 500px;
}

@media (min-width: 768px) {
    .dashboard {
        flex-direction: row;
        height: 80vh;
        min-height: 500px;
    }
}

#luxmap {
    flex: 1;
    min-height: 400px;
    height: 400px;
    border-radius: 8px;
    box-shadow: 0 0 10px rgba(0,0,0,0.1);
    display: flex;
    flex-direction: column;
}

@media (min-width: 768px) {
    #luxmap {
        height: 100%;
    }
}

#details-panel {
    width: 100%;
    padding: 20px;
    min-height: 400px;
    border-radius: 8px;
    box-shadow: 0 0 10px rgba(0,0,0,0.1);
    overflow-y: auto;
    display: flex;
    flex-direction: column;
}

.dark #details-panel {
    box-shadow: 0 0 10px rgba(255,255,255,0.1);
}


@media (min-width: 768px) {
    #details-panel {
        width: 400px;
        flex: 1;
    }
}

#commune-name {
    font-size: 1.5em;
    font-weight: bold;
    margin-bottom: 20px;
}

.stat-group {
    margin-bottom: 20px;
}

.stat-group h3 {
    margin-bottom: 10px;
    /* color: #333; */
}

#nationality-list {
    max-height: 400px;
    overflow-y: auto;
}

.nationality-item {
    display: flex;
    justify-content: space-between;
    padding: 5px 0;
    border-bottom: 1px solid #ddd;
}

.region-stat {
    display: flex;
    justify-content: space-between;
    padding: 5px 0;
    font-weight: bold;
}

.tooltip {
    background: white;
    padding: 10px;
    border-radius: 4px;
    box-shadow: 0 0 10px rgba(0,0,0,0.1);
}

.header {
    display: flex;
    flex-direction: column;
    gap: 10px;
    margin-bottom: 20px;
}

@media (min-width: 768px) {
    .header {
        flex-direction: row;
        justify-content: space-between;
        align-items: center;
    }
}

.controls {
    display: flex;
    flex-direction: column;
    gap: 10px;
}

@media (min-width: 768px) {
    .controls {
        flex-direction: row;
        gap: 20px;
    }
}

.control-group {
    display: flex;
    gap: 10px;
    align-items: center;
}

#language-selector,
#filter-type,
#filter-value {
    padding: 8px;
    font-size: 16px;
    border-radius: 4px;
    border: 1px solid #ccc;
}

label {
    font-weight: bold;
}

.legend {
    padding: 6px 8px;
    background: white;
    background: rgba(255,255,255,0.9);
    box-shadow: 0 0 15px rgba(0,0,0,0.2);
    border-radius: 5px;
    line-height: 1.5;
}

.legend h4 {
    margin: 0 0 5px;
    color: #777;
}

.legend i {
    display: inline-block;
    width: 20px;
    height: 20px;
    vertical-align: middle;
    margin-right: 4px;
    opacity: 0.7;
}

.legend div {
    display: flex;
    align-items: center;
    margin: 2px 0;
}

.legend-note {
    border-bottom: 1px solid #ccc;
    margin-bottom: 6px !important;
    padding-bottom: 6px;
}
