/* ===== MAP STYLES ===== */

#map-container {
    flex: 1;
    position: relative;
    overflow: hidden;
    transform: translateZ(0);
    will-change: transform;
    height: calc(100vh - var(--header-height));
}

.map {
    width: 100%;
    height: 100%;
    touch-action: pan-x pan-y pinch-zoom;
}

/* Karte ist fokussierbar (Tastatur-Navigation). Rahmen nur bei
   Tastatur-Fokus (Tab), nicht nach einem Mausklick. */
.map:focus {
    outline: none;
}
.map:focus-visible {
    outline: 2px solid var(--primary-color, #0066cc);
    outline-offset: -2px;
}

/* ===== MAP CONTROLS ===== */

/* Controls Container rechts unten - über dem Footer und dataCopyright */
.map-controls {
    position: absolute;
    bottom: 55px; /* Platz für Footer + dataCopyright */
    right: 8px;
    z-index: 1500; /* Unter Footer (1600) aber über Karte */
    display: flex;
    flex-direction: row;
    align-items: flex-end;
    gap: 10px;
    /* Container selbst soll keine Touch-Events blockieren */
    pointer-events: none;
}

/* Buttons innerhalb des Containers sollen klickbar sein */
.map-controls > * {
    pointer-events: auto;
}

/* Maßstab und Maßstabsleiste Container - links neben Icons */
.scale-container {
    display: flex;
    flex-direction: column;
    gap: 8px;
    align-items: flex-end;
    order: 1;
}

/* Controls und Zoom in einer vertikalen Gruppe rechts */
.controls-wrapper {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 4px;
    order: 2;
}

/* Maßstab Selector */
.scale-selector {
    position: relative;
    background: rgba(255, 255, 255, 0.95);
    border-radius: 4px;
    padding: 4px 6px;
    box-shadow: 0 2px 8px rgba(0,0,0,0.1);
    border: 1px solid #ddd;
}

/* Dropdown für Maßstab */
.scale-dropdown {
    border: none;
    background: transparent;
    padding: 2px 4px;
    font-size: 12px;
    font-weight: 600;
    color: #333;
    cursor: text;
    width: 92px;
}

/* Eigene Maßstabs-Auswahlliste: erscheint beim Fokus sofort komplett, öffnet
   nach oben (Controls sitzen unten rechts), eng gesetzt. */
.scale-options {
    list-style: none;
    margin: 0 0 4px 0;
    padding: 4px 0;
    position: absolute;
    bottom: 100%;
    right: 0;
    min-width: 100%;
    background: #fff;
    border: 1px solid #ddd;
    border-radius: 4px;
    box-shadow: 0 -4px 12px rgba(0,0,0,0.15);
    max-height: 320px;
    overflow-y: auto;
    z-index: 2000;
}

.scale-options li {
    padding: 3px 12px;
    font-size: 12px;
    line-height: 1.35;
    font-weight: 600;
    color: #333;
    cursor: pointer;
    white-space: nowrap;
}

.scale-options li:hover {
    background: var(--primary-color, #8B0000);
    color: #fff;
}

.scale-dropdown:hover {
    color: var(--primary-color, #8B0000);
}

.scale-dropdown:focus {
    outline: none;
}

/* Expandiertes Dropdown mit size-Attribut */
.scale-dropdown[size] {
    position: absolute;
    bottom: 100%;
    right: 0;
    background: white;
    border: 1px solid #ddd;
    border-radius: 4px;
    box-shadow: 0 -4px 12px rgba(0,0,0,0.15);
    max-height: 400px;
    overflow-y: auto;
    z-index: 1000;
}

/* Erste Option (aktueller Maßstab) hervorheben */
.scale-dropdown option:first-child {
    font-weight: 700;
    color: #333;
}

/* Trennlinie */
.scale-dropdown option:disabled {
    color: #999;
}

/* Alte scale-line-container (Fallback) */
.scale-line-container {
    background: rgba(255, 255, 255, 0.95);
    border-radius: 4px;
    padding: 6px 10px;
    box-shadow: 0 2px 8px rgba(0,0,0,0.1);
    border: 1px solid #ddd;
    font-size: 11px;
    color: #333;
    font-weight: 500;
    white-space: nowrap;
}

/* Maßstabsleiste */
.scale-bar {
    background: rgba(255, 255, 255, 0.95);
    border-radius: 4px;
    padding: 8px 10px;
    box-shadow: 0 2px 8px rgba(0,0,0,0.1);
    border: 1px solid #ddd;
    display: flex;
    flex-direction: column;
    align-items: flex-end;
    min-width: 120px;
}

.scale-bar-line {
    border-bottom: 2px solid #333;
    border-left: 2px solid #333;
    border-right: 2px solid #333;
    height: 8px;
    position: relative;
    background: transparent;
    margin-bottom: 4px;
}

.scale-bar-text {
    font-size: 10px;
    color: #333;
    font-weight: 500;
    text-align: right;
}

/* Controls Group - ohne Hintergrund wie sgdn_3d */
.controls-group {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 4px;
}

/* Einheitliche Control-Buttons im sgdn_3d Style - OHNE Rahmen */
.map-control-btn {
    width: 40px;
    height: 40px;
    background: #fff;
    border: none;
    border-radius: 6px;
    color: var(--primary-color);
    font-size: 17px;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.2s;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.15);
}

.map-control-btn:hover {
    background: var(--primary-color);
    color: #fff;
    transform: scale(1.08);
}

.map-control-btn:active {
    transform: scale(0.95);
}

.map-control-btn.active {
    background: var(--primary-color);
    color: #fff;
}

.map-control-btn.loading {
    background: rgba(255, 255, 255, 0.9);
    color: var(--primary-color);
    animation: pulse 1.5s infinite;
}

@keyframes pulse {
    0%, 100% {
        opacity: 1;
        transform: scale(1);
    }
    50% {
        opacity: 0.8;
        transform: scale(1.05);
    }
}

/* Control Icons mit Font Awesome */
.control-icon {
    font-size: 18px;
    line-height: 1;
    user-select: none;
}

.map-control-btn:hover .control-icon {
    /* Icon-Skalierung über Button-Transform */
}

/* GPS Loading Animation */
.map-control-btn.loading .control-icon.fa-spinner {
    animation: fa-spin 1s infinite linear;
}

/* Fokus-Styles - kein Rahmen wie sgdn_3d */
.map-control-btn:focus {
    outline: none;
}

/* Disabled State */
.map-control-btn:disabled {
    background: #f0f0f0;
    color: #aaa;
    cursor: not-allowed;
    transform: none;
    box-shadow: 0 1px 4px rgba(0, 0, 0, 0.1);
}

.map-control-btn:disabled:hover {
    transform: none;
    background: #f0f0f0;
    color: #aaa;
}

/* OpenLayers Control Overrides */
.ol-zoom {
    display: none; /* Versteckt da wir eigene Controls haben */
}

.ol-scale-line {
    display: none; /* Versteckt da wir eigenen Maßstab haben */
}

.ol-attribution {
    max-width: calc(100% - 250px);
    font-size: 11px;
    bottom: 3px;
    left: 3px; /* Links positioniert */
    /* Nur Attribution-Button soll klickbar sein, nicht das ganze Panel */
    pointer-events: none;
}

/* Attribution-Inhalte (Button und Links) sollen klickbar sein */
.ol-attribution * {
    pointer-events: auto;
}

.ol-attribution.ol-uncollapsible {
    bottom: 3px;
    left: 3px;
}

/* Tooltips: Native title-Attribute werden verwendet (keine CSS-Pseudo-Elemente) */

/* ============================================
   OVERVIEW MAP (Übersichtskarte)
   ============================================ */
#overviewMap {
    position: absolute;
    top: calc(var(--header-height) + 10px);
    right: 10px;
    width: 220px;
    height: 180px;
    background: #fff;
    border-radius: 8px;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.3);
    z-index: 1000;
    display: none;
    overflow: hidden;
}

