/* ═══════════════════════════════════════════════════════
   Lagekarte
   Die Karte füllt den Rest des Bildschirms. Gescrollt wird hier
   nichts — geschoben und gezoomt.
   ═══════════════════════════════════════════════════════ */

.ka-huelle {
    flex: 1; min-height: 0;
    display: flex; flex-direction: column; gap: 0.6rem;
}

/* ── Leiste über der Karte ─────────────────────────────── */
.ka-leiste {
    flex: none;
    display: flex; align-items: center; gap: 0.8rem; flex-wrap: wrap;
    padding: 0.35rem 0.5rem;
    background: var(--surface); border: 1px solid var(--border);
    border-radius: var(--radius-sm);
}
.ka-ebenen { display: flex; gap: 0.3rem; flex-wrap: wrap; min-width: 0; }
.ka-ebenen button {
    display: inline-flex; align-items: center; gap: 0.4rem;
    padding: 0.3rem 0.6rem; border-radius: var(--radius-sm);
    background: transparent; border: 1px solid var(--border);
    color: var(--text-dim); cursor: pointer;
    font-family: var(--sans); font-size: var(--fs-2xs); font-weight: 500;
    transition: color 160ms var(--ein), border-color 160ms var(--ein), background 160ms var(--ein);
}
.ka-ebenen button i { font-size: var(--fs-xs); }
.ka-ebenen button:hover { color: var(--text); }
/* Ein Ebenen-Schalter ist kein Alarm. Rot bleibt dem vorbehalten, wo gerade
   etwas passiert — hier genügt eine hellere Fläche. */
.ka-ebenen button.aktiv {
    color: var(--text); border-color: var(--linie-stark); background: var(--surface3);
}

.ka-werkzeuge { display: flex; align-items: center; gap: 0.4rem; margin-left: auto; }
.ka-stand { font-family: var(--mono); font-size: var(--fs-2xs); color: var(--text-dim); }

/* ── Bühne ─────────────────────────────────────────────── */
.ka-buehne {
    position: relative; flex: 1; min-height: 0;
    border: 1px solid var(--border); border-radius: var(--radius);
    overflow: hidden; background: #08080d;
}
.ka-buehne canvas {
    display: block; width: 100%; height: 100%;
    cursor: grab; touch-action: none;
}
.ka-buehne canvas:active { cursor: grabbing; }

.ka-massstab {
    position: absolute; left: 0.7rem; bottom: 0.7rem;
    display: flex; align-items: center; gap: 0.5rem;
    padding: 0.2rem 0.5rem; border-radius: var(--radius-sm);
    background: rgba(6,6,10,0.72);
    font-family: var(--mono); font-size: var(--fs-3xs); color: var(--text-dim);
    pointer-events: none;
}
.ka-massstab span {
    display: inline-block; height: 7px;
    border-left: 1px solid var(--text-dim);
    border-right: 1px solid var(--text-dim);
    border-bottom: 1px solid var(--text-dim);
}

.ka-hinweis {
    position: absolute; left: 50%; top: 0.7rem; transform: translateX(-50%);
    padding: 0.4rem 0.8rem; border-radius: 999px;
    background: var(--surface3); border: 1px solid var(--border);
    font-size: var(--fs-xs); color: var(--text-mid);
    box-shadow: var(--shadow-1);
    pointer-events: none;
}

/* ── Infobox zum angeklickten Ziel ─────────────────────── */
.ka-infobox {
    position: absolute; right: 0.7rem; top: 0.7rem;
    width: min(280px, calc(100% - 1.4rem));
    max-height: calc(100% - 1.4rem); overflow-y: auto;
    padding: 0.8rem;
    background: rgba(12,12,19,0.95); backdrop-filter: blur(6px);
    border: 1px solid var(--border); border-radius: var(--radius);
    box-shadow: var(--card-shadow);
    animation: kaInfoRein 180ms var(--ein) both;
}
@keyframes kaInfoRein {
    from { opacity: 0; transform: translateY(-6px); }
    to   { opacity: 1; transform: none; }
}
body.ruhig .ka-infobox { animation: none; }

.ka-info-zu {
    position: absolute; right: 0.45rem; top: 0.45rem;
    width: 22px; height: 22px; border-radius: var(--radius-sm);
    display: inline-flex; align-items: center; justify-content: center;
    background: transparent; border: 1px solid var(--border);
    color: var(--text-dim); cursor: pointer; font-size: var(--fs-3xs);
}
.ka-info-zu:hover { color: var(--red); border-color: var(--red); }

.ka-info-kopf {
    display: flex; align-items: center; gap: 0.6rem;
    padding-right: 1.6rem; padding-bottom: 0.6rem; margin-bottom: 0.5rem;
    border-bottom: 1px solid var(--linie);
}
.ka-info-kopf .fms {
    flex: none; width: 30px; height: 30px; border-radius: var(--radius-sm);
    display: inline-flex; align-items: center; justify-content: center;
    font-family: var(--mono); font-size: var(--fs-base); font-weight: 600;
}
.ka-info-alarm {
    flex: none; width: 30px; height: 30px; border-radius: var(--radius-sm);
    display: inline-flex; align-items: center; justify-content: center;
    background: var(--red); color: #fff; font-size: var(--fs-xs);
}
.ka-info-titel {
    font-family: var(--cond); font-size: var(--fs-md); font-weight: 700;
    text-transform: uppercase; letter-spacing: 0.03em; color: var(--text);
    line-height: 1.15;
}
.ka-info-unter { font-size: var(--fs-2xs); color: var(--text-dim); margin-top: 0.1rem; }

.ka-info-meldung {
    padding: 0.45rem 0.6rem; margin-bottom: 0.5rem;
    background: var(--surface2); border-radius: var(--radius-sm);
    font-size: var(--fs-xs); line-height: 1.5; color: var(--text-mid);
}
.ka-info-zeile, .ka-platz {
    display: flex; align-items: baseline; gap: 0.6rem;
    padding: 0.22rem 0; font-size: var(--fs-xs);
}
.ka-info-zeile span, .ka-platz span { flex: none; width: 92px; color: var(--text-dim); }
.ka-info-zeile b, .ka-platz b { flex: 1; min-width: 0; color: var(--text); font-weight: 500; }
.ka-platz { border-top: 1px solid rgba(255,255,255,0.04); }
.ka-platz b { font-size: var(--fs-xs); }

/* ── Handy ─────────────────────────────────────────────── */
@media (max-width: 860px) {
    .ka-huelle { height: 78vh; }
    .ka-ebenen button span { display: none; }
    .ka-ebenen button { padding: 0.4rem 0.55rem; }
    .ka-stand { display: none; }
    .ka-infobox { right: 0.5rem; left: 0.5rem; width: auto; }
}

/* Wachen-Filter */
.ka-wache { width: auto; max-width: 220px; padding: 0.28rem 0.5rem; font-size: var(--fs-2xs); }
@media (max-width: 560px) {
    .ka-wache { flex: 1 1 100%; max-width: none; }
}
