.dashboard-tab { font-weight: 400; color: #666; border-left: 4px solid transparent; border-bottom: 1px solid #f0f0f0; }
.dashboard-tab:last-child { border-bottom: none; }
.dashboard-tab:hover { color: #333333; background: #f7f8fb; }
.dashboard-tab.active-tab { color: #333333; font-weight: 600; border-left: 4px solid #333333; border-bottom: 1px solid #f0f0f0; }

.dropdown-arrow { transform: rotate(45deg); transition: transform 0.2s; }
.dropdown-arrow.open { transform: rotate(-135deg); top: calc(50% + 1px); }

.city-dropdown-list::-webkit-scrollbar { width: 4px; }
.city-dropdown-list::-webkit-scrollbar-track { background: transparent; }
.city-dropdown-list::-webkit-scrollbar-thumb { background: #ccc; border-radius: 4px; }

/* Layer-Tabs */
/* Panel Styles */
.panel, .detail-panel {
    background: white;
    border-radius: 8px;
    padding: 1rem;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.1);
    margin-bottom: 1rem;
}

.panel-label, .detail-label {
    font-weight: 600;
    margin-bottom: 0.5rem;
    color: #333333;
}

.detail-panel-title {
    font-weight: 600;
    color: #333333;
    margin: 0 0 0.75rem 0;
    padding-bottom: 0.5rem;
    border-bottom: 1px solid #e0e0e0;
}

/* Checkbox Group */
.checkbox-group {
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
}

.checkbox-group label {
    display: grid;
    grid-template-columns: auto 1fr;
    gap: 0.4rem;
    align-items: start;
}

.layer-checkbox {
    cursor: pointer;
}

/* Legend */
.legend {
    padding: 0.5rem;
    background: white;
    border-radius: 4px;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.2);
}

.legend i {
    display: inline-block;
    width: 12px;
    height: 12px;
    margin-right: 5px;
    border: 1px solid #ccc;
}

.layer-tabs {
    display: flex;
    flex-direction: column;
    margin-bottom: 1rem;
    border-bottom: 1px solid #e0e0e0;
}

.layer-tab {
    width: 100%;
    padding: 0.5rem;
    background: none;
    border: none;
    cursor: pointer;
    font-weight: 500;
    text-align: left;
    transition: all 0.2s;
}

.layer-tab.active {
    background-color: #333333;
    color: white;
}

.layer-tab:not(.active):hover {
    background-color: rgba(51, 51, 51, 0.1);
}

/* City Filter */
.city-filter {
    margin-top: 1rem;
    padding-top: 1rem;
    border-top: 1px solid #e0e0e0;
}

.city-borders-filter {
    margin-top: 1rem;
    padding-top: 1rem;
    border-top: 1px solid #e0e0e0;
}

.infrastructure-options {
    margin-top: 1rem;
    padding-top: 1rem;
    border-top: 1px solid #e0e0e0;
}

#infrastructure-options label {
    padding: 4px 10px;
    margin: 1px 0;
}

.filter-label {
    font-weight: 500;
    margin-bottom: 0.5rem;
    color: #848181;
}

.cycling-filter{
    font-weight: 500;
    margin-bottom: 0.5rem;
    color: #e0e0e0;
}

/* marker style for cities */
.city-marker {
    background-color: #333333;
    color: white;
    border-radius: 50%;
    width: 30px;
    height: 30px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 12px;
    font-weight: bold;
    cursor: pointer;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.3);
}

.city-marker:hover {
    transform: scale(1.1);
    z-index: 1000;
}

.cycling-mode-tab {
    padding: 8px 16px;
    border: 1px solid #ccc;
    background-color: #f5f5f5;
    color: #333;
    cursor: pointer;
    margin-bottom: 0.5rem;
}

.cycling-mode-tab.active {
    background-color: #333333;
    color: white;
}

.layer-options label,
.checkbox-group label,
#city-borders-filter label {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 8px 10px;
    margin: 3px 0;
    font-size: 14px;
    color: #2d3d5a;
    cursor: pointer;
    border-radius: 8px;
    transition: background-color 0.2s ease, color 0.2s ease;
    user-select: none;
}

.layer-options label:hover,
.checkbox-group label:hover,
#city-borders-filter label:hover {
    background-color: #f1f5f7;
}

.layer-options input[type="checkbox"],
#city-borders-filter input[type="checkbox"] {
    appearance: none;
    -webkit-appearance: none;
    width: 19px;
    height: 19px;
    min-width: 19px;
    border: 2px solid #c8d4dc;
    border-radius: 5px;
    background-color: #f4f6f8;
    cursor: pointer;
    position: relative;
    transition: all 0.2s ease;
}

.layer-options input[type="checkbox"]:hover,
#city-borders-filter input[type="checkbox"]:hover {
    border-color: #8cadbf;
}