#overviewMap.visible {
    display: block;
}

/* Overview Modal - kein Padding, Karte füllt komplett */
#modal_overviewMap .modal-body {
    padding: 0;
    position: relative;
    height: 180px;
    overflow: hidden;
}

#modal_overviewMap #overviewMapContainer {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    width: 100%;
    height: 100%;
}

#modal_overviewMap .overview-controls {
    position: absolute;
    bottom: 8px;
    left: 8px;
    z-index: 1001;
}

#btnCloseOverview {
    position: absolute;
    top: 5px;
    right: 5px;
    width: 24px;
    height: 24px;
    background: rgba(255, 255, 255, 0.9);
    border: none;
    border-radius: 4px;
    color: var(--primary-color);
    font-size: 12px;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 1001;
    box-shadow: 0 1px 4px rgba(0, 0, 0, 0.2);
}

#btnCloseOverview:hover {
    background: var(--primary-color);
    color: #fff;
}

/* Overview Zoom Controls */
.overview-controls {
    position: absolute;
    bottom: 8px;
    left: 8px;
    display: flex;
    flex-direction: column;
    gap: 4px;
    z-index: 1001;
}

.overview-controls button {
    width: 26px;
    height: 26px;
    background: rgba(255, 255, 255, 0.95);
    border: none;
    border-radius: 4px;
    color: var(--primary-color);
    font-size: 12px;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: 0 1px 4px rgba(0, 0, 0, 0.2);
    transition: all 0.2s;
}

