/* Karte und Höhenprofil (nur auf Tour- und Mehrtagestour-Seiten geladen) */
.map {
    height: clamp(440px, 58vh, 720px);
    margin: 0 0 20px;
    border: 1px solid var(--line);
    border-radius: 10px;
    background: var(--surface);
    z-index: 0;
}

.map.map-error {
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 16px;
    color: var(--muted);
}

.profile-wrap {
    position: relative;
    height: 220px;
    margin: 0 0 20px;
    padding: 8px;
    border: 1px solid var(--line);
    border-radius: 10px;
    background: var(--surface);
}

@media (max-width: 600px) {
    .map { height: 320px; }
    .profile-wrap { height: 200px; }
}

/* Kartenvergleich */
.map-large {
    height: clamp(560px, 72vh, 900px);
}

.compare-summary {
    margin: 0 0 12px;
}

.legend-actions {
    display: flex;
    flex-wrap: wrap;
    gap: 6px 16px;
    margin: 0 0 8px;
    font-size: 0.9rem;
}

.legend-item.hover,
.legend-item.active {
    background: color-mix(in srgb, var(--accent) 14%, transparent);
}

.legend-item.muted .tour-main,
.legend-item.muted .tour-figures {
    opacity: 0.45;
}

@media (max-width: 600px) {
    .map-large { height: 400px; }
}

/* Fotos mit Aufnahmeort auf der Karte */
.photo-marker {
    background: none;
    border: 0;
}

.photo-pin {
    display: block;
    box-sizing: border-box;
    width: 44px;
    height: 44px;
    border: 3px solid #fff;
    border-radius: 50%;
    background-color: #fff;
    background-position: center;
    background-repeat: no-repeat;
    background-size: cover;
    box-shadow: 0 1px 6px rgba(0, 0, 0, 0.5);
}

.photo-popup {
    display: flex;
    flex-direction: column;
    gap: 6px;
    align-items: flex-start;
    max-width: 240px;
}

.photo-popup img {
    display: block;
    width: 100%;
    max-height: 200px;
    border-radius: 6px;
    object-fit: cover;
    cursor: zoom-in;
}

.photo-popup p {
    margin: 0;
    font-size: 0.85rem;
}

/* Schaltfläche "Fotos" in der Karte */
.leaflet-bar.photo-control .photo-control-button {
    display: flex;
    align-items: center;
    gap: 6px;
    width: auto;
    height: auto;
    padding: 6px 10px;
    font-size: 0.8rem;
    font-weight: 600;
    line-height: 1.2;
    white-space: nowrap;
}

.leaflet-bar.photo-control.off .photo-control-button {
    color: #777;
    text-decoration: line-through;
}

@media (max-width: 600px) {
    .photo-control-button span {
        display: none;
    }
}