.layer-options input[type="checkbox"]:checked,
#city-borders-filter input[type="checkbox"]:checked {
    background-color: #8cadbf;
    border-color: #8cadbf;
}

.layer-options input[type="checkbox"]:checked::after,
#city-borders-filter input[type="checkbox"]:checked::after {
    content: "";
    position: absolute;
    left: 5px;
    top: 3px;
    width: 4px;
    height: 8px;
    border: solid white;
    border-width: 0 1.5px 1.5px 0;
    transform: rotate(45deg);
}

.layer-options input[type="checkbox"]:focus-visible,
#city-borders-filter input[type="checkbox"]:focus-visible {
    outline: 2px solid #8cadbf;
    outline-offset: 2px;
}

.layer-options input[type="checkbox"]:disabled {
    background-color: #eee;
    border-color: #ccc;
    cursor: not-allowed;
}

.layer-options input[type="checkbox"]:disabled + label,
.layer-options label:has(input[type="checkbox"]:disabled) {
    color: #aaa;
    cursor: not-allowed;
}

.layer-options input[type="radio"] {
    appearance: none;
    -webkit-appearance: none;
    width: 19px;
    height: 19px;
    min-width: 19px;
    border: 2px solid #c8d4dc;
    border-radius: 5px;
    background-color: #f4f6f8;
    cursor: pointer;
    position: relative;
    transition: all 0.2s ease;
}

.layer-options input[type="radio"]:hover {
    border-color: #8cadbf;
}

.layer-options input[type="radio"]:checked {
    background-color: #8cadbf;
    border-color: #8cadbf;
}

.layer-options input[type="radio"]:checked::after {
    content: "";
    position: absolute;
    left: 5px;
    top: 3px;
    width: 4px;
    height: 8px;
    border: solid white;
    border-width: 0 1.5px 1.5px 0;
    transform: rotate(45deg);
}

.filter-label {
    font-weight: 600;
    font-size: 14px;
    color: #333;
    margin-top: 10px;
    margin-bottom: 6px;
}

.radius-slider-wrapper {
    display: flex;
    align-items: center;
    gap: 10px;
    margin-bottom: 10px;
}

/* Slider selbst */
#cycling-flow-radius {
    flex: 1;
    -webkit-appearance: none;
    appearance: none;
    height: 4px;
    border-radius: 2px;
    background: #ddd;
    outline: none;
    cursor: pointer;
}

/* Chrome/Edge/Safari Thumb */
#cycling-flow-radius::-webkit-slider-thumb {
    -webkit-appearance: none;
    width: 16px;
    height: 16px;
    border-radius: 50%;
    background: #333333;
    cursor: pointer;
    transition: background 0.2s ease, transform 0.15s ease;
}

#cycling-flow-radius::-webkit-slider-thumb:hover {
    background: #333333;
    transform: scale(1.1);
}

/* Firefox Thumb */
#cycling-flow-radius::-moz-range-thumb {
    width: 16px;
    height: 16px;
    border-radius: 50%;
    background: #333333;
    cursor: pointer;
    border: none;
    transition: background 0.2s ease, transform 0.15s ease;
}

#cycling-flow-radius::-moz-range-thumb:hover {
    background: #333333;
    transform: scale(1.1);
}

#cycling-flow-radius-value {
    min-width: 45px;
    text-align: right;
    font-size: 13px;
    color: #555;
}

.bike-lane-color-mode-tabs {
    display: flex;
    width: 100%;
}

.bike-lane-color-toggle {
    flex: 1;
    min-width: 0;
    padding: 8px 16px;
    border: 1px solid #ccc;
    background-color: #f5f5f5;
    color: #333;
    cursor: pointer;
    margin-bottom: 0.5rem;
}

.bike-lane-color-toggle.active {
    background-color: #333333;
    color: white;
}

.kpi-row {
    display: grid;
    grid-template-columns: repeat(5, minmax(0, 1fr));
    gap: 1rem;
}

.bike-network-overview {
    display: grid;
    grid-template-columns: minmax(260px, 1fr) minmax(0, 2.7fr);
    gap: 1rem;
    align-items: stretch;
    margin-bottom: 1.5rem;
}

.bike-network-kpi .kpi-row {
    grid-template-columns: 1fr;
}

.bike-network-chart .chart-card {
    height: 100%;
}

@media (max-width: 900px) {
    .bike-network-overview {
        grid-template-columns: 1fr;
    }
}
/* ---------------------------------------------------------------------------
   Intro-Overlay (Begruessungstext der Kartenseite)
   --------------------------------------------------------------------------- */

/* z-index 2000 liegt ueber Leaflets eigenen Ebenen (bis 1000) und ueber den
   Dropdowns im Dashboard, die ebenfalls 1000 nutzen. */
.intro-overlay {
    position: fixed;
    inset: 0;
    z-index: 2000;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 1.5rem;
}

.intro-overlay[hidden] {
    display: none;
}