.overview-controls button:hover {
    background: var(--primary-color);
    color: #fff;
}

/* OpenLayers Overrides für Übersichtskarte */
#overviewMapContainer .ol-zoom,
#overviewMapContainer .ol-attribution {
    display: none;
}

/* ============================================
   LEGENDE
   ============================================ */
.legend-content {
    padding: 4px;
    overflow-y: auto;
}

.legend-content table {
    width: 100%;
    border-collapse: collapse;
    font-size: 12px;
}

.legend-content td {
    padding: 2px 4px;
    vertical-align: middle;
}

.legend-content td.Legtext {
    padding-left: 8px;
}

.legend-content img {
    display: block;
}

/* Farbpunkt fuer Eintraege, die ein Modul ueber LegendManager.registerProvider()
   beisteuert (z.B. gewaehlte Arten der Artenanalyse). Gleiche Hoehe wie die
   Symbolgrafiken darueber, damit die Zeilen nicht springen. */
.legend-content .legend-swatch {
    display: inline-block;
    width: 13px;
    height: 13px;
    border-radius: 50%;
    border: 1px solid rgba(0, 0, 0, 0.35);
    vertical-align: middle;
}

/* Symbole fuer Vektor-Ebenen (geojson/wfs): aus config.style gebaut, weil es
   fuer solche Ebenen kein Legendenbild vom Server gibt. Gleiche Hoehe wie die
   uebrigen Symbole, damit die Zeilen nicht springen. */
.legend-content .legend-swatch-rect {
    display: inline-block;
    width: 15px;
    height: 11px;
    box-sizing: border-box;
    vertical-align: middle;
}

.legend-content .legend-swatch-line {
    display: inline-block;
    width: 15px;
    height: 0;
    vertical-align: middle;
}

.legend-content .legend-sublabel {
    color: #666;
    font-style: italic;
}

/* Einheitliche Symbolhöhe: Mapserver-Klassen-, Header- und POI-Icons (direkte
   <img> in der Zelle) auf 15px begrenzen — gleiche Höhe wie die WMS-Symbole
   (.legend-icon-rect / .lt-legend-icon-crop). WMS-Icons liegen in <span>-
   Containern und sind hiervon nicht betroffen. */
