/* ===== BASE STYLES ===== */
/* Reset und grundlegende Definitionen */

:root {
    --header-height: 50px;
    --primary-color: #8B0000;
    --primary-color-rgb: 139, 0, 0;
    --primary-hover: #B22222;
    --sidebar-width: 320px;
    --sidebar-min-width: 280px;
    --sidebar-max-width: 500px;

    /* Ergebnistabellen — ein Satz Werte für ALLE Tabellen des Clients
       (Abfrage, Attributtabelle, Editiertabelle). Siehe doku/styleguide.md.
       Wer eine neue Tabelle baut, nimmt diese Variablen statt eigener Farben. */
    --table-font-size: 12px;
    --table-cell-padding: 5px 10px;
    --table-head-bg: #f5f5f5;
    --table-head-color: #444;
    --table-head-line: #ddd;          /* 2px-Linie unter der Kopfzeile */
    --table-line: #eee;               /* Zeilen- und Spaltentrenner */
    --table-row-hover: #fafafa;
    --table-action-size: 20px;        /* Knopf in der Aktionsspalte */
    --table-action-bg: #666;
    --table-action-bg-hover: #444;
    --table-action-bg-active: #333;

    /* Schlüssel/Wert-Tabellen (Abfrage-Detailansicht 2D und 3D) */
    --table-kv-font-size: 12px;
    --table-kv-cell-padding: 4px 8px;
    --table-zebra: #f8f8f8;         /* jede zweite Zeile */

    /* Werkzeugleiste über einer Tabelle (Blättern, Zeilenzahl, Filter) */
    --toolbar-bg: #fafafa;
    --toolbar-text: #555;
}
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: Arial, sans-serif;
    font-size: 14px;
    line-height: 1.4;
    background-color: #f5f5f5;
    overflow: hidden;
}

#app {
    height: 100vh;
    display: flex;
    flex-direction: column;
}

/* Grundlegende Utilities */
.hidden {
    display: none !important;
}

.loading {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0,0,0,0.5);
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    z-index: 9999;
    color: white;
}

.spinner {
    width: 40px;
    height: 40px;
    border: 4px solid rgba(255,255,255,0.3);
    border-top: 4px solid white;
    border-radius: 50%;
    animation: spin 1s linear infinite;
    margin-bottom: 15px;
}

@keyframes spin {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}

/* Error Messages */
.error-message {
    font-weight: 500;
    box-shadow: 0 4px 12px rgba(0,0,0,0.3);
    border: 1px solid #cc0000;
}

/* Scrollbar Styling */
::-webkit-scrollbar {
    width: 6px;
}

::-webkit-scrollbar-track {
    background: #f1f1f1;
    border-radius: 3px;
}

::-webkit-scrollbar-thumb {
    background: #c1c1c1;
    border-radius: 3px;
}

::-webkit-scrollbar-thumb:hover {
    background: #a8a8a8;
}
/* Nur für Screenreader: unsichtbar, aber im Accessibility Tree vorhanden (Skill netgis-barrierefreiheit).
   Für Statuszeile (aria-live) und versteckte Beschriftungen — NICHT display:none, das entfernt das
   Element auch für Hilfstechnologien. */
.sr-only {
    position: absolute !important;
    width: 1px !important;
    height: 1px !important;
    padding: 0 !important;
    margin: -1px !important;
    overflow: hidden !important;
    clip: rect(0, 0, 0, 0) !important;
    white-space: nowrap !important;
    border: 0 !important;
}
