.leaflet-control-zoom {
    border: 0 !important;
}

.leaflet-control-zoom-in {
    border-bottom: 0 !important;
}

.top-z-index {
    z-index: 999;
}

#legend {
    width: 450px;
}

.legend-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 0.5rem;
}

#legendToggle {
    display: none;
    background: none;
    border: 1px solid #ccc;
    border-radius: 4px;
    padding: 2px 8px;
    cursor: pointer;
    font-size: 0.75rem;
    flex-shrink: 0;
}

@media (max-width: 600px) {
    #legend {
        width: auto;
        max-width: calc(100vw - 2rem);
        top: 0;
        margin-top: 0;
        border-radius: 0;
        display: flex;
        flex-direction: column;
    }

    #legend:has(#legendBody.is-open) {
        height: 100vh;
    }

    #legend .legend-header h1 {
        font-size: 1rem;
    }

    #legendToggle {
        display: block;
    }

    #legendBody {
        display: none;
        overflow-y: auto;
        flex: 1;
    }

    #legendBody.is-open {
        display: block;
    }
}

.title-row {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 0.75rem;
}

.partner-logo img {
    height: 42px;
    width: auto;
    display: block;
}

.info-tip {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    position: relative;
    width: 15px;
    height: 15px;
    border-radius: 50%;
    background: #888;
    color: #fff;
    font-size: 10px;
    font-weight: 700;
    cursor: default;
    vertical-align: middle;
    user-select: none;
}

.info-tip-content {
    display: none;
    position: absolute;
    left: 50%;
    top: calc(100% + 6px);
    transform: translateX(-50%);
    background: #222;
    color: #fff;
    font-size: 0.75rem;
    font-weight: 400;
    line-height: 1.4;
    border-radius: 6px;
    padding: 0.5rem 0.65rem;
    width: 240px;
    z-index: 9999;
    pointer-events: none;
    box-shadow: 0 2px 8px rgba(0,0,0,0.25);
}

.info-tip-content ul {
    margin: 0;
    padding-left: 1rem;
}

.info-tip-content li {
    margin: 0;
}

.info-tip:hover .info-tip-content,
.info-tip:focus .info-tip-content {
    display: block;
}

.view-mode-toggle {
    font-size: 15px;
}

.date-range-controls {
    display: flex;
    gap: 0.75rem;
    align-items: end;
}

.date-range-controls label {
    display: flex;
    flex-direction: column;
    font-size: 0.75rem;
    color: #444;
    gap: 0.2rem;
}

.date-range-controls input[type="date"] {
    border: 1px solid #d2d2d2;
    border-radius: 6px;
    padding: 0.35rem 0.45rem;
    font-size: 0.82rem;
    background: #fff;
}

.stats-dashboard {
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem;
}

.stat-card {
    flex: 1 1 calc(20% - 0.5rem);
    min-width: 0;
    background: #f7f7f7;
    border: 1px solid #e4e4e4;
    border-radius: 8px;
    padding: 0.4rem 0.4rem;
    text-align: center;
}

.stat-value {
    font-size: 1.1rem;
    font-weight: 700;
    line-height: 1.1;
}

.stat-label {
    font-size: 0.72rem;
    color: #555;
    margin-top: 0.2rem;
}

@media (max-width: 900px) {
    .stat-card {
        flex-basis: calc(33.333% - 0.5rem);
    }
}

@media (max-width: 600px) {
    .stat-card {
        flex-basis: calc(50% - 0.5rem);
    }
}

#intensity {
    width: 120px;
}

.intensity-wrapper.is-disabled {
    opacity: 0.5;
    pointer-events: none;
}

label.is-disabled {
    opacity: 0.35;
    pointer-events: none;
    cursor: default;
}

.participant-icon {
    display: inline-block;
    width: 1rem;
    height: 1rem;
    vertical-align: middle;
    fill: currentColor;
    flex-shrink: 0;
}

.participant-icon-dot {
    width: 0.75rem;
    height: 0.75rem;
}

label:has(svg) {
    cursor: pointer;
    display: inline-flex;
    align-items: center;
    vertical-align: middle;
    font-size: 0.82rem;
    gap: 3px;
    margin-right: 2px;
    margin-bottom: 5px;
    padding: 3px 4px;
    border-radius: 4px;
    border: 1px solid #bbb;
    color: #bbb;
    user-select: none;
    transition: color 0.15s, border-color 0.15s;
}

label:has(input[type="checkbox"]:checked) {
    color: #222;
    border-color: #111;
}

label:has(svg) input[type="checkbox"] {
    display: none;
}