.legend-content td > img {
    height: 15px;
    width: auto;
    max-width: 40px;
}

/* Mehrklassige WMS-Legende: komplette GetLegendGraphic-Grafik (mit eingebetteten
   Klassenwerten) statt Einzelsymbol. Höher spezifisch als die 15px-Regel oben,
   sonst würde das volle Bild auf 15px Höhe gequetscht. */
.legend-content td.legend-wms-full {
    padding: 4px 4px 8px;
}
.legend-content td.legend-wms-full > img {
    display: block;
    height: auto;
    width: auto;
    max-width: 100%;
    margin-top: 2px;
}
.legend-wms-full-name {
    font-size: 12px;
    color: #333;
    margin-bottom: 2px;
}

.legend-empty,
.legend-loading,
.legend-error {
    padding: 16px;
    text-align: center;
    color: #888;
    font-size: 13px;
}

.legend-error {
    color: #c00;
}

/* ============================================
   TOOLS PANEL
   ============================================ */
.tools-panel {
    position: absolute;
    top: calc(var(--header-height) + 10px);
    right: 10px;
    min-width: 180px;
    background: #fff;
    border-radius: 8px;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.25);
    z-index: 1100;
    display: none;
    overflow: hidden;
}

.tools-panel.visible {
    display: block;
    animation: toolsSlideIn 0.2s ease-out;
}

