/*
 * tnet.bundle.css - AUTOGENERIERT durch build_css.py
 * NICHT direkt editieren! Quelle sind die Einzeldateien unter tnet/css/.
 * Reihenfolge = Kaskade wie in index_de.htm.
 */
/* ===== tnet_toc.css ===== */
/**
 * tnet_toc.css
 * Styling für Table of Contents, Accordion und Tab-Manipulation
 *
 * @version    1.0
 * @date       2026-02-12
 * @copyright  Trigonet AG
 * @author     Marco Dellenbach
 */

/* ===========================================================================
   TABS TO ACCORDION CONVERTER (dijit TabContainer)
   =========================================================================== */

.tabs2acc-header {
  padding: 8px 10px;
  background: #95b5be;
  border: none;
  border-radius: 0;
  margin-top: 1px;
  cursor: pointer;
  user-select: none;
  display: flex;
  align-items: center;
  font-weight: bold;
  font-size: 13px;
  color: #fff;
  position: relative;
  z-index: 1;
  min-height: 28px;
  box-sizing: border-box;
  letter-spacing: 0.5px;
}

.tabs2acc-header:hover {
  background: #a5c5ce;
}

.tabs2acc-header.is-open {
  background: #7aa0aa;
}

.tabs2acc-header .acc-icon {
  margin-right: 6px;
  width: 16px;
  height: 16px;
}

.tabs2acc-header .acc-arrow {
  margin-right: 6px;
  transition: transform 0.2s;
  color: #648B95;
}

.tabs2acc-header.is-open .acc-arrow {
  transform: rotate(90deg);
}

.tabs2acc-panel {
  display: none !important;
  border: none;
  padding: 0;
  max-height: none;
  overflow-y: visible;
  overflow-x: hidden;
  position: relative;
}

.tabs2acc-panel.is-open {
  display: block !important;
}

#kantons_container .tabs2acc-panel {
  display: none !important;
  max-height: none;
  overflow: visible;
}

#kantons_container .tabs2acc-panel.is-open {
  display: block !important;
}

.tabs2acc-panel > .dijitContentPane {
  padding: 0 !important;
}

/* Doppelte Kategorie-Header ausblenden */
.tabs2acc-panel .categoryHeader {
  display: none !important;
}

/* Tab-Leiste ausblenden */
.tabs2acc-converted > .dijitTabListContainer-top,
.tabs2acc-converted > .dijitTabSpacer {
  display: none !important;
}

.tabs2acc-converted > .dijitTabPaneWrapper {
  border: none !important;
}

.tabs2acc-converted {
  height: auto !important;
}

/* ===========================================================================
   TITLEPANES TO TABS CONVERTER (Kantons-Tabs)
   =========================================================================== */

/* Themenkatalog: Dreieck-Pfeil ausblenden */
#tp_overview_menu .dijitArrowNode {
  display: none !important;
}

/* Container-Höhe vom übergeordneten Themenkatalog TitlePane */
#tp_overview_menu.dijitTitlePane > .dijitTitlePaneContentOuter {
  height: var(--tnet-catalog-height, 450px) !important;
  padding: 0 !important;
  margin: 0 !important;
}

#tp_overview_menu.dijitTitlePane > .dijitTitlePaneContentOuter > .dijitTitlePaneContentInner {
  height: 100% !important;
  padding: 0 !important;
  margin: 0 !important;
}

/* Kantons-Container Layout */
#kantons_container {
  position: relative;
  height: 100%;
  width: 100%;
  display: flex;
  flex-direction: column;
  overflow: hidden;
  margin: 0 !important;
  padding: 0 !important;
  background: transparent !important;
}

#kantons_tab_bar {
  display: flex;
  flex-wrap: nowrap;
  background: transparent;
  margin: 0 !important;
  padding: 0 !important;
  flex-shrink: 0;
  width: 100%;
}

#kantons_tab_bar .kanton-tab {
  flex: 1;
  padding: 1px 0;
  cursor: pointer;
  border: none;
  border-right: 2px solid rgba(255,255,255,0.4) !important;
  margin: 0;
  background: #648C96;
  display: flex;
  align-items: center;
  justify-content: center;
}

#kantons_tab_bar .kanton-tab:last-child {
  border-right: none !important;
}

#kantons_tab_bar .kanton-tab:hover {
  background: #567a83;
}

#kantons_tab_bar .kanton-tab.active {
  background: #e8423f;
}

#kantons_tab_bar .kanton-tab.active:hover {
  background: #d63a37;
}

#kantons_tab_bar .kanton-tab img {
  width: auto !important;
  height: 28px !important;
  filter: brightness(0) invert(1);
}

/* Schweizerkreuz (Bund) etwas grösser */
#kantons_tab_bar .kanton-tab:nth-child(3) img {
  height: 36px !important;
}

/* Kantons-TitlePanes - Hauptebene */
#kantons_container > .dijitTitlePane {
  display: none !important;
  background: transparent !important;
}

#kantons_container > .dijitTitlePane.active-tab {
  display: block !important;
  flex: 1;
  min-height: 0;
  overflow-y: auto !important;
  overflow-x: hidden !important;
  margin: 0 !important;
  padding: 0 !important;
  border: none !important;
  width: 100% !important;
}

#kantons_container > .dijitTitlePane.active-tab > .dijitTitlePaneTitle {
  display: none !important;
}

/* KRITISCH: ContentOuter der KANTONS-PANE IMMER sichtbar */
/* NUR direkte Kinder (>) — Level-2-TitlePanes NICHT berühren! */
#kantons_container > .dijitTitlePane.active-tab > .dijitTitlePaneContentOuter,
#kantons_container > .dijitTitlePane.active-tab.dijitTitlePaneClosed > .dijitTitlePaneContentOuter,
#kantons_container > .dijitTitlePane.active-tab.dijitClosed > .dijitTitlePaneContentOuter,
#kantons_container > .dijitTitlePane.active-tab[aria-hidden="true"] > .dijitTitlePaneContentOuter,
/* ULTIMATIV: Auch mit inline style attribute selector */
#kantons_container > .dijitTitlePane.active-tab > .dijitTitlePaneContentOuter[style],
#kantons_container > .dijitTitlePane.active-tab > .dijitTitlePaneContentOuter[style*="display"],
#kantons_container > .dijitTitlePane.active-tab > .dijitTitlePaneContentOuter[style*="none"],
#tp_layer_menu.active-tab > .dijitTitlePaneContentOuter,
#tp_layer_menu.active-tab > .dijitTitlePaneContentOuter[style],
#tp_layer_menu2.active-tab > .dijitTitlePaneContentOuter,
#tp_layer_menu2.active-tab > .dijitTitlePaneContentOuter[style],
#tp_layer_menu3.active-tab > .dijitTitlePaneContentOuter,
#tp_layer_menu3.active-tab > .dijitTitlePaneContentOuter[style],
#tp_layer_menu4.active-tab > .dijitTitlePaneContentOuter,
#tp_layer_menu4.active-tab > .dijitTitlePaneContentOuter[style] {
  display: block !important;
  visibility: visible !important;
  opacity: 1 !important;
  height: auto !important;
  max-height: none !important;
  overflow: visible !important;
  border: none !important;
  margin: 0 !important;
  padding: 0 !important;
  width: 100% !important;
  background: transparent !important;
  position: relative !important;
  clip: auto !important;
  transform: none !important;
}

/* ContentInner auch immer sichtbar */
#kantons_container > .dijitTitlePane.active-tab .dijitTitlePaneContentInner,
#kantons_container .dijitTitlePane.active-tab .dijitTitlePaneContentInner {
  display: block !important;
  visibility: visible !important;
  opacity: 1 !important;
  height: auto !important;
  max-height: none !important;
  margin: 0 !important;
  padding: 0 !important;
  width: 100% !important;
  background: transparent !important;
}

/* Alle inneren Inhalte sichtbar */
#kantons_container .dijitTitlePane.active-tab .dijitContentPane,
#kantons_container .dijitTitlePane.active-tab [id*="lyrmgr_wrapper"],
#kantons_container .dijitTitlePane.active-tab #layer_menu,
#kantons_container .dijitTitlePane.active-tab #layer_menu2,
#kantons_container .dijitTitlePane.active-tab #layer_menu3,
#kantons_container .dijitTitlePane.active-tab #layer_menu4 {
  display: block !important;
  visibility: visible !important;
  opacity: 1 !important;
  height: auto !important;
}

/* KRITISCH: TabPaneWrapper und alle inneren Elemente IMMER sichtbar halten */
#kantons_container .dijitTitlePane.active-tab .dijitTabPaneWrapper,
#kantons_container .dijitTitlePane.active-tab .dijitTabPaneWrapper * {
  visibility: visible !important;
}

/* ========================================================================
   ULTIMATIVER FIX: wipeNode (dijitReset) der KANTONS-PANE sichtbar halten
   NUR direkte Kinder (>) — Level-2 wipeNodes NICHT berühren!
   ======================================================================== */
#kantons_container > .dijitTitlePane.active-tab > .dijitTitlePaneContentOuter > .dijitReset,
#kantons_container > .dijitTitlePane.active-tab > .dijitTitlePaneContentOuter > .dijitReset[style],
#kantons_container > .dijitTitlePane.active-tab > .dijitTitlePaneContentOuter > .dijitReset[style*="display"],
#kantons_container > .dijitTitlePane.active-tab > .dijitTitlePaneContentOuter > .dijitReset[style*="none"],
#tp_layer_menu.active-tab > .dijitTitlePaneContentOuter > .dijitReset,
#tp_layer_menu.active-tab > .dijitTitlePaneContentOuter > .dijitReset[style],
#tp_layer_menu2.active-tab > .dijitTitlePaneContentOuter > .dijitReset,
#tp_layer_menu2.active-tab > .dijitTitlePaneContentOuter > .dijitReset[style],
#tp_layer_menu3.active-tab > .dijitTitlePaneContentOuter > .dijitReset,
#tp_layer_menu3.active-tab > .dijitTitlePaneContentOuter > .dijitReset[style],
#tp_layer_menu4.active-tab > .dijitTitlePaneContentOuter > .dijitReset,
#tp_layer_menu4.active-tab > .dijitTitlePaneContentOuter > .dijitReset[style] {
  display: block !important;
  visibility: visible !important;
  opacity: 1 !important;
  height: auto !important;
  max-height: none !important;
  overflow: visible !important;
}

/* SUPER-ULTIMATIV: inline display:none auf KANTONS-PANE überschreiben */
/* NUR direkte Kinder (>) — Level-2-TitlePanes NICHT berühren! */
#kantons_container > .dijitTitlePane.active-tab > .dijitTitlePaneContentOuter[style*="display: none"],
#kantons_container > .dijitTitlePane.active-tab > .dijitTitlePaneContentOuter[style*="display:none"],
#kantons_container > .dijitTitlePane.active-tab > .dijitTitlePaneContentOuter > .dijitReset[style*="display: none"],
#kantons_container > .dijitTitlePane.active-tab > .dijitTitlePaneContentOuter > .dijitReset[style*="display:none"],
#tp_layer_menu.active-tab > .dijitTitlePaneContentOuter[style*="display: none"],
#tp_layer_menu.active-tab > .dijitTitlePaneContentOuter[style*="display:none"],
#tp_layer_menu.active-tab > .dijitTitlePaneContentOuter > .dijitReset[style*="display: none"],
#tp_layer_menu.active-tab > .dijitTitlePaneContentOuter > .dijitReset[style*="display:none"],
#tp_layer_menu2.active-tab > .dijitTitlePaneContentOuter[style*="display: none"],
#tp_layer_menu2.active-tab > .dijitTitlePaneContentOuter[style*="display:none"],
#tp_layer_menu2.active-tab > .dijitTitlePaneContentOuter > .dijitReset[style*="display: none"],
#tp_layer_menu2.active-tab > .dijitTitlePaneContentOuter > .dijitReset[style*="display:none"],
#tp_layer_menu3.active-tab > .dijitTitlePaneContentOuter[style*="display: none"],
#tp_layer_menu3.active-tab > .dijitTitlePaneContentOuter[style*="display:none"],
#tp_layer_menu3.active-tab > .dijitTitlePaneContentOuter > .dijitReset[style*="display: none"],
#tp_layer_menu3.active-tab > .dijitTitlePaneContentOuter > .dijitReset[style*="display:none"],
#tp_layer_menu4.active-tab > .dijitTitlePaneContentOuter[style*="display: none"],
#tp_layer_menu4.active-tab > .dijitTitlePaneContentOuter[style*="display:none"],
#tp_layer_menu4.active-tab > .dijitTitlePaneContentOuter > .dijitReset[style*="display: none"],
#tp_layer_menu4.active-tab > .dijitTitlePaneContentOuter > .dijitReset[style*="display:none"] {
  display: block !important;
}

/* Ausnahme: tabs2acc-panel ohne is-open soll versteckt bleiben */
#kantons_container .dijitTitlePane.active-tab .tabs2acc-panel:not(.is-open) {
  display: none !important;
}

/* tabs2acc-panel mit is-open Klasse IMMER sichtbar */
#kantons_container .dijitTitlePane.active-tab .tabs2acc-panel.is-open {
  display: block !important;
  visibility: visible !important;
  opacity: 1 !important;
  height: auto !important;
  overflow: visible !important;
}

/* Counter-Rules für Level-2 nicht mehr nötig — ULTIMATIV-Regeln verwenden
 * jetzt Child-Selektoren (>) und berühren Level-2 ContentOuter/wipeNode nicht mehr. */

/* Scrollbar nur bei hover */
#kantons_container > .dijitTitlePane.active-tab::-webkit-scrollbar {
  width: 8px;
}

#kantons_container > .dijitTitlePane.active-tab::-webkit-scrollbar-thumb {
  background: transparent;
  border-radius: 4px;
}

#kantons_container > .dijitTitlePane.active-tab:hover::-webkit-scrollbar-thumb {
  background: #999;
}

/* Innere ContentPanes */
#kantons_container .dijitContentPane {
  height: auto !important;
  overflow: visible !important;
  margin: 0 !important;
  padding: 0 !important;
  border: none !important;
  width: 100% !important;
  background: transparent !important;
}

/* Layer Manager Wrapper - weisse Ränder entfernen */
#kantons_container [id$="_lyrmgr_wrapper"] {
  height: auto !important;
  overflow: visible !important;
  margin: 0 !important;
  padding: 0 !important;
  width: 100% !important;
  background: transparent !important;
}

#kantons_container [id$="_lyrmgr_wrapper"] > * {
  width: 100% !important;
  margin: 0 !important;
  padding: 0 !important;
  background: transparent !important;
}

#kantons_container .ClassicLayerMgr {
  height: auto !important;
  overflow: visible !important;
  margin: 0 !important;
  padding: 0 !important;
  width: 100% !important;
  background: transparent !important;
  border: none !important;
}

/* TabContainer - weisse Ränder entfernen */
#kantons_container .dijitTabContainer {
  height: auto !important;
  overflow: visible !important;
  margin: 0 !important;
  padding: 0 !important;
  border: none !important;
  width: 100% !important;
  background: transparent !important;
}

#kantons_container .dijitTabPaneWrapper {
  height: auto !important;
  overflow: visible !important;
  margin: 0 !important;
  padding: 0 !important;
  border: none !important;
  width: 100% !important;
  background: transparent !important;
}

#kantons_container .dijitTabContainerTopChildWrapper {
  height: auto !important;
  overflow: visible !important;
  margin: 0 !important;
  padding: 0 !important;
  width: 100% !important;
  background: transparent !important;
}

#kantons_container .dijitTabListWrapper-top {
  display: none !important;
}

/* Innere Kategorie-Accordions - Borders/Backgrounds entfernen aber Padding behalten */
#kantons_container .dijitTitlePane {
  margin: 0 !important;
  border: none !important;
  width: 100% !important;
  background: transparent !important;
}

#kantons_container .dijitTitlePaneTitle {
  width: 100% !important;
  border: none !important;
  border-radius: 0 !important;
  min-height: 28px !important;
  height: auto !important;
  line-height: 1.4 !important;
  padding: 6px 8px !important;
  overflow: visible !important;
}

#kantons_container .dijitTitlePaneTextNode {
  display: inline-flex !important;
  align-items: center !important;
  flex-wrap: nowrap !important;
  gap: 4px !important;
  overflow: visible !important;
  white-space: nowrap !important;
  text-overflow: clip !important;
  line-height: 1.4 !important;
  height: auto !important;
  max-height: none !important;
  vertical-align: middle !important;
}

#kantons_container .dijitTitlePaneTextNode .appendtitle {
  display: inline !important;
  overflow: visible !important;
  white-space: nowrap !important;
  vertical-align: middle !important;
}

/* ===== CHECKBOX-AUSRICHTUNG ===== */
/*
 * Native Browser-Checkboxen beibehalten (ClassicLayerMgr.css: opacity: 100%).
 * Nur Wrapper und Input konsistent dimensionieren für Ausrichtung.
 */

/* dijitCheckBox Wrapper: Fixe Grösse für konsistente Ausrichtung */
#kantons_container .dijitCheckBox,
[id^="div_head_"] .dijitCheckBox {
  display: inline-flex !important;
  align-items: center !important;
  justify-content: center !important;
  width: 16px !important;
  min-width: 16px !important;
  height: 16px !important;
  flex-shrink: 0 !important;
  margin: 0 4px 0 0 !important;
  padding: 0 !important;
  background-image: none !important;
  background: transparent !important;
  border: none !important;
}

/* Native Checkbox: Quadratisch, einheitliche Grösse */
#kantons_container .dijitCheckBoxInput,
[id^="div_head_"] .dijitCheckBoxInput {
  width: 15px !important;
  height: 15px !important;
  min-width: 15px !important;
  margin: 0 !important;
  padding: 0 !important;
  flex-shrink: 0 !important;
  opacity: 1 !important;
  cursor: pointer !important;
  accent-color: #4b7b81 !important;
}

/* TitlePaneTitleFocus vertikal zentrieren */
.dijitTitlePaneTitleFocus {
  display: flex !important;
  align-items: center !important;
  min-height: 28px !important;
}

/* TitlePaneTextNode inline mit vertikaler Zentrierung */
.dijitTitlePaneTextNode {
  display: inline-flex !important;
  align-items: center !important;
  flex-wrap: nowrap !important;
  vertical-align: middle !important;
}

.dijitTitlePaneTextNode .appendtitle {
  display: inline !important;
  vertical-align: middle !important;
}

/* Arrow-Elemente: Vertikale Zentrierung (nur Themenkatalog) */
#kantons_container .dijitArrowNode {
  vertical-align: middle !important;
}

#kantons_container .dijitArrowNodeInner {
  vertical-align: middle !important;
}

#kantons_container .dijitTitlePaneTitleFocus {
  border-radius: 0 !important;
  height: auto !important;
  min-height: 28px !important;
  overflow: visible !important;
}

#kantons_container .dijitTitlePaneContentOuter {
  margin: 0 !important;
  border: none !important;
  width: 100% !important;
  background: transparent !important;
}

#kantons_container .dijitTitlePaneContentInner {
  margin: 0 !important;
  width: 100% !important;
  background: transparent !important;
}

/* Weisse Hintergründe/Borders global entfernen */
#kantons_container,
#kantons_container * {
  box-sizing: border-box !important;
}

#kantons_container .dijitBorderContainer,
#kantons_container .dijitBorderContainerPane {
  border: none !important;
  background: transparent !important;
}

#kantons_container .dijitAccordionContainer {
  border: none !important;
  background: transparent !important;
}

#kantons_container .dijitStackContainer {
  border: none !important;
  background: transparent !important;
}

/* Padding auf allen _pane Elementen entfernen (verursacht weisse Ränder) */
#tp_overview_menu_pane {
  padding: 0 !important;
  height: auto !important;
}

#tp_layer_menu_pane,
#tp_layer_menu2_pane,
#tp_layer_menu3_pane,
#tp_layer_menu4_pane {
  padding: 0 !important;
}

#kantons_container [id$="_pane"].dijitTitlePaneContentInner {
  padding: 0 !important;
}

/* Themenkatalog Höhe anpassen */
#tp_overview_menu.dijitTitlePane > .dijitTitlePaneContentOuter {
  height: var(--tnet-catalog-height, 450px) !important;
  max-height: none !important;
}

#kantons_container {
  height: var(--tnet-catalog-height, 450px) !important;
}

/* Dargestellte Themen: Höhenbegrenzung für Scroll */
#tp_sort_menu.dijitTitlePane > .dijitTitlePaneContentOuter {
  max-height: var(--tnet-active-height, 300px) !important;
  overflow-y: auto !important;
  /* Scrollbalken verstecken (analog Themenkatalog) */
  scrollbar-width: none;
  -ms-overflow-style: none;
}

#tp_sort_menu.dijitTitlePane > .dijitTitlePaneContentOuter::-webkit-scrollbar {
  display: none;
}

/* ===========================================================================
   TOC Container (für zukünftige Karten-Navigation)
   =========================================================================== */

.tnet-toc {
  position: fixed;
  top: 0;
  left: 0;
  width: 280px;
  height: 100vh;
  background: #fff;
  box-shadow: 2px 0 8px rgba(0,0,0,0.15);
  z-index: 2000;
  transform: translateX(-100%);
  transition: transform 0.3s ease;
  overflow-y: auto;
}

.tnet-toc.open {
  transform: translateX(0);
}

/* ===========================================
   TOC Header
   =========================================== */

.tnet-toc-header {
  position: sticky;
  top: 0;
  background: #700011;
  color: #fff;
  padding: 15px;
  display: flex;
  align-items: center;
  gap: 10px;
}

.tnet-toc-header img {
  height: 32px;
  width: auto;
}

.tnet-toc-title {
  font-size: 1.1rem;
  font-weight: 600;
  flex: 1;
}

.tnet-toc-close {
  background: none;
  border: none;
  color: #fff;
  font-size: 1.5rem;
  cursor: pointer;
  padding: 0 5px;
}

.tnet-toc-close:hover {
  opacity: 0.8;
}

/* ===========================================
   TOC Toggle Button
   =========================================== */

.tnet-toc-toggle {
  position: fixed;
  top: 10px;
  left: 10px;
  z-index: 1999;
  background: #700011;
  color: #fff;
  border: none;
  border-radius: 4px;
  padding: 8px 12px;
  cursor: pointer;
  box-shadow: 0 2px 6px rgba(0,0,0,0.2);
  display: flex;
  align-items: center;
  gap: 6px;
}

.tnet-toc-toggle:hover {
  background: #8a0015;
}

.tnet-toc-toggle img {
  height: 20px;
  width: auto;
}

/* ===========================================
   TOC Sections (Gruppen)
   =========================================== */

.tnet-toc-section {
  border-bottom: 1px solid #eee;
}

.tnet-toc-section-header {
  padding: 12px 15px;
  font-weight: 600;
  color: #333;
  background: #f5f5f5;
  cursor: pointer;
  display: flex;
  align-items: center;
  gap: 8px;
}

.tnet-toc-section-header:hover {
  background: #eee;
}

.tnet-toc-section-header img {
  height: 24px;
  width: auto;
}

.tnet-toc-section-arrow {
  margin-left: auto;
  transition: transform 0.2s;
}

.tnet-toc-section.open .tnet-toc-section-arrow {
  transform: rotate(90deg);
}

/* ===========================================
   TOC Items (Karten-Links)
   =========================================== */

.tnet-toc-items {
  display: none;
  padding: 5px 0;
}

.tnet-toc-section.open .tnet-toc-items {
  display: block;
}

.tnet-toc-item {
  padding: 8px 15px 8px 40px;
  color: #555;
  cursor: pointer;
  transition: background 0.15s;
}

.tnet-toc-item:hover {
  background: #f0f0f0;
  color: #700011;
}

.tnet-toc-item.active {
  background: #fff0f2;
  color: #700011;
  font-weight: 500;
}

/* ===========================================
   Responsive
   =========================================== */

@media (max-width: 600px) {
  .tnet-toc {
    width: 100%;
  }
}
/* ===========================================================================
   EBENEN-FARBSCHEMA - Graugrün Abstufungen
   =========================================================================== */

/* Ebene 1: Hauptmenü-Titel (Themenkatalog, Werkzeuge, Drucken, etc.) */
#spring > .dijitTitlePane > .dijitTitlePaneTitle {
  background: #4b7b81 !important;
}

#spring > .dijitTitlePane > .dijitTitlePaneTitle .dijitTitlePaneTextNode {
  color: #fff !important;
}

#spring > .dijitTitlePane > .dijitTitlePaneTitle .dijitArrowNode {
  display: none !important;
}

/* Ebene 2: tabs2acc-header (ÖREB, RAUMENTWICKLUNG, etc.) - bereits definiert oben */
/* background: linear-gradient(to bottom, #a8c4cc 0%, #95b5be 100%); */

/* Ebene 3: Innere TitlePanes (RAUMPLANUNG, etc.)
   WICHTIG: Nur anwenden wenn KEIN data-lyrmgr-depth gesetzt ist!
   Bei gesetztem Attribut übernimmt override.css die Hierarchie-Farben. */
#kantons_container .dijitTitlePane .dijitTitlePane:not([data-lyrmgr-depth]) > .dijitTitlePaneTitle,
.tabs2acc-panel .dijitTitlePane .dijitTitlePaneTitle {
  background: #b8cdd2 !important;
  border-left: 3px solid #4b7b81 !important;
  padding-left: 12px !important;
  font-size: 12px !important;
}

.tabs2acc-panel .dijitTitlePane .dijitTitlePaneTitle .dijitTitlePaneTextNode,
#kantons_container .dijitTitlePane .dijitTitlePane:not([data-lyrmgr-depth]) > .dijitTitlePaneTitle .dijitTitlePaneTextNode {
  color: #3d5a5f !important;
  font-size: 12px !important;
}

.tabs2acc-panel .dijitTitlePane .dijitTitlePaneTitle .dijitArrowNodeInner,
#kantons_container .dijitTitlePane .dijitTitlePane:not([data-lyrmgr-depth]) > .dijitTitlePaneTitle .dijitArrowNodeInner {
  color: #3d5a5f !important;
}

/* Ebene 4: Layer-Items (div_head_...) — Flexbox für Ausrichtung */
[id^="div_head_"] {
  display: flex !important;
  align-items: center !important;
  gap: 4px !important;
  background: #e8f0f1 !important;
  padding: 6px 10px !important;
  margin: 1px 0 !important;
  border-radius: 2px;
  transition: background 0.15s ease;
}

[id^="div_head_"]:hover {
  background: #cde0e3 !important;
}

/* Layer-Labels */
[id^="div_head_"] label {
  color: #2d4a4f !important;
  font-size: 12px !important;
}

/* ===== LETTER-SPACING FIX: Umbruch bei langen UPPERCASE-Übertiteln verhindern ===== */
#kantons_container .dijitTitlePane .dijitTitlePane .dijitTitlePaneTitle,
.tabs2acc-panel .dijitTitlePane .dijitTitlePaneTitle {
  letter-spacing: 0.5px !important;
  margin-top: 1px !important;
}

/* ===== GRUPPEN-LAYER: Scale-Override für einheitliche Grösse ===== */
.lyrmgr_group * {
  transform: none !important;
  transform-origin: unset !important;
}

.lyrmgr_group label {
  font-size: 0.9em !important;
}

/* ===========================================================================
   CATALOG FILTER BOX
   =========================================================================== */

.tnet-catalog-filter {
  position: relative;
  padding: 0 6px 4px 6px;
  background: transparent;
  flex-shrink: 0;
  margin: 0;
}

.tnet-catalog-filter-input {
  width: 100%;
  box-sizing: border-box;
  padding: 5px 28px 5px 8px;
  border: 1px solid #ccc;
  border-radius: 4px;
  font-size: 12px;
  outline: none;
  background: #fff;
  margin: 0;
}

.tnet-catalog-filter-input:focus {
  border-color: var(--m-color-primary, #4B7B81);
  box-shadow: 0 0 0 1px var(--m-color-primary, #4B7B81);
}

.tnet-catalog-filter-input::placeholder {
  color: #999;
  font-style: italic;
}

.tnet-catalog-filter-clear {
  position: absolute;
  right: 10px;
  top: 50%;
  transform: translateY(-50%);
  background: none;
  border: none;
  font-size: 16px;
  color: #999;
  cursor: pointer;
  padding: 2px 4px;
  line-height: 1;
}

.tnet-catalog-filter-clear:hover {
  color: #333;
}

/* Gefilterte Elemente ausblenden */
.tnet-filter-hidden {
  display: none !important;
}

/* ===========================================================================
   ACCORDION RESIZE HANDLES
   =========================================================================== */

/* Resize-Handle am unteren Rand der Accordion-Inhalte */
.tnet-accordion-resize-handle {
  height: 6px;
  min-height: 6px;
  cursor: ns-resize;
  background: rgba(75, 123, 129, 0.15);
  border-radius: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  pointer-events: auto !important;
  user-select: none;
  -webkit-user-select: none;
  transition: background 0.15s ease;
  flex-shrink: 0;
  overflow: hidden;
}

.tnet-accordion-resize-handle:hover {
  background: rgba(75, 123, 129, 0.28);
}

.tnet-accordion-resize-handle.active {
  background: rgba(75, 123, 129, 0.35);
}

/* Grip-Icon: dezente Punkte-Reihe */
.tnet-accordion-resize-handle::before {
  content: '';
  display: block;
  width: 28px;
  height: 0;
  border-top: 2px dotted rgba(75, 123, 129, 0.55);
}

/* Während Resize: kein Text-Select, Cursor überall */
body.tnet-resizing {
  user-select: none !important;
  -webkit-user-select: none !important;
  cursor: ns-resize !important;
}

body.tnet-resizing * {
  cursor: ns-resize !important;
}

body.tnet-resizing iframe {
  pointer-events: none !important;
}

/* ===== tnet-components.css ===== */
/**
 * tnet-components.css
 * TNET-spezifische UI-Komponenten Styles
 *
 * @version    1.1
 * @date       2026-02-12
 * @copyright  Trigonet AG
 * @author     Marco Dellenbach
 *
 * Extrahiert aus override.css - enthält:
 * - Rechtsklick-Kontextmenü
 * - Map Footer Bar (Koordinaten, Maßstab, Copyright)
 * - Kompass / North Arrow
 * - Polygon-Tool Button
 * - ÖREB-Tool Button + Ergebnis-Panel
 * - Spatial Query Panel (Ergebnis-Anzeige, Excel-Export)
 */

/* ===== RECHTSKLICK-KONTEXTMENÜ ===== */
.context-menu {
  display: none;
  position: fixed;
  z-index: 100000;
  background: white;
  border-radius: 8px;
  box-shadow: 0 4px 20px rgba(0,0,0,0.25), 0 0 1px rgba(0,0,0,0.1);
  min-width: 220px;
  padding: 6px 0;
  font-family: 'Roboto Condensed', Arial, sans-serif;
  font-size: 13px;
  animation: ctxFadeIn 0.15s ease-out;
}

@keyframes ctxFadeIn {
  from { opacity: 0; transform: scale(0.95); }
  to { opacity: 1; transform: scale(1); }
}

.context-menu.show {
  display: block;
}

.context-menu-header {
  padding: 8px 14px 6px;
  font-size: 11px;
  color: #666;
  border-bottom: 1px solid #eee;
  margin-bottom: 4px;
  font-family: 'Roboto Mono', monospace;
}

.context-menu-item {
  display: flex;
  align-items: center;
  padding: 8px 14px;
  cursor: pointer;
  transition: background 0.1s;
  color: #333;
}

.context-menu-item:hover {
  background: #4b7b81;
  color: white;
}

.context-menu-item:hover svg {
  fill: white;
}

.context-menu-item svg {
  width: 18px;
  height: 18px;
  margin-right: 10px;
  fill: #666;
  flex-shrink: 0;
  transition: fill 0.1s;
}

.context-menu-divider {
  height: 1px;
  background: #eee;
  margin: 4px 0;
}

/* Toast-Benachrichtigung für kopierte Koordinaten */
.ctx-toast {
  position: fixed;
  bottom: 80px;
  left: 50%;
  transform: translateX(-50%);
  background: #333;
  color: white;
  padding: 10px 20px;
  border-radius: 6px;
  font-size: 13px;
  z-index: 100001;
  animation: toastIn 0.3s ease-out;
  box-shadow: 0 4px 12px rgba(0,0,0,0.3);
}

@keyframes toastIn {
  from { opacity: 0; transform: translateX(-50%) translateY(10px); }
  to { opacity: 1; transform: translateX(-50%) translateY(0); }
}

.ctx-toast.fade-out {
  animation: toastOut 0.3s ease-in forwards;
}

@keyframes toastOut {
  to { opacity: 0; transform: translateX(-50%) translateY(-10px); }
}

/* ===== MAP FOOTER BAR - Durchgehende Leiste ===== */
#map-footer-bar {
  position: fixed;
  left: 0;
  right: 0;
  bottom: 0;
  z-index: 1000;
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: 26px;
  background: rgba(120, 120, 120, 0.7);
  font-family: 'Inter Tight', Arial, sans-serif;
  font-size: 11px;
  color: #fff;
  padding: 0 10px;
  box-sizing: border-box;
  backdrop-filter: blur(2px);
}

.map-footer-left {
  display: flex;
  align-items: center;
  gap: 10px;
}

.map-footer-scale {
  font-weight: 500;
  padding: 0;
  background: transparent;
  border-radius: 3px;
}

/* Maßstabs-Dropdown */
#map-scale-select {
  background: rgba(255,255,255,0.15);
  color: white;
  border: 1px solid rgba(255,255,255,0.3);
  border-radius: 3px;
  padding: 3px 6px;
  font-size: 12px;
  font-weight: 500;
  cursor: pointer;
  outline: none;
  min-width: 90px;
}

#map-scale-select:hover {
  background: rgba(255,255,255,0.25);
  border-color: rgba(255,255,255,0.5);
}

#map-scale-select:focus {
  border-color: #4b7b81;
  box-shadow: 0 0 0 2px rgba(75,123,129,0.3);
}

#map-scale-select option {
  background: #3a3a3a;
  color: white;
  padding: 5px;
}

.map-footer-scalebar {
  display: flex;
  align-items: center;
}

/* Scale Line im Footer */
#map-footer-bar #scale-line {
  position: relative !important;
  left: auto !important;
  bottom: auto !important;
}

#map-footer-bar .ol-scale-line {
  position: relative !important;
  background: transparent !important;
  padding: 0 !important;
  bottom: auto !important;
  left: auto !important;
}

#map-footer-bar .ol-scale-line-inner {
  background: rgba(255,255,255,0.2) !important;
  border: 1px solid rgba(255,255,255,0.5) !important;
  border-top: none !important;
  color: #fff !important;
  font-size: 10px !important;
  text-align: center !important;
  padding: 1px 4px !important;
}

.map-footer-center {
  display: flex;
  align-items: center;
  gap: 4px;
}

.map-footer-item {
  display: flex;
  align-items: center;
  gap: 4px;
  padding: 2px 8px;
  background: rgba(255,255,255,0.1);
  border-radius: 3px;
}

.map-footer-label {
  color: rgba(255,255,255,0.7);
  font-size: 10px;
}

.map-footer-value {
  font-family: 'Roboto Mono', 'Consolas', monospace;
  font-size: 11px;
  color: #fff;
  font-weight: 500;
}

/* Koordinatensystem Dropdown */
.map-coord-system {
  padding: 2px 4px !important;
}

#map-coord-switch {
  appearance: none;
  -webkit-appearance: none;
  background: transparent url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='10' height='10' viewBox='0 0 24 24'%3E%3Cpath fill='white' d='M7 10l5 5 5-5z'/%3E%3C/svg%3E") no-repeat right center;
  border: none;
  font-family: 'Roboto Condensed', Arial, sans-serif;
  font-size: 11px;
  font-weight: 500;
  color: #fff;
  cursor: pointer;
  padding: 0 16px 0 0;
}

#map-coord-switch:focus {
  outline: none;
}

#map-coord-switch option {
  background: #555;
  color: #fff;
}

/* Picker Button */
.map-footer-picker {
  cursor: pointer;
  padding: 3px 6px !important;
  color: rgba(255,255,255,0.7);
  transition: all 0.15s;
}

.map-footer-picker:hover {
  background: rgba(255,255,255,0.2);
  color: #fff;
}

.map-footer-picker.active {
  background: #4b7b81;
  color: white;
}

.map-footer-picker svg {
  display: block;
}

.map-footer-right {
  font-size: 10px;
  color: rgba(255,255,255,0.8);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  max-width: 50%;
}

.map-footer-right a {
  color: rgba(255,255,255,0.9);
  text-decoration: none;
}

.map-footer-right a:hover {
  text-decoration: underline;
}

/* ===== DESKTOP-FOOTER NEBEN SEITLICHEN DOCKS ===== */
body.tnet-footer-adaptive #map-footer-bar {
  display: grid;
  grid-template-areas: "left center right";
  grid-template-columns: auto minmax(0, max-content) minmax(56px, 1fr);
  gap: 3px 8px;
  height: auto;
  min-height: 26px;
  padding: 3px 6px;
  align-items: start;
}
body.tnet-footer-adaptive #map-footer-bar.map-footer-no-space { display: none; }
body.tnet-footer-adaptive #map-footer-bar.map-footer-stacked {
  grid-template-areas: "left right" "center center";
  grid-template-columns: minmax(0, 1fr) 72px;
}
body.tnet-footer-adaptive .map-footer-left {
  grid-area: left;
  min-width: 0;
  flex-wrap: wrap;
  gap: 3px 6px;
}
body.tnet-footer-adaptive .map-footer-center {
  grid-area: center;
  min-width: 0;
  flex-wrap: wrap;
  gap: 3px;
}
body.tnet-footer-adaptive .map-footer-item {
  min-width: 0;
  max-width: 100%;
  box-sizing: border-box;
  flex-wrap: wrap;
}
body.tnet-footer-adaptive .map-footer-altitude { order: 0; }
body.tnet-footer-adaptive .map-footer-picker { order: 1; }
body.tnet-footer-adaptive .map-coord-system { order: 2; }
body.tnet-footer-adaptive .map-footer-coordinates { order: 3; }
body.tnet-footer-adaptive .map-footer-compact .map-footer-item { padding: 2px 4px; }
body.tnet-footer-adaptive .map-footer-compact .map-footer-coordinates .map-footer-label { display: none; }
body.tnet-footer-adaptive .map-footer-value {
  min-width: 0;
  line-height: 16px;
  overflow-wrap: anywhere;
}
body.tnet-footer-adaptive .map-footer-right {
  grid-area: right;
  display: flex;
  align-items: center;
  gap: 4px;
  min-width: 0;
  max-width: 220px;
  width: 100%;
  justify-self: end;
  overflow: visible;
}
body.tnet-footer-adaptive #map-footer-copyright {
  display: none;
}
.map-footer-sources { flex: 1; min-width: 0; }
.map-footer-sources[hidden] { display: none; }
.map-footer-sources summary {
  cursor: pointer;
  padding: 0;
  border: 0;
  display: block;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  text-decoration: underline;
  text-underline-offset: 2px;
  list-style: none;
}
.map-footer-sources summary::-webkit-details-marker { display: none; }
.map-footer-sources summary:focus-visible { outline: 2px solid #fff; outline-offset: 1px; }
.map-footer-sources-content {
  position: absolute;
  right: 6px;
  bottom: calc(100% + 6px);
  width: min(360px, calc(100% - 12px));
  max-height: min(320px, 45vh);
  overflow: auto;
  overflow-wrap: anywhere;
  white-space: normal;
  box-sizing: border-box;
  padding: 10px;
  color: #203847;
  background: #fff;
  border: 1px solid #b7c9cc;
  border-radius: 4px;
  box-shadow: 0 2px 8px rgba(0,0,0,.2);
}
body.tnet-footer-adaptive .map-footer-sources-content a { color: #315f65; text-decoration: underline; }
body.tnet-footer-adaptive #njs_info_pane.docked-right,
body.tnet-footer-adaptive #oereb-dock-panel.docked-right,
body.tnet-footer-adaptive #print-panel.docked-right,
body.tnet-footer-adaptive #wms-panel.docked-right,
body.tnet-footer-adaptive #tnet-module-dock {
  bottom: var(--tnet-map-bottom-inset, 0px) !important;
}
body.tnet-footer-adaptive .tnet-module-legend-map-overlay {
  bottom: calc(var(--tnet-map-footer-height, 26px) + 79px);
  max-width: max(0px, calc(var(--tnet-map-footer-width, 100vw) - 24px));
}
body.tnet-footer-adaptive.tnet-module-fullheight .tnet-module-legend-map-overlay {
  bottom: calc(var(--tnet-map-footer-height, 26px) + 16px);
  left: calc(var(--tnet-map-footer-left-inset, 340px) + 12px);
}

/* Hide original scale-line if outside footer */
#centerPaneLayout > #scale-line,
#mapContainer > #scale-line:not(#map-footer-bar #scale-line) {
  display: none !important;
}

/* OL-Attribution visuell verstecken aber im DOM belassen,
   damit der Inhalt dynamisch ausgelesen werden kann */
.ol-attribution {
  position: absolute !important;
  width: 1px !important;
  height: 1px !important;
  overflow: hidden !important;
  clip: rect(0,0,0,0) !important;
  white-space: nowrap !important;
  opacity: 0 !important;
  pointer-events: none !important;
}

/* Mapcontrols ausblenden (S/W Button, Opacity Slider) */
#mapcontrols_div {
  display: none !important;
}

/* ===== KOMPASS / NORTH ARROW ===== */
/* OL Rotate-Control: Standardverhalten (autoHide) beibehalten,
   damit der Nordpfeil bei Rotation sichtbar wird */

/* ===== POLYGON-TOOL BUTTON (ersetzt durch tnet-mapcontrols) ===== */
#polygon-tool-btn {
  display: none !important;
}

#polygon-tool-btn:hover {
  background: #f0f0f0;
  box-shadow: 0 3px 8px rgba(0,0,0,0.35);
}

#polygon-tool-btn.active {
  background: #4b7b81;
}

#polygon-tool-btn.active svg path {
  fill: white;
  stroke: white;
}

#polygon-tool-btn svg {
  width: 22px;
  height: 22px;
}

/* ===== SPATIAL QUERY PANEL ===== */
/* Panel ist ausserhalb mapContainer, verwendet position: fixed */
.spatial-query-panel {
  position: fixed;
  top: 60px;
  left: calc(100vw - 526px); /* 420px Breite + 106px Abstand rechts */
  width: 420px;
  max-height: calc(100vh - 120px);
  min-height: 200px;
  background: white;
  border-radius: 6px;
  box-shadow: 0 4px 16px rgba(0,0,0,0.25);
  z-index: 1001;
  display: flex;
  flex-direction: column;
  overflow: hidden;
  resize: none !important; /* KEIN RESIZE */
  font-family: 'Roboto Condensed', Arial, sans-serif;
  line-height: 1.4;
}

.spatial-query-panel.hidden {
  display: none;
}

/* Resize-Handles - Kanten */
.spatial-query-resize-top,
.spatial-query-resize-left,
.spatial-query-resize-right,
.spatial-query-resize-bottom {
  position: absolute;
  z-index: 10;
}

.spatial-query-resize-top {
  top: 0;
  left: 0;
  right: 0;
  height: 6px;
  cursor: ns-resize;
  display: none; /* Nur wenn angedockt sichtbar */
  background: linear-gradient(to bottom, #3a6268, #4b7b81);
  flex-shrink: 0;
}

.spatial-query-resize-top:hover {
  background: linear-gradient(to bottom, #2d4f54, #3a6268);
}

.spatial-query-resize-top::after {
  content: '';
  display: block;
  width: 40px;
  height: 4px;
  margin: 1px auto 0;
  background: rgba(255,255,255,0.4);
  border-radius: 2px;
}

.spatial-query-resize-left {
  top: 0;
  left: 0;
  bottom: 0;
  width: 6px;
  cursor: ew-resize;
}

.spatial-query-resize-right {
  top: 0;
  right: 0;
  bottom: 0;
  width: 6px;
  cursor: ew-resize;
}

.spatial-query-resize-bottom {
  bottom: 0;
  left: 0;
  right: 0;
  height: 6px;
  cursor: ns-resize;
}

/* Resize-Handles - Ecken */
.spatial-query-resize-corner-tl,
.spatial-query-resize-corner-tr,
.spatial-query-resize-corner-bl,
.spatial-query-resize-corner-br {
  position: absolute;
  width: 12px;
  height: 12px;
  z-index: 11;
}

.spatial-query-resize-corner-tl {
  top: 0;
  left: 0;
  cursor: nwse-resize;
}

.spatial-query-resize-corner-tr {
  top: 0;
  right: 0;
  cursor: nesw-resize;
}

.spatial-query-resize-corner-bl {
  bottom: 0;
  left: 0;
  cursor: nesw-resize;
}

.spatial-query-resize-corner-br {
  bottom: 0;
  right: 0;
  cursor: nwse-resize;
}

/* Hover-Effekt für seitliche Handles */
.spatial-query-resize-left:hover,
.spatial-query-resize-right:hover,
.spatial-query-resize-bottom:hover {
  background: rgba(75, 123, 129, 0.15);
}

/* Angedockt unten */
.spatial-query-panel.docked-bottom {
  position: fixed;
  top: auto !important;
  right: 0 !important;
  bottom: 32px !important;
  left: 0 !important;
  width: 100% !important;
  max-width: 100% !important;
  height: 280px;
  max-height: 50vh;
  border-radius: 0;
  resize: none !important;  /* Kein natives Resize wenn angedockt */
}

.spatial-query-panel.docked-bottom .spatial-query-resize-top {
  display: block;
}

/* Im angedockten Modus: seitliche Handles ausblenden */
.spatial-query-panel.docked-bottom .spatial-query-resize-left,
.spatial-query-panel.docked-bottom .spatial-query-resize-right,
.spatial-query-panel.docked-bottom .spatial-query-resize-bottom,
.spatial-query-panel.docked-bottom .spatial-query-resize-corner-tl,
.spatial-query-panel.docked-bottom .spatial-query-resize-corner-tr,
.spatial-query-panel.docked-bottom .spatial-query-resize-corner-bl,
.spatial-query-panel.docked-bottom .spatial-query-resize-corner-br {
  display: none;
}

.spatial-query-panel.docked-bottom .spatial-query-results {
  max-height: none;
}

.spatial-query-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 8px 12px;
  background: #4b7b81;
  color: white;
  font-weight: 500;
  cursor: move;
  user-select: none;
  height: 36px;
  min-height: 36px;
  box-sizing: border-box;
}

.spatial-query-title {
  flex: 1;
  font-size: 13px;
}

.spatial-query-actions {
  display: flex;
  align-items: center;
  gap: 6px;
}

.spatial-query-btn {
  background: rgba(255,255,255,0.15);
  border: none;
  color: white;
  width: 28px;
  height: 28px;
  border-radius: 4px;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: background 0.2s;
}

.spatial-query-btn:hover {
  background: rgba(255,255,255,0.3);
}

.spatial-query-header h3 {
  margin: 0;
  font-size: 14px;
  font-weight: 500;
}

.spatial-query-close {
  background: rgba(255,255,255,0.15);
  border: none;
  color: white;
  width: 28px;
  height: 28px;
  font-size: 18px;
  cursor: pointer;
  border-radius: 4px;
  line-height: 1;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: background 0.2s;
}

.spatial-query-close:hover {
  background: rgba(255,255,255,0.3);
}

.spatial-query-status {
  padding: 8px 12px;
  font-size: 12px;
  color: #666;
  background: #f8f8f8;
  border-bottom: 1px solid #eee;
  flex-shrink: 0;
}

.spatial-query-results {
  flex: 1;
  overflow-y: auto;
  overflow-x: auto;
  padding: 8px;
  min-height: 100px;
}

/* Custom Scrollbar */
.spatial-query-results::-webkit-scrollbar {
  width: 8px;
}

.spatial-query-results::-webkit-scrollbar-track {
  background: #f1f1f1;
  border-radius: 4px;
}

.spatial-query-results::-webkit-scrollbar-thumb {
  background: #c1c1c1;
  border-radius: 4px;
}

.spatial-query-results::-webkit-scrollbar-thumb:hover {
  background: #a1a1a1;
}

/* Ergebnis-Layer */
.query-result-layer {
  margin-bottom: 6px;
  border: 1px solid #e0e0e0;
  border-radius: 4px;
  overflow: hidden;
}

.query-result-header {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 10px 12px;
  background: #f5f5f5;
  cursor: pointer;
  transition: background 0.2s;
}

.query-result-header:hover {
  background: #ebebeb;
}

.query-result-icon {
  color: #666;
  font-size: 10px;
  width: 12px;
}

.query-result-name {
  flex: 1;
  font-size: 13px;
  font-weight: 500;
  color: #333;
}

.query-result-count {
  background: #4b7b81;
  color: white;
  font-size: 11px;
  padding: 2px 8px;
  border-radius: 10px;
  min-width: 24px;
  text-align: center;
}

.query-result-content {
  padding: 8px 12px;
  background: white;
}

.query-result-content.hidden {
  display: none;
}

/* Ergebnis-Tabelle */
.query-result-table-wrap {
  width: 100%;
  overflow-x: auto;
  overflow-y: hidden;
  -webkit-overflow-scrolling: touch;
}

.query-result-table-wrap::-webkit-scrollbar {
  height: 8px;
}

.query-result-table-wrap::-webkit-scrollbar-track {
  background: #f1f1f1;
  border-radius: 4px;
}

.query-result-table-wrap::-webkit-scrollbar-thumb {
  background: #b0b0b0;
  border-radius: 4px;
  min-width: 40px;
}

.query-result-table-wrap::-webkit-scrollbar-thumb:hover {
  background: #909090;
}

.query-result-table {
  width: max-content;
  min-width: 100%;
  border-collapse: collapse;
  font-size: 11px;
}

.query-result-table th,
.query-result-table td {
  padding: 6px 8px;
  text-align: left;
  border-bottom: 1px solid #eee;
  white-space: nowrap;
  line-height: 1.5;
  vertical-align: middle;
}

/* Spaltenheader: dürfen truncated werden */
.query-result-table th {
  max-width: 200px;
  overflow: hidden;
  text-overflow: ellipsis;
}

.query-result-table thead th {
  background: #f9f9f9;
  font-weight: 500;
  color: #555;
  position: sticky;
  top: 0;
  z-index: 1;
}

.query-result-table tbody tr:hover {
  background: #f5f9f9;
}

.sq-col-hidden {
  display: none;
}

.sq-more-wrap {
  margin-top: 8px;
  text-align: right;
}

.sq-show-more-btn {
  appearance: none;
  border: 1px solid #cfcfcf;
  background: #f7f7f7;
  color: #444;
  font-size: 11px;
  line-height: 1.2;
  padding: 5px 10px;
  border-radius: 4px;
  cursor: pointer;
}

.sq-show-more-btn:hover {
  background: #ececec;
  border-color: #bdbdbd;
}

/* Klickbare Zeilen für Highlighting */
.query-result-row {
  cursor: pointer;
  transition: background 0.15s ease;
}

.query-result-row:hover {
  background: #e8f4f5 !important;
}

.query-result-row:active {
  background: #d0ebee !important;
}

.zoom-cell {
  width: 24px;
  text-align: center;
  padding: 4px !important;
}

.zoom-icon {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  opacity: 0;
  transition: opacity 0.25s ease, color 0.25s ease;
  color: #999;
  cursor: pointer;
}

.query-result-row:hover .zoom-icon {
  opacity: 0.7;
  color: #0078d4;
}

.query-result-row:hover .zoom-icon:hover {
  opacity: 1;
  color: #005a9e;
}

/* Status-Meldungen */
.spatial-query-results .no-results,
.spatial-query-results .error,
.spatial-query-results .no-features {
  padding: 12px;
  text-align: center;
  color: #888;
  font-size: 12px;
}

.spatial-query-results .error {
  color: #c44;
}

.more-results {
  padding: 8px;
  text-align: center;
  color: #888;
  font-size: 11px;
  font-style: italic;
}

/* Loading Spinner */
.loading-spinner {
  width: 24px;
  height: 24px;
  margin: 20px auto;
  border: 3px solid #e0e0e0;
  border-top: 3px solid #4b7b81;
  border-radius: 50%;
  animation: spin 1s linear infinite;
}

@keyframes spin {
  0% { transform: rotate(0deg); }
  100% { transform: rotate(360deg); }
}

/* === Spezielle Styling für leere/nicht abfragbare Layer === */
.query-result-empty .query-result-header,
.query-result-not-queryable .query-result-header {
  background: #f8f8f8;
  border-left: 3px solid #999;
}

.query-result-empty .query-result-name,
.query-result-not-queryable .query-result-name {
  color: #666;
  font-style: italic;
}

.query-result-empty .query-result-count,
.query-result-not-queryable .query-result-count {
  background: #999;
}

.empty-layers-list,
.not-queryable-layers-list {
  list-style: none;
  padding: 0;
  margin: 8px 0;
}

.empty-layers-list li,
.not-queryable-layers-list li {
  padding: 6px 12px;
  border-bottom: 1px solid #eee;
  font-size: 12px;
  color: #666;
}

.empty-layers-list li:last-child,
.not-queryable-layers-list li:last-child {
  border-bottom: none;
}

.error-hint {
  font-size: 10px;
  color: #999;
  font-style: italic;
}

/* ===== ÖREB-TOOL BUTTON (ersetzt durch tnet-mapcontrols) ===== */
#oereb-tool-btn {
  display: none !important;
}
#oereb-tool-btn:hover {
  background: #f0f0f0;
  box-shadow: 0 3px 8px rgba(0,0,0,0.35);
}
#oereb-tool-btn.active {
  background: #4b7b81;
}
#oereb-tool-btn.active svg path,
#oereb-tool-btn.active svg rect,
#oereb-tool-btn.active svg circle {
  fill: white;
  stroke: white;
}
#oereb-tool-btn svg {
  width: 22px;
  height: 22px;
}

/* ===== ÖREB DOCK-PANEL ===== */
.oereb-dock-panel {
  position: fixed;
  top: 60px;
  right: 10px;
  width: 440px;
  height: calc(100vh - 120px);
  min-height: 250px;
  min-width: 320px;
  background: white;
  border-radius: 6px;
  box-shadow: 0 4px 16px rgba(0,0,0,0.25);
  z-index: 1001;
  display: flex;
  flex-direction: column;
  overflow: hidden;
  resize: none !important;
  font-family: 'Roboto Condensed', Arial, sans-serif;
  font-size: 13px;
}
/* Angedockt rechts (Position wird via JS gesetzt, identisch mit Objektinfo) */
.oereb-dock-panel.docked-right {
  border-radius: 0 !important;
  box-shadow: -4px 0 12px rgba(0,0,0,0.15) !important;
  display: flex !important;
  flex-direction: column !important;
}
/* Hidden MUSS nach docked-right stehen, damit es gewinnt */
.oereb-dock-panel.docked-right.hidden,
.oereb-dock-panel.hidden {
  display: none !important;
}

/* Resize-Handles (gleich wie Spatial Query) */
.oereb-resize-top,
.oereb-resize-left,
.oereb-resize-right,
.oereb-resize-bottom {
  position: absolute;
  z-index: 10;
}
.oereb-resize-top {
  top: 0; left: 0; right: 0;
  height: 6px;
  cursor: ns-resize;
}
.oereb-resize-left {
  top: 0; left: 0; bottom: 0;
  width: 8px;
  cursor: ew-resize;
  background: linear-gradient(to right, rgba(75,123,129,0.15), transparent);
}
.oereb-resize-right {
  top: 0; right: 0; bottom: 0;
  width: 8px;
  cursor: ew-resize;
  background: linear-gradient(to left, rgba(75,123,129,0.15), transparent);
}
.oereb-resize-bottom {
  bottom: 0; left: 0; right: 0;
  height: 6px;
  cursor: ns-resize;
}
.oereb-resize-corner-tl,
.oereb-resize-corner-tr,
.oereb-resize-corner-bl,
.oereb-resize-corner-br {
  position: absolute;
  width: 12px;
  height: 12px;
  z-index: 11;
}
.oereb-resize-corner-tl { top: 0; left: 0; cursor: nwse-resize; }
.oereb-resize-corner-tr { top: 0; right: 0; cursor: nesw-resize; }
.oereb-resize-corner-bl { bottom: 0; left: 0; cursor: nesw-resize; }
.oereb-resize-corner-br { bottom: 0; right: 0; cursor: nwse-resize; }
.oereb-resize-left:hover,
.oereb-resize-right:hover,
.oereb-resize-bottom:hover,
.oereb-resize-top:hover {
  background: rgba(75, 123, 129, 0.15);
}

/* Im angedockten Modus: nur linker Resize sichtbar (identisch mit Objektinfo) */
.oereb-dock-panel.docked-right .oereb-resize-left {
  display: block !important;
  cursor: ew-resize;
  width: 8px;
  background: linear-gradient(to right, rgba(75,123,129,0.15), transparent) !important;
}
.oereb-dock-panel.docked-right .oereb-resize-left:hover {
  background: linear-gradient(to right, rgba(75,123,129,0.3), transparent) !important;
}
.oereb-dock-panel.docked-right .oereb-resize-top,
.oereb-dock-panel.docked-right .oereb-resize-right,
.oereb-dock-panel.docked-right .oereb-resize-bottom,
.oereb-dock-panel.docked-right .oereb-resize-corner-tl,
.oereb-dock-panel.docked-right .oereb-resize-corner-tr,
.oereb-dock-panel.docked-right .oereb-resize-corner-bl,
.oereb-dock-panel.docked-right .oereb-resize-corner-br {
  display: none;
}

/* Header (gleich wie spatial-query-header) */
.oereb-dock-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 8px 12px;
  background: #4b7b81;
  color: white;
  font-weight: 500;
  cursor: move;
  user-select: none;
  height: 36px;
  min-height: 36px;
  box-sizing: border-box;
  flex-shrink: 0;
}
.oereb-dock-panel.docked-right .oereb-dock-header {
  cursor: default;
}
.oereb-dock-title {
  flex: 1;
  font-size: 13px;
  white-space: nowrap;
}
.oereb-dock-actions {
  display: flex;
  align-items: center;
  gap: 6px;
}
.oereb-dock-btn {
  background: rgba(255,255,255,0.15);
  border: none;
  color: white;
  width: 28px;
  height: 28px;
  border-radius: 4px;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: background 0.2s;
}
.oereb-dock-btn:hover {
  background: rgba(255,255,255,0.3);
}
.oereb-dock-close {
  background: rgba(255,255,255,0.15);
  border: none;
  color: white;
  width: 28px;
  height: 28px;
  font-size: 18px;
  cursor: pointer;
  border-radius: 4px;
  line-height: 1;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: background 0.2s;
}
.oereb-dock-close:hover {
  background: rgba(255,255,255,0.3);
}

/* Selection / Info-Bereich (oben im Panel) */
.oereb-selection {
  flex-shrink: 0;
  border-bottom: 1px solid #eee;
  max-height: 40%;
  overflow-y: auto;
}
.oereb-selection:empty {
  display: none;
}
.oereb-info-text {
  padding: 14px 12px;
  color: #666;
  font-size: 13px;
  display: flex;
  align-items: center;
  gap: 8px;
}
.oereb-info-text.oereb-error {
  color: #c62828;
}

/* Gewähltes Grundstück - kompakte Info-Zeile */
.oereb-selected-info {
  padding: 8px 12px;
  background: #f0f6f7;
}
.oereb-sel-row {
  display: flex;
  align-items: center;
  gap: 10px;
  flex-wrap: wrap;
}
.oereb-sel-row2 {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-top: 4px;
}
.oereb-sel-label {
  font-weight: 600;
  color: #333;
}
.oereb-sel-egrid {
  font-family: 'Roboto Mono', 'Consolas', monospace;
  font-size: 12px;
  color: #4b7b81;
  letter-spacing: 0.3px;
}
.oereb-sel-kanton {
  background: #4b7b81;
  color: white;
  padding: 1px 6px;
  border-radius: 3px;
  font-size: 11px;
  font-weight: 500;
}
.oereb-sel-typ {
  color: #888;
  font-size: 11px;
  font-style: italic;
}
.oereb-sel-gemeinde {
  font-size: 12px;
  color: #555;
}
.oereb-sel-area {
  font-size: 12px;
  color: #888;
}
.oereb-back-btn {
  margin-top: 6px;
  background: none;
  border: 1px solid #ccc;
  border-radius: 3px;
  padding: 3px 10px;
  font-size: 11px;
  color: #4b7b81;
  cursor: pointer;
  font-family: 'Inter Tight', Arial, sans-serif;
}
.oereb-back-btn:hover {
  background: #e8f0f1;
  border-color: #4b7b81;
}

/* Multi-EGRID Auswahlliste */
.oereb-multi-header {
  padding: 10px 12px 6px;
  font-size: 12px;
  color: #555;
  font-weight: 500;
}
.oereb-result-list {
  padding: 0 12px 10px;
}
.oereb-result-item {
  display: flex;
  flex-direction: column;
  gap: 2px;
  padding: 8px 10px;
  margin-bottom: 4px;
  border: 1px solid #e0e0e0;
  border-radius: 4px;
  cursor: pointer;
  transition: all 0.15s ease;
}
.oereb-result-item:hover {
  background: #e8f0f1;
  border-color: #4b7b81;
}
.oereb-ri-main {
  display: flex;
  align-items: center;
  gap: 8px;
}
.oereb-ri-details {
  display: flex;
  align-items: center;
  gap: 8px;
}
.oereb-ri-nr {
  font-weight: 600;
  font-size: 13px;
}
.oereb-ri-egrid {
  font-family: 'Roboto Mono', 'Consolas', monospace;
  font-size: 11px;
  color: #4b7b81;
}
.oereb-ri-typ {
  font-size: 11px;
  color: #888;
  font-style: italic;
}
.oereb-ri-kanton {
  font-size: 11px;
  color: #666;
}
.oereb-ri-gemeinde {
  font-size: 11px;
  color: #555;
}
.oereb-ri-area {
  font-size: 11px;
  color: #888;
}

/* iframe Container (nimmt restlichen Platz ein) */
.oereb-iframe-container {
  flex: 1;
  overflow: hidden;
  min-height: 0;
}

/* Während ÖREB-Modus: Nur Maptip-Popups deaktivieren, Sidepanel/Layermanager bleibt bedienbar.
   NICHT analog drawing-mode: ÖREB braucht kein DOM-Event-Blocking auf #freepane,
   da der Klick-Listener direkt auf dem OL-Map-Objekt registriert ist. */
/* ÖREB Dock-Panel bleibt bedienbar */
.oereb-dock-panel {
  pointer-events: auto !important;
}
.oereb-dock-panel * {
  pointer-events: auto;
}

/* ===== WMS PANEL (Externe Kartendienste) ===== */
/* Floating-Panel ausserhalb Sidebar, identisches Design wie Spatial-Query-Panel */
.wms-panel {
  position: fixed;
  top: 80px;
  left: calc(50vw - 220px);
  width: 440px;
  height: 520px;
  min-width: 360px;
  min-height: 300px;
  background: white;
  border-radius: 6px;
  box-shadow: 0 4px 16px rgba(0,0,0,0.25);
  z-index: 1001;
  display: flex;
  flex-direction: column;
  overflow: hidden;
  font-family: 'Roboto Condensed', Arial, sans-serif;
  line-height: 1.4;
}

.wms-panel.hidden {
  display: none !important;
}

/* Resize-Handles */
.wms-resize-top,
.wms-resize-left,
.wms-resize-right,
.wms-resize-bottom {
  position: absolute;
  z-index: 10;
}

.wms-resize-top { top: 0; left: 0; right: 0; height: 6px; cursor: ns-resize; }
.wms-resize-left { top: 0; left: 0; bottom: 0; width: 6px; cursor: ew-resize; }
.wms-resize-right { top: 0; right: 0; bottom: 0; width: 6px; cursor: ew-resize; }
.wms-resize-bottom { bottom: 0; left: 0; right: 0; height: 6px; cursor: ns-resize; }

.wms-resize-corner-tl,
.wms-resize-corner-tr,
.wms-resize-corner-bl,
.wms-resize-corner-br {
  position: absolute;
  width: 12px;
  height: 12px;
  z-index: 11;
}

.wms-resize-corner-tl { top: 0; left: 0; cursor: nwse-resize; }
.wms-resize-corner-tr { top: 0; right: 0; cursor: nesw-resize; }
.wms-resize-corner-bl { bottom: 0; left: 0; cursor: nesw-resize; }
.wms-resize-corner-br { bottom: 0; right: 0; cursor: nwse-resize; }

.wms-resize-left:hover,
.wms-resize-right:hover,
.wms-resize-top:hover,
.wms-resize-bottom:hover {
  background: rgba(75, 123, 129, 0.15);
}

/* Docked-Right Modus */
.wms-panel.docked-right {
  position: fixed !important;
  top: 69px !important;
  right: 0 !important;
  bottom: 32px !important;
  left: auto !important;
  border-radius: 0 !important;
  height: auto !important;
}

.wms-panel.docked-right .wms-resize-top,
.wms-panel.docked-right .wms-resize-right,
.wms-panel.docked-right .wms-resize-bottom,
.wms-panel.docked-right .wms-resize-corner-tl,
.wms-panel.docked-right .wms-resize-corner-tr,
.wms-panel.docked-right .wms-resize-corner-bl,
.wms-panel.docked-right .wms-resize-corner-br {
  display: none;
}

.wms-panel.docked-right .wms-resize-left {
  display: block;
  cursor: ew-resize;
}

/* Header */
.wms-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 8px 12px;
  background: #4b7b81;
  color: white;
  font-weight: 500;
  cursor: move;
  user-select: none;
  height: 36px;
  min-height: 36px;
  box-sizing: border-box;
  flex-shrink: 0;
}

.wms-title {
  flex: 1;
  font-size: 13px;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.wms-actions {
  display: flex;
  align-items: center;
  gap: 6px;
  margin-left: auto;
}

.wms-btn {
  background: rgba(255,255,255,0.15);
  border: none;
  color: white;
  width: 28px;
  height: 28px;
  border-radius: 4px;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: background 0.2s;
}

.wms-btn:hover {
  background: rgba(255,255,255,0.3);
}

.wms-btn svg {
  width: 16px;
  height: 16px;
}

.wms-close {
  background: rgba(255,255,255,0.15);
  border: none;
  color: white;
  width: 28px;
  height: 28px;
  font-size: 18px;
  cursor: pointer;
  border-radius: 4px;
  line-height: 1;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: background 0.2s;
}

.wms-close:hover {
  background: rgba(255,255,255,0.3);
}

/* Body */
.wms-body {
  flex: 1;
  display: flex;
  flex-direction: column;
  overflow: hidden;
  min-height: 0;
}

.wms-url-bar {
  padding: 10px 12px;
  background: #f8f8f8;
  border-bottom: 1px solid #eee;
  flex-shrink: 0;
}

.wms-label {
  display: block;
  font-size: 11px;
  color: #666;
  margin-bottom: 6px;
}

.wms-url-row {
  display: flex;
  gap: 6px;
  margin-bottom: 6px;
}

.wms-url-row:last-child {
  margin-bottom: 0;
}

.wms-select {
  flex: 1;
  font-size: 12px;
  padding: 5px 8px;
  border: 1px solid #ccc;
  border-radius: 3px;
  background: white;
  min-width: 0;
}

.wms-input {
  flex: 1;
  font-size: 12px;
  padding: 5px 8px;
  border: 1px solid #ccc;
  border-radius: 3px;
  background: white;
  min-width: 0;
  outline: none;
}

.wms-input:focus {
  border-color: #4b7b81;
  box-shadow: 0 0 0 2px rgba(75,123,129,0.15);
}

.wms-load-btn {
  padding: 5px 14px;
  font-size: 12px;
  background: #4b7b81;
  color: white;
  border: none;
  border-radius: 3px;
  cursor: pointer;
  white-space: nowrap;
  flex-shrink: 0;
}

.wms-load-btn:hover { background: #3a6268; }
.wms-load-btn:disabled { opacity: 0.5; cursor: not-allowed; }

/* Status */
.wms-status {
  padding: 6px 12px;
  font-size: 11px;
  color: #666;
  background: #fafafa;
  border-bottom: 1px solid #eee;
  flex-shrink: 0;
  display: none;
}

.wms-status.visible { display: block; }
.wms-status.error { color: #c0392b; background: #fdf0ef; }
.wms-status.success { color: #27ae60; background: #f0faf4; }

/* Filter */
.wms-filter-row {
  padding: 6px 12px;
  background: #f0f0f0;
  border-bottom: 1px solid #e0e0e0;
  flex-shrink: 0;
}

.wms-filter-input { width: 100%; box-sizing: border-box; }

/* Layer-Liste */
.wms-layer-list {
  flex: 1;
  overflow-y: auto;
  overflow-x: hidden;
  min-height: 0;
  padding: 0;
}

.wms-layer-item {
  display: flex;
  align-items: center;
  padding: 6px 12px;
  font-size: 12px;
  border-bottom: 1px solid #f0f0f0;
  gap: 8px;
  cursor: pointer;
  transition: background 0.15s;
}

.wms-layer-item:hover { background: #f5f9fa; }
.wms-layer-item.added { background: #e8f5e9; }

.wms-layer-cb {
  flex-shrink: 0;
  width: 15px;
  height: 15px;
  accent-color: #4b7b81;
}

.wms-layer-info {
  flex: 1;
  min-width: 0;
}

.wms-layer-name {
  font-size: 12px;
  font-weight: 500;
  color: #333;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.wms-layer-abstract {
  font-size: 12px;
  color: #666;
  margin-top: 2px;
  line-height: 1.4;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}
.wms-layer-abstract.expanded {
  -webkit-line-clamp: unset;
  display: block;
}
.wms-layer-more-btn {
  font-size: 11px;
  color: #4b7b81;
  background: none;
  border: none;
  cursor: pointer;
  padding: 0;
  margin-top: 2px;
  text-decoration: underline;
}
.wms-layer-more-btn:hover {
  color: #3a5f64;
}

.wms-layer-actions {
  display: flex;
  gap: 4px;
  flex-shrink: 0;
}

.wms-layer-action-btn {
  width: 24px;
  height: 24px;
  border: none;
  background: rgba(75,123,129,0.08);
  border-radius: 3px;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  color: #4b7b81;
  transition: background 0.15s;
}

.wms-layer-action-btn:hover { background: rgba(75,123,129,0.2); }
.wms-layer-action-btn svg { width: 14px; height: 14px; }

.wms-layer-remove-btn { color: #c0392b; background: rgba(192,57,43,0.08); }
.wms-layer-remove-btn:hover { background: rgba(192,57,43,0.2); }

/* Hinzugefügte Layer */
.wms-added-section {
  border-top: 2px solid #4b7b81;
  flex-shrink: 0;
  max-height: 160px;
  overflow-y: auto;
}

.wms-added-header {
  font-size: 11px;
  font-weight: 600;
  color: #4b7b81;
  padding: 6px 12px;
  background: #e8f0f1;
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

.wms-added-list { padding: 0; }

.wms-added-item {
  display: flex;
  align-items: center;
  padding: 5px 12px;
  font-size: 11px;
  border-bottom: 1px solid #f0f0f0;
  gap: 8px;
}

.wms-added-item-name {
  flex: 1;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  color: #333;
}

.wms-added-opacity {
  width: 60px;
  height: 4px;
  accent-color: #4b7b81;
}

.wms-added-remove {
  width: 20px;
  height: 20px;
  border: none;
  background: rgba(192,57,43,0.1);
  border-radius: 3px;
  cursor: pointer;
  color: #c0392b;
  font-size: 14px;
  display: flex;
  align-items: center;
  justify-content: center;
  line-height: 1;
}

.wms-added-remove:hover { background: rgba(192,57,43,0.25); }

/* Hamburger Menu: Trennlinie */
.menu-divider {
  border: none;
  border-top: 1px solid rgba(255,255,255,0.15);
  margin: 4px 12px;
}

/* ===== WMS GETFEATUREINFO ERGEBNISSE ===== */

.wms-gfi-result {
  margin: 0 0 4px 0;
}

.wms-gfi-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 12px;
  line-height: 1.4;
}

.wms-gfi-table tr:nth-child(even) {
  background: rgba(75, 123, 129, 0.06);
}

.wms-gfi-key {
  font-weight: 600;
  white-space: nowrap;
  padding: 3px 8px 3px 4px;
  color: #4B7B81;
  vertical-align: top;
  width: 35%;
}

.wms-gfi-val {
  padding: 3px 4px;
  word-break: break-word;
}

.wms-gfi-val a {
  color: #4B7B81;
  text-decoration: underline;
}

.wms-gfi-title-icon {
  display: inline-block;
  background: #4B7B81;
  color: #fff;
  font-size: 9px;
  font-weight: 700;
  padding: 1px 4px;
  border-radius: 3px;
  margin-right: 4px;
  vertical-align: middle;
  letter-spacing: 0.5px;
}

/* HTML-Fallback (details/summary) */
.wms-gfi-details {
  border: 1px solid #ccc;
  border-radius: 4px;
  margin: 2px 0;
}

.wms-gfi-summary {
  cursor: pointer;
  padding: 6px 8px;
  font-weight: 600;
  font-size: 12px;
  background: #f5f5f5;
}

.wms-gfi-content {
  padding: 4px 8px;
}

/* ===== WMS LEGENDE-BUTTONS ===== */

.wms-layer-legend-btn {
  color: #4b7b81 !important;
}
.wms-layer-legend-btn svg {
  width: 16px;
  height: 16px;
}
.wms-added-legend {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 20px;
  height: 20px;
  border: none;
  background: rgba(75,123,129,0.08);
  border-radius: 3px;
  color: #4b7b81;
  cursor: pointer;
  flex-shrink: 0;
  padding: 0;
}
.wms-added-legend:hover {
  background: rgba(75,123,129,0.2);
}

/* ===== BOOKMARK-EXPORT DIALOG ===== */
.bm-export-modal {
  display: none;
  position: fixed;
  inset: 0;
  z-index: 200000;
}
.bm-export-modal.open {
  display: block;
}
.bm-export-backdrop {
  position: absolute;
  inset: 0;
  background: rgba(0,0,0,0.45);
}
.bm-export-dialog {
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  background: #fff;
  border-radius: 8px;
  box-shadow: 0 8px 32px rgba(0,0,0,0.28);
  width: 480px;
  max-width: calc(100vw - 32px);
  display: flex;
  flex-direction: column;
  font-family: 'Roboto Condensed', Arial, sans-serif;
  font-size: 13px;
}
.bm-export-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 12px 16px;
  background: #4B7B81;
  color: #fff;
  border-radius: 8px 8px 0 0;
  font-weight: 600;
  font-size: 14px;
}
.bm-export-close {
  background: transparent;
  border: none;
  color: #fff;
  font-size: 16px;
  cursor: pointer;
  padding: 0 2px;
  line-height: 1;
  opacity: 0.8;
}
.bm-export-close:hover { opacity: 1; }
.bm-export-body {
  padding: 14px 16px 8px;
  display: flex;
  flex-direction: column;
  gap: 10px;
}
.bm-export-label {
  display: flex;
  flex-direction: column;
  gap: 3px;
  font-size: 11px;
  font-weight: 600;
  color: #555;
  text-transform: uppercase;
  letter-spacing: 0.4px;
}
.bm-export-req { color: #c0392b; }
.bm-export-hint { font-weight: 400; text-transform: none; font-size: 10px; color: #888; }
.bm-export-input {
  padding: 5px 8px;
  border: 1px solid #ccc;
  border-radius: 4px;
  font-size: 13px;
  font-family: inherit;
  color: #333;
  outline: none;
}
.bm-export-input:focus { border-color: #4B7B81; box-shadow: 0 0 0 2px rgba(75,123,129,0.18); }
.bm-export-preview {
  font-family: 'Consolas', 'Courier New', monospace;
  font-size: 11px;
  line-height: 1.5;
  color: #333;
  background: #f7f9f9;
  border: 1px solid #ddd;
  border-radius: 4px;
  padding: 6px 8px;
  resize: vertical;
  min-height: 120px;
  max-height: 260px;
  outline: none;
}
.bm-export-options {
  display: flex;
  gap: 16px;
  padding: 2px 0 4px;
  flex-wrap: wrap;
}
.bm-export-check {
  display: flex;
  align-items: center;
  gap: 6px;
  font-size: 12px;
  font-weight: 400;
  color: #444;
  text-transform: none;
  letter-spacing: 0;
  cursor: pointer;
  user-select: none;
}
.bm-export-check input[type="checkbox"] {
  accent-color: #4B7B81;
  width: 14px;
  height: 14px;
  cursor: pointer;
}
.bm-export-footer {
  display: flex;
  gap: 8px;
  padding: 10px 16px 14px;
  justify-content: flex-end;
}
.bm-export-btn-copy,
.bm-export-btn-slm {
  padding: 7px 16px;
  border: none;
  border-radius: 5px;
  font-size: 13px;
  font-family: inherit;
  cursor: pointer;
  font-weight: 600;
}
.bm-export-btn-copy {
  background: #4B7B81;
  color: #fff;
}
.bm-export-btn-copy:hover { background: #3a5f64; }
.bm-export-btn-slm {
  background: #f0f0f0;
  color: #333;
}
.bm-export-btn-slm:hover { background: #ddd; }

/* ===== KARTE TEILEN (Kurz-URL + QR, tnet-share.js) ===== */
.tnet-share-overlay {
  position: fixed; inset: 0; z-index: 100002;
  background: rgba(0,0,0,0.35);
  display: flex; align-items: center; justify-content: center;
  font-family: 'Roboto Condensed', Arial, sans-serif;
}
.tnet-share-box {
  background: #fff; border-radius: 8px; width: min(440px, 92vw);
  box-shadow: 0 8px 30px rgba(0,0,0,0.3); overflow: hidden;
}
.tnet-share-head {
  display: flex; align-items: center; justify-content: space-between;
  background: var(--m-color-primary, #4B7B81); color: #fff;
  padding: 10px 14px; font-size: 15px; font-weight: 600; letter-spacing: .02em;
}
.tnet-share-close {
  background: transparent; border: 0; color: #fff; font-size: 22px; line-height: 1;
  cursor: pointer; padding: 0 4px;
}
.tnet-share-body { padding: 14px; }
.tnet-share-hint { margin: 0 0 10px; font-size: 13px; color: #444; }
.tnet-share-row { display: flex; gap: 8px; }
.tnet-share-url {
  flex: 1; min-width: 0; font: 13px/1.4 ui-monospace, Consolas, monospace;
  padding: 7px 9px; border: 1px solid #ccc; border-radius: 4px; background: #fafafa;
}
.tnet-share-actions { display: flex; gap: 8px; margin-top: 10px; }
.tnet-share-btn {
  flex: 1; display: inline-flex; align-items: center; justify-content: center;
  background: var(--m-color-primary, #4B7B81); color: #fff !important; border: 0; border-radius: 6px;
  padding: 8px 14px; font: inherit; font-size: 13px; font-weight: 600; cursor: pointer;
  white-space: nowrap; text-decoration: none !important; box-shadow: 0 1px 3px rgba(0,0,0,.25);
}
.tnet-share-btn:hover { filter: brightness(1.1); }
.tnet-share-btn:active { filter: brightness(.92); }

/* ===== SLM-FACHMODULE ===== */
#tnet-fachtools[hidden],
#tp_tnet_modules[hidden],
.tnet-module-map-buttons[hidden] { display: none !important; }
.tnet-fachtools-title {
  margin: 0;
  padding: 8px 10px;
  background: #95b5be;
  color: #fff;
  font: bold 13px Arial, sans-serif;
}
.tnet-module-toolbar {
  display: flex;
  align-items: center;
  gap: 4px;
  padding: 4px 8px;
  background: #e6eff0;
}
.tnet-module-toolbar strong { flex: 1; min-width: 0; }
.tnet-module-action,
.tnet-module-select {
  border: 0;
  border-radius: 3px;
  padding: 6px 9px;
  background: #dcebed;
  color: #244b50;
  cursor: pointer;
  font: inherit;
}
.tnet-module-action:hover,
.tnet-module-action[aria-pressed="true"],
.tnet-module-select:hover,
.tnet-module-select[aria-pressed="true"] {
  background: #c6dfe2;
}
.tnet-module-list {
  display: flex;
  flex-wrap: wrap;
  gap: 5px;
  padding: 4px 8px 8px;
}
.tnet-module-select {
  display: inline-flex;
  align-items: center;
  flex-direction: column;
  gap: 4px;
  max-width: 100px;
  font-size: 11px;
  background: #fff;
}
.tnet-module-icon { display: inline-flex; width: 30px; height: 30px; font-size: 24px; align-items: center; justify-content: center; color: #4b7b81; }
.tnet-module-icon svg { width: 100%; height: 100%; }
.tnet-module-action { display: inline-flex; align-items: center; justify-content: center; width: 32px; height: 32px; padding: 5px; }
.tnet-module-action svg { width: 22px; height: 22px; }
.tnet-module-view { padding: 8px; }
.tnet-module-panel { background: #fff; pointer-events: auto; }
.tnet-module-map-buttons { position: absolute; top: 0; right: calc(100% + 8px); }
.tnet-module-map-button { width: 40px; height: 40px; }
.tnet-module-map-button .tnet-module-icon { width: 24px; height: 24px; color: inherit; }
body.tnet-module-fullheight #freepane:not(.close) {
  bottom: 0 !important;
  height: calc(100vh - 69px) !important;
  max-height: calc(100vh - 69px) !important;
  border-radius: 0 !important;
}
body.tnet-module-fullheight #freepane #spring {
  height: 100% !important;
  max-height: none !important;
  overflow: hidden !important;
  padding: 0 !important;
  display: flex !important;
  flex-direction: column !important;
}
body.tnet-module-fullheight #freepane #spring > :not(#tp_tnet_modules) { display: none !important; }
body.tnet-module-fullheight #freepane #spring > #tp_tnet_modules {
  display: flex !important;
  flex-direction: column !important;
  flex: 1 1 0 !important;
  min-height: 0 !important;
  height: 100% !important;
  max-height: none !important;
  overflow: hidden !important;
}
body.tnet-module-fullheight #tp_tnet_modules .tnet-module-toolbar { flex: 0 0 auto; }
body.tnet-module-fullheight #tp_tnet_modules .tnet-module-view { flex: 1; min-height: 0; overflow: auto; }
.tnet-module-view iframe { width: 100%; min-height: 360px; border: 0; }
body.tnet-module-fullheight .tnet-module-view iframe { height: 100%; }
.tnet-module-action:focus-visible,
.tnet-module-select:focus-visible,
.tnet-module-map-button:focus-visible { outline: 2px solid #4b7b81; outline-offset: -2px; }
.tnet-module-instance { min-height: 80px; }
.tnet-module-body { min-width: 0; }
.tnet-module-legend {
  margin-top: 10px;
  padding: 8px;
  border: 1px solid #d5dfe0;
  background: #fff;
  font-size: 12px;
}
.tnet-module-legend[hidden] { display: none; }
.tnet-module-legend-title { display: block; margin-bottom: 3px; }
.tnet-module-legend-unit { display: block; color: #666; margin-bottom: 5px; }
.tnet-module-legend-item {
  display: flex;
  align-items: center;
  gap: 6px;
  min-height: 18px;
}
.tnet-module-legend-swatch {
  width: 12px;
  height: 12px;
  border: 1px solid rgba(0,0,0,.2);
  flex: 0 0 12px;
}
.tnet-module-legend-width {
  width: 32px;
  background: #4b7b81;
  flex: 0 0 auto;
}
.tnet-module-legend-count { margin-top: 5px; }
.tnet-module-legend-note { margin-top: 5px; font-size: 11px; color: #53636b; }
.tnet-module-legend-map-overlay {
  position: absolute;
  right: 20px;
  bottom: 105px;
  z-index: 900;
  width: min(280px, 36vw);
  max-height: 45vh;
  overflow: auto;
  pointer-events: auto;
  box-shadow: 0 2px 10px rgba(0,0,0,.2);
}
body.tnet-module-fullheight .tnet-module-legend-map-overlay {
  left: calc(var(--tnet-sidepanel-width, 340px) + 12px);
  right: auto;
  bottom: 42px;
  width: min(280px, calc(100vw - var(--tnet-sidepanel-width, 340px) - 32px));
}
.tnet-module-external-link { color: #315f65; text-decoration: underline; }
.tnet-module-dock {
  position: fixed;
  top: 69px;
  right: 0;
  bottom: 32px;
  width: min(440px, 45vw);
  min-width: 300px;
  background: #fff;
  z-index: 1200;
  display: flex;
  flex-direction: column;
  box-shadow: -4px 0 12px rgba(0,0,0,.15);
}
.tnet-module-dock.hidden { display: none !important; }
.tnet-module-dock-header {
  min-height: 36px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  padding: 6px 10px;
  background: #4b7b81;
  color: #fff;
}
.tnet-module-dock-title { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.tnet-module-close {
  border: 0;
  background: rgba(255,255,255,.15);
  color: #fff;
  padding: 5px 8px;
  cursor: pointer;
}
.tnet-module-dock-body { flex: 1; min-height: 0; overflow: auto; padding: 8px; }
.tnet-module-dock .tnet-module-instance { height: 100%; }
.tnet-module-dock .tnet-module-body { height: 100%; }
.tnet-module-dock .tnet-module-legend { flex: 0 0 auto; }
.tnet-module-dock iframe {
  display: block;
  width: 100%;
  height: 100%;
  min-height: 360px;
  border: 0;
}

/* Flache Buttons «Teilen» / «Export» im Panel (ueberschreibt Dijit-Gradient) */
#preview_menu .tnet-share-export-row {
  display: flex; justify-content: center; gap: 10px;
  padding: 10px; box-sizing: border-box; width: 100%;
}
#preview_menu #btn_tnet_share,
#preview_menu #btn_htmlprint1_preview {
  background: #dcebed !important; background-image: none !important;
  color: #244b50 !important; border: 0 !important; border-radius: 0 !important;
  box-shadow: none !important; margin: 0 !important; height: 28px !important; min-width: 104px !important;
  padding: 0 12px !important; font-weight: normal !important; cursor: pointer;
  display: inline-flex !important; align-items: center; justify-content: center; gap: 6px;
}
#preview_menu #btn_tnet_share:hover,
#preview_menu #btn_htmlprint1_preview:hover { background: #c6dfe2 !important; }
#preview_menu #btn_tnet_share:focus-visible,
#preview_menu #btn_htmlprint1_preview:focus-visible { outline: 2px solid #4B7B81 !important; outline-offset: 2px !important; }
#preview_menu #btn_tnet_share span,
#preview_menu #btn_htmlprint1_preview span { color: #244b50 !important; }
#preview_menu #btn_htmlprint1_preview .njsIconButtonVorExport {
  background: no-repeat center / 16px 16px url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'><path fill='%23244b50' d='M5 20h14v-2H5v2zM19 9h-4V3H9v6H5l7 7 7-7z'/></svg>") !important;
  width: 18px !important; height: 18px !important;
}
#preview_menu #btn_tnet_share .tnetIconShare {
  background-image: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'><path fill='%23244b50' d='M18 16.1c-.8 0-1.5.3-2 .8l-7.1-4.2c.1-.2.1-.5.1-.7s0-.5-.1-.7l7-4.1c.5.5 1.3.8 2.1.8 1.7 0 3-1.3 3-3s-1.3-3-3-3-3 1.3-3 3c0 .2 0 .5.1.7L8 9.8C7.5 9.3 6.8 9 6 9c-1.7 0-3 1.3-3 3s1.3 3 3 3c.8 0 1.5-.3 2-.8l7.1 4.2c-.1.2-.1.4-.1.6 0 1.6 1.3 2.9 2.9 2.9s2.9-1.3 2.9-2.9-1.2-2.9-2.8-2.9z'/></svg>");
}
.tnet-share-status { min-height: 18px; font-size: 12px; color: #2e7d32; margin-top: 6px; }
.tnet-share-qr { text-align: center; margin-top: 10px; }
.tnet-share-qr svg { display: inline-block; border: 1px solid #eee; border-radius: 4px; }

/* ===== WERKZEUGE: MESSEN / ZEICHNEN KOMPAKT ===== */
/* «Speichern» ausblenden: Zeichnungen und Messungen werden ueber «Teilen» gesichert */
#tools_menu .appLayout:has(#btn_measure1_save_all),
#tools_menu .appLayout:has(#rl_save_db_wrapper) {
  display: none !important;
}
/* Desktop: «Löschen» in die Werkzeugzeile, Stil-/Optionsbereich darunter */
#tp_tools_menu #tools_menu .dijitTitlePaneContentInner {
  display: flex !important; flex-wrap: wrap !important; align-items: flex-start;
}
/* Desktop: Titel «Profil»/«Zeichnen» wie «Teilen / Export», ohne Pfeil */
#tp_tools_menu #tools_menu .dijitTitlePaneTitle {
  background: #95b5be !important; background-image: none !important; border: 0 !important;
  min-height: 26px !important; padding: 4px 10px !important; box-sizing: border-box !important;
  display: flex !important; align-items: center !important; cursor: pointer;
}
#tp_tools_menu #tools_menu .dijitTitlePaneTitle:hover { background: #7da3ac !important; }
#tp_tools_menu #tools_menu .dijitTitlePaneTitle .dijitArrowNode { display: none !important; }
#tp_tools_menu #tools_menu .dijitTitlePaneTextNode {
  color: #fff !important; font-size: 11px !important; font-weight: 600 !important;
  line-height: 1.5 !important; letter-spacing: .5px !important; text-transform: none !important;
}
/* Aktives Mess-/Zeichenwerkzeug sichtbar markieren (Dojo setzt nur .dijitChecked) */
#tools_menu .appLayout:has(.dijitToggleButton) {
  border-bottom: 3px solid transparent !important; border-radius: 0 !important; box-sizing: border-box;
}
#tools_menu .appLayout:has(.dijitToggleButton.dijitChecked) {
  background: #dcebed !important; border-bottom-color: #4B7B81 !important;
  color: #244b50 !important; font-weight: 600 !important;
}
#tp_tools_menu #tools_menu .appLayoutContainer { display: contents !important; }
#tp_tools_menu #tools_menu .appLayout { flex: 1 1 0 !important; min-width: 0 !important; }
#tp_tools_menu #tools_menu #measure_menu,
#tp_tools_menu #tools_menu #rl_menu { order: 1; flex: 0 0 100%; }
.tnet-share-toolbtn .tnetIconShare {
  width: 18px; height: 18px; display: inline-block; vertical-align: middle;
  background: no-repeat center / 16px 16px url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'><path fill='%234B7B81' d='M18 16.1c-.8 0-1.5.3-2 .8l-7.1-4.2c.1-.2.1-.5.1-.7s0-.5-.1-.7l7-4.1c.5.5 1.3.8 2.1.8 1.7 0 3-1.3 3-3s-1.3-3-3-3-3 1.3-3 3c0 .2 0 .5.1.7L8 9.8C7.5 9.3 6.8 9 6 9c-1.7 0-3 1.3-3 3s1.3 3 3 3c.8 0 1.5-.3 2-.8l7.1 4.2c-.1.2-.1.4-.1.6 0 1.6 1.3 2.9 2.9 2.9s2.9-1.3 2.9-2.9-1.2-2.9-2.8-2.9z'/></svg>");
}

/* ===== tnet-splitscreen.css ===== */
/**
 * tnet-splitscreen.css
 * Styling for split-screen map comparison feature
 *
 * @version    1.0
 * @date       2026-02-12
 * @copyright  Trigonet AG
 * @author     Marco Dellenbach
 */

/* Split-screen toggle button */
#split-screen-btn {
    position: absolute;
    top: 140px;
    right: 10px;
    width: 40px;
    height: 40px;
    background: white;
    border: none;
    border-radius: 4px;
    box-shadow: 0 2px 4px rgba(0,0,0,0.2);
    cursor: pointer;
    z-index: 1000;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.3s ease;
}

#split-screen-btn:hover {
    background: #f0f0f0;
    box-shadow: 0 3px 6px rgba(0,0,0,0.3);
    transform: scale(1.05);
}

#split-screen-btn.active {
    background: #2c5f6f;
    color: white;
}

#split-screen-btn svg {
    width: 24px;
    height: 24px;
}

/* Split-screen wrapper */
#split-wrapper {
    display: flex;
    width: 100%;
    height: 100%;
    position: relative;
}

/* Split panels */
#split-panel-left,
#split-panel-right {
    position: relative;
    overflow: hidden;
}

#split-panel-left {
    flex: 1;
}

#split-panel-right {
    flex: 1;
    background: #f0f0f0;
}

/* Divider between panels */
#split-divider {
    width: 4px;
    background: #2c5f6f;
    cursor: col-resize;
    position: relative;
    z-index: 1000;
    box-shadow: 0 0 5px rgba(0,0,0,0.3);
    transition: background 0.2s ease;
}

#split-divider:hover {
    background: #3a7484;
}

#split-divider::before {
    content: '';
    position: absolute;
    top: 0;
    left: -2px;
    right: -2px;
    bottom: 0;
    /* Wider hit area for easier grabbing */
}

/* Map containers in split mode */
#split-panel-left .map-cont,
#split-panel-right .map-cont {
    width: 100%;
    height: 100%;
}

/* Panel labels */
.split-panel-label {
    position: absolute;
    top: 80px;
    left: 10px;
    background: rgba(255, 255, 255, 0.95);
    padding: 5px 12px;
    border-radius: 4px;
    font-size: 12px;
    font-weight: 600;
    z-index: 1000;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.15);
    color: #2c5f6f;
    letter-spacing: 0.5px;
}

/* Ensure map controls work in both panels */
#split-panel-left .ol-control,
#split-panel-right .ol-control {
    position: absolute;
}

/* Adjust OpenLayers zoom controls for split view */
#split-panel-right .ol-zoom {
    top: 120px;
    left: 8px;
}

/* Layer switcher for second map */
.split-layer-switcher {
    position: absolute;
    top: 80px;
    right: 10px;
    background: white;
    padding: 10px;
    border-radius: 4px;
    box-shadow: 0 2px 4px rgba(0,0,0,0.2);
    z-index: 1000;
    max-width: 200px;
}

.split-layer-switcher h4 {
    margin: 0 0 8px 0;
    font-size: 12px;
    color: #2c5f6f;
    font-weight: 600;
}

.split-layer-switcher label {
    display: block;
    font-size: 11px;
    margin: 4px 0;
    cursor: pointer;
    user-select: none;
}

.split-layer-switcher input[type="checkbox"] {
    margin-right: 5px;
    cursor: pointer;
}

/* Responsive adjustments */
@media (max-width: 768px) {
    #split-screen-btn {
        top: 80px;
        right: 8px;
        width: 36px;
        height: 36px;
    }
    
    #split-screen-btn svg {
        width: 20px;
        height: 20px;
    }
    
    .split-panel-label {
        font-size: 10px;
        padding: 4px 8px;
    }
}

/* Animation for split-screen toggle */
@keyframes slideIn {
    from {
        opacity: 0;
        transform: translateX(20px);
    }
    to {
        opacity: 1;
        transform: translateX(0);
    }
}

#split-panel-right {
    animation: slideIn 0.3s ease-out;
}

/* Ensure popup and other overlays work correctly */
#split-wrapper .ol-popup {
    z-index: 1001;
}
/* Layer control panel */
#splitscreen-layer-control {
    scrollbar-width: thin;
    scrollbar-color: #ccc #f0f0f0;
}

#splitscreen-layer-control::-webkit-scrollbar {
    width: 6px;
}

#splitscreen-layer-control::-webkit-scrollbar-track {
    background: #f0f0f0;
}

#splitscreen-layer-control::-webkit-scrollbar-thumb {
    background: #ccc;
    border-radius: 3px;
}

#splitscreen-layer-control::-webkit-scrollbar-thumb:hover {
    background: #999;
}

#splitscreen-layer-list {
    scrollbar-width: thin;
    scrollbar-color: #ccc #f0f0f0;
}

#splitscreen-layer-list::-webkit-scrollbar {
    width: 6px;
}

#splitscreen-layer-list::-webkit-scrollbar-track {
    background: #f0f0f0;
}

#splitscreen-layer-list::-webkit-scrollbar-thumb {
    background: #ccc;
    border-radius: 3px;
}

#splitscreen-layer-list::-webkit-scrollbar-thumb:hover {
    background: #999;
}

#splitscreen-layer-list > div:hover {
    background: #f5f5f5;
}

#splitscreen-layer-list input[type="checkbox"] {
    cursor: pointer;
}

#splitscreen-layer-list label {
    user-select: none;
}

/* ===== tnet-3d-landscape.css ===== */
/**
 * tnet-3d-landscape.css
 * Styles for 3D Landscape Model split-screen view
 *
 * @version    1.0
 * @date       2026-02-12
 * @copyright  Trigonet AG
 * @author     Marco Dellenbach
 */

/* Split layout for 3D view */
#split-wrapper-3d {
    display: flex;
    width: 100%;
    height: 100%;
    position: relative;
    z-index: 1;
}

#split-panel-2d {
    flex: 50;
    position: relative;
    overflow: hidden;
    background: #f5f5f5;
}

#split-panel-3d {
    flex: 50;
    position: relative;
    overflow: hidden;
    background: #1a1a1a;
}

#split-divider-3d {
    width: 4px;
    background: linear-gradient(to bottom, #3a6268, #4b7b81);
    cursor: col-resize;
    position: relative;
    z-index: 1000;
    box-shadow: 0 0 8px rgba(0, 0, 0, 0.3), inset 0 1px 0 rgba(255, 255, 255, 0.1);
    transition: background-color 0.2s ease;
    user-select: none;
}

#split-divider-3d:hover {
    background: linear-gradient(to bottom, #4b7b81, #5a9098);
    box-shadow: 0 0 12px rgba(0, 0, 0, 0.4), inset 0 1px 0 rgba(255, 255, 255, 0.15);
}

#split-divider-3d > div {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    width: 20px;
    height: 40px;
    background: rgba(75, 123, 129, 0.8);
    border-radius: 4px;
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
    font-size: 10px;
    font-weight: bold;
    letter-spacing: 1px;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.3);
}

#split-divider-3d:hover > div {
    background: rgba(75, 123, 129, 0.9);
    box-shadow: 0 2px 6px rgba(0, 0, 0, 0.4);
}

/* SceneView container */
#sceneViewContainer {
    width: 100%;
    height: 100%;
    background: linear-gradient(135deg, #1a1a1a 0%, #2a2a2a 100%);
}

/* ESRI widgets styling adjustments for 3D view */
#sceneViewContainer .esri-view {
    background-color: #242424;
}

#sceneViewContainer .esri-widget {
    background-color: rgba(255, 255, 255, 0.95);
    color: #333;
}

#sceneViewContainer .esri-widget:focus {
    outline: 2px solid #0079c1;
    outline-offset: 2px;
}

/* Home widget */
#sceneViewContainer .esri-home {
    margin: 10px;
}

/* Compass widget */
#sceneViewContainer .esri-compass {
    margin: 10px;
    margin-left: 50px;
}

/* ScaleBar widget */
#sceneViewContainer .esri-scale-bar {
    margin: 10px;
}

/* Sync toggle button */
.landscape-sync-button {
    transition: all 0.2s ease;
}

.landscape-sync-button:hover {
    background-color: rgba(0, 121, 193, 0.1) !important;
}

.landscape-sync-button.active {
    background-color: #0079c1 !important;
    color: white !important;
}

.landscape-sync-button.active:hover {
    background-color: #005a9e !important;
}

/* Error message styling */
.landscape-3d-error {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    background: white;
    padding: 20px;
    border-radius: 4px;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.3);
    z-index: 10000;
    font-family: 'Roboto Condensed', Arial, sans-serif;
    max-width: 400px;
    text-align: center;
}

.landscape-3d-error h3 {
    color: #d32f2f;
    margin-top: 0;
    font-size: 16px;
}

.landscape-3d-error p {
    color: #666;
    margin: 10px 0 0 0;
    line-height: 1.5;
}

/* Loading message for 3D view */
.landscape-3d-loading {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    background: rgba(0, 0, 0, 0.8);
    color: white;
    padding: 20px;
    border-radius: 4px;
    z-index: 100;
    text-align: center;
    font-family: 'Roboto Condensed', Arial, sans-serif;
}

.landscape-3d-loading::after {
    content: '';
    display: block;
    width: 32px;
    height: 32px;
    border: 3px solid rgba(255, 255, 255, 0.3);
    border-top: 3px solid white;
    border-radius: 50%;
    animation: landscape-3d-spin 1s linear infinite;
    margin: 10px auto 0;
}

@keyframes landscape-3d-spin {
    to {
        transform: rotate(360deg);
    }
}

/* Responsive adjustments */
@media (max-width: 768px) {
    #split-divider-3d {
        width: 3px;
    }
    
    #split-divider-3d > div {
        width: 15px;
        height: 30px;
        font-size: 8px;
    }
}

/* Print styles */
#scene-controls-3d {
    --m-color-primary: #4B7B81;
    position: absolute;
    top: 10px;
    left: 10px;
    width: 230px;
    max-width: calc(100% - 160px);
    max-height: calc(100% - 130px);
    overflow: auto;
    z-index: 60;
    border-radius: 6px;
    background: white;
    color: #333;
    box-shadow: 0 2px 10px rgba(0,0,0,.2);
    font: 12px 'Roboto', Arial, sans-serif;
}
#scene-controls-3d[hidden] { display: none !important; }
#scene-controls-3d summary {
    background: var(--m-color-primary);
    color: white;
    padding: 8px 12px;
    cursor: pointer;
    font-weight: 600;
}
.scene-controls-body { padding: 6px 10px; }
.scene-controls-row {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 10px;
    padding: 8px 0;
    border-bottom: 1px solid #e5ecec;
    cursor: pointer;
}
.scene-controls-row input { accent-color: var(--m-color-primary); }
.scene-style-options { margin-top: 6px; }
.scene-style-title { margin-top: 10px; font-weight: 600; color: #34595e; }
.scene-style-options:has(.scene-style-card) {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 6px;
    margin-top: 6px;
}
.scene-style-card {
    position: relative;
    display: flex;
    flex-direction: column;
    border: 2px solid transparent;
    border-radius: 4px;
    overflow: hidden;
    cursor: pointer;
    box-sizing: border-box;
    transition: border-color .2s ease, box-shadow .2s ease;
}
.scene-style-card input {
    position: absolute;
    opacity: 0;
    width: 1px;
    height: 1px;
    pointer-events: none;
}
.scene-style-preview {
    display: block;
    height: 52px;
    background: #b6c6cb center/cover no-repeat;
}
.scene-style-card .scene-style-label {
    display: block;
    background: rgba(66, 74, 82, 0.85);
    color: white;
    font-size: 10px;
    text-align: center;
    padding: 4px 2px;
}
.scene-style-card:has(input:checked) {
    border-color: #e8423f;
    box-shadow: 0 0 0 1px #b8211e, 0 0 6px 2px rgba(232, 66, 63, .6);
}
.scene-style-card:has(input:focus-visible) { outline: 2px solid var(--m-color-primary); outline-offset: 2px; }
.scene-style-card:has(input:disabled) { opacity: .6; cursor: default; }
.scene-style-row { justify-content: flex-start; }
.scene-style-row input { margin: 0; }
.scene-style-row:has(input:checked) { color: var(--m-color-primary); font-weight: 600; }
.scene-controls-row:has(input:disabled) { opacity: .6; cursor: default; }
.scene-controls-status { margin: 8px 0 2px; font-size: 11px; line-height: 1.4; }
#scene-controls-3d :focus-visible { outline: 2px solid var(--m-color-primary); outline-offset: 2px; }

@media print {
    #scene-controls-3d,
    #split-wrapper-3d,
    #split-panel-2d,
    #split-panel-3d,
    #sceneViewContainer {
        display: none !important;
    }
}

/* ===== tnet-mapcontrols.css ===== */
/**
 * tnet-mapcontrols.css
 * Styles für die konfigurierbaren Kartensteuerungs-Buttons
 * (Zoom, GNSS, StreetView, 3D)
 *
 * @version    1.0
 * @date       2026-04-01
 * @copyright  Trigonet AG
 * @author     Marco Dellenbach
 */

/* ===== CONTAINER ===== */
#tnet-streetview-close {
  position: absolute !important;
  top: 10px !important;
  right: 56px !important;
  z-index: 10 !important;
  width: 36px !important;
  height: 36px !important;
  padding: 0 !important;
  border: 0 !important;
  border-radius: 4px !important;
  background: white !important;
  color: #333 !important;
  box-shadow: 0 1px 5px rgba(0, 0, 0, 0.4) !important;
  font: 28px/36px Arial, sans-serif !important;
  cursor: pointer !important;
}

#tnet-streetview-close:hover {
  background: #f0f0f0 !important;
}

#tnet-streetview-close:focus-visible {
  outline: 2px solid #4b7b81 !important;
  outline-offset: 2px !important;
}

.tnet-mc-container {
  position: absolute;
  z-index: 998; /* unter basemap_selector (z-index: 999) */
  display: flex;
  flex-direction: column;
  gap: var(--mc-group-gap, 10px);
  pointer-events: none; /* Container selbst nicht klickbar */
}

/* ===== BUTTON-GRUPPEN ===== */
.tnet-mc-group {
  display: flex;
  flex-direction: column;
  background: white;
  border-radius: 6px;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.25);
  overflow: hidden;
  pointer-events: auto; /* Buttons klickbar */
}

/* Trennlinie zwischen Buttons innerhalb einer Gruppe */
.tnet-mc-group .tnet-mc-btn + .tnet-mc-btn {
  border-top: 1px solid #e0e0e0;
}

/* ===== BUTTONS ===== */
.tnet-mc-btn {
  display: flex;
  align-items: center;
  justify-content: center;
  border: none;
  background: white;
  color: #444;
  cursor: pointer;
  padding: 0;
  margin: 0;
  outline: none;
  transition: background-color 0.15s ease, color 0.15s ease;
  -webkit-tap-highlight-color: transparent;
}

.tnet-mc-btn:hover {
  background: #f0f0f0;
  color: #4b7b81;
}

.tnet-mc-btn:active {
  background: #e0e0e0;
}

/* Aktiver Zustand (Toggle-Buttons wie GNSS, StreetView) */
.tnet-mc-btn.active {
  background: #4b7b81;
  color: white;
}

.tnet-mc-btn.active:hover {
  background: #3a6268;
  color: white;
}

/* ===== SVG ICONS ===== */
.tnet-mc-btn svg {
  width: 22px;
  height: 22px;
  flex-shrink: 0;
}

/* ===== ABFRAGEWERKZEUGE: OBJEKTINFO | FLÄCHE | ÖREB ===== */
/* Genau ein Werkzeug ist gefüllt (aktiv); die übrigen bleiben neutral. */
.tnet-mc-query-group .tnet-mc-btn {
  color: #4b7b81;
  --tnet-query-contrast: #fff;
}
.tnet-mc-query-group .tnet-mc-btn.active,
.tnet-mc-query-group .tnet-mc-btn.active:hover {
  background: #4b7b81;
  color: #fff;
  --tnet-query-contrast: #4b7b81;
}
.tnet-mc-query-group .tnet-mc-btn:focus-visible {
  outline: 2px solid #222;
  outline-offset: -3px;
}
#tnet-mc-objektinfo svg,
#tnet-mc-polygon svg {
  width: 24px;
  height: 24px;
}

/* ÖREB-Button: Grösserer Button damit Logo + Text lesbar sind */
#tnet-mc-oereb {
  width: 40px !important;
  height: 48px !important;
}
#tnet-mc-oereb svg {
  width: 38px;
  height: 38px;
}

/* ===== STATUSHINWEIS AKTIVES ABFRAGEWERKZEUG ===== */
/* Position und Stil wie #disclaimer_news (oben links neben dem Seitenpanel) */
#tnet-query-chip {
  position: absolute;
  top: 6px;
  left: calc(var(--tnet-sidepanel-width, 340px) + 50px);
  z-index: 997;
  display: flex;
  align-items: center;
  gap: 12px;
  white-space: nowrap;
  padding: 8px 8px 8px 12px;
  border-radius: 5px;
  background: #4b7b81;
  color: #fff;
  font: 16px/24px Roboto, Arial, sans-serif;
  pointer-events: auto;
  transition: opacity 0.3s ease;
}
#tnet-query-chip[hidden] {
  display: none;
}
#tnet-query-chip.tnet-query-chip-out {
  opacity: 0;
}
#tnet-query-chip .tnet-query-chip-text {
  display: block;
  min-width: 0;
}
#tnet-query-chip .tnet-query-chip-title::after {
  content: ": ";
}
#tnet-query-chip .tnet-query-chip-close {
  flex: none;
  width: 28px;
  height: 28px;
  padding: 0;
  border: 0;
  border-radius: 4px;
  background: rgba(255, 255, 255, 0.15);
  color: #fff;
  font: 20px/28px Arial, sans-serif;
  cursor: pointer;
}
#tnet-query-chip .tnet-query-chip-close:hover {
  background: rgba(255, 255, 255, 0.35);
}
#tnet-query-chip .tnet-query-chip-close:focus-visible {
  outline: 2px solid #fff;
  outline-offset: 1px;
}

/* Fadenkreuz signalisiert Flächen- bzw. ÖREB-Abfrage */
body.tnet-query-area #map .ol-viewport,
body.tnet-query-oereb #map .ol-viewport {
  cursor: crosshair;
}

/* ===== OL ROTATE CONTROL VERSTECKEN (ersetzt durch tnet-mc-compass) ===== */
.ol-rotate {
  display: none !important;
}

/* ===== RESPONSIVE: Kleinere Buttons auf schmalen Bildschirmen ===== */
@media (max-width: 600px) {
  .tnet-mc-btn {
    width: 36px !important;
    height: 36px !important;
  }

  .tnet-mc-btn svg {
    width: 18px;
    height: 18px;
  }
}

/* ===== tnet-basemap-selector.css ===== */
/**
 * tnet-basemap-selector.css
 * Basemap-Selektor und Widget UI Styles
 *
 * Enthält:
 *  - #basemap_selector  Auswahl-Kachel (rechts unten)
 *  - #basemap_widget    expandiertes Panel
 *  - .basemap-card      Kacheln mit Preview-Bildern
 *  - .toggle-btn        Layer-Umschalter (Höhenkurven, Projektebene, etc.)
 *  - .transparency-slider  Transparenz-Regler
 *  - .basemap-time-*    Zeitreise-Slider
 *
 * Pfade: relativ zu tnet/css/ → ../resources/ für Preview-Bilder
 * Kein hardkodierter /maps/-Pfad — funktioniert in maps, maps-dev und edit.
 *
 * @version    1.0
 * @date       2026-07-02
 * @copyright  Trigonet AG
 * @author     Marco Dellenbach
 */

/* ===== BASEMAP SELECTOR ===== */

/* Basemap Selector rechts unten */
#basemap_selector {
  position: absolute;
  right: 20px;
  bottom: 30px;
  z-index: 999;
  width: 78px;
  height: 63px;
  background: transparent;
  border: none;
  border-radius: 4px;
  cursor: pointer;
  overflow: visible;
  transition: transform 0.2s ease, box-shadow 0.2s ease, opacity 0.3s ease;
}

#basemap_selector:hover {
  transform: scale(1.05);
}

body.tnet-footer-adaptive #basemap_selector,
body.tnet-footer-adaptive #basemap_widget {
  bottom: calc(var(--tnet-map-footer-height, 26px) + 4px);
}
body.tnet-footer-adaptive #basemap_widget,
body.tnet-footer-adaptive #basemap_widget:has(.basemap-subrows:not([hidden])) {
  max-height: calc(100vh - var(--tnet-map-footer-height, 26px) - 85px);
  max-width: max(0px, calc(var(--tnet-map-footer-width, 100vw) - 24px));
}

/* Kachel ausblenden wenn Widget offen */
#basemap_selector.hidden {
  opacity: 0;
  pointer-events: none;
}

#basemap_selector .basemap-card-preview {
  position: absolute;
  width: 70px;
  height: 56px;
  min-height: 0;
  box-sizing: border-box;
  border: 2px solid #424A52;
  border-radius: 4px;
  background-size: cover;
  background-position: center;
  box-shadow: 0 2px 6px rgba(0,0,0,0.3);
}

#basemap_selector .basemap-stack-back {
  top: 0;
  left: 0;
  z-index: 1;
}

#basemap_selector .basemap-stack-front {
  top: 7px;
  left: 8px;
  z-index: 2;
}

#basemap_selector .basemap-label {
  position: absolute;
  bottom: 0;
  left: 8px;
  right: 0;
  z-index: 3;
  border-radius: 0 0 4px 4px;
  background: rgba(66, 74, 82, 0.85);
  color: white;
  font-family: 'Inter Tight', Arial, sans-serif;
  font-size: 9px;
  font-weight: 500;
  text-align: center;
  padding: 2px 0;
}

/* Basemap Widget - wächst aus der Kachel */
#basemap_widget {
  position: absolute;
  right: 20px;
  bottom: 30px;
  width: 340px;
  max-height: calc(100vh - 120px);
  display: flex;
  flex-direction: column;
  background: #fff;
  border-radius: 4px;
  box-shadow: 0 4px 20px rgba(0,0,0,0.25);
  z-index: 1000;
  font-family: 'Inter Tight', Arial, sans-serif;
  overflow: hidden;
  transform-origin: right bottom;
  transition: transform 0.35s cubic-bezier(0.34, 1.3, 0.64, 1),
              opacity 0.25s ease;
}

#basemap_widget.basemap-widget-hidden {
  opacity: 0;
  transform: scale(0.29) translateX(0) translateY(0); /* 100/340 ≈ 0.29 */
  pointer-events: none;
}

#basemap_widget:has(.basemap-subrows:not([hidden])) {
  max-height: calc(100vh - 40px);
}

.basemap-widget-header {
  background: #4b7b81;
  color: white;
  padding: 6px 16px;
  flex-shrink: 0;
  font-size: 14px;
  font-weight: 500;
  letter-spacing: 1px;
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.basemap-widget-close {
  background: none;
  border: none;
  color: white;
  font-size: 22px;
  cursor: pointer;
  padding: 0;
  line-height: 1;
  opacity: 0.8;
}

.basemap-widget-close:hover {
  opacity: 1;
}

.basemap-widget-content {
  padding: 8px 16px;
  overflow-y: hidden;
  flex: 1;
  min-height: 0;
  display: flex;
  flex-direction: column;
}

/* ===== LAYER TOGGLES ===== */

.basemap-layer-section {
  margin-bottom: 6px;
  flex-shrink: 0;
}

.basemap-layer-row {
  display: flex;
  align-items: center;
  padding: 1px 0;
  border-bottom: 1px solid #eee;
}

.basemap-layer-row:last-child {
  border-bottom: none;
}

.layer-icon {
  width: 36px;
  margin-right: 12px;
  color: #e8423f;
  font-size: 16px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}

.layer-icon-img {
  width: 31px;
  height: 31px;
  display: block;
}

.layer-label {
  flex: 1;
  font-size: 13px;
  color: #333;
}

.layer-toggle {
  display: flex;
  gap: 0;
}

.toggle-btn {
  padding: 4px 10px;
  font-size: 11px;
  font-weight: 500;
  border: 1px solid #ccc;
  background: #fff;
  color: #666;
  cursor: pointer;
  transition: all 0.2s ease;
}

.toggle-btn:first-child {
  border-radius: 3px 0 0 3px;
}

.toggle-btn:last-child {
  border-radius: 0 3px 3px 0;
  border-left: none;
}

.toggle-btn.active {
  background: #4b7b81;
  border-color: #4b7b81;
  color: white;
}

.toggle-btn:hover:not(.active) {
  background: #f0f0f0;
}

/* ===== OVERLAY SICHTBARKEITS-AUGEN (Höhenkurven/Projektebene/Gemeindegrenzen) ===== */

.basemap-eye {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 28px;
  height: 28px;
  padding: 0;
  border: none;
  background: transparent;
  color: #4b7b81;
  cursor: pointer;
  border-radius: 3px;
  transition: background 0.15s ease, color 0.15s ease;
}

.basemap-eye svg {
  width: 18px;
  height: 18px;
}

.basemap-eye:hover {
  background: #f0f0f0;
}

.basemap-eye.basemap-eye-off {
  color: #aaa;
}

.basemap-expand-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 20px;
  height: 20px;
  margin-right: 2px;
  padding: 0;
  border: none;
  background: transparent;
  color: #888;
  cursor: pointer;
  transition: transform 0.15s ease;
}

.basemap-expand-btn svg {
  width: 12px;
  height: 12px;
}

.basemap-expand-btn.expanded {
  transform: rotate(90deg);
}

.basemap-subrows {
  padding-left: 48px;
}

.basemap-subrows[hidden] {
  display: none;
}

.basemap-subrow {
  display: flex;
  align-items: center;
  padding: 4px 0;
  border-bottom: 1px dashed #eee;
}

.basemap-subrow:last-child {
  border-bottom: none;
}

.basemap-subrow-label {
  flex: 1;
  font-size: 12px;
  color: #555;
}

/* ===== TRANSPARENCY SLIDER ===== */

.transparency-slider {
  flex: 1;
  margin: 0 10px;
  height: 4px;
  -webkit-appearance: none;
  appearance: none;
  background: #ddd;
  border-radius: 2px;
  cursor: pointer;
}

.transparency-slider::-webkit-slider-thumb {
  -webkit-appearance: none;
  width: 14px;
  height: 14px;
  background: #4b7b81;
  border-radius: 50%;
  cursor: pointer;
}

.transparency-slider::-moz-range-thumb {
  width: 14px;
  height: 14px;
  background: #4b7b81;
  border-radius: 50%;
  cursor: pointer;
  border: none;
}

.transparency-value {
  font-size: 12px;
  color: #666;
  min-width: 28px;
  text-align: right;
}

/* ===== BASEMAP KACHELN ===== */

.basemap-cards-scroll {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 8px;
  padding: 8px 6px 6px;
  flex: 1;
  min-height: 0;
  overflow-y: auto;
  scrollbar-gutter: stable;
}

.basemap-cards-scroll .basemap-card {
  min-width: 0;
  min-height: 82px; /* 60px Preview + 22px Label — nicht zusammenstauchen */
}

/* Scrollbar Styling */
.basemap-cards-scroll::-webkit-scrollbar {
  width: 4px;
}
.basemap-cards-scroll::-webkit-scrollbar-track {
  background: transparent;
}
.basemap-cards-scroll::-webkit-scrollbar-thumb {
  background: #bbb;
  border-radius: 2px;
}
.basemap-cards-scroll::-webkit-scrollbar-thumb:hover {
  background: #999;
}

/* "Weitere" Spacer zwischen Haupt- und Zusatz-Kacheln */
.basemap-cards-spacer {
  grid-column: 1 / -1;
  font-size: 11px;
  font-weight: 500;
  color: #888;
  letter-spacing: 0.5px;
  text-transform: uppercase;
  padding: 4px 0 2px 0;
  border-bottom: 1px solid #ddd;
  margin-bottom: 2px;
}

.basemap-card {
  cursor: pointer;
  border-radius: 4px;
  overflow: hidden;
  border: 2px solid transparent;
  box-sizing: border-box;
  transition: border-color 0.2s ease, box-shadow 0.2s ease, transform 0.2s ease;
  position: relative;
}

.basemap-card:hover {
  transform: scale(1.02);
}

/* Aktive Karte: kräftiger roter Rahmen mit Glow und leichtem Glanz */
.basemap-card.active {
  border: 3px solid #e8423f;
  box-shadow:
    0 0 0 1px #b8211e,
    0 0 6px 2px rgba(232, 66, 63, 0.75),
    0 0 14px 3px rgba(255, 90, 80, 0.45);
}

.basemap-card.active::after {
  content: '';
  position: absolute;
  inset: 0;
  border-radius: 1px;
  box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.55);
  background: linear-gradient(160deg, rgba(255, 255, 255, 0.45) 0%, rgba(255, 255, 255, 0.12) 22%, transparent 40%);
  pointer-events: none;
}

/* Zeitreise-Badge auf Kacheln */
.basemap-card-time-badge {
  position: absolute;
  top: 3px;
  right: 3px;
  width: 18px;
  height: 18px;
  font-size: 11px;
  line-height: 18px;
  text-align: center;
  background: rgba(255,255,255,0.88);
  border-radius: 50%;
  z-index: 1;
  pointer-events: none;
  box-shadow: 0 1px 3px rgba(0,0,0,0.2);
}

/* ===== BASEMAP PREVIEW-BILDER ===== */

.basemap-card-preview {
  height: 60px;
  min-height: 60px;
  background-size: cover;
  background-position: center;
  background-color: #b6c6cb;
}

.basemap-card-preview.orthofoto {
  background: url('../resources/preview-swissimage.png') center/cover no-repeat;
}

.basemap-card-preview.basisplan {
  background: #e8e8e8 url('../resources/images/basemap-preview-basisplan.png?v=20261028i') center/cover no-repeat;
}

.basemap-card-preview.grundbuch {
  background: #fff url('../resources/images/basemap-preview-grundbuch.png?v=20261028i') center/cover no-repeat;
}

.basemap-card-preview.landeskarte {
  background: url('../resources/preview-landeskarte.png') center/cover no-repeat;
}

.basemap-card-preview.siegfried {
  background: url('../resources/preview-siegfried.png') center/cover no-repeat;
}

.basemap-card-preview.dufour {
  background: url('../resources/preview-dufour.png') center/cover no-repeat;
}

.basemap-card-preview.transparent {
  background: repeating-conic-gradient(#ccc 0% 25%, #fff 0% 50%) 50% / 16px 16px;
}

.basemap-card-preview.keine {
  background: #fff;
  border: 1px solid #ddd;
}

.basemap-card-preview.swisstopo-vt {
  background: url('../resources/preview-swisstopo-vt.png') center/cover no-repeat;
}

.basemap-card-preview.swisstlm {
  background: url('../resources/preview-swisstlm.png') center/cover no-repeat;
}

.basemap-card-preview.osm {
  background: url('../resources/preview-osm.png') center/cover no-repeat;
}

.basemap-card-label {
  display: block;
  background: rgba(66, 74, 82, 0.85);
  color: white;
  font-size: 10px;
  text-align: center;
  padding: 4px 2px;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

/* ===== ZEITREISE-SLIDER ===== */

.basemap-time-container {
  padding: 6px 16px;
  flex-shrink: 0;
  margin: 0 -16px;
  background: linear-gradient(135deg, #f0f7f8 0%, #e8f0f1 100%);
  border-top: 1px solid #d0dfe1;
  border-bottom: 1px solid #d0dfe1;
  /* slide-in Animation */
  overflow: hidden;
  max-height: 0;
  opacity: 0;
  transition: max-height 0.35s ease, opacity 0.25s ease, padding 0.35s ease;
  padding-top: 0;
  padding-bottom: 0;
}

.basemap-time-container.visible {
  max-height: 110px;
  opacity: 1;
  padding: 6px 16px;
}

.basemap-footprint-row {
  min-height: 28px;
  padding: 0;
  margin: 0;
  border-bottom: none;
}

.basemap-footprint-row .basemap-eye {
  width: 28px;
  height: 28px;
}

.basemap-time-header {
  display: flex;
  align-items: center;
  gap: 6px;
  margin-bottom: 2px;
}

.basemap-time-icon {
  font-size: 14px;
  line-height: 1;
}

.basemap-time-title {
  font-size: 11px;
  font-weight: 600;
  color: #4b7b81;
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

.basemap-time-label {
  margin-left: auto;
  font-size: 18px;
  font-weight: 700;
  color: #2c5f65;
  font-variant-numeric: tabular-nums;
  min-width: 44px;
  text-align: right;
}

.basemap-time-reset {
  background: none;
  border: 1px solid #b0c8cc;
  border-radius: 3px;
  cursor: pointer;
  padding: 2px 4px;
  color: #4b7b81;
  line-height: 1;
  transition: background 0.15s, border-color 0.15s;
}

.basemap-time-reset:hover {
  background: #d0e6e8;
  border-color: #4b7b81;
}

/* Zeitreise-Slider Track & Thumb */
.basemap-time-slider {
  -webkit-appearance: none;
  appearance: none;
  width: 100%;
  height: 6px;
  background: linear-gradient(to right, #a0b8bc 0%, #4b7b81 100%);
  border-radius: 3px;
  outline: none;
  cursor: pointer;
}

.basemap-time-slider::-webkit-slider-thumb {
  -webkit-appearance: none;
  width: 18px;
  height: 18px;
  background: #4b7b81;
  border: 2px solid #fff;
  border-radius: 50%;
  box-shadow: 0 1px 4px rgba(0,0,0,0.25);
  cursor: grab;
  transition: transform 0.1s ease;
}

.basemap-time-slider::-webkit-slider-thumb:hover {
  transform: scale(1.15);
}

.basemap-time-slider::-webkit-slider-thumb:active {
  cursor: grabbing;
  transform: scale(1.2);
}

.basemap-time-slider::-moz-range-thumb {
  width: 18px;
  height: 18px;
  background: #4b7b81;
  border: 2px solid #fff;
  border-radius: 50%;
  box-shadow: 0 1px 4px rgba(0,0,0,0.25);
  cursor: grab;
}

.basemap-time-range {
  display: flex;
  justify-content: space-between;
  font-size: 9px;
  color: #7a9da3;
  margin-top: 2px;
  font-variant-numeric: tabular-nums;
}

/* Zeitreise Info-Label (Siegfried etc.) */
.basemap-time-info {
  flex-shrink: 0;
  padding: 6px 16px;
  margin: 0 -16px;
  background: #f5f0e8;
  border-top: 1px solid #ddd5c8;
  border-bottom: 1px solid #ddd5c8;
  display: flex;
  align-items: center;
  gap: 6px;
  font-size: 11px;
  color: #8b7355;
  font-style: italic;
  /* slide-in Animation */
  overflow: hidden;
  max-height: 0;
  opacity: 0;
  transition: max-height 0.35s ease, opacity 0.25s ease, padding 0.35s ease;
  padding-top: 0;
  padding-bottom: 0;
}

.basemap-time-info.visible {
  max-height: 40px;
  opacity: 1;
  padding: 6px 16px;
}

/* ===== tnet-wms-panel.css ===== */
/**
 * tnet-wms-panel.css
 * WMS-Panel Styles (Sidebar-Eintraege, Inputs, Grid)
 *
 * @version    1.0
 * @date       2026-07-02
 * @copyright  Trigonet AG
 * @author     Marco Dellenbach
 */

/* ========================================
   WMS Menu — Ausblendung wird jetzt per Config-Flag
   layerManager.useNewWmsPanel in tnet-lm-init.js gesteuert.
   ======================================== */
/* #tp_wms_menu { display: none !important; } */

/* Alte WMS-Sidebar-Styles (beibehalten für Kompatibilität) */
#tp_wms_menu .dijitTitlePaneTextNode {
  font-size: 13px !important;
}

#tp_wms_menu .wms-cont {
  font-size: 12px;
}

#tp_wms_menu .dijitTextBox,
#tp_wms_menu .dijitComboBox {
  font-size: 12px !important;
}

#tp_wms_menu .dijitInputInner {
  font-size: 12px !important;
  padding: 4px 6px !important;
}

#tp_wms_menu .dijitPlaceHolder {
  font-size: 11px !important;
}

#tp_wms_menu .dijitButton .dijitButtonText {
  font-size: 12px !important;
}

#tp_wms_menu .dijitButtonNode {
  padding: 2px 8px !important;
}

#tp_wms_menu .dojoxGridHeader th {
  font-size: 12px !important;
  padding: 4px !important;
}

#tp_wms_menu .dojoxGridCell {
  font-size: 12px !important;
}

#tp_wms_menu .dijitDialogPaneContent {
  font-size: 12px !important;
  padding: 4px !important;
}

#tp_wms_menu .row {
  margin: 4px 0 !important;
}

#tp_wms_menu #wmsimportGrid {
  height: 120px !important;
}

#tp_wms_menu .dojoxGridMasterHeader {
  height: auto !important;
}

#tp_wms_menu #wmsimport_abstract_wrapper {
  height: 50px !important;
  font-size: 11px !important;
}

/* #logoMapPlus {
  height: 110px !important;
  background: url(../img/gr_logo.svg) center no-repeat;
  background-size: 260px;
} */

/* ===== tnet-info-panel.css ===== */
/**
 * tnet-info-panel.css
 * Info-Panel (Objektinformation): FloatingPane-Layout, Header, Unified Design
 *
 * @version    1.0
 * @date       2026-07-02
 * @copyright  Trigonet AG
 * @author     Marco Dellenbach
 */

/* ===== INFO PANE (Objektinformation) - Gleiches Styling wie Räumliche Abfrage ===== */
#njs_info_pane {
  width: 10cm !important;
  min-width: 350px;
  max-width: none !important; /* Freies Resizen erlauben */
  min-height: 150px;
  border-radius: 6px !important;
  overflow: hidden !important;
  box-shadow: 0 4px 16px rgba(0,0,0,0.25) !important;
  border: none !important;
}

/* Header wie Räumliche Abfrage - gleiche Höhe */
#njs_info_pane .dojoxFloatingPaneTitle {
  display: flex !important;
  flex-direction: row !important;
  align-items: center !important;
  justify-content: flex-start !important;
  padding: 8px 10px !important;
  background: #4b7b81 !important;
  color: white !important;
  font-weight: 500 !important;
  cursor: move !important;
  user-select: none !important;
  height: 36px !important;
  min-height: 36px !important;
  box-sizing: border-box !important;
}

/* Original Close-Button verstecken (wird durch custom ersetzt) */
#njs_info_pane .dojoxFloatingCloseIcon {
  display: none !important;
}

/* Titel-Text - zuerst, dann flex-grow */
#njs_info_pane .dijitTitleNode {
  flex: 1 !important;
  font-size: 13px !important;
  font-weight: 500 !important;
  color: white !important;
  order: 1 !important;
  margin-left: 0 !important;
}

#njs_info_pane .dijitTitleNode table {
  color: white !important;
}

/* Verstecke originale Dojo-Icons */
#njs_info_pane .dojoxFloatingMaximizeIcon,
#njs_info_pane .dojoxFloatingRestoreIcon,
#njs_info_pane .dojoxFloatingMinimizeIcon {
  display: none !important;
}

/* Custom Action Buttons - rechts */
#njs_info_pane .info-pane-actions {
  display: flex !important;
  align-items: center !important;
  gap: 4px !important;
  margin-left: auto !important;
  margin-right: 0 !important;
  order: 2 !important;
}

#njs_info_pane .info-pane-btn {
  background: rgba(255,255,255,0.15) !important;
  border: none !important;
  color: white !important;
  width: 24px !important;
  height: 24px !important;
  border-radius: 4px !important;
  cursor: pointer !important;
  display: flex !important;
  align-items: center !important;
  justify-content: center !important;
  transition: background 0.2s !important;
}

#njs_info_pane .info-pane-btn:hover {
  background: rgba(255,255,255,0.3) !important;
}

#njs_info_pane .info-pane-btn svg {
  width: 16px !important;
  height: 16px !important;
}

/* Original Dojo Close-Button bleibt versteckt - Custom Button wird verwendet */

/* Content-Bereich */
#njs_info_pane .dojoxFloatingPaneCanvasInfo {
  background: white !important;
  flex: 1 !important;
  overflow: hidden !important;
  position: relative !important;
}

#njs_info_pane .dojoxFloatingPaneContentInfo {
  overflow-y: auto !important;
  overflow-x: auto !important;
  height: 100% !important;
  padding: 0 !important;
}

/* Resize Handle (Dojo original) - KOMPLETT VERSTECKT */
#njs_info_pane .dojoxFloatingResizeHandle {
  display: none !important;
  visibility: hidden !important;
  opacity: 0 !important;
  pointer-events: none !important;
}

#njs_info_pane .dojoxFloatingResizeHandle:hover {
  display: none !important;
}

/* Resize Handles für Info Panel - alle Seiten */
#njs_info_pane .info-pane-resize-top,
#njs_info_pane .info-pane-resize-bottom,
#njs_info_pane .info-pane-resize-left,
#njs_info_pane .info-pane-resize-right {
  position: absolute !important;
  z-index: 100 !important;
  transition: background 0.2s;
}

#njs_info_pane .info-pane-resize-top {
  top: 0 !important;
  left: 0 !important;
  right: 0 !important;
  height: 6px !important;
  cursor: ns-resize !important;
}

#njs_info_pane .info-pane-resize-bottom {
  bottom: 0 !important;
  left: 0 !important;
  right: 0 !important;
  height: 6px !important;
  cursor: ns-resize !important;
}

#njs_info_pane .info-pane-resize-left {
  left: 0 !important;
  top: 0 !important;
  bottom: 0 !important;
  width: 8px !important;
  cursor: ew-resize !important;
  background: linear-gradient(to right, rgba(75,123,129,0.15), transparent) !important;
}

#njs_info_pane .info-pane-resize-right {
  right: 0 !important;
  top: 0 !important;
  bottom: 0 !important;
  width: 8px !important;
  cursor: ew-resize !important;
  background: linear-gradient(to left, rgba(75,123,129,0.15), transparent) !important;
}

/* Hover-Effekte */
#njs_info_pane .info-pane-resize-top:hover,
#njs_info_pane .info-pane-resize-bottom:hover {
  background: rgba(75,123,129,0.15) !important;
}

#njs_info_pane .info-pane-resize-left:hover {
  background: linear-gradient(to right, rgba(75,123,129,0.3), transparent) !important;
}

#njs_info_pane .info-pane-resize-right:hover {
  background: linear-gradient(to left, rgba(75,123,129,0.3), transparent) !important;
}

/* Ecken-Handles */
#njs_info_pane .info-pane-resize-corner-tl,
#njs_info_pane .info-pane-resize-corner-tr,
#njs_info_pane .info-pane-resize-corner-bl,
#njs_info_pane .info-pane-resize-corner-br {
  position: absolute !important;
  width: 12px !important;
  height: 12px !important;
  z-index: 101 !important;
}

#njs_info_pane .info-pane-resize-corner-tl {
  top: 0 !important;
  left: 0 !important;
  cursor: nwse-resize !important;
}

#njs_info_pane .info-pane-resize-corner-tr {
  top: 0 !important;
  right: 0 !important;
  cursor: nesw-resize !important;
}

#njs_info_pane .info-pane-resize-corner-bl {
  bottom: 0 !important;
  left: 0 !important;
  cursor: nesw-resize !important;
}

#njs_info_pane .info-pane-resize-corner-br {
  bottom: 0 !important;
  right: 0 !important;
  width: 20px !important;
  height: 20px !important;
  cursor: nwse-resize !important;
  background: linear-gradient(135deg, transparent 50%, rgba(75,123,129,0.5) 50%) !important;
}

#njs_info_pane .info-pane-resize-corner-br:hover {
  background: linear-gradient(135deg, transparent 50%, #4b7b81 50%) !important;
}

/* Angedockt rechts */
#njs_info_pane.docked-right {
  position: fixed !important;
  top: 69px !important;
  right: 0 !important;
  left: auto !important;
  bottom: 32px !important;
  width: var(--tnet-info-panel-docked-width, 400px) !important;
  height: auto !important;
  max-height: none !important;
  border-radius: 0 !important;
  box-shadow: -4px 0 12px rgba(0,0,0,0.15) !important;
  display: flex !important;
  flex-direction: column !important;
}

/* Im angedockten Modus: nur linken Handle zeigen, alle anderen verstecken */
#njs_info_pane.docked-right .dojoxFloatingResizeHandle,
#njs_info_pane.docked-right .info-pane-resize-top,
#njs_info_pane.docked-right .info-pane-resize-bottom,
#njs_info_pane.docked-right .info-pane-resize-right,
#njs_info_pane.docked-right .info-pane-resize-corner-tl,
#njs_info_pane.docked-right .info-pane-resize-corner-tr,
#njs_info_pane.docked-right .info-pane-resize-corner-bl,
#njs_info_pane.docked-right .info-pane-resize-corner-br {
  display: none !important;
}

#njs_info_pane.docked-right .info-pane-resize-left {
  display: block !important;
}

/* Content im angedockten Modus flexibel */
#njs_info_pane.docked-right .dojoxFloatingPaneCanvasInfo {
  flex: 1 !important;
  min-height: 0 !important;
  overflow: hidden !important;
}

#njs_info_pane.docked-right .dojoxFloatingPaneContentInfo {
  height: 100% !important;
  max-height: none !important;
}

/* FloatingPane Title allgemein */
.dojoxFloatingPane .dojoxFloatingPaneTitle {
  position: relative;
  z-index: 1000;
}

[type="checkbox"],
[type="radio"] {
  accent-color: #4b7b81 !important;
}

#btnZuruck,
#solrsearchSearchInputCancel,
.infoWindowIpadClose {
  filter: grayscale(100%);
}

#infowin_wait {
  filter: hue-rotate(210deg) brightness(1.3);
}

#second_lyrmgr .dijitTitlePaneTextNode,
#layer_menu .dijitTitlePaneTextNode {
  margin-left: 11px;
  margin-top: 0;
}


/* ===== INFO-PANEL UNIFIED DESIGN ===== */

/* ===== INFO-PANEL UNIFIED DESIGN ===== */
/* Framework-Ergebnisse an WMS-GFI-Design angleichen (teal, 12px, Zebra-Stripes) */

/* Layer-Ergebnisse: ruhige Kopfzeilen wie bei den Grundstückinformationen */
#njs_info_pane_content .dijitTitlePane {
  border: none !important;
}

#njs_info_pane_content .dijitTitlePaneTitle,
.tnet-location-info > summary {
  background: #f1f6f6 !important;
  color: var(--m-color-primary, #4B7B81) !important;
  border-bottom: 1px solid #dce7e8 !important;
  border-top: none !important;
  border-left: none !important;
  border-right: none !important;
  font-size: 13px !important;
  font-weight: 500 !important;
  letter-spacing: 0 !important;
  text-transform: none !important;
  min-height: 30px !important;
  padding: 4px 6px !important;
  flex-wrap: wrap !important;
  box-sizing: border-box !important;
  cursor: pointer !important;
}

#njs_info_pane_content .dijitTitlePaneTitle,
.tnet-location-info > summary {
  font-family: Arial, sans-serif !important;
  font-size: 13px !important;
  font-weight: 700 !important;
  line-height: 1.4 !important;
}

#njs_info_pane_content .dijitTitlePaneTextNode,
#njs_info_pane_content .dijitTitlePaneTextNode *,
.tnet-location-info > summary h3 {
  font: inherit !important;
  color: inherit !important;
  letter-spacing: 0 !important;
  text-transform: none !important;
  background: transparent !important;
}

#njs_info_pane_content .dijitTitlePaneTitleFocus {
  display: flex !important;
  align-items: center !important;
  flex-wrap: wrap !important;
  width: 100% !important;
  padding: 0 !important;
  margin: 0 !important;
  min-height: 0 !important;
}

#njs_info_pane_content .dijitTitlePaneTextNode {
  margin: 0 !important;
  padding: 0 !important;
}

#njs_info_pane_content .dijitTitlePaneTitle .dijitArrowNode {
  background: none !important;
  width: 10px !important;
  height: 14px !important;
  margin-right: 4px !important;
  color: inherit !important;
  font-size: 0 !important;
  flex: 0 0 10px !important;
}

#njs_info_pane_content .dijitTitlePaneTitle .dijitArrowNodeInner {
  display: none !important;
}

#njs_info_pane_content .dijitTitlePaneTitle .dijitArrowNode::before,
.tnet-location-info > summary::before {
  content: '' !important;
  display: block !important;
  width: 10px !important;
  height: 14px !important;
  background: currentColor !important;
  clip-path: polygon(20% 25%, 80% 50%, 20% 75%) !important;
}

#njs_info_pane_content .dijitTitlePaneTitle.dijitOpen .dijitArrowNode::before,
.tnet-location-info[open] > summary::before {
  clip-path: polygon(15% 30%, 85% 30%, 50% 70%) !important;
}

.tnet-location-info > summary {
  display: flex !important;
  align-items: center !important;
  list-style: none !important;
}

.tnet-location-info > summary::-webkit-details-marker {
  display: none !important;
}

.tnet-location-info > summary::before {
  flex: 0 0 10px !important;
  margin-right: 4px !important;
}

#njs_info_pane_content .dijitTitlePaneTitle:hover,
#njs_info_pane_content .dijitTitlePaneTitle:active,
.tnet-location-info > summary:hover,
.tnet-location-info > summary:active {
  background: #e5eeee !important;
}

#njs_info_pane_content .dijitTitlePaneTitle:focus-visible,
.tnet-location-info > summary:focus-visible {
  outline: 2px solid var(--m-color-primary, #4B7B81) !important;
  outline-offset: -2px !important;
}

#njs_info_pane_content .dijitTitlePaneContentOuter {
  border: none !important;
}

#njs_info_pane_content .dijitTitlePaneTitle .tnet-maptip-breadcrumb {
  display: block !important;
  width: 100% !important;
  flex-basis: 100% !important;
  margin-top: 0 !important;
  padding-top: 0 !important;
  color: #8a8f96 !important;
  font-size: 10px !important;
  font-weight: 500 !important;
  letter-spacing: 0 !important;
  text-transform: none !important;
  line-height: 1.2 !important;
  white-space: normal !important;
  word-break: break-word !important;
}

/* Klickbarer Breadcrumb: Hover-Feedback */
#njs_info_pane_content .dijitTitlePaneTitle .tnet-maptip-breadcrumb-clickable {
  cursor: pointer !important;
  transition: color 0.15s ease !important;
}
#njs_info_pane_content .dijitTitlePaneTitle .tnet-maptip-breadcrumb-clickable:hover {
  color: #4B7B81 !important;
  text-decoration: underline !important;
}

/* Highlight-Animation für Layer im Themenkatalog */
@keyframes tnet-catalog-highlight-pulse {
  0%   { background-color: rgba(75, 123, 129, 0.35); }
  50%  { background-color: rgba(75, 123, 129, 0.12); }
  100% { background-color: rgba(75, 123, 129, 0.35); }
}
.tnet-catalog-highlight {
  animation: tnet-catalog-highlight-pulse 0.8s ease-in-out 3 !important;
  border-radius: 3px !important;
  outline: 2px solid rgba(75, 123, 129, 0.5) !important;
  outline-offset: 1px !important;
}

/* Feldname-Spalte: teal, fett, 12px — analog .wms-gfi-key */
#njs_info_pane_content .infoWindowItemName,
#njs_info_pane_content .infoWindowFirstItemName {
  font-weight: 600 !important;
  white-space: nowrap !important;
  padding: 3px 8px 3px 4px !important;
  color: #4B7B81 !important;
  vertical-align: top !important;
  width: 35% !important;
  font-size: 12px !important;
  background-color: transparent !important;
  border-top: none !important;
}

/* Wert-Spalte: 12px, Zeilenumbruch — analog .wms-gfi-val */
#njs_info_pane_content .infoWindowItem,
#njs_info_pane_content .infoWindowFirstItem {
  padding: 3px 4px !important;
  word-break: break-word !important;
  font-size: 12px !important;
  font-weight: normal !important;
  color: #333 !important;
  background-color: transparent !important;
  border-top: none !important;
}

/* Zebra-Stripes für alle Tabellen im Info-Panel */
#njs_info_pane_content table tr:nth-child(even) {
  background: rgba(75, 123, 129, 0.06) !important;
}

/* Links im Info-Panel: Primärfarbe mit Unterstrich */
#njs_info_pane_content .infoWindowItem a,
#njs_info_pane_content .infoWindowItem a:visited,
#njs_info_pane_content .infoWindowItem a:hover {
  color: #4B7B81 !important;
  text-decoration: underline !important;
}

/* Kategorie-Header (seltener Fall) */
#njs_info_pane_content .infoWindowCat {
  background-color: #4B7B81 !important;
  border-color: #4B7B81 !important;
  font-size: 11px !important;
  padding: 4px 6px !important;
}

/* Footer-Zeile */
#njs_info_pane_content .infoWindowFooter {
  border-top: 1px solid rgba(75, 123, 129, 0.2) !important;
  font-size: 12px !important;
}

/* Meldungs-Zeile */
#njs_info_pane_content .infoWindowMsg {
  font-size: 12px !important;
  color: #666 !important;
}

.ol-overviewmap {
  right: 1.5px;
  bottom: 1.5px;
  left: auto;
}

.ol-overviewmap .ol-overviewmap-map {
  border: none;
  outline: 2px solid red;
  outline-offset: -2px;
  height: 240px;
  width: 100%;
}

.ol-overviewmap-box {
  background-color: rgba(255, 255, 255, 0.6);  
  border: 3px dotted red;
}

.compact_center {
  margin-left: 0px !important;
}

.ol-control button {
  background-color: #4b7b81;
}

.ol-control button:hover {
	color: #FFF;
	background-color: red;
	outline: none !important;
}

.infolay_wait {
  height: 60px;
  width: 60px;
  border: none;
  font-size: 0px;
  position: fixed;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
}



/* ===== INFO SPEZIALABFRAGEN (tnet-info-special-queries.js) ===== */
/* Expliziter Fehlerzustand fuer Grundstueck-Zusatzabfragen statt haengendem "loading ..." */
.tnet-spec-qry-error {
  color: #a33 !important;
  font-style: italic;
}

/* ===== EIGENE STANDORTAUSKUNFT ===== */
.tnet-location-info {
  padding: 0 !important;
  color: #333 !important;
  font-size: 13px !important;
  overflow: auto !important;
}
.tnet-location-info h3 {
  color: var(--m-color-primary, #4B7B81) !important;
  display: inline !important;
  margin: 0 !important;
}
.tnet-location-info > summary {
  color: var(--m-color-primary, #4B7B81) !important;
}
.tnet-location-info > div {
  padding: 10px !important;
}
.tnet-location-info dl {
  display: grid !important;
  grid-template-columns: minmax(100px, 1fr) 2fr !important;
  gap: 1px 10px !important;
  margin: 4px 0 6px !important;
}
.tnet-location-info dt,
.tnet-location-info dd {
  margin: 0 !important;
  padding: 0 !important;
  line-height: 1.3 !important;
  overflow-wrap: anywhere !important;
}
.tnet-location-info details summary { padding: 5px 0 !important; cursor: pointer !important; }
.tnet-parcel-section {
  margin: 1px 0 !important;
}
.tnet-location-info .tnet-parcel-section > summary {
  display: flex !important;
  align-items: center !important;
  gap: 7px !important;
  padding: 4px 0 !important;
  list-style: none !important;
  color: var(--m-color-primary, #4B7B81) !important;
  font-size: 12px !important;
  font-weight: 600 !important;
}
.tnet-parcel-section > summary::-webkit-details-marker { display: none !important; }
.tnet-parcel-section > summary::before {
  content: "" !important;
  flex: 0 0 auto !important;
  width: 0 !important;
  height: 0 !important;
  border-top: 3px solid transparent !important;
  border-bottom: 3px solid transparent !important;
  border-left: 4px solid currentColor !important;
}
.tnet-parcel-section[open] > summary::before { transform: rotate(90deg) !important; }
.tnet-parcel-section > summary:focus-visible {
  outline: 2px solid var(--m-color-primary, #4B7B81) !important;
  outline-offset: 2px !important;
}
.tnet-location-info table { border-collapse: collapse !important; width: 100% !important; }
.tnet-location-info th,
.tnet-location-info td { padding: 5px !important; text-align: left !important; border-bottom: 1px solid #ddd !important; }
.tnet-location-info details > div { overflow-x: auto !important; }
.tnet-gwr-attribution {
  margin: 4px 0 !important;
  font-size: 10px !important;
  line-height: 1.3 !important;
  color: #666 !important;
  white-space: nowrap !important;
  overflow-x: auto !important;
}
.tnet-gwr-attribution a { font-size: inherit !important; color: inherit !important; text-decoration: underline !important; }
.tnet-gwr-list { container-type: inline-size !important; }
.tnet-gwr-building {
  min-width: 0 !important;
  padding: 6px 0 !important;
  border-bottom: 1px solid #ddd !important;
}
.tnet-gwr-building > summary {
  display: grid !important;
  grid-template-columns: 14px minmax(0, 1fr) !important;
  column-gap: 4px !important;
  list-style: none !important;
}
.tnet-gwr-building > summary::-webkit-details-marker { display: none !important; }
.tnet-gwr-building > summary::before {
  content: "" !important;
  grid-column: 1 !important;
  grid-row: 1 / span 2 !important;
  width: 0 !important;
  height: 0 !important;
  margin-top: 4px !important;
  border-top: 4px solid transparent !important;
  border-bottom: 4px solid transparent !important;
  border-left: 6px solid var(--m-color-primary, #4B7B81) !important;
  transform-origin: 3px 4px !important;
}
.tnet-gwr-building[open] > summary::before { transform: rotate(90deg) !important; }
.tnet-gwr-building > summary > span { grid-column: 2 !important; }
.tnet-gwr-address { font-weight: 600 !important; overflow-wrap: break-word !important; }
.tnet-gwr-facts {
  display: block !important;
  margin-top: 2px !important;
  color: #666 !important;
  font-size: 11px !important;
  line-height: 1.3 !important;
}
.tnet-gwr-building section { padding: 0 0 4px !important; }
.tnet-gwr-building h4 { margin: 8px 0 5px !important; font-size: 12px !important; }
.tnet-gwr-building dl { grid-template-columns: minmax(0, 1fr) minmax(0, 1.3fr) !important; gap: 5px 12px !important; }
.tnet-gwr-building dt,
.tnet-gwr-building dd { min-width: 0 !important; overflow-wrap: break-word !important; }
@container (max-width: 360px) {
  .tnet-gwr-building dl { grid-template-columns: minmax(0, 1fr) !important; gap: 2px !important; }
  .tnet-gwr-building dt { font-weight: 600 !important; }
  .tnet-gwr-building dd { margin-bottom: 6px !important; }
}
.tnet-location-info p { margin: 4px 0 !important; line-height: 1.3 !important; }
.tnet-parcel-header { display: grid !important; grid-template-columns: minmax(0, 1fr) auto !important; gap: 6px 10px !important; align-items: start !important; }
.tnet-parcel-header > dl { grid-column: 1 !important; grid-row: 1 !important; min-width: 0 !important; grid-template-columns: minmax(0, 1fr) minmax(0, 1.4fr) !important; }
.tnet-parcel-oereb-actions { grid-column: 2 !important; grid-row: 1 !important; display: flex !important; flex-direction: column !important; gap: 5px !important; padding-top: 4px !important; }
.tnet-parcel-header > .tnet-spec-qry-error,
.tnet-parcel-header > div:not(.tnet-parcel-oereb-actions) { grid-column: 1 / -1 !important; }
.tnet-parcel-oereb-actions button,
.tnet-parcel-oereb-actions a,
.tnet-parcel-actions button,
.tnet-parcel-actions a {
  appearance: none !important;
  display: inline-flex !important;
  align-items: center !important;
  justify-content: center !important;
  box-sizing: border-box !important;
  min-height: 26px !important;
  padding: 4px 8px !important;
  border: 0 !important;
  border-radius: 0 !important;
  background: #dcebed !important;
  box-shadow: none !important;
  color: #244b50 !important;
  font: inherit !important;
  font-size: 11px !important;
  line-height: 1.2 !important;
  white-space: nowrap !important;
  text-transform: none !important;
  text-align: center !important;
  text-decoration: none !important;
  cursor: pointer !important;
}
.tnet-parcel-oereb-actions button:hover,
.tnet-parcel-oereb-actions a:hover,
.tnet-parcel-actions button:hover,
.tnet-parcel-actions a:hover { background: #c6dfe2 !important; }
.tnet-parcel-oereb-actions button:focus-visible,
.tnet-parcel-oereb-actions a:focus-visible,
.tnet-parcel-actions button:focus-visible,
.tnet-parcel-actions a:focus-visible { outline: 2px solid #4B7B81 !important; outline-offset: 2px !important; }
.tnet-parcel-actions { display: flex !important; flex-wrap: wrap !important; justify-content: flex-end !important; gap: 6px 12px !important; align-items: center !important; margin: 4px 0 !important; }
.tnet-land-cover-content { container-type: inline-size !important; container-name: land-cover !important; }
.tnet-land-cover { display: grid !important; grid-template-columns: minmax(0, 1fr) 126px !important; gap: 10px !important; align-items: start !important; }
.tnet-land-cover table { min-width: 0 !important; }
.tnet-land-cover caption { text-align: left !important; font-size: 12px !important; }
.tnet-land-cover td,
.tnet-land-cover th { padding: 3px 2px !important; line-height: 1.3 !important; }
.tnet-land-cover td:not(:first-child),
.tnet-land-cover th:not(:first-child) { text-align: right !important; white-space: nowrap !important; }
.tnet-land-cover-chart { width: 126px !important; flex: 0 0 126px !important; }
@container land-cover (max-width: 375px) {
  .tnet-land-cover { grid-template-columns: minmax(0, 1fr) !important; }
  .tnet-land-cover-chart,
  .tnet-land-cover .tnet-land-cover-swatch { display: none !important; }
}
.tnet-land-cover-chart svg { display: block !important; width: 126px !important; height: 126px !important; overflow: visible !important; }
.tnet-land-cover-info { font-size: 11px !important; min-height: 3.9em !important; overflow-wrap: anywhere !important; }
.tnet-land-cover-status:empty { display: none !important; }
.tnet-land-cover-segment { cursor: pointer !important; transform-origin: 60px 60px !important; transition: opacity 120ms, transform 120ms !important; }
.tnet-land-cover-segment.is-muted { opacity: 0.35 !important; }
.tnet-land-cover-segment.is-active { transform: scale(1.05) !important; stroke: #244b50 !important; stroke-width: 1.5px !important; }
.tnet-land-cover-segment:focus-visible { outline: none !important; stroke: #182f33 !important; stroke-width: 2px !important; }
.tnet-land-cover tr.is-active td { background: #e5eff0 !important; }
.tnet-land-cover-label { border: 0 !important; background: transparent !important; color: inherit !important; font: inherit !important; padding: 0 !important; text-align: left !important; cursor: pointer !important; }
.tnet-land-cover-label:focus-visible { outline: 2px solid #4b7b81 !important; outline-offset: 2px !important; }
.tnet-land-cover-swatch { display: inline-block !important; width: 9px !important; height: 9px !important; margin-right: 5px !important; }
@media (prefers-reduced-motion: reduce) {
  .tnet-land-cover-segment { transition: none !important; }
}

/* ===== EIGENTÜMERABFRAGE (tnet-owner-info.js) ===== */
.tnet-owner-section[hidden] { display: none !important; }
.tnet-owner-content,
.tnet-owner-store { font-size: 12px !important; line-height: 1.35 !important; color: #333 !important; }
.tnet-owner-note,
.tnet-owner-muted { color: #666 !important; font-size: 11px !important; margin: 4px 0 !important; }
.tnet-owner-loading { color: var(--m-color-primary, #4B7B81) !important; font-style: italic !important; }
.tnet-owner-content dl.tnet-owner-parcel,
.tnet-owner-store dl.tnet-owner-parcel {
  display: grid !important;
  grid-template-columns: minmax(0, 1fr) minmax(0, 1.6fr) !important;
  gap: 1px 10px !important;
  margin: 4px 0 6px !important;
}
.tnet-owner-parcel dt,
.tnet-owner-parcel dd { margin: 0 !important; padding: 0 !important; overflow-wrap: anywhere !important; }
.tnet-owner-groups,
.tnet-owner-persons { list-style: none !important; margin: 0 !important; padding: 0 !important; }
.tnet-owner-group { padding: 5px 0 !important; border-top: 1px solid #ddd !important; }
.tnet-owner-group-title { font-weight: 600 !important; color: var(--m-color-primary, #4B7B81) !important; }
.tnet-owner-persons > li { padding: 2px 0 2px 10px !important; }
.tnet-owner-persons strong { display: block !important; }
.tnet-owner-type,
.tnet-owner-address { display: block !important; color: #555 !important; font-size: 11px !important; }
.tnet-owner-link { margin: 4px 0 0 10px !important; padding-left: 8px !important; border-left: 2px solid #dcebed !important; }
.tnet-owner-link-pending { display: flex !important; flex-wrap: wrap !important; gap: 4px 8px !important; align-items: center !important; }
.tnet-owner-link > summary { cursor: pointer !important; color: var(--m-color-primary, #4B7B81) !important; }
.tnet-owner-link button,
.tnet-owner-store-header button {
  appearance: none !important;
  min-height: 24px !important;
  padding: 3px 8px !important;
  border: 0 !important;
  border-radius: 0 !important;
  background: #dcebed !important;
  color: #244b50 !important;
  font: inherit !important;
  font-size: 11px !important;
  cursor: pointer !important;
}
.tnet-owner-content button:disabled,
.tnet-owner-store button:disabled { opacity: 0.55 !important; cursor: not-allowed !important; }
.tnet-owner-store {
  position: fixed !important;
  right: 16px !important;
  bottom: 16px !important;
  z-index: 1004 !important;
  box-sizing: border-box !important;
  width: 420px !important;
  max-width: calc(100vw - 32px) !important;
  max-height: 70vh !important;
  overflow: auto !important;
  padding: 0 12px 12px !important;
  background: #fff !important;
  border: 1px solid #c6dfe2 !important;
  box-shadow: 0 4px 18px rgba(0, 0, 0, 0.25) !important;
}
.tnet-owner-store-header {
  position: sticky !important;
  top: 0 !important;
  display: flex !important;
  align-items: center !important;
  justify-content: space-between !important;
  gap: 8px !important;
  padding: 10px 0 6px !important;
  background: #fff !important;
}
.tnet-owner-store-header h3 { margin: 0 !important; font-size: 14px !important; color: var(--m-color-primary, #4B7B81) !important; }
.tnet-owner-store-entry > div { padding: 2px 0 6px !important; }
.tnet-owner-toast {
  position: fixed !important;
  left: 50% !important;
  bottom: 24px !important;
  z-index: 1005 !important;
  transform: translateX(-50%) !important;
  display: flex !important;
  gap: 10px !important;
  align-items: center !important;
  max-width: calc(100vw - 32px) !important;
  padding: 8px 12px !important;
  background: #244b50 !important;
  color: #fff !important;
  font-size: 12px !important;
  box-shadow: 0 2px 10px rgba(0, 0, 0, 0.3) !important;
}
.tnet-owner-toast button {
  border: 1px solid #fff !important;
  background: transparent !important;
  color: #fff !important;
  font: inherit !important;
  padding: 2px 8px !important;
  cursor: pointer !important;
}
@media (max-width: 600px) {
  .tnet-owner-store {
    left: 0 !important;
    right: 0 !important;
    bottom: 0 !important;
    width: 100% !important;
    max-width: 100% !important;
    max-height: 80vh !important;
  }
}

/* ===== tnet-search.css ===== */
/**
 * tnet-search.css
 * Desktop-Suchfeld v1.5 (tnet-search.js): Suchbar, Filter-Popup, Resultatliste
 *
 * @version    1.0
 * @date       2026-07-02
 * @copyright  Trigonet AG
 * @author     Marco Dellenbach
 */

/* ========================================
   Desktop-Suchfeld v1.5 (tnet-search.js)
   ======================================== */
#dt-search-bar {
    position: fixed;
    top: 12px;
    left: 340px;
    /* schrumpft bei schmalen Fenstern, damit er nicht in die Header-Toolbar (rechts) ragt */
    width: clamp(140px, calc(100vw - 700px), 340px);
    height: 45px;
    display: flex;
    align-items: center;
    z-index: 1000;
    background: #e8f0f1;
    box-shadow: 0 1px 3px rgba(0,0,0,0.10);
    padding: 0 10px;
    box-sizing: border-box;
    gap: 0;
}

/* Lupe-Icon (links) */
.dt-search-icon {
    flex-shrink: 0;
    width: 18px;
    height: 18px;
    fill: rgba(0,0,0,0.40);
    display: flex;
    align-items: center;
    pointer-events: none;
    margin-right: 6px;
}

/* Suchfeld-Input */
#dt-search-input {
    flex: 1;
    min-width: 0;
    background: transparent;
    border: none;
    outline: none;
    color: #333;
    font-size: 14px;
    font-family: 'Roboto', sans-serif;
    line-height: 45px;
    height: 45px;
    padding: 0;
    -webkit-appearance: none;
    appearance: none;
}
#dt-search-input::placeholder {
    color: #999;
    font-size: 13px;
}
#dt-search-input::-webkit-search-cancel-button,
#dt-search-input::-webkit-search-decoration {
    -webkit-appearance: none;
}

/* Clear-Button */
#dt-search-clear {
    flex-shrink: 0;
    width: 20px;
    height: 20px;
    background: rgba(0,0,0,0.08);
    border: none;
    border-radius: 50%;
    color: #666;
    font-size: 13px;
    line-height: 1;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 0;
    margin-left: 4px;
    transition: background 0.15s;
}
#dt-search-clear:hover {
    background: rgba(0,0,0,0.15);
    color: #333;
}

/* Filter-Button (Tune-Icon rechts) */
#dt-search-filter-btn {
    flex-shrink: 0;
    width: 32px;
    height: 32px;
    background: transparent;
    border: none;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    padding: 0;
    margin-left: 4px;
    transition: background 0.15s;
    position: relative;
}
#dt-search-filter-btn svg {
    width: 20px;
    height: 20px;
    fill: rgba(0,0,0,0.40);
    transition: fill 0.15s;
}
#dt-search-filter-btn:hover {
    background: rgba(0,0,0,0.06);
}
#dt-search-filter-btn:hover svg {
    fill: rgba(0,0,0,0.60);
}
#dt-search-filter-btn.active svg {
    fill: #4b7b81;
}

/* Filter-Indikator: oranger Punkt wenn Filter gesetzt */
#dt-search-filter-btn.has-filter::after {
    content: '';
    position: absolute;
    top: 3px;
    right: 3px;
    width: 8px;
    height: 8px;
    background: #e67e22;
    border-radius: 50%;
    pointer-events: none;
}

/* Filter-Popup (weisses Panel unterhalb Suchbar) */
#dt-search-filter-popup {
    display: none;
    position: absolute;
    top: calc(100% + 6px);
    right: 0;
    width: 220px;
    background: #fff;
    border-radius: 8px;
    box-shadow: 0 8px 28px rgba(0,0,0,0.18);
    padding: 14px 16px;
    z-index: 1002;
}
#dt-search-filter-popup::before {
    content: '';
    position: absolute;
    top: -6px;
    right: 16px;
    width: 12px;
    height: 12px;
    background: #fff;
    transform: rotate(45deg);
    box-shadow: -2px -2px 4px rgba(0,0,0,0.06);
}
#dt-search-filter-popup.open {
    display: block;
}

.dt-filter-section {
    margin: 0;
}
.dt-filter-title {
    font-size: 11px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.06em;
    color: #4b7b81;
    margin-bottom: 8px;
}
.dt-filter-hr {
    border: none;
    border-top: 1px solid #e8e8e8;
    margin: 12px 0;
}
.dt-filter-radio,
.dt-filter-check {
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 13px;
    color: #333;
    padding: 4px 0;
    cursor: pointer;
}
.dt-filter-radio:hover,
.dt-filter-check:hover {
    color: #111;
}
.dt-filter-radio input,
.dt-filter-check input {
    accent-color: #4b7b81;
    width: 15px;
    height: 15px;
    margin: 0;
    cursor: pointer;
}

/* Dropdown-Resultatliste */
#dt-search-results {
    display: none;
    position: absolute;
    top: 100%;
    left: 0;
    width: 100%;
    background: #fff;
    border-radius: 0 0 8px 8px;
    box-shadow: 0 8px 24px rgba(0,0,0,0.15);
    list-style: none;
    margin: 0;
    padding: 4px 0;
    z-index: 1001;
    max-height: 50vh;
    overflow-y: auto;
}
#dt-search-results.open {
    display: block;
}

/* Einzelnes Resultat */
.dt-search-item {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 10px 14px;
    cursor: pointer;
    border-bottom: 1px solid rgba(0,0,0,0.05);
    transition: background 0.12s;
}
.dt-search-item:last-child {
    border-bottom: none;
}
.dt-search-item:hover,
.dt-search-item:focus {
    background: rgba(75,123,129,0.08);
    outline: none;
}

/* Resultat-Icon */
.dt-search-item-icon {
    width: 18px;
    height: 18px;
    flex-shrink: 0;
    fill: #4b7b81;
    opacity: 0.7;
}

/* Text-Container (Label + Subtitle) */
.dt-search-item-text {
    display: flex;
    flex-direction: column;
    min-width: 0;
    flex: 1;
}

/* Resultat-Label */
.dt-search-item-label {
    font-size: 13px;
    color: #333;
    line-height: 1.4;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

/* Subtitle (Adresse, Strasse, Gemeinde etc.) */
.dt-search-item-subtitle {
    font-size: 11px;
    color: #888;
    line-height: 1.3;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}
.dt-search-highlight {
    font-weight: 700;
    color: #1a1a1a;
    background: transparent;
}

/* Gruppen-Header (Layer / Standorte) */
.dt-search-group-header {
    display: block;
    padding: 6px 14px 4px;
    font-size: 11px;
    font-weight: 600;
    letter-spacing: 0.06em;
    text-transform: uppercase;
    color: #4b7b81;
    background: rgba(75,123,129,0.06);
    border-bottom: 1px solid rgba(75,123,129,0.10);
    pointer-events: none;
    user-select: none;
}

/* Thematische Suchen: Untergruppen-Header (je Alias) */
.dt-search-group-header.dt-search-group-sub {
    padding-left: 24px;
    font-weight: 500;
    text-transform: none;
    letter-spacing: 0;
}

/* Thematische Suchen: Selector (Alle | Alias) neben dem Suchfeld */
#dt-search-thematic {
    flex: 0 1 110px;
    min-width: 0;
    max-width: 110px;
    height: 26px;
    margin-left: 6px;
    padding: 0 4px;
    font-size: 12px;
    font-family: 'Roboto', sans-serif;
    color: #4b7b81;
    background: rgba(75,123,129,0.10);
    border: 1px solid rgba(75,123,129,0.35);
    border-radius: 13px;
    outline: none;
    cursor: pointer;
    text-overflow: ellipsis;
}

/* ===== tnet-legend.css ===== */
/**
 * tnet-legend.css
 * Legende: FloatingPane-Layout, Header, Dock-Ansicht
 *
 * @version    1.0
 * @date       2026-07-02
 * @copyright  Trigonet AG
 * @author     Marco Dellenbach
 */

/* ===== LEGEND PANE (Legende) - Identisches Styling wie Info-Pane ===== */
#njs_floatlegend_pane {
  width: 10cm !important;
  min-width: 350px;
  max-width: none !important;
  min-height: 150px;
  border-radius: 6px !important;
  overflow: hidden !important;
  box-shadow: 0 4px 16px rgba(0,0,0,0.25) !important;
  border: none !important;
}

/* Header wie Info-Pane - gleiche Höhe */
#njs_floatlegend_pane .dojoxFloatingPaneTitle {
  display: flex !important;
  flex-direction: row !important;
  align-items: center !important;
  justify-content: flex-start !important;
  padding: 8px 10px !important;
  background: #4b7b81 !important;
  color: white !important;
  font-weight: 500 !important;
  cursor: move !important;
  user-select: none !important;
  height: 36px !important;
  min-height: 36px !important;
  box-sizing: border-box !important;
}

/* Original Dojo-Icons verstecken */
#njs_floatlegend_pane .dojoxFloatingCloseIcon,
#njs_floatlegend_pane .dojoxFloatingMaximizeIcon,
#njs_floatlegend_pane .dojoxFloatingRestoreIcon,
#njs_floatlegend_pane .dojoxFloatingMinimizeIcon {
  display: none !important;
}

/* Custom Titel-Text */
#njs_floatlegend_pane .legend-pane-custom-title {
  flex: 1 !important;
  font-size: 13px !important;
  font-weight: 500 !important;
  color: white !important;
  white-space: nowrap !important;
  overflow: hidden !important;
  text-overflow: ellipsis !important;
}

/* Custom Action Buttons - rechts */
#njs_floatlegend_pane .legend-pane-actions {
  display: flex !important;
  align-items: center !important;
  gap: 4px !important;
  margin-left: auto !important;
  margin-right: 0 !important;
}

#njs_floatlegend_pane .legend-pane-btn {
  background: rgba(255,255,255,0.15) !important;
  border: none !important;
  color: white !important;
  width: 24px !important;
  height: 24px !important;
  border-radius: 4px !important;
  cursor: pointer !important;
  display: flex !important;
  align-items: center !important;
  justify-content: center !important;
  transition: background 0.2s !important;
}

#njs_floatlegend_pane .legend-pane-btn:hover {
  background: rgba(255,255,255,0.3) !important;
}

#njs_floatlegend_pane .legend-pane-btn svg {
  width: 16px !important;
  height: 16px !important;
}

/* Content-Bereich */
#njs_floatlegend_pane .dojoxFloatingPaneCanvas {
  background: white !important;
  position: absolute !important;
  top: 36px !important;
  left: 0 !important;
  right: 0 !important;
  bottom: 0 !important;
}

#njs_floatlegend_pane .dojoxFloatingPaneContent {
  overflow: auto !important;
  height: 100% !important;
  padding: 0 !important;
}

#njs_floatlegend_pane iframe {
  width: 100% !important;
  height: 100% !important;
  border: none !important;
  margin: 0 !important;
}

/* Resize Handle (Dojo original) - KOMPLETT VERSTECKT */
#njs_floatlegend_pane .dojoxFloatingResizeHandle {
  display: none !important;
  visibility: hidden !important;
  opacity: 0 !important;
  pointer-events: none !important;
}

/* ===== tnet-lm-legacy.css ===== */
/**
 * tnet-lm-legacy.css
 * Layer-Manager Legacy-Styles: Hierarchie-Einrueckung, Container Desktop, Dargestellte Themen
 *
 * @version    1.0
 * @date       2026-07-02
 * @copyright  Trigonet AG
 * @author     Marco Dellenbach
 */

/* ===== Layer Manager TitlePane vertikale Zentrierung ===== */
/* TitlePaneTitle als Flex-Container für vertikale Zentrierung */
.dijitTitlePaneTitle {
  display: flex !important;
  align-items: center !important;
  min-height: 32px !important;
}

/* TitlePaneTitleFocus (enthält Arrow + Text + Buttons) */
.dijitTitlePaneTitleFocus {
  display: flex !important;
  align-items: center !important;
  flex: 1 !important;
  min-height: 28px !important;
}

/* TextNode mit allen Kindelementen vertikal zentrieren */
.dijitTitlePaneTextNode {
  display: inline-flex !important;
  align-items: center !important;
  flex-wrap: nowrap !important;
  gap: 4px !important;
}

/* Checkbox und andere inline-Elemente zentrieren */
.dijitTitlePaneTextNode .dijitCheckBox,
.dijitTitlePaneTextNode .dijitInline,
.dijitTitlePaneTextNode img,
.dijitTitlePaneTextNode a {
  vertical-align: middle !important;
  margin-top: 0 !important;
  margin-bottom: 0 !important;
}

/* Arrow-Icon vertikal zentrieren */
.dijitArrowNode {
  display: inline-flex !important;
  align-items: center !important;
  align-self: center !important;
}

/* Icons/Buttons rechts im TitlePane zentrieren */
.dijitTitlePaneTextNode .imagelink,
.dijitTitlePaneTextNode > a > img {
  display: inline-flex !important;
  align-items: center !important;
  vertical-align: middle !important;
}

/* ===== LAYER MANAGER HIERARCHIE-EINRÜCKUNG ===== */
/* Verschachtelte TitlePanes im Layer-Manager visuell einrücken.
   data-lyrmgr-depth wird per JS-Patch gesetzt (1=erste Sub-Kat, aufsteigend).
   Jede Ebene bekommt Einrückung, linke Farblinie und Farbverlauf dunkel→hell.
   
   Farbschema (dunkel → hell, Teal-Palette):
     Tiefe 1: #3d6a70  (dunkelster Teal)  — Hauptkategorie
     Tiefe 2: #5a8f98  (mittlerer Teal)   — Unterkategorie
     Tiefe 3: #8db5bc  (heller Teal)      — Gruppe
     Tiefe 4: #b0ced4  (sehr hell)        — Untergruppe
     Tiefe 5: #cee0e4  (hellster)         — Blatt-Gruppe
     Tiefe 6: #e2edef  (fast weiss)
     Tiefe 7: #f0f5f6  (weiss-Teal)
   
   @version 2.0 — 2026-03-04 — solide Farben statt rgba, grössere Einrückung
*/

/* Alle sub-category TitlePanes: Basis-Styling */
body.tnet-lm-legacy-nested #layer_menu .dijitTitlePane[data-lyrmgr-depth] {
  border: 0 !important;
  border-color: transparent !important;
  border-left: 0 !important;
  box-shadow: none !important;
  margin-top: 1px;
  margin-bottom: 1px;
}
body.tnet-lm-legacy-nested #layer_menu .dijitTitlePane[data-lyrmgr-depth] > .dijitTitlePaneContentOuter {
  border: 0 !important;
  border-left: 0 !important;
  box-shadow: none !important;
}

/* Verschachtelte Panes: Sichtbarkeit NUR via CSS-Klasse 'lyrmgr-open' */
/* GESCHLOSSEN: Content-Bereich komplett verstecken */
body.tnet-lm-legacy-nested #layer_menu .dijitTitlePane[data-lyrmgr-depth]:not(.lyrmgr-open) > .dijitTitlePaneContentOuter {
  display: none !important;
  height: 0 !important;
  overflow: hidden !important;
}

/* OFFEN: Content-Bereich komplett anzeigen */
body.tnet-lm-legacy-nested #layer_menu .dijitTitlePane[data-lyrmgr-depth].lyrmgr-open > .dijitTitlePaneContentOuter {
  display: block !important;
  height: auto !important;
  overflow: visible !important;
}
body.tnet-lm-legacy-nested #layer_menu .dijitTitlePane[data-lyrmgr-depth].lyrmgr-open > .dijitTitlePaneContentOuter > * {
  display: block !important;
  height: auto !important;
  overflow: visible !important;
}

/* Pfeil-Indikator für verschachtelte TitlePanes */
body.tnet-lm-legacy-nested #layer_menu .dijitTitlePane[data-lyrmgr-depth] > .dijitTitlePaneTitle {
  cursor: pointer !important;
  border-left-style: solid !important;
  border-left-color: transparent !important;
}
body.tnet-lm-legacy-nested #layer_menu .dijitTitlePane[data-lyrmgr-depth].dijitClosed > .dijitTitlePaneTitle .dijitArrowNode::before {
  content: '\25B6' !important; /* ▶ */
  font-size: 9px !important;
  display: inline-block !important;
  margin-right: 4px !important;
}
body.tnet-lm-legacy-nested #layer_menu .dijitTitlePane[data-lyrmgr-depth]:not(.dijitClosed) > .dijitTitlePaneTitle .dijitArrowNode::before {
  content: '\25BC' !important; /* ▼ */
  font-size: 9px !important;
  display: inline-block !important;
  margin-right: 4px !important;
}

/* Ebene 1 (z.B. "Raumplanung") — dunkelster Teal */
body.tnet-lm-legacy-nested #layer_menu .dijitTitlePane[data-lyrmgr-depth="1"] {
  margin-left: 0 !important;
}
body.tnet-lm-legacy-nested #layer_menu .dijitTitlePane[data-lyrmgr-depth="1"] > .dijitTitlePaneTitle {
  background: #3d6a70 !important;
  border-left: 4px solid #2a4e53 !important;
  padding-left: 10px !important;
  color: #fff !important;
}
body.tnet-lm-legacy-nested #layer_menu .dijitTitlePane[data-lyrmgr-depth="1"] > .dijitTitlePaneTitle .appendtitle {
  font-size: 12.5px !important;
  font-weight: 700 !important;
  text-transform: uppercase !important;
  letter-spacing: 0.3px !important;
  color: #fff !important;
}
body.tnet-lm-legacy-nested #layer_menu .dijitTitlePane[data-lyrmgr-depth="1"] > .dijitTitlePaneTitle .dijitArrowNode::before {
  color: #fff !important;
}

/* Ebene 2 (z.B. "Rechtskräftig" / "Projektiert") — mittlerer Teal */
body.tnet-lm-legacy-nested #layer_menu .dijitTitlePane[data-lyrmgr-depth="2"] {
  margin-left: 0 !important;
}
body.tnet-lm-legacy-nested #layer_menu .dijitTitlePane[data-lyrmgr-depth="2"] > .dijitTitlePaneTitle {
  background: #5a8f98 !important;
  border-left: 4px solid #4b7b81 !important;
  padding-left: 22px !important;
  color: #fff !important;
}
body.tnet-lm-legacy-nested #layer_menu .dijitTitlePane[data-lyrmgr-depth="2"] > .dijitTitlePaneTitle .appendtitle {
  font-size: 12px !important;
  font-weight: 600 !important;
  color: #fff !important;
}
body.tnet-lm-legacy-nested #layer_menu .dijitTitlePane[data-lyrmgr-depth="2"] > .dijitTitlePaneTitle .dijitArrowNode::before {
  color: rgba(255,255,255,0.8) !important;
}

/* Ebene 3 (z.B. "Nutzungsplanung") — heller Teal */
body.tnet-lm-legacy-nested #layer_menu .dijitTitlePane[data-lyrmgr-depth="3"] {
  margin-left: 0 !important;
}
body.tnet-lm-legacy-nested #layer_menu .dijitTitlePane[data-lyrmgr-depth="3"] > .dijitTitlePaneTitle {
  background: #8db5bc !important;
  border-left: 4px solid #5a8f98 !important;
  padding-left: 34px !important;
  color: #1a3e43 !important;
}
body.tnet-lm-legacy-nested #layer_menu .dijitTitlePane[data-lyrmgr-depth="3"] > .dijitTitlePaneTitle .appendtitle {
  font-size: 11.5px !important;
  font-weight: 600 !important;
  color: #1a3e43 !important;
}
body.tnet-lm-legacy-nested #layer_menu .dijitTitlePane[data-lyrmgr-depth="3"] > .dijitTitlePaneTitle .dijitArrowNode::before {
  color: #2a4e53 !important;
}

/* Ebene 4 (z.B. "Flächenbezogene Themen") — sehr hell */
body.tnet-lm-legacy-nested #layer_menu .dijitTitlePane[data-lyrmgr-depth="4"] {
  margin-left: 0 !important;
}
body.tnet-lm-legacy-nested #layer_menu .dijitTitlePane[data-lyrmgr-depth="4"] > .dijitTitlePaneTitle {
  background: #b0ced4 !important;
  border-left: 3px solid #8db5bc !important;
  padding-left: 46px !important;
  color: #2a4e53 !important;
}
body.tnet-lm-legacy-nested #layer_menu .dijitTitlePane[data-lyrmgr-depth="4"] > .dijitTitlePaneTitle .appendtitle {
  font-size: 11px !important;
  font-weight: 500 !important;
  color: #2a4e53 !important;
}

/* Ebene 5 (z.B. "Nutzungszonen") — hellster Teal */
body.tnet-lm-legacy-nested #layer_menu .dijitTitlePane[data-lyrmgr-depth="5"] {
  margin-left: 0 !important;
}
body.tnet-lm-legacy-nested #layer_menu .dijitTitlePane[data-lyrmgr-depth="5"] > .dijitTitlePaneTitle {
  background: #cee0e4 !important;
  border-left: 3px solid #b0ced4 !important;
  padding-left: 58px !important;
  color: #345c61 !important;
}
body.tnet-lm-legacy-nested #layer_menu .dijitTitlePane[data-lyrmgr-depth="5"] > .dijitTitlePaneTitle .appendtitle {
  font-size: 10.5px !important;
  font-weight: 500 !important;
  color: #345c61 !important;
}

/* Ebene 6 — fast weiss */
body.tnet-lm-legacy-nested #layer_menu .dijitTitlePane[data-lyrmgr-depth="6"] {
  margin-left: 0 !important;
}
body.tnet-lm-legacy-nested #layer_menu .dijitTitlePane[data-lyrmgr-depth="6"] > .dijitTitlePaneTitle {
  background: #e2edef !important;
  border-left: 2px solid #cee0e4 !important;
  padding-left: 68px !important;
  color: #345c61 !important;
}

/* Ebene 7 (tiefste) — weiss-Teal */
body.tnet-lm-legacy-nested #layer_menu .dijitTitlePane[data-lyrmgr-depth="7"] {
  margin-left: 0 !important;
}
body.tnet-lm-legacy-nested #layer_menu .dijitTitlePane[data-lyrmgr-depth="7"] > .dijitTitlePaneTitle {
  background: #f0f5f6 !important;
  border-left: 2px solid #e2edef !important;
  padding-left: 78px !important;
  color: #345c61 !important;
}

/* Leaf-Layer im Content ebenfalls depth-basiert einrücken
   WICHTIG: via padding-left (nicht margin-left), damit Checkbox/Label zuverlässig
   unter dem Parent-Titel erscheinen und nicht am linken Rand "kleben". */
body.tnet-lm-legacy-nested #layer_menu .tnet-lm-nested-leaf {
  margin-left: 0 !important;
  box-sizing: border-box !important;
}
body.tnet-lm-legacy-nested #layer_menu .tnet-lm-nested-leaf[data-lyrmgr-parent-depth="1"] { padding-left: 24px !important; }
body.tnet-lm-legacy-nested #layer_menu .tnet-lm-nested-leaf[data-lyrmgr-parent-depth="2"] { padding-left: 36px !important; }
body.tnet-lm-legacy-nested #layer_menu .tnet-lm-nested-leaf[data-lyrmgr-parent-depth="3"] { padding-left: 48px !important; }
body.tnet-lm-legacy-nested #layer_menu .tnet-lm-nested-leaf[data-lyrmgr-parent-depth="4"] { padding-left: 60px !important; }
body.tnet-lm-legacy-nested #layer_menu .tnet-lm-nested-leaf[data-lyrmgr-parent-depth="5"] { padding-left: 72px !important; }
body.tnet-lm-legacy-nested #layer_menu .tnet-lm-nested-leaf[data-lyrmgr-parent-depth="6"] { padding-left: 84px !important; }
body.tnet-lm-legacy-nested #layer_menu .tnet-lm-nested-leaf[data-lyrmgr-parent-depth="7"] { padding-left: 96px !important; }

body.tnet-lm-legacy-nested #layer_menu .tnet-lm-nested-leaf .lyrmgr_group,
body.tnet-lm-legacy-nested #layer_menu .tnet-lm-nested-leaf [id^="div_"] {
  margin-left: 0 !important;
}
body.tnet-lm-legacy-nested #layer_menu .dijitTitlePane[data-lyrmgr-depth="6"] > .dijitTitlePaneTitle .appendtitle {
  font-size: 10px !important;
  font-weight: 500 !important;
  color: #345c61 !important;
}
body.tnet-lm-legacy-nested #layer_menu .dijitTitlePane[data-lyrmgr-depth="7"] > .dijitTitlePaneTitle .appendtitle {
  font-size: 10px !important;
  font-weight: 400 !important;
  font-style: italic !important;
  color: #345c61 !important;
}


/* ===== LAYER MANAGER CONTAINER DESKTOP ===== */

/* ========================================
   Layer Manager — Dezenter Scrollbar
   Der Container (#lm-tree-container) scrollt als Ganzes.
   Tab-Bar + Suchfeld bleiben per position:sticky oben fixiert.
   ======================================== */

/* Container: Flex-Column — Tab-Bar + Suche fest oben, nur Inhalt scrollt */
body:not(.tnet-sidepanel-v2) #lm-tree-container.lm-container-desktop {
  display: flex !important;
  flex-direction: column !important;
  overflow: hidden !important;
}

/* Tab-Bar: fest oben, kein Sticky nötig */
body:not(.tnet-sidepanel-v2) .lm-container-desktop .lm-tab-bar {
  position: relative !important;
  flex-shrink: 0 !important;
  z-index: 6 !important;
  background: var(--m-color-primary, #4B7B81) !important;
}

/* Suchfeld: nahtlos unter Tab-Bar, dezent modern */
body:not(.tnet-sidepanel-v2) .lm-container-desktop .lm-search-wrap {
  background: #52808a !important;
  padding: 4px 10px 5px 10px !important;
  border: none !important;
}

/* Suchfeld-Input: dezent, abgerundet, leichter Inset-Schatten */
body:not(.tnet-sidepanel-v2) .lm-container-desktop .lm-search {
  border: none !important;
  border-radius: 6px !important;
  background: rgba(255, 255, 255, 0.15) !important;
  color: #fff !important;
  box-shadow: inset 0 1px 2px rgba(0, 0, 0, 0.15) !important;
  padding: 6px 30px 6px 10px !important;
  font-size: 13px !important;
}

body:not(.tnet-sidepanel-v2) .lm-container-desktop .lm-search::placeholder {
  color: rgba(255, 255, 255, 0.6) !important;
  font-style: normal !important;
}

body:not(.tnet-sidepanel-v2) .lm-container-desktop .lm-search:focus {
  background: rgba(255, 255, 255, 0.25) !important;
  box-shadow: inset 0 1px 2px rgba(0, 0, 0, 0.1), 0 0 0 1px rgba(255, 255, 255, 0.3) !important;
  outline: none !important;
}

/* Kategorie-Inhalt: scrollt als einziges Element */
body:not(.tnet-sidepanel-v2) .lm-container-desktop .lm-cat-content {
  flex: 1 1 0 !important;
  overflow-y: auto !important;
  overflow-x: hidden !important;
  min-height: 0 !important;
  padding-bottom: 8px !important;
}

/* Dezenter Scrollbar — Firefox: unsichtbar, bei Hover dünn */
body:not(.tnet-sidepanel-v2) .lm-container-desktop .lm-cat-content {
  scrollbar-width: none;
  scrollbar-color: transparent transparent;
  transition: scrollbar-color 0.3s;
}
body:not(.tnet-sidepanel-v2) #lm-tree-container.lm-container-desktop:hover .lm-cat-content {
  scrollbar-width: thin;
  scrollbar-color: rgba(75, 123, 129, 0.25) transparent;
}

/* Dezenter Scrollbar — Chrome / Safari / Edge: Auto-Hide bei Hover */
body:not(.tnet-sidepanel-v2) .lm-container-desktop .lm-cat-content::-webkit-scrollbar {
  width: 5px;
}
body:not(.tnet-sidepanel-v2) .lm-container-desktop .lm-cat-content::-webkit-scrollbar-track {
  background: transparent;
}
body:not(.tnet-sidepanel-v2) .lm-container-desktop .lm-cat-content::-webkit-scrollbar-thumb {
  background: transparent;
  border-radius: 3px;
  transition: background 0.3s;
}
/* Einblenden bei Hover über gesamten Tree-Container */
body:not(.tnet-sidepanel-v2) #lm-tree-container.lm-container-desktop:hover .lm-cat-content::-webkit-scrollbar-thumb {
  background: rgba(75, 123, 129, 0.2);
}
body:not(.tnet-sidepanel-v2) #lm-tree-container.lm-container-desktop:hover .lm-cat-content::-webkit-scrollbar-thumb:hover {
  background: rgba(75, 123, 129, 0.45);
}
/* Keine Scrollbar-Pfeile */
body:not(.tnet-sidepanel-v2) .lm-container-desktop .lm-cat-content::-webkit-scrollbar-button {
  display: none;
  height: 0;
}

/* ===== LAYER SEARCH HIGHLIGHT ===== */
/* Rotes, smoothes Aufblinken (3x) wenn ein Layer via Breadcrumb-Klick oder Suche navigiert wird */
.lm-highlight {
  animation: lm-highlight-pulse 0.7s ease-in-out 3 !important;
  border-radius: 3px !important;
}
@keyframes lm-highlight-pulse {
  0%   { background-color: transparent; }
  50%  { background-color: rgba(220, 53, 69, 0.55); }
  100% { background-color: transparent; }
}

/* Dezenter Scrollbar auch für "Dargestellte Themen" Panel */
body:not(.tnet-sidepanel-v2) #lm-active-container.lm-container-desktop {
  scrollbar-width: thin;
  scrollbar-color: rgba(75, 123, 129, 0.3) transparent;
}
body:not(.tnet-sidepanel-v2) #lm-active-container.lm-container-desktop::-webkit-scrollbar {
  width: 6px;
}
body:not(.tnet-sidepanel-v2) #lm-active-container.lm-container-desktop::-webkit-scrollbar-track {
  background: transparent;
}
body:not(.tnet-sidepanel-v2) #lm-active-container.lm-container-desktop::-webkit-scrollbar-thumb {
  background: rgba(75, 123, 129, 0.3);
  border-radius: 3px;
}
body:not(.tnet-sidepanel-v2) #lm-active-container.lm-container-desktop::-webkit-scrollbar-thumb:hover {
  background: rgba(75, 123, 129, 0.5);
}

/* ========================================
   Themenkatalog - Layer Manager Styling
   ======================================== */

/* Fix TabContainer height for Bund and Weitere - set to same as Obwalden */
#third_lyrmgr.dijitTabContainer,
#forth_lyrmgr.dijitTabContainer {
  height: 411px !important;
  min-height: 411px !important;
  overflow-y: auto !important;
  overflow-x: hidden !important;
}

/* Ensure content panes scroll within tab container */
#third_lyrmgr .dijitTabPane,
#forth_lyrmgr .dijitTabPane {
  height: auto !important;
  overflow-y: auto !important;
}

/* Fix für ContentPane Höhenrestriktionen */
#layer_menu.dijitContentPane,
#layer_menu2.dijitContentPane,
#layer_menu3.dijitContentPane,
#layer_menu4.dijitContentPane {
  height: auto !important;
  overflow: visible !important;
}

/* Direkter Fix der wrapper-divs wenn sie gehidden werden */
#njs_main_lyrmgr_wrapper > *,
#njs_second_lyrmgr_wrapper > *,
#njs_third_lyrmgr_wrapper > *,
#njs_forth_lyrmgr_wrapper > * {
  width: 100% !important;
  height: auto !important;
  max-height: none !important;
}

/* Alle Kindelemente in den Wrappern */
#njs_main_lyrmgr_wrapper > * > *,
#njs_second_lyrmgr_wrapper > * > *,
#njs_third_lyrmgr_wrapper > * > *,
#njs_forth_lyrmgr_wrapper > * > * {
  height: auto !important;
  max-height: none !important;
}

/* Verhindere dass Dijit die TitlePane zu macht */
.dijitTitlePane .dijitTitlePaneContentOuter {
  overflow: visible !important;
}

#tp_layer_menu3 .dijitTitlePaneContentOuter,
#tp_layer_menu4 .dijitTitlePaneContentOuter {
  overflow: visible !important;
  height: auto !important;
}

/* Layer Manager spezifische Container */
.ClassicLayerMgr,
.ClassicLayerMgr > div {
  height: auto !important;
  max-height: none !important;
  overflow: visible !important;
}


/* ===== DARGESTELLTE THEMEN ===== */

/* ===== DARGESTELLTE THEMEN - Active Panel im Desktop-TitlePane ===== */
#sort_menu .lm-container-desktop {
  padding: 0 !important;
  min-height: 60px;
}

/* Layer-Items im Desktop-Kontext etwas kompakter */
#sort_menu .lm-active-item {
  padding: 3px 6px !important;
  border-bottom: 1px solid #eee;
  background: #fff;
}

#sort_menu .lm-active-item:last-child {
  border-bottom: none;
}

#sort_menu .lm-active-row {
  display: flex;
  align-items: center;
  gap: 2px;
  min-height: 24px;
}

#sort_menu .lm-drag-handle {
  cursor: grab;
  width: 14px;
  flex-shrink: 0;
  opacity: 0;
  transition: opacity 0.15s ease;
}

#sort_menu .lm-active-item:hover .lm-drag-handle,
#sort_menu .lm-active-item:focus-within .lm-drag-handle,
#sort_menu .lm-active-group:hover .lm-drag-handle,
#sort_menu .lm-active-group:focus-within .lm-drag-handle {
  opacity: 0.85;
}

#sort_menu .lm-eye {
  width: 24px;
  height: 24px;
  border: none;
  background: none;
  cursor: pointer;
  color: #4b7b81;
  flex-shrink: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 4px;
  padding: 2px;
}

#sort_menu .lm-eye:hover {
  background: rgba(75,123,129,0.1);
}

#sort_menu .lm-eye-off {
  color: #bbb;
}

#sort_menu .lm-active-name {
  flex: 1;
  font-size: 12px;
  color: #333;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

#sort_menu .lm-btn-remove {
  display: none;
}

#sort_menu .lm-btn-remove:hover {
  background: rgba(232,66,63,0.1);
  color: #e8423f;
}

/* Legend-Button in Dargestellte Themen (nur WMS-Layer) */
#sort_menu .lm-btn-legend {
  width: 22px;
  height: 22px;
  border: none;
  background: none;
  cursor: pointer;
  color: #4b7b81;
  flex-shrink: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 4px;
  padding: 2px;
}

#sort_menu .lm-btn-legend:hover {
  background: rgba(75,123,129,0.15);
}

#sort_menu .lm-btn-legend .lm-icon {
  width: 16px;
  height: 16px;
}

#sort_menu .lm-opacity-row {
  display: flex;
  align-items: center;
  gap: 6px;
  padding: 0 0 0 14px;
}

#sort_menu .lm-opacity-label {
  font-size: 10px;
  color: #999;
  flex-shrink: 0;
}

#sort_menu .lm-opacity-slider {
  flex: 1;
  height: 4px;
  accent-color: #4b7b81;
}

#sort_menu .lm-opacity-val {
  font-size: 10px;
  color: #999;
  min-width: 30px;
  text-align: right;
}

#sort_menu .lm-empty {
  text-align: center;
  padding: 16px 8px;
  color: #999;
  font-size: 12px;
}

#sort_menu .lm-active-toolbar {
  display: flex;
  align-items: center;
  justify-content: flex-start;
  gap: 8px;
  padding: 4px 8px;
  background: #f5f9fa;
  border-bottom: 1px solid #e0e0e0;
}

#sort_menu .lm-active-count {
  font-size: 11px;
  color: #888;
  font-weight: 500;
  margin-right: auto;
}

#sort_menu .lm-active-modified {
  display: inline-flex;
  align-items: center;
  gap: 6px;
}

#sort_menu .lm-btn-remove-all {
  display: inline-flex;
  align-items: center;
  margin-left: auto;
  padding: 3px 7px;
  border: 1px solid #d2dde1;
  border-radius: 4px;
  background: #fff;
  color: #5f7278;
  font-size: 11px;
  font-weight: 600;
  cursor: pointer;
}

#sort_menu .lm-btn-remove-all:hover {
  background: #f7fbfc;
  border-color: #aebfc5;
  color: #3f5359;
}

#sort_menu .lm-btn-remove-all .lm-icon {
  width: 14px;
  height: 14px;
  fill: currentColor;
}

#sort_menu .lm-btn-bm-reset {
  font-size: 11px;
  padding: 2px 6px;
}

#sort_menu .lm-active-meta {
  display: flex;
  gap: 8px;
  padding: 6px 8px 4px;
  background: #f5f9fa;
  border-bottom: 1px solid #e0e0e0;
}

#sort_menu .lm-active-meta-block {
  min-width: 0;
  display: flex;
  flex-direction: column;
  gap: 2px;
}

#sort_menu .lm-active-meta-map {
  flex: 1;
}

#sort_menu .lm-active-meta-view {
  width: 138px;
  flex-shrink: 0;
}

#sort_menu .lm-active-meta-label {
  font-size: 10px;
  font-weight: 600;
  color: #7f8e93;
  text-transform: uppercase;
}

#sort_menu .lm-active-map-switch {
  width: 100%;
  border: 1px solid #d2dde1;
  border-radius: 4px;
  background: #fff;
  color: #1e3a4a;
  font-size: 13px;
  font-weight: 600;
  text-align: left;
  padding: 4px 8px;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  cursor: pointer;
}

#sort_menu .lm-active-view-select,
#sort_menu .lm-active-view-fallback {
  width: 100%;
  font-size: 12px;
}

#sort_menu .lm-active-list {
  list-style: none;
  padding: 0;
  margin: 0;
}

#sort_menu .lm-icon {
  width: 18px;
  height: 18px;
  fill: currentColor;
}

#sort_menu .lm-icon-drag {
  width: 16px;
  height: 16px;
}

/* Drag-Clone (schwebendes Element beim Verschieben) */
#sort_menu .lm-drag-clone,
.lm-drag-clone {
  position: fixed;
  z-index: 10000;
  pointer-events: none;
  opacity: 0.9;
  box-shadow: 0 4px 12px rgba(0,0,0,0.2);
  background: #fff;
  border-radius: 4px;
}

#sort_menu .lm-drag-placeholder {
  background: rgba(75,123,129,0.08);
  border: 2px dashed rgba(75,123,129,0.3);
  border-radius: 4px;
}

#sort_menu .lm-drag-hidden {
  opacity: 0;
  height: 0;
  overflow: hidden;
  padding: 0 !important;
  margin: 0 !important;
  border: none !important;
}

/* Resize Handles für Legend Pane - alle Seiten */
#njs_floatlegend_pane .legend-pane-resize-top,
#njs_floatlegend_pane .legend-pane-resize-bottom,
#njs_floatlegend_pane .legend-pane-resize-left,
#njs_floatlegend_pane .legend-pane-resize-right {
  position: absolute !important;
  z-index: 1100 !important;
  transition: background 0.2s;
}

#njs_floatlegend_pane .legend-pane-resize-top {
  top: 0 !important;
  left: 0 !important;
  right: 0 !important;
  height: 6px !important;
  cursor: ns-resize !important;
}

#njs_floatlegend_pane .legend-pane-resize-bottom {
  bottom: 0 !important;
  left: 0 !important;
  right: 0 !important;
  height: 6px !important;
  cursor: ns-resize !important;
}

#njs_floatlegend_pane .legend-pane-resize-left {
  left: 0 !important;
  top: 0 !important;
  bottom: 0 !important;
  width: 8px !important;
  cursor: ew-resize !important;
  background: linear-gradient(to right, rgba(75,123,129,0.15), transparent) !important;
}

#njs_floatlegend_pane .legend-pane-resize-right {
  right: 0 !important;
  top: 0 !important;
  bottom: 0 !important;
  width: 8px !important;
  cursor: ew-resize !important;
  background: linear-gradient(to left, rgba(75,123,129,0.15), transparent) !important;
}

/* Hover-Effekte */
#njs_floatlegend_pane .legend-pane-resize-top:hover,
#njs_floatlegend_pane .legend-pane-resize-bottom:hover {
  background: rgba(75,123,129,0.15) !important;
}

#njs_floatlegend_pane .legend-pane-resize-left:hover {
  background: linear-gradient(to right, rgba(75,123,129,0.3), transparent) !important;
}

#njs_floatlegend_pane .legend-pane-resize-right:hover {
  background: linear-gradient(to left, rgba(75,123,129,0.3), transparent) !important;
}

/* Ecken-Handles */
#njs_floatlegend_pane .legend-pane-resize-corner-tl,
#njs_floatlegend_pane .legend-pane-resize-corner-tr,
#njs_floatlegend_pane .legend-pane-resize-corner-bl,
#njs_floatlegend_pane .legend-pane-resize-corner-br {
  position: absolute !important;
  width: 12px !important;
  height: 12px !important;
  z-index: 1101 !important;
}

#njs_floatlegend_pane .legend-pane-resize-corner-tl {
  top: 0 !important;
  left: 0 !important;
  cursor: nwse-resize !important;
}

#njs_floatlegend_pane .legend-pane-resize-corner-tr {
  top: 0 !important;
  right: 0 !important;
  cursor: nesw-resize !important;
}

#njs_floatlegend_pane .legend-pane-resize-corner-bl {
  bottom: 0 !important;
  left: 0 !important;
  cursor: nesw-resize !important;
}

#njs_floatlegend_pane .legend-pane-resize-corner-br {
  bottom: 0 !important;
  right: 0 !important;
  width: 20px !important;
  height: 20px !important;
  cursor: nwse-resize !important;
  background: transparent !important;
}

#njs_floatlegend_pane .legend-pane-resize-corner-br:hover {
  background: transparent !important;
}

/* ===== tnet-sidepanel-legacy.css ===== */
/**
 * tnet-sidepanel-legacy.css
 * Sidepanel Legacy (body:not(.tnet-sidepanel-v2)) + TNET-Panel Vanilla Accordions
 *
 * @version    1.0
 * @date       2026-07-02
 * @copyright  Trigonet AG
 * @author     Marco Dellenbach
 */

/* ========================================
   Modal Dialog Styling für Maps-Katalog
   ======================================== */

div#search_container {
  position: fixed;
  left: 50%;
  top: 0px;
  transform: translateX(-50%);
  width: 340px;
  height: 38px;
  box-sizing: border-box;
}

input#solrsearchFirstParamSelect {
  border: 5px solid rgb(99, 41, 41);
  box-sizing: border-box;
}

/* Header-Bereich – njs-Suche per Config ausgeblendet */
div#njs_search_wrapper,
body div#njs_search_wrapper {
  display: none !important;
}

/* Search Container */
div#search_container,
body div#search_container,
div#njs_search_wrapper div#search_container {
  position: relative !important;
  top: auto !important;
  left: auto !important;
  transform: none !important;
  width: 330px !important;
  height: 45px !important;
  background: #e8f0f1 !important;
  border: none !important;
  border-radius: 0 !important;
  box-shadow: 0 1px 3px rgba(0,0,0,0.1) !important;
  display: flex !important;
  align-items: center !important;
  padding: 0 10px !important;
  box-sizing: border-box !important;
}

div#search_container #srch_free {
  width: 100% !important;
  display: flex !important;
  align-items: center !important;
}

div#search_container #srch_free > div {
  width: 100% !important;
  align-items: center !important;
}

/* Lupe links */
div#search_container .iconSearch {
  flex-shrink: 0 !important;
  width: 20px !important;
  height: 20px !important;
  margin-right: 10px !important;
  opacity: 0.6;
}

/* Suchfeld-Input Styling */
div#search_container .dijitTextBox {
  flex: 1 !important;
  height: 40px !important;
  border: none !important;
  background: transparent !important;
  overflow: visible !important;
}

div#search_container .dijitInputInner {
  width: 100% !important;
  height: 40px !important;
  border: none !important;
  outline: none !important;
  font-size: 14px !important;
  background: transparent !important;
  padding: 0 !important;
  text-align: left !important;
  margin-top: 2px !important;
  overflow: visible !important;
}

div#search_container .dijitPlaceHolder {
  text-align: left !important;
  color: #888 !important;
  font-size: 14px !important;
  margin-top: 8px !important;
  overflow: visible !important;
}

div#search_container .dijitInputContainer {
  overflow: visible !important;
}

/* Kreuz rechts, feiner */
div#search_container .clearSearch {
  flex-shrink: 0 !important;
  width: 18px !important;
  height: 18px !important;
  margin-left: 10px !important;
  cursor: pointer !important;
  opacity: 0.5 !important;
}

div#search_container .clearSearch:hover {
  opacity: 1 !important;
}

/* Arrow Button verstecken */
div#search_container .dijitArrowButton {
  display: none !important;
}

/* Validation Icon verstecken */
div#search_container .dijitValidationContainer {
  display: none !important;
}

/* Disclaimer unterhalb Header */
#disclaimer_pdf,
body #disclaimer_pdf,
div#disclaimer_pdf,
#disclaimer_news,
body #disclaimer_news,
div#disclaimer_news {
  top: 75px !important;
  left: calc(var(--tnet-sidepanel-width, 340px) + 50px) !important;
}

/* Search Dropdown Popup - NUR für Suche, nicht global! */
#widget_solrsearchFirstParamSelect_dropdown {
  left: var(--tnet-sidepanel-width, 340px) !important;
  top: 57px !important;
}

div#njs_search_wrapper .solrsearchSearchInputCancel:hover,
div#njs_search_wrapper [class*="cancel"]:hover,
div#njs_search_wrapper button:hover {
  color: #dd1533 !important;
}

div#leftPaneHeader {
  margin-left: 0;
  box-sizing: border-box;
  color: #700011 !important;
  display: none; /* Ausgeblendet, Logo ist jetzt separat */
}

body:not(.tnet-sidepanel-v2) div#freepane {
  left: 0 !important;
  top: 69px !important;
  width: 340px;
  z-index: 50;
  position: fixed !important;
  bottom: 0 !important;
  height: calc(100vh - 69px) !important;
  overflow: hidden !important;
  pointer-events: none !important; /* Container lässt Klicks durch */
  max-height: calc(100vh - 69px) !important;
}

/* Spring Container - braucht pointer-events für Scrolling */
body:not(.tnet-sidepanel-v2) #spring {
  pointer-events: auto; /* Scroll muss funktionieren */
  width: 340px !important; /* Begrenzt auf Panel-Breite */
}

/* Während Polygon-Zeichnen: Freepane komplett deaktivieren */
body.drawing-mode #freepane {
  pointer-events: none !important;
}

body.drawing-mode #freepane * {
  pointer-events: none !important;
}

/* Spatial Query Panel bleibt IMMER bedienbar */
.spatial-query-panel {
  pointer-events: auto !important;
}

.spatial-query-panel * {
  pointer-events: auto;
}

/* Nur echte interaktive Elemente bekommen pointer-events zurück */
body:not(.tnet-sidepanel-v2) #freepane #leftPaneHeader,
body:not(.tnet-sidepanel-v2) #freepane .dijitTitlePane,
body:not(.tnet-sidepanel-v2) #freepane .close_switch,
body:not(.tnet-sidepanel-v2) #freepane #scrollToTopBtn,
body:not(.tnet-sidepanel-v2) #freepane .dijitTitlePaneTitle,
body:not(.tnet-sidepanel-v2) #freepane .dijitTitlePaneContentOuter,
body:not(.tnet-sidepanel-v2) #freepane .tnet-accordion-resize-handle {
  pointer-events: auto;
}

/* Resize-Handle: sichtbar, mit Grip-Linie */
body:not(.tnet-sidepanel-v2) #freepane #spring .tnet-accordion-resize-handle {
  height: 5px !important;
  min-height: 5px !important;
  max-height: 5px !important;
  background: #6e9aa0 !important;
  border-top: 1px solid #5f8a90 !important;
  border-bottom: 1px solid #5f8a90 !important;
  cursor: ns-resize !important;
  display: flex !important;
  align-items: center !important;
  justify-content: center !important;
  flex-shrink: 0 !important;
  overflow: visible !important;
  opacity: 1 !important;
  visibility: visible !important;
  transition: background 0.15s ease !important;
  pointer-events: auto !important;
  position: relative !important;
  z-index: 100 !important;
}

body:not(.tnet-sidepanel-v2) #freepane #spring .tnet-accordion-resize-handle:hover {
  background: #5f8a90 !important;
}

body:not(.tnet-sidepanel-v2) #freepane #spring .tnet-accordion-resize-handle.active {
  background: #557e83 !important;
}

body:not(.tnet-sidepanel-v2) #freepane #spring .tnet-accordion-resize-handle::before {
  content: '' !important;
  display: block !important;
  width: 24px !important;
  height: 0 !important;
  border-top: 2px dotted #3f666b !important;
}

/* Spring Container - scrollbar immer dünn sichtbar, kein Inhalt-Shift */
body:not(.tnet-sidepanel-v2) #spring {
  height: calc(100vh - 79px) !important;
  max-height: calc(100vh - 79px) !important;
  overflow-y: hidden !important;
  overflow-x: hidden !important;
  padding-bottom: 16px !important;
  box-sizing: border-box !important;
  scrollbar-width: thin !important;
  scrollbar-color: rgba(75, 123, 129, 0.2) transparent !important;
}

/* Keine Scrollbar-Pfeile, dünner transparenter Balken */
body:not(.tnet-sidepanel-v2) #spring::-webkit-scrollbar-button {
  display: none !important;
  height: 0 !important;
  width: 0 !important;
}

body:not(.tnet-sidepanel-v2) #spring::-webkit-scrollbar {
  width: 6px !important;
  background: transparent !important;
}

body:not(.tnet-sidepanel-v2) #spring::-webkit-scrollbar-track {
  background: transparent !important;
}

body:not(.tnet-sidepanel-v2) #spring::-webkit-scrollbar-thumb {
  background: rgba(75, 123, 129, 0.2) !important;
  border-radius: 3px !important;
}

body:not(.tnet-sidepanel-v2) #spring::-webkit-scrollbar-thumb:hover {
  background: rgba(75, 123, 129, 0.45) !important;
}

/* Scroll-to-Top Button - Kreis mit Chevron */
body:not(.tnet-sidepanel-v2) #scrollToTopBtn {
  position: fixed;
  bottom: 24px;
  left: 318px;
  width: 44px;
  height: 44px;
  background: #e8423f;
  color: white;
  border: 4px solid #e8423f;
  border-radius: 50%;
  cursor: pointer;
  font-size: 0;
  text-align: center;
  box-shadow: 0 2px 8px rgba(0,0,0,0.25);
  opacity: 0;
  visibility: hidden;
  transition: all 0.3s ease;
  z-index: 100;
  display: flex;
  align-items: center;
  justify-content: center;
}

/* Chevron-Pfeil mit CSS - zentriert */
body:not(.tnet-sidepanel-v2) #scrollToTopBtn::before {
  content: '';
  display: block;
  width: 12px;
  height: 12px;
  border-left: 3px solid white;
  border-top: 3px solid white;
  transform: rotate(45deg) translateX(2px) translateY(2px);
}

body:not(.tnet-sidepanel-v2) #scrollToTopBtn.visible {
  opacity: 1;
  visibility: visible;
}

body:not(.tnet-sidepanel-v2) #scrollToTopBtn:hover {
  background: #4b7b81;
  border-color: #4b7b81;
  transform: translateY(-2px);
  box-shadow: 0 4px 12px rgba(0,0,0,0.3);
}

body:not(.tnet-sidepanel-v2) #scrollToTopBtn:active {
  transform: translateY(0);
}

/* Panel Zusammenklappen Button */
body:not(.tnet-sidepanel-v2) #freepane {
  position: absolute;
  display: flex;
  flex-direction: column;
}

body:not(.tnet-sidepanel-v2) #spring {
  flex: 1 1 auto;
  min-height: 0;
  display: flex;
  flex-direction: column;
  position: relative;
  /* pointer-events wird oben bereits auf none gesetzt */
}

/* Panel-Schatten entfernt — war störend */
body:not(.tnet-sidepanel-v2) #panelShadow {
  display: none !important;
}

body:not(.tnet-sidepanel-v2) .close_switch {
  position: relative;
  width: 100%;
  height: 10px;
  background: #95b5be;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 100;
  flex-shrink: 0;
  left: 0;
}

body:not(.tnet-sidepanel-v2) .close_switch:hover {
  background: #4b7b81;
}

body:not(.tnet-sidepanel-v2) .close_switch::before {
  content: '';
  width: 40px;
  height: 2px;
  background: rgba(255,255,255,0.8);
  border-radius: 1px;
}

body:not(.tnet-sidepanel-v2) .close_switch:hover::before {
  background: rgba(255,255,255,1);
}

/* Panel geschlossen Status */
body:not(.tnet-sidepanel-v2) #freepane {
  max-height: 100vh;
  overflow: visible;
}

/* Header + Spring: animierbar machen */
body:not(.tnet-sidepanel-v2) #freepane #leftPaneHeader {
  max-height: 50px;
  opacity: 1;
  overflow: hidden;
  transition: max-height 0.4s ease, opacity 0.3s ease;
}

body:not(.tnet-sidepanel-v2) #freepane #spring > *:not(.close_switch):not(.tnet-accordion-resize-handle):not(.tnet-panel) {
  max-height: 2000px;
  opacity: 1;
  overflow: hidden;
  transition: max-height 0.4s ease, opacity 0.3s ease;
}

/* details-Panels: kein overflow:hidden (bricht native Toggle) */
body:not(.tnet-sidepanel-v2) #freepane #spring > .tnet-panel {
  opacity: 1;
  transition: max-height 0.4s ease, opacity 0.3s ease;
}

body:not(.tnet-sidepanel-v2) #freepane #scrollToTopBtn {
  transition: opacity 0.3s ease;
}

/* Geschlossen: Inhalt einklappen, Handle sichtbar/klickbar lassen */
body:not(.tnet-sidepanel-v2) #freepane.close #leftPaneHeader {
  max-height: 0 !important;
  opacity: 0 !important;
  overflow: hidden !important;
  padding: 0 !important;
  margin: 0 !important;
}

body:not(.tnet-sidepanel-v2) #freepane.close #scrollToTopBtn {
  opacity: 0 !important;
  pointer-events: none !important;
  max-height: 0 !important;
}

body:not(.tnet-sidepanel-v2) #freepane.close #spring > *:not(.close_switch) {
  max-height: 0 !important;
  height: 0 !important;
  min-height: 0 !important;
  opacity: 0 !important;
  overflow: hidden !important;
  margin: 0 !important;
  padding: 0 !important;
  border: none !important;
  pointer-events: none !important;
}

body:not(.tnet-sidepanel-v2) #freepane.close #spring {
  position: relative !important;
  height: 10px !important;
  max-height: 10px !important;
  min-height: 10px !important;
  overflow: visible !important;
  padding: 0 !important;
  margin: 0 !important;
}

/* close_switch bleibt immer sichtbar */
body:not(.tnet-sidepanel-v2) #freepane.close .close_switch {
  position: absolute !important;
  top: 0 !important;
  left: 0 !important;
  right: 0 !important;
  transform: none !important;
  pointer-events: auto !important;
}

body:not(.tnet-sidepanel-v2) #freepane.close {
  max-height: 20px !important;
  min-height: 0 !important;
  overflow: visible !important;
}

/* Schatten sanft ausblenden wenn Panel geschlossen */
body:not(.tnet-sidepanel-v2) #panelShadow {
  transition: opacity 0.4s ease;
}

body:not(.tnet-sidepanel-v2) #freepane.close + #panelShadow {
  opacity: 0 !important;
  pointer-events: none !important;
}

/* Freepane kürzen wenn Spatial Query Panel angedockt */
body:not(.tnet-sidepanel-v2) #freepane.panel-docked {
  /* bottom wird dynamisch per JS gesetzt */
  transition: bottom 0.15s ease;
}

body:not(.tnet-sidepanel-v2) #freepane.close .close_switch {
  width: 170px;
  margin: 0 auto;
  border-radius: 0 0 4px 4px;
  height: 10px !important;
  min-height: 10px !important;
}

/* Balken schrumpft nur beim Schließen */
body:not(.tnet-sidepanel-v2) #freepane:not(.close) .close_switch {
  transition: none;
}

body:not(.tnet-sidepanel-v2) #freepane.close .close_switch {
  transition: width 0.5s ease, margin 0.5s ease;
}

body:not(.tnet-sidepanel-v2) #freepane.close .close_switch::before {
  width: 30px;
  height: 2px;
}

/* Haupt-Container unter Header positionieren */
#NeapoljsContainer {
  position: fixed !important;
  top: 69px !important;
  left: 0;
  right: 0;
  bottom: 0;
  height: auto !important;
}

/* GIS Logo Header links oben */
#gis_logo_header {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 69px;
  background: #fcfcfc;
  z-index: 999;
  box-shadow: 0 1px 3px rgba(0,0,0,0.1);
}

/* Header Toolbar rechts oben */
#header_toolbar {
  position: fixed;
  top: 18px;
  right: 20px;
  z-index: 1001;
  display: flex;
  align-items: center;
  gap: 12px;
}

#header_toolbar .toolbar-item {
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 8px;
  background: transparent;
  border: none;
  color: #666;
  cursor: pointer;
  transition: all 0.2s ease;
  border-radius: 4px;
}

#header_toolbar .toolbar-item:hover {
  color: #4b7b81;
  background: rgba(75, 123, 129, 0.1);
}

#header_toolbar .toolbar-item svg {
  width: 20px;
  height: 20px;
  fill: currentColor;
}

/* Hamburger Menü Dropdown */
#header_menu {
  position: relative;
}

.menu-dropdown {
  position: absolute;
  top: 100%;
  right: 0;
  margin-top: 8px;
  min-width: 180px;
  background: white;
  border-radius: 4px;
  box-shadow: 0 4px 12px rgba(0,0,0,0.15);
  opacity: 0;
  visibility: hidden;
  transform: translateY(-10px);
  transition: all 0.2s ease;
  z-index: 9999;
}

#header_menu.open .menu-dropdown {
  opacity: 1;
  visibility: visible;
  transform: translateY(0);
}

.menu-item {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 12px 16px;
  color: #444;
  font-family: 'Roboto Condensed', Arial, sans-serif;
  font-size: 14px;
  cursor: pointer;
  transition: background 0.15s ease;
}

.menu-item:first-child {
  border-radius: 4px 4px 0 0;
}

.menu-item:last-child {
  border-radius: 0 0 4px 4px;
}

.menu-item:only-child {
  border-radius: 4px;
}

.menu-item:hover {
  background: rgba(75, 123, 129, 0.1);
  color: #4b7b81;
}

.menu-item svg {
  width: 20px;
  height: 20px;
  fill: currentColor;
}

/* Anmelde-Button in Toolbar */
#header_login {
  display: flex;
  align-items: center;
  gap: 6px;
  padding: 8px 12px;
  background: transparent;
  border: none;
  color: #4b7b81;
  font-family: 'Roboto Condensed', Arial, sans-serif;
  font-size: 14px;
  font-weight: 400;
  cursor: pointer;
  transition: all 0.2s ease;
}

#header_login:hover {
  background: rgba(75, 123, 129, 0.1);
}

#header_login .login-text {
  font-size: 14px;
}

#header_login .login-arrow {
  width: 14px;
  height: 14px;
  fill: #4b7b81;
}

/* Schmale Fenster: News/Support/Login wandern ins Hamburger-Menü */
#header_menu_dropdown .menu-narrow {
  display: none;
}

@media (max-width: 900px) {
  #header_toolbar:has(.menu-narrow) #header_login,
  #header_toolbar:has(.menu-narrow) #header_logout,
  #header_toolbar:has(.menu-narrow) .toolbar-item:not(#header_menu) {
    display: none !important;
  }

  #header_menu_dropdown .menu-narrow {
    display: flex;
  }

  #header_menu_dropdown hr.menu-narrow {
    display: block;
  }

  body.tnet-logged-in #menu_narrow_login,
  body:not(.tnet-logged-in) #menu_narrow_logout {
    display: none;
  }

  body #dt-search-bar {
    width: clamp(140px, calc(100vw - 440px), 340px);
  }
}

/* Abmelde-Bereich (angemeldet) */
#header_logout {
  display: flex;
  align-items: center;
  gap: 6px;
  padding: 8px 12px;
  background: transparent;
  border: none;
  color: #444;
  font-family: 'Roboto Condensed', Arial, sans-serif;
  font-size: 14px;
  font-weight: 400;
  cursor: pointer;
  transition: all 0.2s ease;
}

#header_logout:hover {
  background: rgba(0, 0, 0, 0.05);
}

#header_logout .user-icon {
  width: 18px;
  height: 18px;
  fill: #666;
}

#header_logout .username-text {
  color: #444;
  font-weight: 500;
}

#header_logout .separator {
  color: #999;
  margin: 0 2px;
}

#header_logout .logout-text {
  color: #666;
}

#header_logout .logout-arrow {
  width: 14px;
  height: 14px;
  fill: #4b7b81;
  transform: rotate(180deg);
}


/* ===== TNET PANEL - VANILLA ACCORDIONS ===== */

/* ===== TNET PANEL — Vanilla Accordions (Ersatz für dijit/TitlePane) ===== */

/* Haupt-Panel (details-Element) */
body:not(.tnet-sidepanel-v2) .tnet-panel {
  margin: 0;
  padding: 0;
  border: none;
}

/* Summary (klickbarer Header) */
body:not(.tnet-sidepanel-v2) .tnet-panel > summary.tnet-panel-title {
  display: flex;
  align-items: center;
  min-height: 28px;
  padding: 5px 10px;
  margin: 0;
  background: #4b7b81;
  color: #fff;
  font-size: 12px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  cursor: pointer;
  user-select: none;
  -webkit-user-select: none;
  list-style: none;
  outline: none;
  border: none;
}

/* Standard-Marker in Safari/Chrome entfernen */
body:not(.tnet-sidepanel-v2) .tnet-panel > summary.tnet-panel-title::-webkit-details-marker {
  display: none;
}

/* Kein Pfeil rechts */

/* Hover-Effekt */
body:not(.tnet-sidepanel-v2) .tnet-panel > summary.tnet-panel-title:hover {
  background: #3d6a70;
}

/* Gepunkteter Resize-Handle unter dem Header (wie bisher) */
body:not(.tnet-sidepanel-v2) .tnet-panel > summary.tnet-panel-title::before {
  content: '';
}

/* Content-Bereich */
body:not(.tnet-sidepanel-v2) .tnet-panel > .tnet-panel-content {
  padding: 0;
  margin: 0;
  background: #fff;
}

/* Nested Panels (Export PDF / Ausdruck massstäblich) */
body:not(.tnet-sidepanel-v2) .tnet-panel-nested > summary.tnet-panel-title-nested {
  background: #95b5be;
  font-size: 11px;
  font-weight: 600;
  min-height: 26px;
  padding: 4px 10px;
  text-transform: none;
}

body:not(.tnet-sidepanel-v2) .tnet-panel-nested > summary.tnet-panel-title-nested:hover {
  background: #7da3ac;
}

/* Themenkatalog: spezielle Höhensteuerung */
body:not(.tnet-sidepanel-v2) #tp_overview_menu > .tnet-panel-content {
  height: min(var(--tnet-catalog-height, 450px), calc(100vh - 340px));
  overflow: hidden;
}

body:not(.tnet-sidepanel-v2) #tp_overview_menu > .tnet-panel-content > #kantons_container {
  height: 100%;
}

/* Dargestellte Themen: Höhenbegrenzung */
body:not(.tnet-sidepanel-v2) #tp_sort_menu > .tnet-panel-content {
  max-height: min(var(--tnet-active-height, 300px), calc(100vh - 260px));
  overflow-y: auto;
  scrollbar-width: none;
  -ms-overflow-style: none;
}

body:not(.tnet-sidepanel-v2) #tp_sort_menu > .tnet-panel-content::-webkit-scrollbar {
  display: none;
}

/* Animation: übergangsloser Wechsel (kein Dojo-wipeIn nötig) */
body:not(.tnet-sidepanel-v2) .tnet-panel:not([open]) > .tnet-panel-content {
  display: none;
}

/* ===== gis-daten-splash.css ===== */
/**
 * gis-daten-splash.css
 * GIS Daten AG – Splash Screen Cube Styles
 *
 * Drehender 3D-Cube auf dem Splash Screen (positioniert auf dem "I" im GIS-Logo).
 * Enthält Rotation, Farbgebung und frontcolor-Animation (Flächen blitzen weiß auf).
 *
 * @version    1.0
 * @date       2026-02-13
 * @copyright  GIS Daten AG
 * @author     Marco Dellenbach
 */

/* ===== CSS-VARIABLEN ===== */
:root {
    --cube-size: 30px;
    --cube-half: calc(var(--cube-size) / 2);
    --cube-speed: 1s;
}

/* ===== CUBE CONTAINER ===== */
/* Drehender Cube auf dem I von GIS – ausserhalb #splash-logo damit filter:invert nicht greift */
#splash-cube-container {
    width: var(--cube-size);
    height: var(--cube-size);
    -webkit-perspective: 300px;
    -moz-perspective: 300px;
    perspective: 300px;
    margin-top: -11.5em;
}

/* ===== CUBE ===== */
#splash-cube {
    width: 100%;
    height: 100%;
    position: relative;
    -webkit-transform-style: preserve-3d;
    -moz-transform-style: preserve-3d;
    transform-style: preserve-3d;
    -webkit-animation: splashRotate var(--cube-speed) infinite;
    -moz-animation: splashRotate var(--cube-speed) infinite;
    animation: splashRotate var(--cube-speed) infinite;
    animation-timing-function: linear;
}

/* ===== CUBE FACES (Basis) ===== */
#splash-cube .cube-face {
    width: var(--cube-size);
    height: var(--cube-size);
    display: block;
    position: absolute;
    border: none;
    line-height: var(--cube-size);
}

/* ===== FARBEN ===== */
#splash-cube .cube-face.cube-back,
#splash-cube .cube-face.cube-right,
#splash-cube .cube-face.cube-left,
#splash-cube .cube-face.cube-front,
#splash-cube .cube-face.cube-bottom {
    background: hsl(357deg 64% 51%);
}

#splash-cube .cube-face.cube-top {
    background: hsl(11deg 73% 72%);
}

/* ===== FRONTCOLOR-ANIMATION (Flächen blitzen weiß auf) ===== */
#splash-cube .cube-face.cube-front,
#splash-cube .cube-face.cube-bottom,
#splash-cube .cube-face.cube-left {
    -webkit-animation: splashFrontColor var(--cube-speed) infinite;
    animation: splashFrontColor var(--cube-speed) infinite;
    transition: all 500ms cubic-bezier(0.550, 0.055, 0.675, 0.190);
    transition-timing-function: cubic-bezier(0.550, 0.055, 0.675, 0.190);
}

@-webkit-keyframes splashFrontColor {
    0%   { background: hsl(357deg 64% 51%); }
    60%  { background: white; }
    100% { background: white; }
}
@keyframes splashFrontColor {
    0%   { background: hsl(357deg 64% 51%); }
    60%  { background: white; }
    100% { background: white; }
}

/* ===== FACE TRANSFORMS ===== */
#splash-cube .cube-face.cube-front {
    -webkit-transform: rotateY(0deg) translateZ(var(--cube-half));
    -moz-transform: rotateY(0deg) translateZ(var(--cube-half));
    transform: rotateY(0deg) translateZ(var(--cube-half));
}
#splash-cube .cube-face.cube-back {
    -webkit-transform: rotateX(180deg) translateZ(var(--cube-half));
    -moz-transform: rotateX(180deg) translateZ(var(--cube-half));
    transform: rotateX(180deg) translateZ(var(--cube-half));
}
#splash-cube .cube-face.cube-right {
    -webkit-transform: rotateY(90deg) translateZ(var(--cube-half));
    -moz-transform: rotateY(90deg) translateZ(var(--cube-half));
    transform: rotateY(90deg) translateZ(var(--cube-half));
}
#splash-cube .cube-face.cube-left {
    -webkit-transform: rotateY(-90deg) translateZ(var(--cube-half));
    -moz-transform: rotateY(-90deg) translateZ(var(--cube-half));
    transform: rotateY(-90deg) translateZ(var(--cube-half));
}
#splash-cube .cube-face.cube-top {
    -webkit-transform: rotateX(90deg) translateZ(var(--cube-half));
    -moz-transform: rotateX(90deg) translateZ(var(--cube-half));
    transform: rotateX(90deg) translateZ(var(--cube-half));
}
#splash-cube .cube-face.cube-bottom {
    -webkit-transform: rotateX(-90deg) translateZ(var(--cube-half));
    -moz-transform: rotateX(-90deg) translateZ(var(--cube-half));
    transform: rotateX(-90deg) translateZ(var(--cube-half));
}

/* ===== ROTATION KEYFRAMES ===== */
@-webkit-keyframes splashRotate {
    0%   { -webkit-transform: rotateX(-22deg) rotateY(0deg) rotateZ(0deg); }
    100% { -webkit-transform: rotateX(-22deg) rotateY(-90deg) rotateZ(0deg); }
}
@keyframes splashRotate {
    0%   { transform: rotateX(-22deg) rotateY(0deg) rotateZ(0deg); }
    100% { transform: rotateX(-22deg) rotateY(-90deg) rotateZ(0deg); }
}



/* ===== SPLASH SCREEN LAYOUT (migriert aus override.css) ===== */
/* ============================================================
   SPLASH SCREEN
   Cube-Styles → /maps/tnet/css/gis-daten-splash.css
   ============================================================ */

#splash-screen {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: linear-gradient(135deg, #4b7b81 0%, #3a6268 100%);
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  z-index: 99999;
  transition: opacity 1s ease, visibility 1s ease, transform 1s ease;
}

#splash-screen.hidden {
  opacity: 0;
  visibility: hidden;
  transform: scale(1.05);
}

#splash-logo {
  position: relative;
  width: 15em;
  height: 12em;
  background-image: url(../resources/Logo-GIS-Daten-AG.svg);
  background-position: center;
  background-repeat: no-repeat;
  background-size: 15em;
  filter: brightness(0) invert(1);
  margin-top: -30px;
}

#splash-loader {
  width: 200px;
  height: 4px;
  background: rgba(255, 255, 255, 0.15);
  border-radius: 4px;
  overflow: hidden;
  margin-top: calc(1.5em + 130px);
  box-shadow: 0 0 10px rgba(255, 255, 255, 0.1);
}

#splash-loader-bar {
  width: 30%;
  height: 100%;
  background: linear-gradient(90deg, rgba(255, 255, 255, 0.3), white, rgba(255, 255, 255, 0.3));
  border-radius: 4px;
  animation: splashLoading 1.5s ease-in-out infinite;
  box-shadow: 0 0 8px rgba(255, 255, 255, 0.5);
}

@keyframes splashLoading {
  0%   { transform: translateX(-100%); }
  100% { transform: translateX(400%); }
}

/* Kartenauswahl Button links oben */
#header_maps_select {
  position: fixed;
  left: 200px;
  top: 18px;
  z-index: 1002;
  display: flex;
  align-items: center;
  gap: 6px;
  padding: 6px 10px;
  background: transparent;
  border: none;
  cursor: pointer;
  font-family: 'Inter Tight', Arial, sans-serif;
  font-size: 13px;
  font-weight: 500;
  color: #4b7b81;
  transition: all 0.2s ease;
}

#header_maps_select:hover {
  color: #3a6268;
}

#header_maps_select .maps-icon {
  display: flex;
  align-items: center;
}

#header_maps_select .maps-icon img {
  width: 30px;
  height: 30px;
}

#header_maps_select:hover .maps-icon img {
  transform: scale(1.05);
  transition: transform 0.2s ease;
}

#gis_logo_container {
  position: fixed;
  top: 5px;
  left: 12px;
  z-index: 1001;
  cursor: pointer;
  display: block;
  text-decoration: none;
}

#gis_logo_container .gis-logo-svg {
  height: 58px;
  width: auto;
  display: block;
}

#gis_logo_container .gis-logo-cube {
  position: absolute;
  height: 16px;
  width: auto;
  top: 0px;
  left: 30px;
}

#gis_logo_container:hover {
  opacity: 0.85;
}

/* Hintergrund abdunkeln */
.dijitDialogUnderlay {
  background-color: rgba(0, 0, 0, 0.7) !important;
  opacity: 1 !important;
}

/* Base Typography - Roboto als Hauptschrift */
body,
.tundra,
.dijitContentPane,
.dijitTitlePane,
.dijitButton,
.dijitTextBox,
.dijitSelect,
input,
button,
select,
textarea {
  font-family: 'Roboto', Arial, sans-serif !important;
}

body {
  font-size: 14px;
  line-height: 1.5;
  color: #333;
}

h1, h2, h3 {
  font-weight: 600;
  color: #1d1d1b;
}

h2 {
  font-size: 1.75rem;
  margin-bottom: 1rem;
}

h3 {
  font-size: 1.25rem;
  margin-bottom: 0.75rem;
}

#mapsInfoDialog.dijitDialog {
  width: 1300px !important;
  height: calc(90vh - 69px) !important;
  max-width: 1300px !important;
  max-height: calc(90vh - 69px) !important;
  border: none !important;
  border-radius: 8px !important;
  box-shadow: 0 4px 20px rgba(0,0,0,0.5) !important;
  overflow: hidden !important;
  /* Vertikal zentrieren unterhalb des 69px App-Headers */
  top: calc(69px + (100vh - 69px - (90vh - 69px)) / 2) !important;
}

@media (max-width: 1400px) {
  #mapsInfoDialog.dijitDialog {
    width: 90vw !important;
  }
}

#mapsInfoDialog .dijitDialogTitleBar {
  display: none !important;
}

#mapsInfoDialog .dijitDialogPaneContent {
  padding: 0 !important;
  width: 100% !important;
  height: 100% !important;
  border: none !important;
  overflow: hidden !important;
}

/* Nur X ohne runden Button */
.customCloseBtn {
  position: absolute;
  top: 16px;
  right: 16px;
  background: none;
  border: none;
  cursor: pointer;
  z-index: 10000;
  font-size: 40px;
  font-weight: 300;
  color: white;
  line-height: 56px;
  text-shadow: 0 2px 4px rgba(0,0,0,0.5);
  transition: all 0.2s ease;
  padding: 0;
  margin: 0;
  width: 56px;
  height: 56px;
  display: flex !important;
  align-items: center;
  justify-content: center;
  text-align: center;
}

.customCloseBtn:hover {
  color: #ff4444;
  transform: scale(1.2);
  text-shadow: 0 2px 8px rgba(255,68,68,0.8);
}

/* Zurück-Button */
.customBackBtn {
  position: absolute;
  top: 16px;
  right: 72px;
  background: none;
  border: none;
  cursor: pointer;
  z-index: 10000;
  font-size: 40px;
  font-weight: 300;
  color: white;
  line-height: 56px;
  text-shadow: 0 2px 4px rgba(0,0,0,0.5);
  transition: all 0.2s ease;
  padding: 0;
  margin: 0;
  width: 56px;
  height: 56px;
  display: flex !important;
  align-items: center;
  justify-content: center;
  text-align: center;
}

.customBackBtn:hover {
  color: #4CAF50;
  transform: scale(1.2);
  text-shadow: 0 2px 8px rgba(76,175,80,0.8);
}

/* Refresh-Button */
.customRefreshBtn {
  position: absolute;
  top: 16px;
  right: 136px;
  background: none;
  border: none;
  cursor: pointer;
  z-index: 10000;
  font-size: 40px;
  font-weight: 300;
  color: white;
  line-height: 56px;
  text-shadow: 0 2px 4px rgba(0,0,0,0.5);
  transition: all 0.2s ease;
  padding: 0;
  margin: 0;
  width: 56px;
  height: 56px;
  display: none;
  align-items: center;
  justify-content: center;
  text-align: center;
}

#mapsInfoDialog.dijitDialogVisible .customRefreshBtn {
  display: flex;
}

/* ===== tnet-lm.css ===== */
/**
 * tnet-lm.css — Styles für den neuen Layer-Manager (Desktop + Mobile)
 *
 * Farbkonzept: Alle Farben zentral als CSS-Variablen in :root definiert.
 * Siehe FARBKONZEPT-Block direkt nach diesem Header.
 *
 * Einrückung: Kopf und Layer derselben Stufe bündig, 12px pro Stufe
 * Helle Farbvarianten und aelteres Tuerkis-Konzept; Layerzustaende separat markiert
 *
 * @version 1.3
 * @copyright Trigonet AG
 */

/* ============================================================
   FARBKONZEPT — Zentrale Variablen
   Farben hier ändern → wirkt automatisch im ganzen Layer-Manager.
   ============================================================ */
:root {
  /* ── Tabs ── */
  --lm-tab-bg:           #648C96;     /* Tab inaktiv */
  --lm-tab-active:       #e8423f;     /* Tab aktiv (rot) */

  /* ── Akzent ── */
  --lm-accent:           #e8423f;     /* Checkbox, aktiver Layer, Buttons */
  --lm-accent-dark:      #700011;     /* Aktiver-Layer-Text */

  /* ── Themenbaum: einheitliche Darstellung aller Hierarchiestufen ── */
  --lm-tree-row-bg:      #ffffff;
  --lm-tree-text:        #2b4447;
  --lm-tree-border:      #b7d0d2;
  --lm-tree-rail:        #91b6ba;
  --lm-tree-pressed-bg:  #e8f3f4;

  /* ── Layer-Zustände ── */
  --lm-layer-visible-bg: #eaf5ed;
  --lm-layer-visible:    #39834f;
  --lm-layer-hidden-bg:  #f0f2f2;
  --lm-layer-hidden:     #879294;

  /* ── Baum-Einrückung: Stufe N beginnt bei base + (N-1) * step ── */
  --lm-tree-indent-base: 12px;
  --lm-tree-indent-step: 12px;
  /* Zusatz-Einrückung, damit Pfeile von Untergruppen rechts der Führungslinie stehen */
  --lm-tree-arrow-shift: 16px;

  /* ── Aktiver Layer ── */
  --lm-active-bg:        #fef3f2;

  /* ── UI-Elemente ── */
  --lm-primary:          #4b7b81;
  --lm-primary-light:    #648C96;
  --lm-count-badge-bg:   #6e9aa0;     /* Farbe der Seitenpanel-Trennleisten */
  --lm-count-badge-text: #132e32;
  --lm-filter-bg:        #fdeceb;     /* Such-Treffer Highlight */
  --lm-group-bg:         #f4f8f9;     /* Active-Panel Gruppen */
  --lm-group-header-bg:  #e8f0f2;
  --lm-group-border:     #d0dde0;
  --lm-group-name:       #2c4a50;
  --lm-placeholder-bg:   #e8f0f1;     /* Drag & Drop */
}

/* ============================================================
   Gemeinsam
   ============================================================ */

.lm-container {
  font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
  font-size: 14px;
  line-height: 1.4;
  color: #333;
  -webkit-tap-highlight-color: transparent;
}

/* ============================================================
   Tab-Bar (Kategorien) — mit Wappen-Icons wie Original-TOC
   ============================================================ */

.lm-tab-bar {
  display: flex;
  gap: 0;
  background: transparent;
  flex-shrink: 0;
  position: sticky;
  top: 0;
  z-index: 5;
}

.lm-tab {
  flex: 1;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 4px 0;
  border: none;
  border-right: 2px solid rgba(255, 255, 255, 0.4);
  background: var(--lm-tab-bg);
  color: #fff;
  cursor: pointer;
  min-height: 44px;
  -webkit-appearance: none;
  appearance: none;
  -webkit-user-select: none;
  user-select: none;
}

.lm-tab:last-child {
  border-right: none;
}

.lm-tab-active {
  background: var(--lm-tab-active);
}

.lm-tab:active {
  opacity: 0.85;
}

.lm-tab-icon {
  width: auto;
  height: 28px;
  filter: brightness(0) invert(1);
  pointer-events: none;
}

/* Schweizerkreuz (Bund) etwas grösser */
.lm-tab:nth-child(3) .lm-tab-icon {
  height: 36px;
}

.lm-tab-label {
  font-weight: 700;
  font-size: 15px;
  letter-spacing: 0.5px;
  pointer-events: none;
}

.lm-tab-name {
  font-size: 10px;
  opacity: 0.85;
  margin-top: 1px;
  pointer-events: none;
}

/* ============================================================
   Suchfeld — unter der Tab-Bar, sticky
   ============================================================ */

.lm-search-wrap {
  padding: 0 6px 4px 6px;
  background: transparent;
  position: sticky;
  top: 34px;
  z-index: 4;
}

.lm-search-wrap.lm-search-active {
  background: rgba(232, 66, 63, 0.18);
}

.lm-search {
  width: 100%;
  box-sizing: border-box;
  padding: 9px 34px 9px 12px;
  border: 1px solid #ccc;
  border-radius: 6px;
  font-size: 14px;
  background: #fafafa;
  -webkit-appearance: none;
  appearance: none;
}

.lm-search:focus {
  outline: none;
  border-color: var(--lm-accent);
  box-shadow: 0 0 0 2px rgba(232, 66, 63, 0.15);
}

.lm-search-clear {
  position: absolute;
  right: 18px;
  top: 50%;
  transform: translateY(-50%);
  width: 28px;
  height: 28px;
  line-height: 28px;
  text-align: center;
  font-size: 20px;
  color: #999;
  cursor: pointer;
  pointer-events: auto;
  -webkit-user-select: none;
  user-select: none;
}

.lm-search-clear:active {
  color: var(--lm-accent);
}

.lm-search-field {
  position: relative;
  flex: 1 1 auto;
  min-width: 0;
}

.lm-search-field .lm-search-clear {
  right: 4px;
}

.lm-search-wrap--variants {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 4px;
}

.lm-search-wrap--variants .lm-search-field {
  flex: 1 1 120px;
}

.lm-tree-variants {
  display: flex;
  flex: 0 0 auto;
  gap: 2px;
}

.lm-tree-variant-btn {
  min-width: 28px;
  height: 28px;
  padding: 0 3px;
  border: 1px solid #d0e0e1;
  border-radius: 4px;
  background: #f5fbfb;
  color: #2b4447;
  font-size: 11px;
  font-weight: 600;
  cursor: pointer;
}

.lm-tree-variant-btn[aria-pressed="true"] {
  border-color: #315d62;
  background: #315d62;
  color: #fff;
}

.lm-tree-variant-btn:focus-visible {
  outline: 2px solid #f3cb68;
  outline-offset: 1px;
}

/* Kontextmenü (Rechtsklick auf Gruppe) */
.lm-group-context-menu {
  position: fixed;
  z-index: 100000;
  min-width: 210px;
  padding: 4px 0;
  background: #fff;
  border: 1px solid rgba(75, 123, 129, 0.45);
  border-radius: 4px;
  box-shadow: 0 4px 14px rgba(0, 0, 0, 0.25);
}
.lm-group-context-item {
  display: block;
  width: 100%;
  padding: 7px 14px;
  border: 0;
  background: none;
  color: #2b4447;
  font: inherit;
  font-size: 13px;
  text-align: left;
  cursor: pointer;
}
.lm-group-context-item:hover:not(:disabled),
.lm-group-context-item:focus-visible {
  background: #deeeee;
  outline: none;
}
.lm-group-context-item:disabled {
  opacity: .5;
  cursor: default;
}

.lm-no-results {
  padding: 20px 12px;
  text-align: center;
  color: #999;
  font-style: italic;
}

/* Filter-Match-Highlight */
.lm-filter-match {
  background: var(--lm-filter-bg) !important;
}

/* ============================================================
   Subcategory (Level 1)
   ============================================================ */

.lm-subcat {
  border-bottom: none;
}

.lm-subcat-header {
  display: flex;
  align-items: center;
  gap: 6px;
  padding: 6px 12px;
  background: var(--lm-tree-row-bg);
  color: var(--lm-tree-text);
  cursor: pointer;
  min-height: 40px;
  box-sizing: border-box;
  -webkit-user-select: none;
  user-select: none;
  font-size: 13px;
  border-left: 4px solid var(--lm-tree-border);
  border-bottom: 1px solid rgba(75, 123, 129, 0.12);
}

.lm-subcat-header:active {
  background: var(--lm-tree-pressed-bg);
}

.lm-subcat-icon {
  width: 20px;
  height: 20px;
  flex-shrink: 0;
}

.lm-subcat-name {
  flex: 1;
}

/* ============================================================
   Group (Level 2)
   ============================================================ */

.lm-group {
  border-bottom: none;
}

.lm-group-header {
  display: flex;
  align-items: center;
  gap: 6px;
  padding: 6px 12px;
  background: var(--lm-tree-row-bg);
  color: var(--lm-tree-text);
  cursor: pointer;
  min-height: 40px;
  box-sizing: border-box;
  -webkit-user-select: none;
  user-select: none;
  border-left: 4px solid var(--lm-tree-border);
  border-bottom: 1px solid rgba(75, 123, 129, 0.12);
}

.lm-group-header:active {
  background: var(--lm-tree-pressed-bg);
}

.lm-group-name {
  flex: 1;
}

/* ============================================================
   Nested Group (Level 3 — type:"group")
   ============================================================ */

.lm-nested-group {
  border-bottom: none;
}

.lm-nested-header {
  display: flex;
  align-items: center;
  gap: 6px;
  padding: 6px 12px;
  background: var(--lm-tree-row-bg);
  color: var(--lm-tree-text);
  cursor: pointer;
  min-height: 40px;
  box-sizing: border-box;
  -webkit-user-select: none;
  user-select: none;
  border-left: 4px solid var(--lm-tree-border);
  border-bottom: 1px solid rgba(75, 123, 129, 0.12);
}

.lm-nested-header:active {
  background: var(--lm-tree-pressed-bg);
}

.lm-nested-name {
  flex: 1;
}

/* ============================================================
   Collapse / Expand
   ============================================================ */

.lm-arrow {
  display: inline-block;
  width: 16px;
  font-size: 11px;
  text-align: center;
  transition: transform 0.2s ease;
  flex-shrink: 0;
  color: inherit;
  opacity: 0.7;
}

.lm-expanded > .lm-subcat-header .lm-arrow,
.lm-expanded > .lm-group-header .lm-arrow,
.lm-expanded > .lm-nested-header .lm-arrow {
  transform: rotate(90deg);
}

/* Leichter Übergang beim Auf-/Zuklappen im Themenbaum */
.lm-subcat-body,
.lm-group-body,
.lm-nested-body {
  max-height: 9999px;
  opacity: 1;
  overflow: hidden;
  transition: max-height 0.18s ease, opacity 0.14s ease;
}

.lm-collapsed > .lm-subcat-body,
.lm-collapsed > .lm-group-body,
.lm-collapsed > .lm-nested-body {
  max-height: 0;
  opacity: 0;
}

.lm-count {
  font-size: 11px;
  opacity: 0.65;
  margin-left: auto;
  padding: 1px 6px;
  background: rgba(0, 0, 0, 0.1);
  border-radius: 8px;
}

/* ============================================================
   Layer-Zeile (Blatt mit Checkbox)
   ============================================================ */

.lm-layer {
  display: flex;
  align-items: center;
  padding: 6px 12px;
  min-height: 40px;
  box-sizing: border-box;
  border-bottom: 1px solid rgba(75, 123, 129, 0.12);
  background: var(--lm-tree-row-bg);
  border-left: 4px solid var(--lm-tree-border);
}

/* ============================================================
   Depth-Stufen
   Checkboxen und Namen jeder Stufe stehen in festen, gemeinsamen Spalten.
   ============================================================ */

.lm-depth-1 { --lm-tree-level: 0; }
.lm-depth-2 { --lm-tree-level: 1; }
.lm-depth-3 { --lm-tree-level: 2; }
.lm-depth-4 { --lm-tree-level: 3; }
.lm-depth-5 { --lm-tree-level: 4; }
.lm-depth-6 { --lm-tree-level: 5; }

/* [data-lm-depth] hebt die Spezifität über die padding-Shorthands der
   Basis- und Desktop-Regeln, ohne Zustandsfarben (aktiv, Suche) zu überdecken. */
.lm-subcat-header[data-lm-depth],
.lm-group-header[data-lm-depth],
.lm-nested-header[data-lm-depth],
.lm-layer[data-lm-depth] {
  padding-left: calc(var(--lm-tree-indent-base) + var(--lm-tree-level, 0) * var(--lm-tree-indent-step) + var(--lm-tree-shift, 0px));
}

/* Die Zeilen jeder Gruppe ohne Steuerelement rücken um --lm-tree-arrow-shift nach rechts:
   Die Checkboxen stehen dann deutlich rechts der Führungslinie, und die Pfeile von
   Untergruppen mit Steuerelement stehen rechts davon. Die Verschiebung summiert sich je Stufe
   (--lm-shift-N sitzt auf den Kindern der Gruppe der Stufe N, nie auf der Gruppe selbst). */
.lm-depth-1:is(.lm-group, .lm-nested-group):not(.lm-group-has-control) > :is(.lm-group-body, .lm-nested-body) > * { --lm-shift-1: var(--lm-tree-arrow-shift); }
.lm-depth-2:is(.lm-group, .lm-nested-group):not(.lm-group-has-control) > :is(.lm-group-body, .lm-nested-body) > * { --lm-shift-2: var(--lm-tree-arrow-shift); }
.lm-depth-3:is(.lm-group, .lm-nested-group):not(.lm-group-has-control) > :is(.lm-group-body, .lm-nested-body) > * { --lm-shift-3: var(--lm-tree-arrow-shift); }
.lm-depth-4:is(.lm-group, .lm-nested-group):not(.lm-group-has-control) > :is(.lm-group-body, .lm-nested-body) > * { --lm-shift-4: var(--lm-tree-arrow-shift); }
.lm-depth-5:is(.lm-group, .lm-nested-group):not(.lm-group-has-control) > :is(.lm-group-body, .lm-nested-body) > * { --lm-shift-5: var(--lm-tree-arrow-shift); }

.lm-group-body,
.lm-nested-body,
.lm-group-header[data-lm-depth],
.lm-nested-header[data-lm-depth],
.lm-layer[data-lm-depth] {
  --lm-tree-shift: calc(var(--lm-shift-1, 0px) + var(--lm-shift-2, 0px) + var(--lm-shift-3, 0px) + var(--lm-shift-4, 0px) + var(--lm-shift-5, 0px));
}

/* Führungslinie nur bei aufgeklappten Gruppen, auf Höhe der Pfeilmitte. */
.lm-group.lm-expanded > .lm-group-body,
.lm-nested-group.lm-expanded > .lm-nested-body {
  position: relative;
}

.lm-group.lm-expanded > .lm-group-body::before,
.lm-nested-group.lm-expanded > .lm-nested-body::before {
  content: '';
  position: absolute;
  top: 0;
  bottom: 4px;
  left: calc(4px + var(--lm-tree-indent-base) + var(--lm-tree-level, 0) * var(--lm-tree-indent-step) + var(--lm-tree-shift, 0px) + 7px);
  width: 2px;
  background: var(--lm-tree-rail);
  opacity: 0.7;
  pointer-events: none;
  z-index: 1;
}

.lm-layer-label {
  display: grid;
  grid-template-columns: var(--lm-tree-lead-w, 16px) 20px minmax(0, 1fr) auto;
  align-items: center;
  gap: 4px !important;
  flex: 1;
  min-width: 0;
  cursor: pointer;
}

.lm-tree-slot {
  display: inline-block;
  width: var(--lm-tree-lead-w, 16px);
  height: 16px;
  flex-shrink: 0;
}

.lm-layer-label > .lm-tree-slot { grid-column: 1; }
.lm-layer-label > .lm-cb-wrap { grid-column: 2; }
.lm-layer-label > .lm-layer-name { grid-column: 3; }
.lm-layer-label > .lm-layer-missing-badge { grid-column: 4; }

.lm-cb-wrap {
  position: relative;
  width: 20px;
  height: 20px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}

.lm-layer-hidden-icon {
  position: absolute;
  top: -3px;
  right: -3px;
  z-index: 1;
  display: none;
  width: 12px;
  height: 12px;
  align-items: center;
  justify-content: center;
  border: 1px solid #fff;
  border-radius: 50%;
  background: #fff;
  color: var(--lm-layer-hidden);
  pointer-events: none;
}

.lm-layer-hidden-icon .lm-icon {
  width: 10px;
  height: 10px;
}

.lm-layer.lm-layer-hidden .lm-layer-hidden-icon {
  display: inline-flex;
}

.lm-cb {
  width: 20px;
  height: 20px;
  accent-color: var(--lm-layer-visible);
  flex-shrink: 0;
  cursor: pointer;
}

.lm-layer-label > .lm-cb-wrap > .lm-cb {
  margin: 0 !important;
}

.lm-subcat-header[data-lm-depth],
.lm-group-header[data-lm-depth],
.lm-nested-header[data-lm-depth],
.lm-container-desktop .lm-subcat-header[data-lm-depth],
.lm-container-desktop .lm-group-header[data-lm-depth],
.lm-container-desktop .lm-nested-header[data-lm-depth] {
  display: grid;
  grid-template-columns: var(--lm-tree-lead-w, 16px) 20px minmax(0, 1fr) auto auto;
  column-gap: 4px !important;
  align-items: center;
}

.lm-subcat-header .lm-arrow,
.lm-group-header .lm-arrow,
.lm-nested-header .lm-arrow { grid-column: 1; width: 16px; margin: 0; }
.lm-subcat-header > .lm-tree-slot,
.lm-subcat-header > .lm-cb,
.lm-group-header > .lm-tree-slot,
.lm-group-header > .lm-cb,
.lm-group-header > .lm-group-cb,
.lm-nested-header > .lm-tree-slot,
.lm-nested-header > .lm-cb,
.lm-nested-header > .lm-group-cb { grid-column: 2; }
.lm-subcat-header .lm-subcat-name,
.lm-group-header .lm-group-name,
.lm-nested-header .lm-nested-name { grid-column: 3; min-width: 0; }
.lm-subcat-header .lm-count,
.lm-group-header .lm-count,
.lm-nested-header .lm-count { grid-column: 5; margin-left: 0; }
.lm-group-header .lm-legend-btn,
.lm-nested-header .lm-legend-btn { grid-column: 4; }
.lm-group-header .lm-group-cb,
.lm-nested-header .lm-group-cb {
  justify-self: center;
  margin: 0;
}

.lm-subcat-name,
.lm-group-name,
.lm-nested-name,
.lm-layer-name {
  font-size: 13px;
  font-weight: 500;
  color: var(--lm-tree-text);
  word-break: break-word;
}

.lm-layer.lm-active {
  background: var(--lm-layer-visible-bg);
  border-left: 4px solid var(--lm-layer-visible);
}

.lm-layer.lm-active .lm-layer-name {
  font-weight: 600;
  color: #315d3b;
}

/* Aktiv, aber unsichtbar: nativer Minus-Zustand statt eines missverstaendlichen Hakens. */
.lm-layer.lm-layer-hidden .lm-cb {
  accent-color: var(--lm-layer-hidden) !important;
  filter: none;
}
.lm-layer.lm-active.lm-layer-hidden {
  background: var(--lm-layer-hidden-bg) !important;
  border-left-color: #aeb8ba !important;
}
.lm-layer.lm-active.lm-layer-hidden .lm-layer-name {
  color: #687477;
  font-weight: 500;
  font-style: normal;
}

/* Layer ausserhalb des sichtbaren Massstabsbereichs */
.lm-layer.lm-out-of-range .lm-layer-name {
  opacity: 0.4;
  font-style: italic;
}
.lm-layer.lm-out-of-range .lm-cb {
  opacity: 0.4;
}

/* Fehlende Layer (kein layer_definition-Eintrag) — nur in Preview sichtbar */
.lm-layer--missing {
  border-left-color: #ff9800 !important;
  background: #fff8f0 !important;
}
.lm-layer--missing .lm-layer-name {
  color: #e65100;
}
.lm-layer--missing .lm-cb {
  opacity: 0.4;
  pointer-events: none;
}
.lm-layer-missing-badge {
  display: inline-block;
  margin-left: 6px;
  font-size: 10px;
  color: #ff6f00;
  font-weight: 600;
  vertical-align: middle;
  white-space: nowrap;
}
/* Checkbox "Fehlende ausblenden": wenn Container-Klasse gesetzt → missing ausblenden */
.lm-hide-missing .lm-layer--missing {
  display: none !important;
}

/* Mobile: Dojo-Inline-Styles übersteuern, Zustands- und Suchfarben erhalten. */
.lm-container:not(.lm-container-desktop) .lm-subcat-header,
.lm-container:not(.lm-container-desktop) .lm-group-header,
.lm-container:not(.lm-container-desktop) .lm-nested-header,
.lm-container:not(.lm-container-desktop) .lm-layer {
  min-height: 40px !important;
  padding-top: 6px !important;
  padding-bottom: 6px !important;
  box-sizing: border-box !important;
  border-bottom-color: rgba(75, 123, 129, 0.12) !important;
}
.lm-container:not(.lm-container-desktop) .lm-subcat-header[data-lm-depth],
.lm-container:not(.lm-container-desktop) .lm-group-header[data-lm-depth],
.lm-container:not(.lm-container-desktop) .lm-nested-header[data-lm-depth],
.lm-container:not(.lm-container-desktop) .lm-layer[data-lm-depth] {
  padding-left: calc(var(--lm-tree-indent-base) + var(--lm-tree-level, 0) * var(--lm-tree-indent-step) + var(--lm-tree-shift, 0px)) !important;
}
.lm-container:not(.lm-container-desktop) .lm-subcat-header,
.lm-container:not(.lm-container-desktop) .lm-group-header,
.lm-container:not(.lm-container-desktop) .lm-nested-header {
  background: var(--lm-tree-row-bg) !important;
  color: var(--lm-tree-text) !important;
  border-left-color: var(--lm-tree-border) !important;
}
.lm-container:not(.lm-container-desktop) .lm-subcat-header:active,
.lm-container:not(.lm-container-desktop) .lm-group-header:active,
.lm-container:not(.lm-container-desktop) .lm-nested-header:active {
  background: var(--lm-tree-pressed-bg) !important;
}
.lm-container {
  --lm-tree-main-bg: #c6dfe0;
}
.lm-container[data-lm-tree-variant="v1"] {
  --lm-tree-main-bg: #edf5f5;
}
.lm-container[data-lm-tree-variant="v2"] {
  --lm-tree-main-bg: #deeeee;
}
.lm-container[data-lm-tree-variant="v3"] {
  --lm-tree-main-bg: #c6dfe0;
}
.lm-container[data-lm-tree-variant="v4"] {
  --lm-tree-main-bg: #a8cbd0;
}
.lm-container[data-lm-tree-variant="v5"] {
  --lm-tree-main-bg: #6fa5ae;
  --lm-tree-text: #102c32;
  --lm-tree-flat-bg: #6fa5ae;
}
.lm-container[data-lm-tree-variant] .lm-subcat-header[data-lm-depth="1"]:not(:active),
.lm-container[data-lm-tree-variant] .lm-group-header[data-lm-depth="1"]:not(:active) {
  background: var(--lm-tree-main-bg);
}
.lm-container:not(.lm-container-desktop)[data-lm-tree-variant] .lm-subcat-header[data-lm-depth="1"]:not(:active),
.lm-container:not(.lm-container-desktop)[data-lm-tree-variant] .lm-group-header[data-lm-depth="1"]:not(:active) {
  background: var(--lm-tree-main-bg) !important;
}
.lm-container:not(.lm-container-desktop) .lm-search-wrap--variants {
  display: flex !important;
  flex-wrap: wrap !important;
  align-items: center !important;
  gap: 4px !important;
}
.lm-container:not(.lm-container-desktop) .lm-search-field {
  position: relative !important;
  flex: 1 1 auto !important;
  min-width: 0 !important;
}
.lm-container:not(.lm-container-desktop) .lm-search-field .lm-search-clear {
  right: 4px !important;
}
.lm-container:not(.lm-container-desktop) .lm-search-wrap--variants .lm-search-field {
  flex: 1 1 120px !important;
}
.lm-container:not(.lm-container-desktop) .lm-tree-variants {
  display: flex !important;
  flex: 0 0 auto !important;
  gap: 2px !important;
}
.lm-container:not(.lm-container-desktop) .lm-tree-variant-btn {
  min-width: 40px !important;
  height: 40px !important;
  padding: 0 3px !important;
  border: 1px solid #d0e0e1 !important;
  border-radius: 4px !important;
  background: #f5fbfb !important;
  color: #2b4447 !important;
  font-size: 12px !important;
  font-weight: 600 !important;
}
.lm-container:not(.lm-container-desktop) .lm-tree-variant-btn[aria-pressed="true"] {
  border-color: #315d62 !important;
  background: #315d62 !important;
  color: #fff !important;
}
.lm-container:not(.lm-container-desktop) .lm-layer-hidden-icon {
  display: none !important;
}
.lm-container:not(.lm-container-desktop) .lm-layer.lm-layer-hidden .lm-layer-hidden-icon {
  display: inline-flex !important;
}
.lm-container:not(.lm-container-desktop) .lm-layer:not(.lm-active):not(.lm-filter-match):not(.lm-layer--missing) {
  background: var(--lm-tree-row-bg) !important;
}
.lm-container:not(.lm-container-desktop) .lm-layer:not(.lm-active):not(.lm-layer--missing) {
  border-left-color: var(--lm-tree-border) !important;
}
.lm-container:not(.lm-container-desktop) .lm-subcat-name,
.lm-container:not(.lm-container-desktop) .lm-group-name,
.lm-container:not(.lm-container-desktop) .lm-nested-name,
.lm-container:not(.lm-container-desktop) .lm-layer-name {
  font-size: 13px !important;
}
.lm-container:not(.lm-container-desktop) .lm-subcat-name,
.lm-container:not(.lm-container-desktop) .lm-group-name,
.lm-container:not(.lm-container-desktop) .lm-nested-name,
.lm-container:not(.lm-container-desktop) .lm-layer:not(.lm-active):not(.lm-layer--missing) .lm-layer-name {
  color: var(--lm-tree-text) !important;
  font-weight: 500 !important;
}

/* Aelteres Tuerkis-Konzept, aufgehellt: gleichmaessig hellere Stufen, dunkler Text. */
.lm-container[data-lm-tree-variant="v5"] [data-lm-depth="1"] {
  --lm-tree-peer-bg: #6fa5ae;
  --lm-tree-peer-border: #5c929b;
  --lm-tree-flat-bg: #6fa5ae;
  --lm-tree-leaf-bg: #f4f9fa;
}
.lm-container[data-lm-tree-variant="v5"] [data-lm-depth="2"] {
  --lm-tree-peer-bg: #8dbcc5;
  --lm-tree-peer-border: #7aabb4;
  --lm-tree-flat-bg: #8dbcc5;
  --lm-tree-leaf-bg: #f4f9fa;
}
.lm-container[data-lm-tree-variant="v5"] [data-lm-depth="3"] {
  --lm-tree-peer-bg: #d2e6e9;
  --lm-tree-peer-border: #bcd8dc;
  --lm-tree-flat-bg: #d2e6e9;
  --lm-tree-leaf-bg: #f4f9fa;
}
.lm-container[data-lm-tree-variant="v5"] [data-lm-depth="4"] {
  --lm-tree-peer-bg: #deedf0;
  --lm-tree-peer-border: #c9e0e3;
  --lm-tree-flat-bg: #deedf0;
  --lm-tree-leaf-bg: #f5f9fa;
}
.lm-container[data-lm-tree-variant="v5"] [data-lm-depth="5"] {
  --lm-tree-peer-bg: #e8f2f4;
  --lm-tree-peer-border: #d5e6e9;
  --lm-tree-flat-bg: #e8f2f4;
  --lm-tree-leaf-bg: #f9fcfd;
}
.lm-container[data-lm-tree-variant="v5"] [data-lm-depth="6"] {
  --lm-tree-peer-bg: #f1f7f8;
  --lm-tree-peer-border: #dfeaed;
  --lm-tree-flat-bg: #f1f7f8;
  --lm-tree-leaf-bg: #fcfeff;
}
.lm-container[data-lm-tree-variant="v5"] .lm-subcat-header[data-lm-depth]:not(:active),
.lm-container[data-lm-tree-variant="v5"] .lm-group-header[data-lm-depth]:not(:active),
.lm-container[data-lm-tree-variant="v5"] .lm-nested-header[data-lm-depth]:not(:active) {
  background: var(--lm-tree-peer-bg) !important;
  border-left-color: var(--lm-tree-peer-border) !important;
}
.lm-container[data-lm-tree-variant="v5"] .lm-layer:not(.lm-active):not(.lm-filter-match):not(.lm-layer--missing) {
  background: var(--lm-tree-leaf-bg, #edf4f6) !important;
}
/* Stufe 1 und 2: weisse, fette Gruppentitel auf den Farben des aelteren Konzepts. */
.lm-container[data-lm-tree-variant="v5"] .lm-subcat-header[data-lm-depth="1"],
.lm-container[data-lm-tree-variant="v5"] .lm-group-header[data-lm-depth="1"],
.lm-container[data-lm-tree-variant="v5"] .lm-subcat-header[data-lm-depth="2"],
.lm-container[data-lm-tree-variant="v5"] .lm-group-header[data-lm-depth="2"],
.lm-container[data-lm-tree-variant="v5"] .lm-nested-header[data-lm-depth="2"] {
  color: #fff !important;
}
.lm-container[data-lm-tree-variant="v5"] .lm-subcat-header[data-lm-depth="1"] .lm-subcat-name,
.lm-container[data-lm-tree-variant="v5"] .lm-group-header[data-lm-depth="1"] .lm-group-name,
.lm-container[data-lm-tree-variant="v5"] .lm-subcat-header[data-lm-depth="2"] .lm-subcat-name,
.lm-container[data-lm-tree-variant="v5"] .lm-group-header[data-lm-depth="2"] .lm-group-name,
.lm-container[data-lm-tree-variant="v5"] .lm-nested-header[data-lm-depth="2"] .lm-nested-name {
  color: #fff !important;
  font-weight: 700 !important;
}

/* V4 (Standard): Stufe-1-Gruppentitel weiss und fett, ohne Schatten.
   Etwas Laufweite verbessert die Lesbarkeit auf der Hauptfarbe. */
.lm-container[data-lm-tree-variant="v4"] .lm-subcat-header[data-lm-depth="1"],
.lm-container[data-lm-tree-variant="v4"] .lm-group-header[data-lm-depth="1"] {
  color: #fff !important;
}
.lm-container[data-lm-tree-variant="v4"] .lm-subcat-header[data-lm-depth="1"] .lm-subcat-name,
.lm-container[data-lm-tree-variant="v4"] .lm-group-header[data-lm-depth="1"] .lm-group-name {
  color: #fff !important;
  font-weight: 700 !important;
  letter-spacing: 0.03em;
}
.lm-container-desktop[data-lm-tree-variant="v4"] .lm-subcat-header[data-lm-depth="1"] .lm-subcat-name,
.lm-container-desktop[data-lm-tree-variant="v4"] .lm-group-header[data-lm-depth="1"] .lm-group-name {
  font-size: 13px;
}

/* Durchgehende Randleiste über die ganze Stufe-1-Gruppe: flache Layer und aktive Zeilen
   schieben ihren eigenen Rand aus dem Sichtbereich, die Leiste hält Gruppe und Inhalt optisch zusammen.
   V5 färbt die Ränder je Stufe und behält seine eigenen Ränder. */
.lm-container:not([data-lm-tree-variant="v5"]) .lm-subcat > .lm-subcat-body,
.lm-container:not([data-lm-tree-variant="v5"]) .lm-group.lm-depth-1 > .lm-group-body {
  position: relative;
}
.lm-container:not([data-lm-tree-variant="v5"]) .lm-subcat > .lm-subcat-body::after,
.lm-container:not([data-lm-tree-variant="v5"]) .lm-group.lm-depth-1 > .lm-group-body::after {
  content: '';
  position: absolute;
  top: 0;
  bottom: 0;
  left: 0;
  width: 4px;
  background: var(--lm-tree-border);
  pointer-events: none;
  z-index: 2;
}

.lm-container[data-lm-tree-variant="v1"] .lm-layer-flat[data-lm-depth="1"],
.lm-container[data-lm-tree-variant="v2"] .lm-layer-flat[data-lm-depth="1"],
.lm-container[data-lm-tree-variant="v3"] .lm-layer-flat[data-lm-depth="1"],
.lm-container[data-lm-tree-variant="v4"] .lm-layer-flat[data-lm-depth="1"] {
  --lm-tree-flat-bg: var(--lm-tree-main-bg);
}
.lm-container[data-lm-tree-variant="v1"] .lm-layer-flat:not([data-lm-depth="1"]),
.lm-container[data-lm-tree-variant="v2"] .lm-layer-flat:not([data-lm-depth="1"]),
.lm-container[data-lm-tree-variant="v3"] .lm-layer-flat:not([data-lm-depth="1"]),
.lm-container[data-lm-tree-variant="v4"] .lm-layer-flat:not([data-lm-depth="1"]) {
  --lm-tree-flat-bg: #fff;
}

.lm-container[data-lm-tree-variant] .lm-layer.lm-layer-flat:not(.lm-active):not(.lm-filter-match):not(.lm-layer--missing) {
  background: var(--lm-tree-flat-bg) !important;
  border-left-color: var(--lm-tree-peer-border, var(--lm-tree-border)) !important;
}

/* ============================================================
   Dargestellte Themen — Active Layers Panel
   ============================================================ */

.lm-empty {
  padding: 24px 12px;
  text-align: center;
  color: #999;
  font-style: italic;
}

.lm-active-list {
  list-style: none;
  padding: 0;
  margin: 0;
}

.lm-active-item {
  padding: 8px 10px;
  border-bottom: 1px solid #eee;
  background: #fff;
}

.lm-active-item:last-child {
  border-bottom: none;
}

.lm-active-row {
  display: flex;
  align-items: center;
  gap: 4px;
  min-height: 34px;
}

.lm-active-name {
  flex: 1;
  font-size: 13px;
  font-weight: 500;
  color: #333;
  word-break: break-word;
  padding: 2px 0;
}

/* V3: Drag über die Titelzeile (kein Drag-Handle) */
.lm-panel-v3 .lm-active-name,
.lm-panel-v3 .lm-active-group-name,
.lm-panel-v3 .lm-subgroup-name {
  cursor: grab;
  touch-action: none;
  user-select: none;
  -webkit-user-select: none;
}

.lm-panel-v3 .lm-active-name:active,
.lm-panel-v3 .lm-active-group-name:active,
.lm-panel-v3 .lm-subgroup-name:active {
  cursor: grabbing;
}

/* ── Icon-Buttons ── */

.lm-icon {
  width: 20px;
  height: 20px;
  fill: currentColor;
  pointer-events: none;
}

.lm-eye {
  display: flex;
  align-items: center;
  justify-content: center;
  position: relative;
  width: 36px;
  height: 36px;
  border: none;
  background: transparent;
  color: var(--lm-primary-light);
  cursor: pointer;
  border-radius: 50%;
  flex-shrink: 0;
  padding: 0;
  /* Auge (button) und Schloss/Spacer (span) muessen gleich breit sein, auch wenn
     #sort_menu .lm-eye ein Padding setzt. */
  box-sizing: border-box;
  -webkit-appearance: none;
  appearance: none;
}

.lm-eye:active {
  background: rgba(0, 0, 0, 0.06);
}

.lm-eye.lm-eye-off {
  color: #ccc;
  opacity: 0.45;
}

/* Teil-Sichtbarkeit: nicht alle Sublayer der Gruppe sind sichtbar.
   Auge bleibt "an", wird aber heller dargestellt zur Signalisierung. */
.lm-eye.lm-eye-partial {
  opacity: 0.5;
}

@keyframes lm-spin {
  from { transform: translate(-50%, -50%) rotate(0deg); }
  to { transform: translate(-50%, -50%) rotate(360deg); }
}

@keyframes lm-spin-inline {
  from { transform: rotate(0deg); }
  to { transform: rotate(360deg); }
}

/* Rotes, smoothes Aufblinken (3x) wenn ein Layer via Breadcrumb-Klick oder Suche navigiert wird */
.lm-highlight {
  animation: lm-highlight-pulse 0.7s ease-in-out 3 !important;
  border-radius: 3px !important;
}
@keyframes lm-highlight-pulse {
  0%   { background-color: transparent; }
  50%  { background-color: rgba(220, 53, 69, 0.55); }
  100% { background-color: transparent; }
}

.lm-eye.lm-eye-loading::after {
  content: '';
  position: absolute;
  top: 50%;
  left: 50%;
  width: 22px;
  height: 22px;
  border: 2px solid rgba(75, 123, 129, 0.22);
  border-top-color: var(--m-color-primary, #4B7B81);
  border-radius: 50%;
  transform: translate(-50%, -50%);
  animation: lm-spin 0.8s linear infinite;
}

.lm-layer-loading .lm-icon,
.lm-layer-slow .lm-icon {
  opacity: 0.35;
}

.lm-layer-loading .lm-cb-wrap::after {
  content: '';
  position: absolute;
  top: 50%;
  left: 50%;
  width: 26px;
  height: 26px;
  margin-top: -13px;
  margin-left: -13px;
  box-sizing: border-box;
  border: 2px solid rgba(75, 123, 129, 0.22);
  border-top-color: var(--m-color-primary, #4B7B81);
  border-radius: 50%;
  animation: lm-spin-inline 0.8s linear infinite;
  pointer-events: none;
}

.lm-layer-slow .lm-cb-wrap::after {
  border-color: rgba(170, 120, 20, 0.22);
  border-top-color: #8a6416;
}

.lm-layer-error .lm-cb-wrap::after {
  animation: none;
  border-color: rgba(180, 50, 50, 0.35);
  border-top-color: #a43a3a;
}

.lm-layer-status {
  flex-shrink: 0;
  max-width: 72px;
  padding: 1px 5px;
  border-radius: 4px;
  background: rgba(75, 123, 129, 0.10);
  color: var(--m-color-primary, #4B7B81);
  font-size: 10px;
  font-weight: 600;
  line-height: 1.2;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.lm-layer-slow .lm-layer-status {
  background: rgba(170, 120, 20, 0.12);
  color: #8a6416;
}

.lm-layer-error .lm-layer-status {
  background: rgba(180, 50, 50, 0.12);
  color: #a43a3a;
}

.lm-btn-remove {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 34px;
  height: 34px;
  border: none;
  background: transparent;
  cursor: pointer;
  border-radius: 50%;
  padding: 0;
  color: var(--lm-accent);
  flex-shrink: 0;
  -webkit-appearance: none;
  appearance: none;
  color: #b53535;
  font-size: 16px;
  font-weight: 700;
  line-height: 1;
  opacity: 0.96;
  transition: opacity 0.14s ease, background-color 0.14s ease, color 0.14s ease;
}

.lm-btn-remove:active {
  background: rgba(0, 0, 0, 0.06);
}

.lm-btn-remove:hover,
.lm-btn-remove:focus-visible {
  background: rgba(184, 74, 74, 0.12);
  color: #a53131;
}

/* ── Legende-Button (nur WMS-Layer) ── */

.lm-btn-legend {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 34px;
  height: 34px;
  border: none;
  background: transparent;
  cursor: pointer;
  border-radius: 50%;
  padding: 0;
  color: var(--lm-primary);
  flex-shrink: 0;
  -webkit-appearance: none;
  appearance: none;
}

.lm-btn-legend:active {
  background: rgba(75, 123, 129, 0.12);
}

/* ── Drag & Drop States ── */

/* V2: expliziter Drag-Handle (≡) links in der Zeile */
.lm-drag-handle {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 22px;
  min-height: 34px;
  cursor: grab;
  color: #aaa;
  flex-shrink: 0;
  touch-action: none;
  user-select: none;
  -webkit-user-select: none;
}

.lm-drag-handle:active {
  cursor: grabbing;
  color: var(--lm-primary-light);
}

.lm-icon-drag {
  width: 18px;
  height: 18px;
}

.lm-dragging {
  position: relative;
}

.lm-drag-hidden {
  opacity: 0 !important;
  height: 0 !important;
  min-height: 0 !important;
  padding: 0 !important;
  margin: 0 !important;
  border: none !important;
  overflow: hidden !important;
}

.lm-drag-placeholder {
  background: var(--lm-placeholder-bg);
  border: 2px dashed var(--lm-primary-light);
  border-radius: 6px;
  box-sizing: border-box;
  list-style: none;
  transition: none;
}

.lm-drag-clone {
  position: fixed;
  z-index: 9999;
  pointer-events: none;
  opacity: 0.9;
  background: #fff;
  box-shadow: 0 4px 16px rgba(0, 0, 0, 0.18);
  border-radius: 6px;
  border-left: 3px solid var(--lm-primary-light);
  list-style: none;
  transition: none;
}

/* ── Opacity Slider ── */

.lm-opacity-row {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 0 0 0 22px;
}

.lm-opacity-label {
  font-size: 11px;
  color: #888;
  flex-shrink: 0;
  width: 68px;
}

/* Default (V2): kräftiger Slider mit grossem Thumb */
.lm-opacity-slider {
  flex: 1;
  height: 4px;
  -webkit-appearance: none;
  appearance: none;
  background: #ddd;
  border-radius: 2px;
  outline: none;
}

.lm-opacity-slider::-webkit-slider-thumb {
  -webkit-appearance: none;
  width: 20px;
  height: 20px;
  border-radius: 50%;
  background: var(--lm-primary-light);
  border: 2px solid #fff;
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.2);
  cursor: pointer;
}

/* V3: dezenter grauer Basisstrich, darüber kräftigerer Strich in Primärfarbe
   von links gemäss Füllstand (--lm-op); Griff nur bei Hover/Fokus */
/* Label "Deckkraft" + Prozentwert zusammen rechtsbündig, Slider links */
.lm-panel-v3 .lm-opacity-slider {
  order: 1;
  height: 16px;
  background:
    linear-gradient(to bottom,
      transparent 7px,
      #8fb2b7 7px, #8fb2b7 9px,
      transparent 9px) no-repeat,
    linear-gradient(to bottom,
      transparent 7.5px,
      #d5dcde 7.5px, #d5dcde 8.5px,
      transparent 8.5px) no-repeat;
  background-size: var(--lm-op, 100%) 100%, 100% 100%;
  border-radius: 0;
  cursor: pointer;
}

.lm-panel-v3 .lm-opacity-label {
  order: 2;
  width: auto;
  margin-left: auto;
}

.lm-panel-v3 .lm-opacity-val {
  order: 3;
}

.lm-panel-v3 .lm-opacity-slider::-webkit-slider-thumb {
  width: 14px;
  height: 14px;
  border: 1px solid #fff;
  box-shadow: 0 0 0 1px var(--lm-primary-light);
  opacity: 0;
  transition: opacity 0.12s ease;
}

.lm-panel-v3 .lm-opacity-slider:hover::-webkit-slider-thumb,
.lm-panel-v3 .lm-opacity-slider:focus-visible::-webkit-slider-thumb {
  opacity: 1;
}

.lm-panel-v3 .lm-opacity-slider::-moz-range-track {
  height: 2px;
  background: linear-gradient(to right,
    #8fb2b7 0, #8fb2b7 var(--lm-op, 100%),
    #d5dcde var(--lm-op, 100%));
}

.lm-panel-v3 .lm-opacity-slider::-moz-range-thumb {
  width: 12px;
  height: 12px;
  border-radius: 50%;
  background: var(--lm-primary-light);
  border: 1px solid #fff;
  box-shadow: 0 0 0 1px var(--lm-primary-light);
  cursor: pointer;
  opacity: 0;
  transition: opacity 0.12s ease;
}

.lm-panel-v3 .lm-opacity-slider:hover::-moz-range-thumb,
.lm-panel-v3 .lm-opacity-slider:focus-visible::-moz-range-thumb {
  opacity: 1;
}

.lm-panel-v3 .lm-opacity-slider:focus-visible {
  outline: 2px solid var(--lm-primary-light);
  outline-offset: 2px;
}

/* Legacy-Regel "#sort_menu .lm-opacity-slider" (ID-Spezifität) übersteuern —
   sonst bleibt der Slider 4px hoch und der Strich (6-10px) unsichtbar */
#sort_menu .lm-panel-v3 .lm-opacity-slider {
  height: 16px;
}

.lm-opacity-val {
  font-size: 11px;
  color: #888;
  width: 32px;
  text-align: right;
  flex-shrink: 0;
}

/* ============================================================
   COALESCE-GRUPPEN im Active-Panel
   ============================================================ */

/* Gruppen-Container */
.lm-active-group {
  list-style: none;
  border: 1px solid var(--lm-group-border);
  border-radius: 6px;
  margin: 4px 0;
  background: var(--lm-group-bg);
  overflow: hidden;
}

/* V3: Einzel-Layer als Karte wie eine (zugeklappte) Gruppe - einheitliche Optik */
.lm-panel-v3 .lm-active-item,
.lm-panel-v3 .lm-active-item:last-child,
#sort_menu .lm-panel-v3 .lm-active-item,
#sort_menu .lm-panel-v3 .lm-active-item:last-child {
  border: 1px solid var(--lm-group-border);
  border-radius: 6px;
  margin: 4px 0;
  background: var(--lm-group-header-bg);
  overflow: hidden;
}

/* Gruppen-Header: Auge | Ordner-Icon | Name | Expand | X */
.lm-active-group-header {
  display: flex;
  align-items: center;
  gap: 4px;
  padding: 4px 6px;
  min-height: 32px;
  background: var(--lm-group-header-bg);
  border-bottom: 1px solid var(--lm-group-border);
  cursor: default;
}

/* V2: Header-Klick klappt auf/zu */
.lm-panel-v2 .lm-active-group-header {
  cursor: pointer;
}

/* V3: keine Abtrennlinie zwischen Header und Slider/Kindern */
.lm-panel-v3 .lm-active-group-header {
  border-bottom: none;
}

.lm-active-group-icon {
  display: flex;
  align-items: center;
  color: var(--m-color-primary, #4B7B81);
  flex-shrink: 0;
}

.lm-active-group-icon .lm-icon {
  width: 18px;
  height: 18px;
}

.lm-active-group-name {
  flex: 1;
  font-size: 12px;
  font-weight: 600;
  color: var(--lm-group-name);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.lm-active-group-header .lm-eye {
  width: 32px;
  height: 32px;
  flex-shrink: 0;
}

.lm-btn-expand {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 24px;
  height: 24px;
  border: none;
  background: transparent;
  cursor: pointer;
  border-radius: 4px;
  color: #6b8e95;
  flex-shrink: 0;
  transition: transform 0.15s ease;
}

.lm-btn-expand:hover {
  background: rgba(75, 123, 129, 0.12);
}

.lm-btn-expand .lm-icon {
  width: 18px;
  height: 18px;
  fill: currentColor;
  transform: rotate(0deg);
  transition: transform 0.15s ease;
}

.lm-active-group:not(.lm-collapsed) .lm-btn-expand .lm-icon {
  transform: rotate(90deg);
}

/* V3: gefuelltes Dreieck analog Themenkatalog */
.lm-btn-expand .lm-arrow {
  font-size: 10px;
  width: auto;
  line-height: 1;
}

.lm-active-group:not(.lm-collapsed) .lm-btn-expand .lm-arrow {
  transform: rotate(90deg);
}

/* Gruppen-Opazitäts-Slider */
.lm-active-group > .lm-opacity-row {
  padding: 1px 6px 3px 30px;
  background: var(--lm-group-header-bg);
}

/* Kind-Layer-Liste */
.lm-active-group-children {
  list-style: none;
  margin: 0;
  padding: 0;
  max-height: none;
  overflow: visible;
}

/* Collapsed → Kinder ausblenden */
.lm-active-group.lm-collapsed .lm-active-group-children {
  max-height: 0;
  overflow: hidden;
  display: none;
}

.lm-active-group.lm-collapsed .lm-active-group-header {
  border-bottom: none;
}

.lm-active-group.lm-collapsed > .lm-opacity-row {
  display: none;
}

/* Einzelnes Kind-Layer */
.lm-active-group-child {
  display: flex;
  align-items: center;
  gap: 4px;
  padding: 3px 6px 3px 18px;
  min-height: 26px;
  border-bottom: 1px solid #edf2f3;
}

.lm-active-group-child:last-child {
  border-bottom: none;
}

.lm-active-group-child .lm-eye {
  width: 28px;
  height: 28px;
  flex-shrink: 0;
  position: relative;
  margin: 0;
}

.lm-active-group-child .lm-active-name {
  font-size: 12px;
  color: #444;
}

.lm-active-subgroup {
  list-style: none;
  margin: 0;
  padding-left: 12px;
}

.lm-active-subgroup-heading {
  display: flex;
  align-items: center;
  gap: 3px;
  min-height: 24px;
  padding: 1px 5px 1px 0;
  background: transparent;
}

/* Aufklappdreieck analog Themenkatalog (.lm-arrow): klein, dezent, rotiert bei offen */
.lm-tree-expand {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 18px;
  height: 18px;
  border: 0;
  padding: 0;
  background: transparent;
  color: inherit;
  opacity: 0.7;
  cursor: pointer;
  flex-shrink: 0;
}

.lm-tree-expand:hover {
  opacity: 1;
}

.lm-tree-expand .lm-icon {
  width: 12px;
  height: 12px;
  transform: rotate(90deg);
  transition: transform 0.2s ease;
}

.lm-subgroup-collapsed > .lm-active-subgroup-heading .lm-tree-expand .lm-icon {
  transform: rotate(0deg);
}

/* V3: gefuelltes Dreieck analog Themenkatalog */
.lm-tree-expand .lm-arrow {
  font-size: 9px;
  width: auto;
  line-height: 1;
  transform: rotate(90deg);
}

.lm-subgroup-collapsed > .lm-active-subgroup-heading .lm-tree-expand .lm-arrow {
  transform: rotate(0deg);
}

.lm-subgroup-name {
  flex: 1;
  min-width: 0;
  color: #435d60;
  font-size: 11px;
  font-weight: 600;
}

.lm-active-subgroup-children {
  list-style: none;
  margin: 0;
  padding: 0;
}

.lm-subgroup-collapsed > .lm-active-subgroup-children {
  display: none;
}

/* Ruhigeres Bild: keine Trennlinien zwischen Kind-Zeilen in V3 */
.lm-panel-v3 .lm-active-group-child {
  border-bottom: none;
}

/* V3: Auge/Schloss in fester Spalte links, rechts davon Pfeil + Einrueckung + Name (Baum).
   Selektoren mit 3 Klassen, damit sie die spaeteren .lm-container-desktop-Regeln schlagen.
   --lm-arrow-slot = Pfeil 24px + gap 4px; Blatt-Layer reservieren diesen Platz, damit
   ihre Namen buendig mit gleichrangigen Untergruppen-Namen stehen. */
.lm-panel-v3 {
  --lm-eye-size: 28px;
  --lm-eye-x: 6px;
  --lm-indent: 12px;
  --lm-arrow-slot: 28px;
}

.lm-container-desktop.lm-panel-v3 {
  --lm-eye-size: 26px;
  --lm-eye-x: 4px;
}

.lm-panel-v3 .lm-active-group .lm-eye {
  width: var(--lm-eye-size);
  height: var(--lm-eye-size);
}

.lm-panel-v3 .lm-active-group > .lm-active-group-header {
  padding-left: var(--lm-eye-x);
}

.lm-panel-v3 .lm-active-group .lm-active-subgroup {
  padding-left: 0;
}

.lm-panel-v3 .lm-active-subgroup .lm-active-subgroup-heading {
  gap: 4px;
  padding-left: var(--lm-eye-x);
}

.lm-panel-v3 .lm-active-subgroup-heading .lm-tree-expand {
  width: 24px;
  height: 24px;
  margin-left: calc(var(--lm-sub-depth, 1) * var(--lm-indent));
}

.lm-panel-v3 .lm-active-group .lm-active-group-child {
  padding-left: var(--lm-eye-x);
}

.lm-panel-v3 .lm-active-group-child .lm-active-name {
  margin-left: calc((var(--lm-sub-depth, 0) + 1) * var(--lm-indent) + var(--lm-arrow-slot));
}

.lm-eye.lm-eye-spacer {
  visibility: hidden;
  pointer-events: none;
}

/* Katalogpfad unter dem Namen (z.B. "NATURGEFAHREN › Gefahrenkarte") */
.lm-active-path {
  margin-top: -4px;
  padding: 0 0 2px 28px;
  font-size: 10px;
  line-height: 1.3;
  color: #7a9296;
  word-break: break-word;
}

.lm-active-path.lm-active-path-tree {
  padding-left: 52px;
}

/* Klickbare Pfadsegmente: Sprung zur Gruppe im Themenkatalog */
.lm-active-path-seg {
  cursor: pointer;
}

.lm-active-path-seg:hover,
.lm-active-path-seg:focus-visible {
  color: var(--m-color-primary, #4B7B81) !important;
  text-decoration: underline !important;
}

/* Gruppen: Pfadzeile im Kopf-Hintergrund, bündig zum Gruppennamen */
.lm-active-path.lm-active-path-group {
  margin-top: 0;
  padding: 0 6px 2px 58px;
  background: var(--lm-group-header-bg);
}

/* Unterlayer-Sichtbarkeit gesperrt (Site-Einstellung "Gruppenverhalten"): Auge unsichtbar, Platz bleibt */
.lm-eye.lm-eye-noswitch {
  visibility: hidden;
  pointer-events: none;
}

/* Aufklappen gesperrt: Pfeil unsichtbar, Platz bleibt */
.lm-tree-expand.lm-tree-noexpand {
  visibility: hidden;
  pointer-events: none;
}

/* ArcGIS-Gruppenlayer (z.B. Naturgefahren "Wasser"): Baum der MapServer-Unterlayer, nur Anzeige */
.lm-arcgis-collapsed > .lm-arcgis-tree {
  display: none;
}

.lm-arcgis-expand .lm-arrow {
  font-size: 10px;
  line-height: 1;
  transform: rotate(90deg);
}

.lm-arcgis-collapsed .lm-arcgis-expand .lm-arrow {
  transform: none;
}

.lm-arcgis-tree {
  list-style: none;
  margin: 0;
  padding: 0 0 2px 0;
}

.lm-arcgis-node-row {
  display: flex;
  align-items: center;
  gap: 4px;
  min-height: 22px;
  padding-left: calc(24px + (var(--lm-arc-depth, 1) - 1) * var(--lm-indent, 12px));
}

.lm-arcgis-node-collapsed > .lm-arcgis-tree {
  display: none;
}

.lm-arcgis-spacer {
  width: 24px;
  height: 18px;
  flex-shrink: 0;
}

.lm-arcgis-node-row .lm-tree-expand {
  width: 24px;
  height: 18px;
}

/* Unterlayer schaltbar: Auge links in der Spalte, Einrueckung ueber Pfeil/Spacer */
.lm-arcgis-toggle .lm-arcgis-node-row {
  padding-left: 0;
}

.lm-arcgis-toggle .lm-arcgis-eye {
  width: 22px;
  height: 22px;
}

.lm-arcgis-toggle .lm-arcgis-eye .lm-icon {
  width: 16px;
  height: 16px;
}

.lm-arcgis-toggle .lm-arcgis-node-row .lm-tree-expand,
.lm-arcgis-toggle .lm-arcgis-node-row .lm-arcgis-spacer {
  margin-left: calc((var(--lm-arc-depth, 1) - 1) * var(--lm-indent, 12px));
}

.lm-arcgis-node-collapsed > .lm-arcgis-node-row .lm-tree-expand .lm-arrow {
  transform: none;
}

.lm-arcgis-node-name {
  flex: 1;
  min-width: 0;
  color: #435d60;
  font-size: 11px;
  word-break: break-word;
}

/* ============================================================
   DESKTOP-SPEZIFISCHE STYLES
   Scoping via .lm-container-desktop (wird von tnet-lm-init.js gesetzt)
   ============================================================ */

.lm-container-desktop {
  font-size: 13px;
}

/* Tab-Bar: kompakter als Mobile (kein 44px Touch-Target nötig) */
.lm-container-desktop .lm-tab {
  min-height: 34px;
  padding: 3px 0;
}

.lm-container-desktop .lm-tab-icon {
  height: 22px;
}

/* Schweizerkreuz (Bund) etwas grösser */
.lm-container-desktop .lm-tab:nth-child(3) .lm-tab-icon {
  height: 28px;
}

/* Suchfeld: kompakter */
.lm-container-desktop .lm-search-wrap {
  padding: 0 6px 2px 6px;
  top: 34px;
}

.lm-container-desktop .lm-search {
  padding: 5px 30px 5px 10px;
  font-size: 13px;
  border-radius: 4px;
}

/* Einheitliche Zeilenhöhe auf allen Hierarchiestufen */
.lm-container-desktop .lm-subcat-header,
.lm-container-desktop .lm-group-header,
.lm-container-desktop .lm-nested-header,
.lm-container-desktop .lm-layer {
  min-height: 28px;
  padding: 3px 10px;
}

/* Baum-Einrückung Desktop: gleiche Formel wie Mobile, kleinere Basis.
   Die Basis ist 0: Der Baum beginnt direkt hinter der 4-px-Randleiste.
   Die Kopfspalte (--lm-tree-lead-w) ist 0: Pfeile von Zeilen mit Steuerelement
   hängen links neben dem Steuerelement, alle Checkboxen rücken nach links. */
.lm-container-desktop {
  --lm-tree-indent-base: 0px;
  --lm-tree-indent-step: 10px;
  --lm-tree-lead-w: 0px;
  --lm-tree-arrow-shift: 14px;
}

.lm-container-desktop .lm-has-control > .lm-arrow {
  justify-self: end;
}

/* Hängende Pfeile neben der Führungslinie rücken dicht an ihre Checkbox. */
.lm-container-desktop :is(.lm-group, .lm-nested-group):not(.lm-group-has-control) > :is(.lm-group-body, .lm-nested-body) > .lm-nested-group.lm-group-has-control > .lm-nested-header > .lm-arrow {
  margin-right: -6px;
}

/* Stufe 1 hat links keinen Platz für einen hängenden Pfeil: eigene Kopfspalte. */
.lm-container-desktop .lm-subcat-header.lm-has-control[data-lm-depth="1"],
.lm-container-desktop .lm-group-header.lm-has-control[data-lm-depth="1"] {
  --lm-tree-lead-w: 16px;
}

.lm-container-desktop .lm-subcat-header.lm-has-control[data-lm-depth="1"] > .lm-arrow,
.lm-container-desktop .lm-group-header.lm-has-control[data-lm-depth="1"] > .lm-arrow {
  justify-self: start;
}

.lm-container-desktop .lm-group.lm-expanded.lm-group-has-control:not(.lm-depth-1) > .lm-group-body::before,
.lm-container-desktop .lm-nested-group.lm-expanded.lm-group-has-control > .lm-nested-body::before {
  left: calc(4px + var(--lm-tree-indent-base) + var(--lm-tree-level, 0) * var(--lm-tree-indent-step) + var(--lm-tree-shift, 0px) - 9px);
}

/* Stufe 2 steht direkt hinter der Randleiste: Der hängende Pfeil rückt dicht an sein
   Steuerelement und die Linie folgt ihm, damit er nicht in die Randleiste ragt. */
.lm-container-desktop .lm-group.lm-depth-2 > .lm-group-header.lm-has-control > .lm-arrow {
  margin-right: -3px;
}

.lm-container-desktop .lm-group.lm-depth-2.lm-expanded.lm-group-has-control > .lm-group-body::before {
  left: calc(4px + var(--lm-tree-indent-base) + var(--lm-tree-level, 0) * var(--lm-tree-indent-step) + var(--lm-tree-shift, 0px) - 6px);
}

/* Die Linie folgt dem dicht an die Checkbox gerückten Pfeil (siehe margin-right oben). */
.lm-container-desktop :is(.lm-group, .lm-nested-group):not(.lm-group-has-control) > :is(.lm-group-body, .lm-nested-body) > .lm-nested-group.lm-expanded.lm-group-has-control > .lm-nested-body::before {
  left: calc(4px + var(--lm-tree-indent-base) + var(--lm-tree-level, 0) * var(--lm-tree-indent-step) + var(--lm-tree-shift, 0px) - 3px);
}

.lm-container[data-lm-tree-layout="v7"] .lm-has-control > .lm-cb-locked {
  justify-self: center !important;
}

.lm-container[data-lm-tree-layout="v7"] .lm-subcat-header:not(.lm-has-control) > .lm-tree-slot,
.lm-container[data-lm-tree-layout="v7"] .lm-group-header:not(.lm-has-control) > .lm-tree-slot,
.lm-container[data-lm-tree-layout="v7"] .lm-nested-header:not(.lm-has-control) > .lm-tree-slot {
  display: none !important;
}

.lm-container[data-lm-tree-layout="v7"] .lm-subcat-header:not(.lm-has-control) > .lm-arrow,
.lm-container[data-lm-tree-layout="v7"] .lm-group-header:not(.lm-has-control) > .lm-arrow,
.lm-container[data-lm-tree-layout="v7"] .lm-nested-header:not(.lm-has-control) > .lm-arrow {
  grid-column: 2 !important;
  justify-self: center !important;
}

.lm-container[data-lm-tree-layout="v7"] .lm-subcat-header:not(.lm-has-control) > .lm-subcat-name,
.lm-container[data-lm-tree-layout="v7"] .lm-group-header:not(.lm-has-control) > .lm-group-name,
.lm-container[data-lm-tree-layout="v7"] .lm-nested-header:not(.lm-has-control) > .lm-nested-name {
  grid-column: 3 !important;
}

.lm-container-desktop .lm-subcat-header[data-lm-depth],
.lm-container-desktop .lm-group-header[data-lm-depth],
.lm-container-desktop .lm-nested-header[data-lm-depth],
.lm-container-desktop .lm-layer[data-lm-depth] {
  padding-left: calc(var(--lm-tree-indent-base) + var(--lm-tree-level, 0) * var(--lm-tree-indent-step) + var(--lm-tree-shift, 0px));
}

.lm-container[data-lm-tree-layout="v7"] .lm-layer.lm-active[data-lm-depth],
.lm-container[data-lm-tree-layout="v7"] .lm-layer.lm-layer-flat[data-lm-depth] {
  margin-left: -4px !important;
  padding-left: calc(var(--lm-tree-indent-base) + var(--lm-tree-level, 0) * var(--lm-tree-indent-step) + var(--lm-tree-shift, 0px) + 4px) !important;
}

.lm-container[data-lm-tree-layout="v7"] .lm-group.lm-expanded:not(.lm-group-has-control) > .lm-group-body::before,
.lm-container[data-lm-tree-layout="v7"] .lm-nested-group.lm-expanded:not(.lm-group-has-control) > .lm-nested-body::before {
  left: calc(4px + var(--lm-tree-indent-base) + var(--lm-tree-level, 0) * var(--lm-tree-indent-step) + var(--lm-tree-shift, 0px) + var(--lm-tree-lead-w, 16px) + 13px) !important;
}

.lm-container-desktop .lm-cb {
  width: 16px;
  height: 16px;
}

.lm-container-desktop .lm-subcat-name,
.lm-container-desktop .lm-group-name,
.lm-container-desktop .lm-nested-name,
.lm-container-desktop .lm-layer-name {
  font-size: 12px;
}

/* Count-Badge */
.lm-container-desktop .lm-count {
  font-size: 10px;
}

/* Tree-Container: Scroll im Dojo-Sidepane.
   Höhe wird per tnet-accordion-resize.js dynamisch gesetzt. */
#lm-tree-container.lm-container-desktop {
  max-height: calc(100vh - 260px);
  min-height: 120px;
  overflow-y: auto;
  overflow-x: hidden;
}

/* Active-Container: Scroll + Höhe per Accordion-Resize.
   Default 300px, wird per JS-Variable --tnet-active-height überschrieben.
   !important weil Dojo bei TitlePane-Open Inline-Styles setzt. */
#lm-active-container.lm-container-desktop {
  flex: 1;
  min-height: 0;
  overflow-y: auto !important;
  overflow-x: hidden !important;
}

/* ContentOuter von "Dargestellte Themen" muss auch scrollen können,
   falls #lm-active-container noch nicht per JS begrenzt wurde. */
#tp_sort_menu > .dijitTitlePaneContentOuter {
  overflow-y: auto !important;
  overflow-x: hidden !important;
}

/* Active-Panel: kompaktere Items */
.lm-container-desktop .lm-active-row {
  min-height: 26px;
  gap: 2px;
}

.lm-container-desktop .lm-active-item {
  padding: 1px 4px;
}

.lm-container-desktop .lm-active-name {
  font-size: 12px;
}

/* V2: Drag-Handle auf Desktop erst bei Hover sichtbar */
.lm-container-desktop .lm-drag-handle {
  min-height: 26px;
  width: 14px;
  opacity: 0;
  transition: opacity 0.15s ease;
}

.lm-container-desktop .lm-active-item:hover .lm-drag-handle,
.lm-container-desktop .lm-active-item:focus-within .lm-drag-handle,
.lm-container-desktop .lm-active-group:hover .lm-drag-handle,
.lm-container-desktop .lm-active-group:focus-within .lm-drag-handle {
  opacity: 0.85;
}

.lm-container-desktop .lm-eye {
  width: 26px;
  height: 26px;
}

.lm-container-desktop .lm-btn-legend {
  width: 24px;
  height: 24px;
}

.lm-container-desktop .lm-btn-remove {
  display: flex !important;
  width: 24px;
  height: 24px;
  opacity: 0.45;
  pointer-events: auto;
}

.lm-container-desktop .lm-active-item:hover .lm-btn-remove,
.lm-container-desktop .lm-active-item:focus-within .lm-btn-remove,
.lm-container-desktop .lm-active-group:hover > .lm-active-group-header .lm-btn-remove,
.lm-container-desktop .lm-active-group:focus-within > .lm-active-group-header .lm-btn-remove,
.lm-container-desktop .lm-active-group-child:hover .lm-btn-remove,
.lm-container-desktop .lm-active-group-child:focus-within .lm-btn-remove {
  opacity: 1;
}

.lm-container-desktop .lm-opacity-row {
  padding: 0 0 0 14px;
}

.lm-container-desktop .lm-opacity-label {
  font-size: 10px;
  width: 48px;
}

/* V3: Label rechtsbündig neben Prozentwert — keine Festbreite */
.lm-container-desktop.lm-panel-v3 .lm-opacity-label {
  width: auto;
}

.lm-container-desktop .lm-layer-status {
  max-width: 64px;
}

/* Active-Panel Toolbar */
.lm-container-desktop .lm-active-toolbar {
  font-size: 12px;
}

/* ── Karteninhalt: Bookmark-Header ── */
.lm-active-header {
  border-bottom: 1px solid #e0e0e0;
  background: #f5f9fa;
  position: sticky;
  top: 0;
  z-index: 10;
}
.lm-active-meta {
  display: flex;
  gap: 8px;
  padding: 6px 8px 4px;
}
.lm-active-meta-block {
  min-width: 0;
  display: flex;
  flex-direction: column;
  gap: 2px;
}
.lm-active-meta-map {
  flex: 1;
}
.lm-active-meta-view {
  width: 138px;
  flex-shrink: 0;
}
.lm-active-meta-label {
  font-size: 10px;
  font-weight: 600;
  color: #7f8e93;
  letter-spacing: 0.03em;
  text-transform: uppercase;
}
.lm-active-map-switch {
  display: block;
  width: 100%;
  border: 1px solid #d2dde1;
  border-radius: 4px;
  background: #fff;
  color: #1e3a4a;
  font-size: 13px;
  font-weight: 600;
  text-align: left;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  padding: 4px 8px;
  cursor: pointer;
}
.lm-active-map-switch:hover {
  border-color: #9fb2b8;
  background: #f8fbfc;
}
.lm-active-toolbar {
  display: flex;
  align-items: center;
  gap: 6px;
  padding: 4px 8px 6px;
  border-top: 1px solid #e8eef0;
  border-bottom: 1px solid #eee;
}
.lm-active-count {
  font-size: 11px;
  color: #7f8e93;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  min-width: 0;
  flex-shrink: 1;
  margin-right: auto;
}
/* Roter Punkt: Karte lädt/rendert noch Layer */
.lm-map-load-dot {
  display: none;
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: #d34a3f;
  flex-shrink: 0;
  cursor: default;
}
.lm-map-load-dot.is-active {
  display: inline-block;
  animation: lm-map-load-pulse 1.2s ease-in-out infinite;
}
@keyframes lm-map-load-pulse {
  0%, 100% { opacity: 1; }
  50% { opacity: 0.35; }
}
.lm-active-modified {
  display: inline-flex;
  align-items: center;
  gap: 6px;
}
.lm-btn-bm-reset {
  flex-shrink: 0;
  border: none;
  background: #d98f1f;
  font-size: 11px;
  font-weight: 600;
  line-height: 1.2;
  color: #fff;
  white-space: nowrap;
  cursor: pointer;
  padding: 4px 9px;
  border-radius: 3px;
}
.lm-btn-bm-reset:hover {
  background: #c47a00;
}
.lm-active-count-loading {
  color: #4b7b81;
  font-weight: 600;
}

/* ── Layerzaehler rechts in Paneltitel, Menue und Sheet ── */
.tnet-layer-count-badge {
  display: inline-flex !important;
  align-items: center;
  justify-content: center;
  box-sizing: border-box;
  min-width: 18px;
  height: 18px;
  margin-left: 6px;
  padding: 0 6px;
  border-radius: 9px;
  background: var(--lm-count-badge-bg);
  color: var(--lm-count-badge-text);
  font-size: 11px;
  font-weight: 700;
  line-height: 18px;
  letter-spacing: 0;
  text-transform: none;
  vertical-align: middle;
  white-space: nowrap;
  flex-shrink: 0;
}
.tnet-layer-count-badge[hidden] {
  display: none !important;
}
.tnet-panel-title .tnet-layer-count-badge {
  margin-left: auto;
}
.m-menu-item[data-m-action="active"] .m-menu-label,
#m-active-sheet .m-sheet-title {
  display: flex !important;
  align-items: center !important;
  flex: 1 1 auto !important;
  min-width: 0 !important;
  gap: 8px !important;
}
#m-active-sheet .m-sheet-header {
  gap: 8px !important;
}
.m-menu-label .tnet-layer-count-badge,
.m-sheet-title .tnet-layer-count-badge {
  min-width: 20px !important;
  height: 20px !important;
  margin-left: auto !important;
  padding: 0 7px !important;
  border-radius: 10px !important;
  background: var(--lm-count-badge-bg) !important;
  color: var(--lm-count-badge-text) !important;
  font-size: 12px !important;
  line-height: 20px !important;
}
.lm-active-view-select {
  width: 100%;
  font-size: 12px;
  padding: 3px 4px;
  border: 1px solid #b0bec5;
  border-radius: 3px;
  background: #fff;
  color: #333;
  cursor: pointer;
}
.lm-active-view-fallback {
  display: inline-block;
  width: 100%;
  border: 1px solid #d2dde1;
  border-radius: 4px;
  background: #fff;
  color: #6e7a7e;
  font-size: 12px;
  padding: 3px 6px;
}

.lm-btn-remove-all {
  flex-shrink: 0;
  border: none;
  border-radius: 3px;
  background: #e8eef0;
  color: #4a5d63;
  font-size: 11px;
  font-weight: 600;
  line-height: 1.2;
  white-space: nowrap;
  padding: 4px 9px;
  cursor: pointer;
}

.lm-btn-remove-all:hover {
  background: #d5e0e3;
  color: #33454b;
}
.lm-active-view-select:hover {
  border-color: #1e3a4a;
}

/* Empty-State */
.lm-container-desktop .lm-empty {
  padding: 16px 10px;
  font-size: 12px;

.lm-pending-load {
  display: flex;
  gap: 10px;
  align-items: flex-start;
  margin: 10px 8px 12px;
  padding: 12px;
  border: 1px solid #d7e3e6;
  border-radius: 6px;
  background: linear-gradient(180deg, #fbfdfd 0%, #f1f7f8 100%);
}

.lm-pending-load-spinner {
  width: 16px;
  height: 16px;
  border: 2px solid #c6d8dc;
  border-top-color: #4b7b81;
  border-radius: 50%;
  flex-shrink: 0;
  margin-top: 2px;
  animation: lmPendingSpin 0.8s linear infinite;
}

.lm-pending-load-copy {
  min-width: 0;
}

.lm-pending-load-title {
  font-size: 13px;
  font-weight: 600;
  color: #1e3a4a;
  margin-bottom: 3px;
}

.lm-pending-load-text {
  font-size: 11px;
  line-height: 1.45;
  color: #62757c;
}

@keyframes lmPendingSpin {
  from { transform: rotate(0deg); }
  to { transform: rotate(360deg); }
}
}

/* Desktop: Gruppen kompakter */
.lm-container-desktop .lm-active-group-header {
  min-height: 24px;
  padding: 1px 4px;
}

.lm-container-desktop .lm-active-group-name {
  font-size: 12px;
}

.lm-container-desktop .lm-active-group-child {
  min-height: 20px;
  padding: 1px 4px 1px 14px;
}

.lm-container-desktop .lm-active-group > .lm-opacity-row {
  padding: 0 4px 1px 22px;
}

/* ============================================================
   SelectAll-Checkbox auf Gruppen-Headern
   ============================================================ */

/* Checkbox in Gruppen-Headern (neben dem Pfeil) */
.lm-group-cb {
  width: 20px;
  height: 20px;
  margin: 0;
  cursor: pointer;
  accent-color: var(--m-color-primary, #4B7B81);
  vertical-align: middle;
  flex-shrink: 0;
}

/* Indeterminate-State: Eltern-Gruppe mit teils sichtbaren Layern */
.lm-group-cb:indeterminate {
  opacity: 0.7;
}

/* Desktop: gleiche Grösse wie Layer-Checkbox */
.lm-container-desktop .lm-group-cb {
  width: 16px;
  height: 16px;
}

/* ============================================================
   Legenden-Button auf Gruppen-/Layer-Zeilen (bei Hover)
   ============================================================ */

/* Legenden-Button: kaum sichtbar, bei Hover auf Zeile dezent, bei Hover auf Button stark */
.lm-legend-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 22px;
  height: 22px;
  padding: 0;
  margin: 0 4px 0 auto;
  border: none;
  background: transparent;
  cursor: pointer;
  font-size: 14px;
  opacity: 0.1;
  transition: opacity 0.15s ease;
  vertical-align: middle;
  flex-shrink: 0;
  line-height: 1;
  border-radius: 3px;
}

/* Bei Hover auf Header/Layer: Legenden-Button dezent sichtbar */
.lm-group-header:hover .lm-legend-btn,
.lm-nested-header:hover .lm-legend-btn,
.lm-layer:hover .lm-legend-btn,
.lm-legend-btn:focus {
  opacity: 0.4;
}

.lm-legend-btn:hover {
  opacity: 1 !important;
  background: rgba(75, 123, 129, 0.15);
}

/* Desktop: etwas kleiner */
.lm-container-desktop .lm-legend-btn {
  width: 20px;
  height: 20px;
  font-size: 12px;
}

/* ===== tnet-sidepanel.css ===== */
/* ===== TNET SIDEPANEL V2 ===== */

:root {
  --tnet-sidepanel-width: 340px;
}

/* Freepane base — bündig links/oben, Schatten nur rechts */
body.tnet-sidepanel-v2 div#freepane {
  left: 0 !important;
  top: 69px !important;
  width: var(--tnet-sidepanel-width, 340px) !important;
  z-index: 50;
  position: fixed !important;
  bottom: auto !important;
  height: auto !important;
  overflow: hidden !important;
  pointer-events: none !important;
  max-height: calc(100vh - 69px) !important;
  display: flex;
  flex-direction: column;
  border-radius: 0 0 10px 0;
  box-shadow: 4px 0 10px rgba(0, 0, 0, 0.12),
              2px 4px 8px rgba(0, 0, 0, 0.08);
  animation: tnet-sidepanel-fade-in 0.5s ease both;
}

@keyframes tnet-sidepanel-fade-in {
  from { opacity: 0; transform: translateX(-8px); }
  to   { opacity: 1; transform: translateX(0); }
}

/* Freepane verkürzt wenn Spatial-Query-Panel unten angedockt */
body.tnet-sidepanel-v2 div#freepane.panel-docked {
  bottom: auto !important;
  /* Hüllbox ist höher als der Inhalt: box-shadow würde leere Fläche abdunkeln (Ghosting).
     drop-shadow folgt nur den sichtbaren Pixeln des Inhalts. */
  box-shadow: none !important;
  filter: drop-shadow(4px 0 5px rgba(0, 0, 0, 0.18))
          drop-shadow(2px 3px 4px rgba(0, 0, 0, 0.12));
}

/* Spring passt sich dem verkürzten Freepane an */
body.tnet-sidepanel-v2 div#freepane.panel-docked #spring {
  height: 100% !important;
  max-height: 100% !important;
}

/* Während Polygon-Zeichnen: Sidepanel deaktivieren */
body.tnet-sidepanel-v2.drawing-mode #freepane,
body.tnet-sidepanel-v2.drawing-mode #freepane * {
  pointer-events: none !important;
}

/* Spatial Query Panel bleibt immer bedienbar */
body.tnet-sidepanel-v2 .spatial-query-panel,
body.tnet-sidepanel-v2 .spatial-query-panel * {
  pointer-events: auto !important;
}

/* Spring scroll container — kein Scroll hier, nur innere Container scrollen */
body.tnet-sidepanel-v2 #spring {
  pointer-events: auto;
  width: var(--tnet-sidepanel-width, 340px) !important;
  height: auto !important;
  max-height: calc(100vh - 129px) !important;
  overflow: hidden !important;
  padding-bottom: 0 !important;
  box-sizing: border-box !important;
  flex: 1 1 auto;
  min-height: 0;
  display: flex;
  flex-direction: column;
  position: relative;
}

/* Keep panel interactive */
body.tnet-sidepanel-v2 #freepane #leftPaneHeader,
body.tnet-sidepanel-v2 #freepane .dijitTitlePane,
body.tnet-sidepanel-v2 #freepane .close_switch,
body.tnet-sidepanel-v2 #freepane #scrollToTopBtn,
body.tnet-sidepanel-v2 #freepane #freepane-resize-handle,
body.tnet-sidepanel-v2 #freepane .dijitTitlePaneTitle,
body.tnet-sidepanel-v2 #freepane .dijitTitlePaneContentOuter,
body.tnet-sidepanel-v2 #freepane .tnet-accordion-resize-handle {
  pointer-events: auto;
}

/* Horizontaler Handle fuer Breiten-Resize */
body.tnet-sidepanel-v2 #freepane-resize-handle {
  position: absolute;
  top: 0;
  right: -4px;
  bottom: 0;
  width: 10px;
  z-index: 130;
  cursor: ew-resize;
  opacity: 0;
  background: linear-gradient(to right, rgba(75, 123, 129, 0.25), rgba(75, 123, 129, 0));
  transition: opacity 0.15s ease, background 0.15s ease;
}

body.tnet-sidepanel-v2 #freepane:hover #freepane-resize-handle,
body.tnet-sidepanel-v2 #freepane-resizing #freepane-resize-handle,
body.tnet-sidepanel-v2.tnet-resizing #freepane-resize-handle {
  opacity: 1;
}

body.tnet-sidepanel-v2 #freepane-resize-handle:hover,
body.tnet-sidepanel-v2 #freepane-resize-handle.active {
  background: linear-gradient(to right, rgba(75, 123, 129, 0.5), rgba(75, 123, 129, 0.1));
}

body.tnet-sidepanel-v2 #freepane.close #freepane-resize-handle {
  display: none;
}

/* Accordion resize handle */
body.tnet-sidepanel-v2 #freepane #spring .tnet-accordion-resize-handle {
  height: 5px !important;
  min-height: 5px !important;
  max-height: 5px !important;
  background: #6e9aa0 !important;
  border-top: 1px solid #5f8a90 !important;
  border-bottom: 1px solid #5f8a90 !important;
  cursor: ns-resize !important;
  display: flex !important;
  align-items: center !important;
  justify-content: center !important;
  flex-shrink: 0 !important;
  overflow: visible !important;
  opacity: 1 !important;
  visibility: visible !important;
  transition: background 0.15s ease !important;
  pointer-events: auto !important;
  position: relative !important;
  z-index: 100 !important;
}

body.tnet-sidepanel-v2 #freepane #spring .tnet-accordion-resize-handle:hover {
  background: #5f8a90 !important;
}

body.tnet-sidepanel-v2 #freepane #spring .tnet-accordion-resize-handle.active {
  background: #557e83 !important;
}

body.tnet-sidepanel-v2 #freepane #spring .tnet-accordion-resize-handle::before {
  content: '' !important;
  display: block !important;
  width: 24px !important;
  height: 0 !important;
  border-top: 2px dotted #3f666b !important;
}

/* Scroll to top button */
body.tnet-sidepanel-v2 #scrollToTopBtn {
  position: fixed;
  bottom: 14px;
  left: calc(var(--tnet-sidepanel-width, 340px) - 22px);
  width: 44px;
  height: 44px;
  background: #e8423f;
  color: white;
  border: 4px solid #e8423f;
  border-radius: 50%;
  cursor: pointer;
  font-size: 0;
  text-align: center;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.25);
  opacity: 0;
  visibility: hidden;
  transition: all 0.3s ease;
  z-index: 100;
  display: flex;
  align-items: center;
  justify-content: center;
}

body.tnet-sidepanel-v2 #scrollToTopBtn::before {
  content: '';
  display: block;
  width: 12px;
  height: 12px;
  border-left: 3px solid white;
  border-top: 3px solid white;
  transform: rotate(45deg) translateX(2px) translateY(2px);
}

body.tnet-sidepanel-v2 #scrollToTopBtn.visible {
  opacity: 1;
  visibility: visible;
}

body.tnet-sidepanel-v2 #scrollToTopBtn:hover {
  background: #4b7b81;
  border-color: #4b7b81;
  transform: translateY(-2px);
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.3);
}

body.tnet-sidepanel-v2 #scrollToTopBtn:active {
  transform: translateY(0);
}

/* Close switch */
body.tnet-sidepanel-v2 .close_switch {
  position: relative;
  width: 100%;
  height: 10px;
  background: #95b5be;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 100;
  flex-shrink: 0;
  left: 0;
  border-radius: 0 0 10px 10px;
}

body.tnet-sidepanel-v2 .close_switch:hover {
  background: #4b7b81;
}

body.tnet-sidepanel-v2 .close_switch::before {
  content: '';
  width: 40px;
  height: 2px;
  background: rgba(255, 255, 255, 0.8);
  border-radius: 1px;
}

body.tnet-sidepanel-v2 .close_switch:hover::before {
  background: rgba(255, 255, 255, 1);
}

/* Open state */
body.tnet-sidepanel-v2 #freepane #leftPaneHeader {
  max-height: 50px;
  opacity: 1;
  overflow: hidden;
  transition: max-height 0.4s ease, opacity 0.3s ease;
}

body.tnet-sidepanel-v2 #freepane #spring > *:not(.close_switch):not(.tnet-accordion-resize-handle):not(.tnet-panel) {
  max-height: 2000px;
  opacity: 1;
  overflow: hidden;
  transition: max-height 0.4s ease, opacity 0.3s ease;
}

body.tnet-sidepanel-v2 #freepane #spring > .tnet-panel {
  opacity: 1;
  transition: max-height 0.4s ease, opacity 0.3s ease;
}

body.tnet-sidepanel-v2 #freepane #scrollToTopBtn {
  transition: opacity 0.3s ease;
}

/* Während Resize-Drag: Transitions auf Resize-relevanten Elementen abschalten */
body.tnet-resizing #freepane,
body.tnet-resizing #spring,
body.tnet-resizing .tnet-panel-content,
body.tnet-resizing #lm-tree-container,
body.tnet-resizing #lm-active-container,
body.tnet-resizing #kantons_container,
body.tnet-resizing .tnet-accordion-resize-handle {
  transition: none !important;
}

/* Während Resize: will-change + contain für GPU-beschleunigtes Layout */
body.tnet-resizing #lm-tree-container,
body.tnet-resizing #lm-active-container,
body.tnet-resizing #kantons_container,
body.tnet-resizing .tnet-panel-content {
  will-change: height, max-height !important;
  contain: layout style !important;
}

/* Closed state */
body.tnet-sidepanel-v2 #freepane.close #leftPaneHeader {
  max-height: 0 !important;
  opacity: 0 !important;
  overflow: hidden !important;
  padding: 0 !important;
  margin: 0 !important;
}

body.tnet-sidepanel-v2 #freepane.close #scrollToTopBtn {
  opacity: 0 !important;
  pointer-events: none !important;
  max-height: 0 !important;
}

body.tnet-sidepanel-v2 #freepane.close #spring > *:not(.close_switch) {
  max-height: 0 !important;
  height: 0 !important;
  min-height: 0 !important;
  opacity: 0 !important;
  overflow: hidden !important;
  margin: 0 !important;
  padding: 0 !important;
  border: none !important;
  pointer-events: none !important;
}

body.tnet-sidepanel-v2 #freepane.close #spring {
  position: relative !important;
  height: 10px !important;
  max-height: 10px !important;
  min-height: 10px !important;
  overflow: visible !important;
  padding: 0 !important;
  margin: 0 !important;
}

body.tnet-sidepanel-v2 #freepane.close .close_switch {
  position: absolute !important;
  top: 0 !important;
  left: 0 !important;
  right: 0 !important;
  transform: none !important;
  pointer-events: auto !important;
  width: 170px;
  margin: 0 auto;
  border-radius: 0 0 4px 4px;
  height: 10px !important;
  min-height: 10px !important;
  transition: width 0.5s ease, margin 0.5s ease;
}

body.tnet-sidepanel-v2 #freepane:not(.close) .close_switch {
  transition: none;
}

body.tnet-sidepanel-v2 #freepane.close .close_switch::before {
  width: 30px;
  height: 2px;
}

body.tnet-sidepanel-v2 #freepane.close {
  max-height: 20px !important;
  min-height: 0 !important;
  overflow: visible !important;
  box-shadow: none !important;
}

/* Shadow disabled */
body.tnet-sidepanel-v2 #panelShadow {
  display: none !important;
  transition: opacity 0.4s ease;
}

body.tnet-sidepanel-v2 #freepane.close + #panelShadow {
  opacity: 0 !important;
  pointer-events: none !important;
}

/* Panel dock support */
body.tnet-sidepanel-v2 #freepane.panel-docked {
  transition: bottom 0.15s ease;
}

/* Vanilla panels */
body.tnet-sidepanel-v2 .tnet-panel {
  margin: 0;
  padding: 0;
  border: none;
}

body.tnet-sidepanel-v2 .tnet-panel > summary.tnet-panel-title {
  display: flex;
  align-items: center;
  min-height: 28px;
  padding: 5px 10px;
  margin: 0;
  background: #4b7b81;
  color: #fff;
  font-size: 12px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  cursor: pointer;
  user-select: none;
  -webkit-user-select: none;
  list-style: none;
  outline: none;
  border: none;
}

body.tnet-sidepanel-v2 .tnet-panel > summary.tnet-panel-title::-webkit-details-marker {
  display: none;
}

body.tnet-sidepanel-v2 .tnet-panel > summary.tnet-panel-title:hover {
  background: #3d6a70;
}

body.tnet-sidepanel-v2 .tnet-panel > summary.tnet-panel-title::before {
  content: '';
}

body.tnet-sidepanel-v2 .tnet-panel > .tnet-panel-content {
  padding: 0;
  margin: 0;
  background: #fff;
}

body.tnet-sidepanel-v2 .tnet-panel-nested > summary.tnet-panel-title-nested {
  background: #95b5be;
  font-size: 11px;
  font-weight: 600;
  min-height: 26px;
  padding: 4px 10px;
  text-transform: none;
}

body.tnet-sidepanel-v2 .tnet-panel-nested > summary.tnet-panel-title-nested:hover {
  background: #7da3ac;
}

body.tnet-sidepanel-v2 #tp_overview_menu > .tnet-panel-content {
  height: var(--tnet-catalog-height, min(450px, calc(50vh - 80px)));
  max-height: calc(100vh - 250px);
  overflow: hidden;
}

body.tnet-sidepanel-v2 #tp_overview_menu > .tnet-panel-content > #kantons_container {
  height: 100%;
}

body.tnet-sidepanel-v2 #tp_sort_menu > .tnet-panel-content {
  height: var(--tnet-active-height, min(300px, calc(30vh - 50px)));
  max-height: calc(100vh - 350px);
  overflow: hidden;
  scrollbar-width: none;
  -ms-overflow-style: none;
  display: flex;
  flex-direction: column;
}

body.tnet-sidepanel-v2 #tp_sort_menu > .tnet-panel-content > #sort_menu {
  flex: 1;
  min-height: 0;
  max-height: none !important;
  overflow: hidden;
  display: flex;
  flex-direction: column;
}

body.tnet-sidepanel-v2 #tp_sort_menu > .tnet-panel-content::-webkit-scrollbar {
  display: none;
}

/* ===== NEW TREE / ACTIVE PANEL STYLING (aus override.css migriert) ===== */
body.tnet-sidepanel-v2 #lm-tree-container.lm-container-desktop {
  display: flex !important;
  flex-direction: column !important;
  overflow: hidden !important;
  height: var(--tnet-catalog-height, min(450px, calc(50vh - 80px))) !important;
  max-height: var(--tnet-catalog-height, min(450px, calc(50vh - 80px))) !important;
}

body.tnet-sidepanel-v2 .lm-container-desktop .lm-tab-bar {
  position: relative !important;
  flex-shrink: 0 !important;
  z-index: 6 !important;
  background: var(--m-color-primary, #4B7B81) !important;
}

body.tnet-sidepanel-v2 .lm-container-desktop .lm-search-wrap {
  background: #52808a !important;
  padding: 4px 10px 5px 10px !important;
  border: none !important;
}

body.tnet-sidepanel-v2 .lm-container-desktop .lm-search-wrap.lm-search-active {
  background: #8b3f46 !important;
  box-shadow: inset 0 0 0 1px rgba(255, 230, 230, 0.3) !important;
}

body.tnet-sidepanel-v2 .lm-container-desktop .lm-search {
  border: none !important;
  border-radius: 6px !important;
  background: rgba(255, 255, 255, 0.15) !important;
  color: #fff !important;
  box-shadow: inset 0 1px 2px rgba(0, 0, 0, 0.15) !important;
  padding: 6px 30px 6px 10px !important;
  font-size: 13px !important;
}

body.tnet-sidepanel-v2 .lm-container-desktop .lm-search::placeholder {
  color: rgba(255, 255, 255, 0.6) !important;
  font-style: normal !important;
}

body.tnet-sidepanel-v2 .lm-container-desktop .lm-search:focus {
  background: rgba(255, 255, 255, 0.25) !important;
  box-shadow: inset 0 1px 2px rgba(0, 0, 0, 0.1), 0 0 0 1px rgba(255, 255, 255, 0.3) !important;
  outline: none !important;
}

/* Themenkatalog-Liste: dezenter Scrollbar überlagert Content (kein Platzverbrauch) */
body.tnet-sidepanel-v2 .lm-container-desktop .lm-cat-content {
  overflow-y: auto !important;
  overflow-x: hidden !important;
  min-height: 0 !important;
  padding-bottom: 8px !important;
  scrollbar-width: thin;
  scrollbar-color: #95b5be transparent;
}

@supports (overflow: overlay) {
  body.tnet-sidepanel-v2 .lm-container-desktop .lm-cat-content {
    overflow-y: overlay !important;
  }
}

body.tnet-sidepanel-v2 .lm-container-desktop .lm-cat-content::-webkit-scrollbar {
  width: 6px;
}

body.tnet-sidepanel-v2 .lm-container-desktop .lm-cat-content::-webkit-scrollbar-track {
  background: transparent;
}

body.tnet-sidepanel-v2 .lm-container-desktop .lm-cat-content::-webkit-scrollbar-thumb {
  background: #95b5be;
  border-radius: 3px;
}

body.tnet-sidepanel-v2 .lm-container-desktop .lm-cat-content:hover::-webkit-scrollbar-thumb {
  background: #b0cdd4;
}

/* Dargestellte Themen: dezenter Scrollbar überlagert Content */
body.tnet-sidepanel-v2 #lm-active-container.lm-container-desktop {
  flex: 1;
  min-height: 0;
  overflow-y: auto !important;
  overflow-x: hidden !important;
  scrollbar-width: thin;
  scrollbar-color: #95b5be transparent;
}

@supports (overflow: overlay) {
  body.tnet-sidepanel-v2 #lm-active-container.lm-container-desktop {
    overflow-y: overlay !important;
  }
}

body.tnet-sidepanel-v2 #lm-active-container.lm-container-desktop::-webkit-scrollbar {
  width: 6px;
}

body.tnet-sidepanel-v2 #lm-active-container.lm-container-desktop::-webkit-scrollbar-track {
  background: transparent;
}

body.tnet-sidepanel-v2 #lm-active-container.lm-container-desktop::-webkit-scrollbar-thumb {
  background: #95b5be;
  border-radius: 3px;
}

body.tnet-sidepanel-v2 #lm-active-container.lm-container-desktop:hover::-webkit-scrollbar-thumb {
  background: #b0cdd4;
}

body.tnet-sidepanel-v2 .tnet-panel:not([open]) > .tnet-panel-content {
  display: none;
}

/* ===== NAVIGIEREN OVERVIEW MAP ===== */
body.tnet-sidepanel-v2 #tp_ov_menu > .tnet-panel-content {
  overflow: visible !important;
  width: 100%;
  padding: 0 !important;
  box-sizing: border-box !important;
}

body.tnet-sidepanel-v2 #ovWin {
  width: 100% !important;
  max-width: 100% !important;
  position: relative !important;
  right: 0 !important;
  left: 0 !important;
  bottom: 0 !important;
  box-sizing: border-box !important;
  overflow: visible !important;
  border: none !important;
}

body.tnet-sidepanel-v2 #ovWin .ol-viewport {
  width: 100% !important;
  max-width: 100% !important;
}

/* ===== DRUCKEN PANEL IM AKKORDEON ===== */
/* spring scrollbar: verhindert Clipping bei langen Panel-Inhalten */
body.tnet-sidepanel-v2 #spring {
  overflow-y: auto !important;
  overflow-x: hidden !important;
  scrollbar-width: thin;
  scrollbar-color: #95b5be transparent;
}
body.tnet-sidepanel-v2 #spring::-webkit-scrollbar { width: 4px; }
body.tnet-sidepanel-v2 #spring::-webkit-scrollbar-thumb { background: #95b5be; border-radius: 2px; }

body.tnet-sidepanel-v2 #tp_tnet_print_menu > .tnet-panel-content {
  overflow-y: auto;
  max-height: var(--tnet-print-height, 250px);
  scrollbar-width: thin;
  scrollbar-color: #95b5be transparent;
}
body.tnet-sidepanel-v2 #tp_print_menu > .tnet-panel-content::-webkit-scrollbar { width: 4px; }
body.tnet-sidepanel-v2 #tp_print_menu > .tnet-panel-content::-webkit-scrollbar-thumb { background: #95b5be; border-radius: 2px; }

/* ===== WERKZEUGE / EXPORT PANEL ===== */
body.tnet-sidepanel-v2 #tp_tools_menu > .tnet-panel-content {
  overflow-y: auto;
  max-height: var(--tnet-tools-height, 250px);
  scrollbar-width: thin;
  scrollbar-color: #95b5be transparent;
}
body.tnet-sidepanel-v2 #tp_tools_menu > .tnet-panel-content::-webkit-scrollbar { width: 4px; }
body.tnet-sidepanel-v2 #tp_tools_menu > .tnet-panel-content::-webkit-scrollbar-thumb { background: #95b5be; border-radius: 2px; }

/* ===== tnet-print.css ===== */
/* ================================================================
   tnet-print.css
   Drucken Side-Panel + Druckrahmen (OL Overlay)

   @version    1.0
   @date       2026-02-12
   @copyright  Trigonet AG
   @author     Marco Dellenbach
   ================================================================ */

/* ==============================
   Side-Panel
   ============================== */
.print-panel {
  position: fixed;
  top: 60px;
  right: 0;
  width: 340px;
  max-width: 90vw;
  height: calc(100vh - 60px);
  background: white;
  box-shadow: -4px 0 16px rgba(0,0,0,0.2);
  z-index: 1002;
  display: flex;
  flex-direction: column;
  font-family: 'Roboto Condensed', Arial, sans-serif;
  font-size: 13px;
}
.print-panel.hidden { display: none !important; }

/* Angedockter Modus */
.print-panel.docked-right {
  position: fixed !important;
  right: 0 !important;
  box-shadow: -2px 0 8px rgba(0,0,0,0.15);
  border-left: 1px solid #ccc;
  max-width: none;
}

.print-panel-header {
  display: flex; align-items: center; justify-content: space-between;
  padding: 10px 14px; background: #4b7b81; color: white;
  font-weight: 500; font-size: 14px; flex-shrink: 0;
  min-height: 42px; box-sizing: border-box;
}
.print-panel-actions {
  display: flex; align-items: center; gap: 4px;
}
.print-panel-btn {
  background: transparent; border: none; color: white;
  cursor: pointer; opacity: 0.8; padding: 2px 4px; line-height: 1;
  display: inline-flex; align-items: center; justify-content: center;
  border-radius: 3px; transition: opacity 0.15s, background 0.15s;
}
.print-panel-btn:hover { opacity: 1; background: rgba(255,255,255,0.15); }
.print-panel-close {
  font-size: 22px; padding: 0 4px;
}

/* Resize-Handle (linker Rand im Dock-Modus) */
.print-resize-handle {
  position: absolute; left: 0; top: 0; bottom: 0; width: 6px;
  cursor: ew-resize; z-index: 1003;
  background: linear-gradient(to right, rgba(75,123,129,0.15), transparent);
  display: none;
}
.print-panel.docked-right .print-resize-handle { display: block; }

.print-panel-body { flex: 1; overflow-y: auto; padding: 12px 14px; }

.print-section { margin-bottom: 14px; }
.print-section > label {
  display: block; font-size: 11px; color: #666;
  margin-bottom: 3px; font-weight: 500;
}
.print-section select,
.print-section input[type="text"],
.print-section input[type="number"] {
  width: 100%; padding: 6px 8px; border: 1px solid #bbb;
  border-radius: 4px; font-size: 13px; box-sizing: border-box; font-family: inherit;
}
.print-section select:focus,
.print-section input:focus { outline: none; border-color: #4b7b81; }

/* ===== KOMPAKTER DRUCK V2 ===== */
.print-panel-v2 .print-section { margin-bottom: 10px !important; }
.print-settings-row {
  display: grid !important;
  grid-template-columns: minmax(0, 1.25fr) minmax(0, 1.25fr) minmax(0, 0.8fr) !important;
  gap: 4px !important;
}
.print-settings-row .print-section { min-width: 0 !important; }
.print-settings-row select {
  padding: 5px 0 5px 3px !important;
  font-size: 12px !important;
}
.print-panel-v2 .print-frame-info { padding: 6px 8px !important; }
.print-rotation-heading {
  display: flex !important;
  align-items: center !important;
  justify-content: space-between !important;
  margin-bottom: 4px !important;
  font-size: 11px !important;
  color: #666 !important;
}
.print-help-wrap { position: relative !important; }
.print-help-btn {
  display: inline-flex !important;
  align-items: center !important;
  justify-content: center !important;
  width: 18px !important;
  height: 18px !important;
  padding: 0 !important;
  border: 1px solid #4b7b81 !important;
  border-radius: 50% !important;
  background: white !important;
  color: #4b7b81 !important;
  cursor: help !important;
}
#print-frame-help {
  visibility: hidden !important;
  position: absolute !important;
  right: 0 !important;
  top: 100% !important;
  width: min(260px, 70vw) !important;
  box-sizing: border-box !important;
  padding: 8px !important;
  border: 1px solid #e8dfa0 !important;
  border-radius: 4px !important;
  background: #fffce6 !important;
  color: #444 !important;
  font-size: 11px !important;
  line-height: 1.4 !important;
  z-index: 20 !important;
}
.print-help-wrap:hover #print-frame-help,
.print-help-wrap:focus-within #print-frame-help { visibility: visible !important; }

/* ==============================
   Massstab (Dropdown)
   ============================== */
#print-scale {
  appearance: auto; cursor: pointer;
}

/* ==============================
   Radio-Gruppen / Checkboxen
   ============================== */
/* Massstab + Auflösung in einer Zeile */
.print-row-2col {
  display: flex; gap: 12px; align-items: flex-start; margin-bottom: 14px;
}
.print-row-2col .print-section {
  margin-bottom: 0; flex: 1;
}
.print-row-2col .print-section-dpi {
  flex: 0 0 auto;
}
.print-row-2col .print-section select { width: 100%; }

.print-radio-row { display: flex; gap: 14px; }
.print-radio, .print-checks label {
  display: inline-flex; align-items: center; gap: 4px;
  font-size: 12px; color: #444; cursor: pointer; font-weight: 400;
}
.print-checks input[type="checkbox"],
.print-radio input[type="radio"] { margin: 0; }
.print-grid-colors { margin-top: 6px; display: flex; gap: 14px; padding-left: 4px; }

/* ==============================
   Rotation
   ============================== */
.print-rotation-row {
  display: flex !important; align-items: center !important; gap: 8px !important; margin-bottom: 0 !important;
}
.print-rotation-row input[type="range"] { flex: 1 !important; min-width: 0 !important; }
.print-rotation-row .print-ctrl-btn { flex: 0 0 auto !important; padding: 4px 6px !important; }
#print-rotation-val { font-size: 12px; color: #444; min-width: 36px; text-align: right; }

/* Rahmen-Steuerung */
.print-frame-info {
  background: #f0f6f6; border: 1px solid #d0e0e0; border-radius: 6px; padding: 10px;
}
.print-frame-info > label { margin-bottom: 6px; }
.print-frame-controls { display: flex; gap: 6px; }
.print-ctrl-btn {
  flex: 1; padding: 5px; background: white; border: 1px solid #bbb;
  border-radius: 4px; font-size: 12px; cursor: pointer; font-family: inherit;
}
.print-ctrl-btn:hover { background: #e8f0f0; border-color: #4b7b81; }

/* ==============================
   Hinweis-Box
   ============================== */
.print-hint-box {
  background: #fffce6; border: 1px solid #e8dfa0; border-radius: 4px;
  padding: 8px 10px; font-size: 11px; color: #666; line-height: 1.4;
}

/* ==============================
   Drucken-Button
   ============================== */
.print-action-btn {
  width: 100%; padding: 10px 16px; background: #4b7b81; color: white;
  border: none; border-radius: 6px; font-size: 15px; font-weight: 500;
  cursor: pointer; display: flex; align-items: center; justify-content: center;
  gap: 8px; transition: background 0.15s; font-family: inherit;
}
.print-action-btn:hover { background: #3a6268; }
.print-action-btn:disabled { background: #999; cursor: not-allowed; }
.print-action-btn.printing { background: #c0392b; }

/* ==============================
   Fortschrittsanzeige
   ============================== */
.print-progress-bar {
  height: 6px; background: #e0e0e0; border-radius: 3px;
  overflow: hidden; margin-bottom: 4px;
}
.print-progress-fill {
  height: 100%; background: #4b7b81; border-radius: 3px;
  width: 0%; transition: width 0.3s ease;
}
.print-progress-text { font-size: 11px; color: #666; overflow-wrap: anywhere !important; }
.print-progress-text a { color: #2a6068 !important; font-weight: 600 !important; }

/* ==============================
   PDF Aufträge (vereinigte Job-Liste)
   ============================== */
.print-jobs-list {
  display: flex; flex-direction: column; gap: 3px;
  max-height: 300px; overflow-y: auto;
}
/* Jeder Job: einzeilige Flex-Row */
.print-job {
  display: flex; align-items: center; gap: 5px;
  border: 1px solid #ddd; border-radius: 4px; padding: 4px 6px;
  background: #fafafa; font-size: 11px;
}
.pj-title {
  flex: 1; min-width: 0; overflow: hidden; text-overflow: ellipsis;
  white-space: nowrap; font-weight: 500; color: #333;
}
/* Titel als Download-Link */
a.pj-title.pj-dl {
  color: #2a6068; text-decoration: none; cursor: pointer;
}
a.pj-title.pj-dl:hover { text-decoration: underline; color: #4b7b81; }
.pj-meta {
  font-size: 10px; color: #888; white-space: nowrap; flex-shrink: 0;
}
/* Zähler-Badge bei mehrfachen gleichen PDFs */
.pj-count {
  flex-shrink: 0; font-size: 10px; font-weight: 600; color: white;
  background: #4b7b81; border-radius: 10px; padding: 1px 5px; line-height: 1.4;
}
/* Status-Farben */
.pj-pending { background: #fafafa; border-color: #ddd; }
.pj-processing { flex-direction: column; align-items: stretch; background: #e3f2fd; border-color: #90caf9; }
.pj-processing .pj-proc-row { display: flex; align-items: center; }
.pj-processing .pj-title { flex: 1; }
.pj-completed { background: #e8f5e9; border-color: #a5d6a7; }
.pj-failed { background: #ffebee; border-color: #ef9a9a; }
.pj-failed .pj-meta { color: #c62828; }
/* Fortschritt (nur bei processing) */
.pj-progress {
  display: flex; align-items: center; gap: 5px; margin-top: 3px;
}
.pj-progress-bar {
  flex: 1; height: 3px; background: #e0e0e0; border-radius: 2px; overflow: hidden;
}
.pj-progress-fill {
  height: 100%; background: #4b7b81; border-radius: 2px;
  width: 0%; transition: width 0.2s ease;
}
.pj-progress-text {
  font-size: 10px; color: #666; min-width: 24px; text-align: right;
}
/* Icon-Buttons (Download / Vorschau / Entfernen) */
.pj-icon {
  flex-shrink: 0; display: inline-flex; align-items: center; justify-content: center;
  width: 22px; height: 22px; border-radius: 3px; border: none;
  background: transparent; cursor: pointer; font-size: 13px; color: #666;
  text-decoration: none; padding: 0; font-family: inherit;
  transition: background 0.12s, color 0.12s;
}
.pj-icon:hover { background: #e0eeee; color: #4b7b81; }
/* Download-Icon: gefärbt und etwas breiter für bessere Erkennbarkeit */
.pj-icon-dl {
  background: #4b7b81; color: white; width: 24px; border-radius: 3px;
}
.pj-icon-dl:hover { background: #2a6068; color: white; }
.pj-icon-remove:hover { background: #fde8e8; color: #c0392b; }

/* ==============================
   Accordion (Vorschau + Downloads)
   ============================== */
.print-accordion {
  border: 1px solid #ddd; border-radius: 6px;
  margin-bottom: 10px; overflow: hidden;
  background: #fafafa;
}
.print-acc-header {
  display: flex; align-items: center; gap: 6px;
  padding: 8px 12px; cursor: pointer;
  font-size: 12px; font-weight: 600; color: #333;
  background: #f0f0f0; user-select: none;
  border-bottom: 1px solid transparent;
  transition: background 0.15s;
}
.print-acc-header:hover { background: #e8f0f0; }
.print-acc-arrow {
  display: inline-block; font-size: 10px;
  transition: transform 0.2s;
}
.print-accordion.is-open > .print-acc-header { border-bottom-color: #ddd; }
.print-accordion.is-open > .print-acc-header .print-acc-arrow {
  transform: rotate(90deg);
}
.print-acc-panel {
  max-height: 0; overflow: hidden;
  transition: max-height 0.25s ease;
  padding: 0 10px;
}
.print-accordion.is-open > .print-acc-panel {
  max-height: 1200px; padding: 10px;
}

/* ==============================
   PDF-Vorschau (iframe im Accordion)
   ============================== */
.print-preview-frame {
  width: 100%; height: 360px; border: 1px solid #ddd;
  border-radius: 4px; background: #f0f0f0;
}
.print-jobs-list + .print-preview-frame {
  margin-top: 10px;
}

/* (Job-Queue-Klassen entfernt – ersetzt durch .print-job / .pj-* oben) */

/* ==============================
   ============================== */
.print-frame-rect {
  border: 2px solid #555;
  box-shadow: 0 0 0 9999px rgba(0, 0, 0, 0.3);
  position: relative; box-sizing: content-box;
  overflow: visible;
  cursor: move;
  user-select: none;
}

/* SVG-Template-Vorschau im Druckrahmen */
.print-frame-svg-preview {
  position: absolute;
  pointer-events: none;
  user-select: none;
  -webkit-user-select: none;
}

/* ==============================
   Ecken-Handles (Drehen) + Mittelpunkt
   ============================== */
.print-corner-handle {
  position: absolute;
  width: 12px;
  height: 12px;
  background: #cc0000;
  border: 2px solid #ffffff;
  border-radius: 50%;
  box-shadow: 0 1px 4px rgba(0,0,0,0.5);
  z-index: 10;
  touch-action: none;
}
/* Cursor gibt Dreh-Richtungshinweis */
.print-corner-nw { top: -7px; left: -7px;   cursor: crosshair; }
.print-corner-ne { top: -7px; right: -7px;  cursor: crosshair; }
.print-corner-sw { bottom: -7px; left: -7px;  cursor: crosshair; }
.print-corner-se { bottom: -7px; right: -7px; cursor: crosshair; }

/* Mittelpunkt-Marker (nur visuell) */
.print-center-dot {
  position: absolute;
  width: 10px;
  height: 10px;
  background: #cc0000;
  border: 2px solid #ffffff;
  border-radius: 50%;
  box-shadow: 0 1px 4px rgba(0,0,0,0.5);
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  pointer-events: none;
  z-index: 10;
}

/* ===== INLINE-MODUS: Print-Panel im Sidebar-Akkordeon ===== */
.print-panel.print-panel-inline {
  position: static !important;
  width: 100% !important;
  height: auto !important;
  max-width: none !important;
  box-shadow: none !important;
  border: none !important;
  z-index: auto !important;
  display: flex !important;
  flex-direction: column;
}
.print-panel.print-panel-inline.hidden {
  display: flex !important; /* Im Inline-Modus nie per CSS verstecken */
}
.print-panel.print-panel-inline .print-panel-header {
  display: none !important; /* Titelbar ausblenden — Akkordeon-Summary ist der Titel */
}
.print-panel.print-panel-inline .print-panel-body {
  overflow-y: auto;
  max-height: calc(100vh - 220px);
  padding: 4px 8px;
  flex: 1;
}
/* Resize-Handle ausblenden (kein Docking) */
.print-panel.print-panel-inline .print-resize-handle {
  display: none !important;
}