.intro-backdrop {
    position: absolute;
    inset: 0;
    background: rgba(20, 22, 28, 0.55);
    backdrop-filter: blur(2px);
    animation: intro-fade 0.25s ease-out;
}

.intro-card {
    position: relative;
    width: min(640px, 100%);
    max-height: 100%;
    overflow-y: auto;
    background: #ffffff;
    border-radius: 12px;
    padding: 2rem 2.25rem 1.75rem;
    box-shadow: 0 18px 48px rgba(0, 0, 0, 0.28);
    animation: intro-rise 0.28s cubic-bezier(0.16, 1, 0.3, 1);
}

@keyframes intro-fade {
    from { opacity: 0; }
    to   { opacity: 1; }
}

@keyframes intro-rise {
    from { opacity: 0; transform: translateY(12px) scale(0.985); }
    to   { opacity: 1; transform: none; }
}

@media (prefers-reduced-motion: reduce) {
    .intro-backdrop,
    .intro-card { animation: none; }
}

.intro-close {
    position: absolute;
    top: 0.9rem;
    right: 0.9rem;
    width: 32px;
    height: 32px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: transparent;
    border: 1px solid transparent;
    border-radius: 50%;
    color: #888;
    cursor: pointer;
}

.intro-close:hover {
    background: #f7f8fb;
    border-color: #e0e0e0;
    color: #333333;
}

.intro-close i {
    width: 18px;
    height: 18px;
}

.intro-kicker {
    font-size: 0.72rem;
    font-weight: 600;
    letter-spacing: 0.09em;
    text-transform: uppercase;
    color: #999;
    margin-bottom: 0.4rem;
}

.intro-title {
    font-size: 1.45rem;
    font-weight: 700;
    line-height: 1.25;
    color: #333333;
    margin: 0 2.5rem 1rem 0;
}

.intro-text {
    font-size: 0.86rem;
    line-height: 1.6;
    color: #555;
    margin-bottom: 0.85rem;
}

.intro-text-muted {
    font-size: 0.82rem;
    color: #666;
    margin: 0.9rem 0 0;
}

.intro-section {
    margin-top: 1.25rem;
    padding-top: 1.25rem;
    border-top: 1px solid #ececf0;
}

.intro-section-label {
    font-weight: 600;
    color: #333333;
    margin-bottom: 0.75rem;
}

/* Nummerierte Leitfragen: schlichte Stichpunkte statt Icon-Liste. */
.intro-questions {
    list-style: decimal;
    padding-left: 1.35rem;
    margin-bottom: 1.1rem;
}

.intro-questions li {
    font-size: 0.84rem;
    line-height: 1.5;
    color: #444;
    margin-bottom: 0.7rem;
}

.intro-questions li:last-child {
    margin-bottom: 0;
}

.intro-questions li::marker {
    color: #333333;
    font-weight: 600;
}

/* Fundstelle in der Anwendung, unter der jeweiligen Frage. */
.intro-where {
    display: block;
    margin-top: 0.2rem;
    font-size: 0.74rem;
    color: #8b8b93;
}

.intro-list {
    list-style: none;
    display: flex;
    flex-direction: column;
    gap: 0.6rem;
}

.intro-list li {
    display: grid;
    grid-template-columns: 20px 1fr;
    gap: 0.7rem;
    align-items: start;
    font-size: 0.84rem;
    line-height: 1.5;
    color: #555;
}

.intro-list i {
    width: 16px;
    height: 16px;
    margin-top: 0.2rem;
    color: #333333;
    flex-shrink: 0;
}

.intro-list strong {
    color: #333333;
    font-weight: 600;
}

.intro-actions {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 0.9rem;
    margin-top: 1.5rem;
    padding-top: 1.25rem;
    border-top: 1px solid #ececf0;
}

.intro-btn {
    background: #333333;
    border: 1px solid #333333;
    color: #ffffff;
    padding: 9px 22px;
    border-radius: 4px;
    font-size: 0.85rem;
    font-weight: 500;
    cursor: pointer;
}

.intro-btn:hover {
    background: #1f1f1f;
}

.intro-hint {
    display: inline-flex;
    align-items: center;
    gap: 0.3rem;
    font-size: 0.76rem;
    color: #888;
}

.intro-hint i {
    width: 14px;
    height: 14px;
}

/* Runder Info-Button in der Kopfzeile, erbt Farben von .header-btn */
.header-btn.header-btn-icon {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 38px;
    height: 38px;
    padding: 0;
    border-radius: 50%;
}

.header-btn.header-btn-icon:hover {
    background: rgba(255, 255, 255, 0.12);
}

.header-btn.header-btn-icon i {
    width: 18px;
    height: 18px;
}

@media (max-width: 600px) {
    .intro-card { padding: 1.5rem 1.25rem 1.25rem; }
    .intro-title { font-size: 1.2rem; }
}