@keyframes toolsSlideIn {
    from {
        opacity: 0;
        transform: translateY(-10px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.tools-panel-header {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 12px 15px;
    background: var(--primary-color);
    color: #fff;
    font-weight: 600;
    font-size: 14px;
}

.tools-panel-header i:first-child {
    font-size: 16px;
}

.tools-close-btn {
    margin-left: auto;
    background: none;
    border: none;
    color: #fff;
    cursor: pointer;
    padding: 4px;
    font-size: 14px;
    opacity: 0.8;
    transition: opacity 0.2s;
}

.tools-close-btn:hover {
    opacity: 1;
}

.tools-grid {
    padding: 8px;
    display: flex;
    flex-direction: column;
    gap: 4px;
}

.tool-item {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 12px 14px;
    background: transparent;
    border: none;
    border-radius: 6px;
    cursor: pointer;
    font-size: 14px;
    color: #333;
    font-weight: 500;
    transition: all 0.2s;
    text-align: left;
}

.tool-item:hover {
    background: rgba(var(--primary-color-rgb), 0.08);
    color: var(--primary-color);
}

.tool-item:active {
    transform: scale(0.98);
}

.tool-item i {
    font-size: 18px;
    width: 24px;
    text-align: center;
    color: var(--primary-color);
}

/* ============================================
   ABFRAGE (PUFFER) — MODAL-INHALT
   ============================================ */
.buffer-query-body {
    display: flex;
    flex-direction: column;
    gap: 1px;
    padding: 2px 2px 0;
}

.buffer-query-field {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 8px;
    padding: 2px 6px 7px;
    border-bottom: 1px solid #eee;
    margin-bottom: 4px;
}

.buffer-query-field label {
    font-size: 13px;
    color: #555;
    font-weight: 500;
}

.buffer-query-input-wrap {
    display: flex;
    align-items: center;
    gap: 4px;
}

.buffer-query-field input {
    width: 70px;
    padding: 4px 7px;
    border: 1px solid #ccc;
    border-radius: 5px;
    font-size: 14px;
    text-align: right;
}

/* Spinner-Pfeile ausblenden (Erhöhen/Erniedrigen entfällt) */
.buffer-query-input::-webkit-outer-spin-button,
.buffer-query-input::-webkit-inner-spin-button {
    -webkit-appearance: none;
    margin: 0;
}
.buffer-query-input {
    -moz-appearance: textfield;
    appearance: textfield;
}

.buffer-query-geom-label {
    font-size: 11.5px;
    color: #888;
    font-weight: 500;
    padding: 0 6px 2px;
}

.buffer-query-hint {
    font-size: 11px;
    color: #888;
    padding: 5px 6px 0;
    line-height: 1.35;
}

.buffer-query-hint i {
    color: var(--primary-color);
    margin-right: 4px;
}

.buffer-query-clear {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 24px;
    height: 26px;
    padding: 0;
    border: 1px solid #ccc;
    border-radius: 5px;
    background: #f5f5f5;
    color: #666;
    cursor: pointer;
    font-size: 12px;
}

.buffer-query-clear:hover {
    background: #e8e8e8;
    color: #c0392b;
}

.buffer-query-item {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 6px 8px;
    background: transparent;
    border: none;
    border-radius: 6px;
    cursor: pointer;
    font-size: 13.5px;
    color: #333;
    font-weight: 500;
    text-align: left;
    width: 100%;
}

.buffer-query-item:hover {
    background: rgba(var(--primary-color-rgb), 0.08);
    color: var(--primary-color);
}

/* Gewaehltes Werkzeug: bleibt sichtbar markiert, solange gezeichnet wird. */
.buffer-query-item.is-active {
    background: rgba(var(--primary-color-rgb), 0.12);
    color: var(--primary-color);
}

/* Zoom auf die Abfragegeometrie — gleiche Zeilenoptik wie die Werkzeuge,
   aber durch eine feine Linie davon abgesetzt (kein Zeichenwerkzeug). */
.buffer-query-zoom {
    margin-top: 8px;
    padding-top: 8px;
    border-top: 1px solid #e5e5e5;
    border-radius: 0;
    font-size: 12px;
    color: #666;
}
.buffer-query-zoom i {
    font-size: 12.5px;
}
/* Folgt direkt auf einen anderen Zusatz-Eintrag: keine zweite Trennlinie. */
.buffer-query-zoom-follow {
    margin-top: 0;
    padding-top: 4px;
    border-top: none;
}

.buffer-query-item i {
    font-size: 14px;
    width: 18px;
    text-align: center;
    color: var(--primary-color);
}

/* ============================================
   PRINT PANEL (Sidebar-Style für Karteninteraktion)
   ============================================ */
.print-panel {
    position: fixed;
    top: 70px;
    right: 20px;
    width: 300px;
    max-height: calc(100vh - 100px);
    background: #fff;
    border-radius: 8px;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.25);
    z-index: 1500;
    display: none;
    flex-direction: column;
    overflow: hidden;
}

.print-panel.visible {
    display: flex;
}

.print-panel-header {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 12px 16px;
    background: var(--primary-color);
    color: #fff;
    font-weight: 600;
    font-size: 14px;
    flex-shrink: 0;
}

.print-panel-header i:first-child {
    font-size: 16px;
}

.print-panel-body {
    padding: 14px;
    overflow-y: auto;
    flex: 1;
}

/* Tabs: PDF Druck / Bild Export */
.print-tabs {
    display: flex;
    flex-shrink: 0;
    background: #f4f6f8;
    border-bottom: 1px solid #e2e6ea;
}

.print-tab {
    flex: 1;
    padding: 10px 8px;
    border: none;
    background: transparent;
    color: #555;
    font-size: 12.5px;
    font-weight: 600;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 6px;
    border-bottom: 2px solid transparent;
    transition: color 0.15s, border-color 0.15s, background 0.15s;
}

.print-tab:hover {
    background: #eaeef2;
    color: #333;
}

.print-tab.active {
    color: var(--primary-color);
    border-bottom-color: var(--primary-color);
    background: #fff;
}

.print-tab i {
    font-size: 13px;
}

.print-tab-pane {
    display: none;
}

.print-tab-pane.active {
    display: block;
}

/* Legacy Modal Styles */
.print-modal {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    z-index: 2000;
    display: none;
    align-items: center;
    justify-content: center;
}

.print-modal.visible {
    display: flex;
}

.print-modal-overlay {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.5);
}

.print-modal-content {
    position: relative;
    width: 380px;
    max-width: 90%;
    background: #fff;
    border-radius: 8px;
    box-shadow: 0 10px 40px rgba(0, 0, 0, 0.3);
    z-index: 1;
    overflow: hidden;
}

.print-modal-header {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 15px 20px;
    background: var(--primary-color);
    color: #fff;
    font-weight: 600;
    font-size: 16px;
}

.print-modal-header i:first-child {
    font-size: 18px;
}

.print-close-btn {
    margin-left: auto;
    background: none;
    border: none;
    color: #fff;
    cursor: pointer;
    padding: 4px;
    font-size: 16px;
    opacity: 0.8;
    transition: opacity 0.2s;
}

.print-close-btn:hover {
    opacity: 1;
}

.print-modal-body {
    padding: 20px;
}

.print-form-group {
    margin-bottom: 15px;
}

.print-form-group label {
    display: block;
    margin-bottom: 6px;
    font-weight: 500;
    font-size: 13px;
    color: #333;
}

.print-select,
.print-textarea {
    width: 100%;
    padding: 10px 12px;
    border: 1px solid #ddd;
    border-radius: 6px;
    font-size: 14px;
    outline: none;
    transition: border-color 0.2s;
    box-sizing: border-box;
}

.print-select:focus,
.print-textarea:focus {
    border-color: var(--primary-color);
}

.print-textarea {
    resize: vertical;
    min-height: 70px;
}

.print-char-counter {
    display: block;
    text-align: right;
    font-size: 11px;
    color: #999;
    margin-top: 4px;
}

.print-scale-hint {
    display: block;
    font-size: 11px;
    color: #666;
    margin-top: 4px;
    font-style: italic;
}

.print-scale-info {
    background: #f0f7ff;
    border: 1px solid #cce0ff;
    border-radius: 5px;
    padding: 8px 10px;
    margin: 8px 0;
    font-size: 11px;
    color: #2c5282;
    line-height: 1.4;
}

.print-scale-info i {
    margin-right: 5px;
    color: #3182ce;
}

.print-scale-info strong {
    color: #1a365d;
}

.print-input {
    width: 100%;
    padding: 8px 10px;
    border: 1px solid #ddd;
    border-radius: 5px;
    font-size: 13px;
    transition: border-color 0.2s;
}

.print-input:focus {
    outline: none;
    border-color: var(--primary-color);
}

.print-custom-scale-group {
    margin-top: -5px;
}

/* Kompaktere Styles für Panel */
.print-panel .print-form-group {
    margin-bottom: 12px;
}

.print-panel .print-select,
.print-panel .print-textarea {
    padding: 8px 10px;
    font-size: 13px;
}

.print-panel .print-textarea {
    min-height: 50px;
}

.print-panel .print-form-group label {
    font-size: 12px;
    margin-bottom: 4px;
}

.print-actions {
    margin-top: 15px;
}

.print-btn {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    width: 100%;
    padding: 12px 20px;
    border: none;
    border-radius: 6px;
    font-size: 14px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.2s;
}

.print-btn-primary {
    background: var(--primary-color);
    color: #fff;
}

.print-btn-primary:hover {
    background: var(--primary-hover);
}

.print-btn-primary:disabled {
    background: #ccc;
    cursor: not-allowed;
}

.print-btn i {
    font-size: 16px;
}

/* ============================================
   APP FOOTER
   ============================================ */
.app-footer {
    position: fixed;
    bottom: 0;
    left: 0;
    right: 0;
    background: rgba(245, 245, 245, 0.95);
    border-top: 1px solid #ddd;
    z-index: 1600; /* Über Sidebar (1500) */
    padding: 5px 15px;
    font-size: 11px;
    backdrop-filter: blur(5px);
    -webkit-backdrop-filter: blur(5px);
    display: flex;
    align-items: center;
}

.footer-content {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 15px;
    flex-wrap: wrap;
    flex: 1;
}

.footer-copyright {
    color: #666;
    text-decoration: none;
}

a.footer-copyright:hover {
    color: var(--primary-color);
}

.footer-links {
    display: flex;
    align-items: center;
    gap: 6px;
}

.footer-links a {
    color: #555;
    text-decoration: none;
    padding: 2px 8px;
    border-radius: 3px;
    transition: all 0.2s;
    font-size: 11px;
}

.footer-links a:hover {
    color: var(--primary-color);
    background: rgba(0, 0, 0, 0.05);
}

.footer-separator {
    color: #bbb;
    font-size: 10px;
}

/* Info-Button im Footer */
.footer-info-btn {
    background: none;
    border: none;
    color: #999;
    cursor: pointer;
    font-size: 14px;
    padding: 2px 5px;
    transition: color 0.2s;
    line-height: 1;
    margin-left: auto;
    flex-shrink: 0;
}
.footer-info-btn:hover {
    color: var(--primary-color);
}

/* NETGIS Info Modal */
.netgis-info-overlay {
    display: none;
    position: fixed;
    top: 0; left: 0; right: 0; bottom: 0;
    background: rgba(0, 0, 0, 0.5);
    z-index: 10000;
    align-items: center;
    justify-content: center;
}
.netgis-info-overlay.active {
    display: flex;
}
.netgis-info-modal {
    background: #fff;
    border-radius: 12px;
    padding: 35px 40px;
    text-align: center;
    max-width: 360px;
    width: 90%;
    position: relative;
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.3);
}
.netgis-info-close {
    position: absolute;
    top: 10px; right: 15px;
    background: none;
    border: none;
    font-size: 22px;
    color: #999;
    cursor: pointer;
    line-height: 1;
}
.netgis-info-close:hover {
    color: #333;
}
.netgis-info-logo {
    margin-bottom: 15px;
}
.netgis-info-logo img {
    max-height: 40px;
    width: auto;
}
.netgis-info-modal h3 {
    margin: 0 0 5px;
    font-size: 18px;
    font-weight: 600;
    color: #333;
}
.netgis-info-version {
    display: block;
    font-size: 12px;
    color: #888;
    margin-bottom: 4px;
}
.netgis-info-build {
    display: block;
    font-size: 10px;
    color: #aaa;
    margin-bottom: 18px;
    font-family: 'Consolas', 'Monaco', monospace;
}
.netgis-info-link {
    display: inline-block;
    color: var(--primary-color);
    text-decoration: none;
    font-size: 13px;
    font-weight: 500;
    padding: 6px 16px;
    border: 1px solid var(--primary-color);
    border-radius: 6px;
    transition: all 0.2s;
}
.netgis-info-link:hover {
    background: var(--primary-color);
    color: #fff;
}

