/* Taktik-Editor und Taktik-Elemente auf der Karte */

/* Aufklappbare Abschnitte der Seitenleiste */
.panel-section > summary {
  cursor: pointer;
  list-style: none;
  font-size: 0.8rem;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  color: var(--text-muted);
  font-weight: 600;
  margin-bottom: 8px;
  user-select: none;
}
.panel-section > summary::-webkit-details-marker { display: none; }
.panel-section > summary::before { content: "▸ "; }
.panel-section[open] > summary::before { content: "▾ "; }

.tactic-panel { display: flex; flex-direction: column; gap: 10px; }
.tactic-row { display: flex; gap: 6px; flex-wrap: wrap; align-items: center; }
.tactic-row .input { flex: 1 1 120px; min-width: 0; }
.tactic-panel .btn { padding: 5px 10px; font-size: 0.85rem; }
.btn-danger { color: var(--down); }
.btn-danger:hover:not(:disabled) { border-color: var(--down); }
.tactic-meta { display: flex; flex-direction: column; gap: 6px; }
.tactic-desc { resize: vertical; font: inherit; font-size: 0.85rem; width: 100%; }
.tactic-team { font-size: 0.8rem; margin: 0; }
.tactic-readonly { display: flex; flex-direction: column; gap: 2px; padding: 8px 10px; border: 1px dashed var(--border); border-radius: 6px; }
.tactic-readonly .muted { font-size: 0.8rem; }
.tactic-desc-view { font-size: 0.85rem; margin: 0; white-space: pre-line; }
.tactic-status { font-size: 0.8rem; margin: 0; display: flex; flex-direction: column; gap: 6px; }
.tactic-phases { display: flex; flex-direction: column; gap: 6px; }

/* Werkzeuge */
.tactic-tools { display: grid; grid-template-columns: repeat(5, 1fr); gap: 4px; }
.tactic-tool {
  display: flex; flex-direction: column; align-items: center; gap: 2px;
  padding: 6px 2px; border: 1px solid var(--border); border-radius: 6px;
  background: var(--surface); cursor: pointer; font-size: 0.68rem; line-height: 1.1;
}
.tactic-tool:hover { border-color: var(--accent); }
.tactic-tool[aria-pressed="true"] { background: var(--accent); border-color: var(--accent); color: var(--surface); }
.tactic-tool-icon { font-size: 1.05rem; line-height: 1; }

.tactic-options { display: flex; flex-direction: column; gap: 8px; }
.tactic-colors { display: flex; flex-wrap: wrap; gap: 6px; }
.tactic-color {
  width: 24px; height: 24px; border-radius: 50%; cursor: pointer;
  border: 2px solid var(--border); box-shadow: inset 0 0 0 1px rgb(0 0 0 / 0.25);
}
.tactic-color[aria-pressed="true"] { border-color: var(--text); transform: scale(1.12); }
.tactic-symbols { display: grid; grid-template-columns: repeat(8, 1fr); gap: 4px; }
.tactic-symbol-btn {
  display: grid; place-items: center; padding: 3px; aspect-ratio: 1;
  border: 1px solid var(--border); border-radius: 6px; background: #1d2018; cursor: pointer;
}
.tactic-symbol-btn[aria-pressed="true"] { border-color: var(--accent); box-shadow: 0 0 0 2px var(--accent); }

/* Eigenschaften */
.tactic-props:empty { display: none; }
.tactic-props { display: flex; flex-direction: column; gap: 8px; padding-top: 10px; border-top: 1px solid var(--border); }
.tactic-props-head { display: flex; justify-content: space-between; align-items: center; gap: 8px; }
.tactic-check { font-size: 0.85rem; display: flex; align-items: center; gap: 6px; }

/* Auf der Karte */
.map-canvas.tactic-placing, .map-canvas.tactic-placing .leaflet-interactive { cursor: copy; }
.tactic-icon { background: none; border: 0; }
.tactic-symbol { position: relative; filter: drop-shadow(0 1px 2px rgb(0 0 0 / 0.8)); }
.tactic-symbol svg { display: block; }
.tactic-symbol-label, .tactic-text, .tactic-label {
  color: #fff;
  font-family: var(--font);
  font-weight: 700;
  text-shadow: 0 0 3px #000, 0 0 3px #000, 0 1px 2px #000;
  white-space: nowrap;
}
.tactic-symbol-label {
  position: absolute; left: 50%; top: 100%; transform: translateX(-50%);
  font-size: 12px; margin-top: 2px;
}
.tactic-text { display: inline-block; line-height: 1.1; }
.leaflet-tooltip.tactic-label {
  background: none; border: 0; box-shadow: none; padding: 0; font-size: 13px;
}
.leaflet-tooltip.tactic-label::before { display: none; }
/* Dunkler Rand um Taktik-Linien/Flächen: gut sichtbar auf hellem und farbigem Untergrund */
.leaflet-tactic-pane path { filter: drop-shadow(0 0 1px rgb(0 0 0 / 0.9)) drop-shadow(0 0 2px rgb(0 0 0 / 0.6)); }
.tactic-selected { filter: drop-shadow(0 0 4px #fff) drop-shadow(0 0 2px #fff); }
path.tactic-selected { stroke-width: 6; }

/* Live-Lage: Standorte der Team-Mitglieder */
.live-panel { display: flex; flex-direction: column; gap: 8px; }
.live-list { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 2px; }
.live-list button {
  width: 100%; display: flex; justify-content: space-between; gap: 8px;
  background: none; border: 0; padding: 4px 2px; color: inherit; font: inherit; font-size: 0.85rem; cursor: pointer; text-align: left;
}
.live-list button:hover { color: var(--accent, #4f9fd8); }
.live-desktop { display: flex; flex-direction: column; gap: 6px; }
.live-field { display: flex; flex-direction: column; gap: 2px; font-size: 0.8rem; }
.live-calib > summary { cursor: pointer; font-size: 0.8rem; color: var(--text-muted); }
.live-calib { display: flex; flex-direction: column; gap: 6px; }
.live-calibrating { cursor: crosshair !important; }

.live-marker { position: relative; }
.live-dot {
  position: absolute; inset: 0; border-radius: 50%;
  background: #f1c40f; border: 2px solid #111; box-shadow: 0 0 0 3px rgba(241, 196, 15, 0.35);
}
.live-marker.own .live-dot { background: #2ecc71; box-shadow: 0 0 0 3px rgba(46, 204, 113, 0.4); }
.live-marker.stale { opacity: 0.45; }
.live-name {
  position: absolute; left: 20px; top: -2px; white-space: nowrap;
  font-size: 12px; font-weight: 600; color: #fff; text-shadow: 0 0 3px #000, 0 0 3px #000;
  pointer-events: none;
}