/* Logout-Bereich im Footer */
.logout-area {
    position: absolute;
    right: 15px;
    display: flex;
    align-items: center;
    gap: 8px;
}

.logout-area .user-name {
    color: #888;
    font-size: 11px;
}

.logout-area .logout-link {
    color: #999;
    text-decoration: none;
    display: flex;
    align-items: center;
    gap: 4px;
    font-size: 11px;
    transition: color 0.2s;
}

.logout-area .logout-link:hover {
    color: var(--primary-color);
}

/* ============================================
   LANGUAGE SELECTOR
   ============================================ */
.language-selector {
    display: flex;
    align-items: center;
    gap: 5px;
    color: #666;
    margin-left: 10px;
}

.language-selector .fa-globe {
    font-size: 12px;
    color: #888;
}

.language-selector select {
    background: transparent;
    border: 1px solid #ccc;
    border-radius: 3px;
    padding: 2px 6px;
    font-size: 11px;
    color: #555;
    cursor: pointer;
    outline: none;
    transition: border-color 0.2s, color 0.2s;
}

.language-selector select:hover {
    border-color: #999;
    color: #333;
}

.language-selector select:focus {
    border-color: var(--primary-color);
}

/* ============================================
   DATA COPYRIGHT (über der Karte, rechts unten)
   ============================================ */
#dataCopyright {
    position: absolute;
    bottom: 32px;
    right: 10px;
    font-size: 10px;
    color: #444;
    background: rgba(255, 255, 255, 0.75);
    padding: 2px 6px;
    border-radius: 3px;
    z-index: 999;
    max-width: calc(100vw - 320px);
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

#dataCopyright a {
    color: #555;
    text-decoration: none;
    transition: color 0.2s;
}

#dataCopyright a:hover {
    color: var(--primary-color);
}

/* ============================================
   ABFRAGE EINSTELLUNGEN (im ModalManager)
   ============================================ */
.query-settings-body {
    padding: 12px;
}

.query-settings-group {
    margin-bottom: 12px;
}

.query-settings-group label {
    display: block;
    font-size: 12px;
    font-weight: 600;
    color: #444;
    margin-bottom: 5px;
}

/* Autozoom-Schalter ganz oben: Checkbox und Text nebeneinander statt
   untereinander (die generische Regel oben setzt display:block). */
.query-settings-group.qs-autozoom-group {
    padding-bottom: 10px;
    border-bottom: 1px solid #eee;
}

.query-settings-group .qs-autozoom-label {
    display: flex;
    align-items: center;
    gap: 8px;
    font-weight: 500;
    margin-bottom: 0;
    cursor: pointer;
}

.query-settings-group .qs-autozoom-label input {
    margin: 0;
    cursor: pointer;
    flex: none;
}

.qs-searchable-list-wrap {
    display: flex;
    flex-direction: column;
    gap: 4px;
}

.qs-search-row {
    display: flex;
    gap: 6px;
    align-items: center;
}

.qs-search-input {
    flex: 1;
    font-size: 12px;
    border: 1px solid #ccc;
    border-radius: 4px;
    padding: 6px 10px;
    background: #fff;
    outline: none;
    transition: border-color 0.2s, box-shadow 0.2s;
}

.qs-search-input:focus {
    border-color: var(--primary-color, #007acc);
    box-shadow: 0 0 0 2px rgba(0, 120, 212, 0.12);
}

.qs-search-input::placeholder {
    color: #aaa;
}

.qs-checkbox-list {
    max-height: 160px;
    overflow-y: auto;
    border: 1px solid #ccc;
    border-radius: 4px;
    background: #fff;
    padding: 4px 0;
}

.qs-checkbox-item {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 5px 10px;
    cursor: pointer;
    font-size: 12px;
    color: #333;
    transition: background 0.15s;
    border-radius: 2px;
    margin: 0 3px;
}

.qs-checkbox-item:hover {
    background: #edf2ff;
}

.qs-checkbox-item input[type="checkbox"] {
    width: 15px;
    height: 15px;
    margin: 0;
    flex-shrink: 0;
    accent-color: var(--primary-color, #007acc);
    cursor: pointer;
}

.qs-checkbox-item span {
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
    line-height: 1.4;
    padding-top: 1px;
}

.query-settings-clear-btn {
    background: #f0f0f0;
    border: 1px solid #ccc;
    border-radius: 4px;
    cursor: pointer;
    padding: 4px 8px;
    color: #666;
    font-size: 13px;
    flex-shrink: 0;
    margin-top: 1px;
}

.query-settings-clear-btn:hover {
    background: #e0e0e0;
    color: #333;
}

.query-settings-hint {
    font-size: 11px;
    color: #888;
    line-height: 1.5;
    padding: 8px 0 0;
    border-top: 1px solid #eee;
}

.query-settings-hint i {
    color: var(--primary-color, #007acc);
}