
/**
 * Projekt: GPX-Editor
 * Datei: route-style.css
 * Programmiersprache: CSS
 *  
 * Version: 1.0.10 Datum: 02.11.2025, 09:35:00 CET
 *    nur ein bisschen Optik für die Lupe 
 * Version: 1.0.9 Datum: 02.11.2025, 09:35:00 CET
 *    Sichtbarer Zustand für Toggle-Buttons der linken Toolbar 
 * Version: 1.0.8 Datum: 30.10.2025, 12:05:00 CET
 *    Standardfarben für Streckenarten (werden von localStorage überschrieben)
 * Version: 1.0.7 Datum: 30.10.2025, 11:01:00
 *    === Datei Tabs Statusfarben ===
 * Version: 1.0.7 Datum: 30.10.2025, 10:31:00
 *   Menüeintrag deaktiviert 
 * Version: 1.0.6 Datum: 30.10.2025, 9:43:00
 *    ==== Datei Tabs Statusfarben ====
 * Version: 1.0.5 Datum: 30.10.2025, 8:36:22
 *    === Linke Toolbar – States ==== 
 * Version: 1.0.3 Datum: 30.10.2025, 7:00:22
 *    GPX-Route-Editor – Tabs & Modal (Ergänzung) 
 * Version: 1.0.2 Datum: 29.10.2025, 14:00:22
 *    GPX-Route-Editor – Popup/ContextMenu Styles 
 *    aus Datei: route-ui-controller.js ausgelagert.
 * Version: 1.0.1  Datum: 17.10.2025, 12:10:00
 */

 
 /* Reset und Basis-Styles */
:root {
    --primary-color: #007bff;
    --primary-hover: #0056b3;
    --danger-color: #dc3545;
    --danger-hover: #c82333;
    --success-color: #28a745;
    --warning-color: #fd7e14;
    --border-color: #dee2e6;
    --bg-color: #f8f9fa;
    --text-color: #333;
    --text-muted: #495057;

    --z-index-dropdown: 1000;
    --z-index-toolbar: 1001;
    --z-index-context-menu: 1002;
    --z-index-modal: 1003;
    
     /* Standardfarben für Streckenarten (werden von localStorage überschrieben) */
  --route-driving:  #ff6b6b;   /* Auto */
  --route-cycling:  #00b894;   /* Rad */
  --route-walking:  #0984e3;   /* Fuß */
  --route-train:    #ff8c00;   /* Zug (Fern/Regio) */
  --route-sbahn:    #2ecc71;   /* S-Bahn */
  --route-ubahn:    #9b59b6;   /* U-Bahn */
  --route-highlight:#111111;   /* Hervorhebung/Kontur */
}

/* Dann alle Farbwerte durch die Variablen ersetzen */
*, *::before, *::after {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    font-family: Arial, sans-serif;
}

body {
    display: flex;
    flex-direction: column;
    height: 100vh;
    overflow: hidden;
}

/* Header Styles */
header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 10px 20px;
    background-color: #f5f5f5;
    border-bottom: 1px solid #ddd;
    position: fixed;
    z-index: 1111;
    width: 100%;
}


section {
    margin: 20px;
    margin-left: 50px;
}

.header-left h1 {
    font-size: 1.5rem;
}

.header-right {
    display: flex;
    align-items: center;
}

nav {
    z-index: 1000;
}

nav ul {
    display: flex;
    list-style: none;
}

nav li {
    position: relative;
    margin-right: 20px;
}

nav a {
    text-decoration: none;
    color: #333;
    padding: 5px 10px;
    display: block;
}

.dropdown-content {
    display: none;
    position: absolute;
    background-color: white;
    width: max-content;
    box-shadow: 0px 8px 16px 0px rgba(0,0,0,0.2);
    z-index: 1;
    left: 0;
    top: 100%;
    padding: .5rem;
    border: solid 1px gray;
    border-radius: .5rem;
}
 
.dropdown-content li {
    margin: 0;
    padding: 5px;
    border-bottom: 1px solid #eee;
}

.dropdown-content li:last-child {
    border: none;
}
nav button {
    white-space: nowrap;
    border: none;
    background: none;
}

nav li.dropdown:hover {
    background-color: aliceblue;
}

.dropdown:hover .dropdown-content {
    display: block;
}

.dropdown-content li.separator {
    height: 1px;
    background-color: #eee;
    margin: 5px 0;
    padding: 0;
}

kbd {
    margin-left: 1rem;
    padding: 2px 4px;
    font-size: 0.8rem;
    float: right;
    font-family: monospace;
}

.header-buttons {
    display: flex;
    margin-left: 20px;
}

.header-buttons button {
    margin-left: 10px;
    padding: 5px 10px;
    cursor: pointer;
}

/* Main Content Styles */
.main-content {
    display: flex;
    flex: 1;
    overflow: hidden;
}

/* Left Menu Styles */
/* Linke Toolbar */
.left-toolbar {
    position: fixed;
    left: 10px;
    top: 50%;
    transform: translateY(-50%);
    z-index: 1000;
    background: white;
    border-radius: 8px;
    padding: 0.5rem;
    box-shadow: 0 2px 8px rgba(0,0,0,0.15);
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
}
.left--menu {
    width: 60px;
    background-color: #f8f8f8;
    display: flex;
    flex-direction: column;
    align-items: center;
    padding: 20px 0;
    z-index: 1000;
    position: relative;
}

.left-menu ul {
    list-style: none;
    width: 100%;
}

.left-menu li {
    text-align: center;
    margin-bottom: 20px;
    position: relative;
}

.left-menu svg {
    width: 24px;
    height: 24px;
    fill: #555;
    cursor: pointer;
}

.left-menu li:hover svg {
    fill: #007bff;
}

/* Aktive Button-Hervorhebung */
.left-toolbar li.active {
    background-color: rgba(0, 123, 255, 0.1);
    border-radius: 6px;
    /* border: 0px solid #007bff; */
}

.left-toolbar li.active svg {
    filter: drop-shadow(0 0 3px #007bff);
}

/* Hover-Effekte für Toolbar */
.left-toolbar li:hover {
    background-color: rgba(0, 123, 255, 0.1);
    border-radius: 6px;
    cursor: pointer;
    transform: scale(1.05);
    transition: all 0.2s ease;
}
.tooltip {
    position: absolute;
    left: 100%;
    top: 50%;
    transform: translateY(-50%);
    background-color: #333;
    color: white;
    padding: 5px 10px;
    border-radius: 4px;
    white-space: nowrap;
    font-size: 0.8rem;
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.3s;
    margin-left: 10px;
}

.left-menu li:hover .tooltip {
    opacity: 1;
}

/* Map Styles */
.map-container {
    flex: 1;
    position: relative;    
    min-height: 100vh !important;
    z-index: 999;
}

#map {
    height: 100%;
    width: 100%;
    max-height: calc(100% - 54px);
    top: 33px; 
}

/* Waypoints Panel Styles */
.waypoints-panel {
    width: 300px;
    background-color: white;
    border-left: 1px solid #ddd;
    padding: 20px;
    display: none;
    overflow-y: auto;
}

.waypoints-panel h2 {
    margin-bottom: 15px;
    font-size: 1.2rem;
}

.waypoint-item {
    padding: 10px;
    border-bottom: 1px solid #eee;
    cursor: pointer;
}

.waypoint-item:hover {
    background-color: #f5f5f5;
}

/* Elevation Profile Styles */
.elevation-profile {
    position: absolute;
    bottom: 0;
    left: 60px;
    right: 0;
    height: 150px;
    background-color: white;
    border-top: 1px solid #ddd;
    padding: 10px;
    display: none;
}

.elevation-chart {
    width: 100%;
    height: 100%;
    background-color: #f9f9f9;
    position: relative;
}

.elevation-labels {
    position: absolute;
    left: 0;
    top: 0;
    bottom: 0;
    width: 40px;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    padding: 5px 0;
    font-size: 0.7rem;
    color: #666;
}

.distance-labels {
    position: absolute;
    left: 40px;
    right: 0;
    bottom: 0;
    height: 20px;
    display: flex;
    justify-content: space-between;
    font-size: 0.7rem;
    color: #666;
}
.leaflet-left {
    bottom: 100%;
}

.leaflet-bar a {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 34px;
  height: 34px;
  padding: 0;
  border: 1px solid #bbb;
  background: #fff;
  box-sizing: border-box;
  transition: background-color 0.2s, border-color 0.2s;
}

.leaflet-bar a:first-child:hover ,
.leaflet-bar a:nth-child(2):hover ,
.leaflet-bar a:nth-child(3):hover ,
.leaflet-bar a:nth-child(4):hover ,
.leaflet-bar a:last-child:hover {
  /* Styles nur für das erste Kind */
    color: red;
}

.leaflet-bar a:nth-child(3):hover ,
.leaflet-bar a:nth-child(4):hover ,
.leaflet-bar a:last-child {
  /* Styles nur für das letzte Kind */
  background-color: #f0f0f0;
  border-color: #0078FF;
    padding: 4.5px;
}

.leaflet-bar a:nth-child(3),
.leaflet-bar a:nth-child(4),
.leaflet-bar a:last-child {
    padding: 4.5px;
}

/* SVG bleibt zentriert, keine Veränderung auf hover */
.leaflet-bar a svg {
  display: block;
  margin: 0;
  vertical-align: middle;
  pointer-events: none;
  height: 20px;
  width: 20px;
}


/* -------------------------------------------------------------------------- */
li.dropdown {
    position: relative;
}

ul.dropdown-content {
    position: absolute;
    top: 100%;   /* direkt unter Button */
    left: 0;     /* links ausrichten, je nach Bedarf auf 50% + transform für zentriert */
    min-width: 320px;
    z-index: 700;
    display: none;
}

li.dropdown:hover ul.dropdown-content {
    display: block;
}

ul.dropdown-content.right {
    right: 0;
    left: auto;
    font-size: 13.333px;
}

/* -------------------------------------------------------------------------- */
/* Toggle-Switch als Slider mit Farbwechsel */
div.form-check {
  
  display: flex;
  align-items: center;
  
    flex-direction: row-reverse;
}
.form-check-input[type="checkbox"] {
    width: 40px;
    height: 20px;
    appearance: none;
    background-color: #f44336; /* Rot - AUS */
    outline: none;
    border-radius: 34px;
    position: relative;
    margin-left: 6px;
    transition: background 0.3s;
    cursor: pointer;
}

.form-check-input[type="checkbox"]:checked {
    background-color: #4caf50; /* Grün - EIN */
}

.form-check-input[type="checkbox"]::before {
    content: '';
    position: absolute;
    left: 4px;
    top: 4px;
    width: 12px;
    height: 12px;
    background: #fff;
    border-radius: 50%;
    transition: transform 0.3s;
}

.form-check-input[type="checkbox"]:checked::before {
    transform: translateX(16px);
}

/* -------------------------------------------------------------------------- */
select#activity-type {
    min-width: calc(100% + 0px);
}

.input-field {
    display: flex
;
    align-items: center;
    justify-content: center;
}

.input-field button,
.input-field .mic-btn {
    font-size: 1.6em;
    padding: 0;
    margin-left: 8px;
    border-radius: 8px;
    border: none;
    background: #ededed;
    cursor: pointer;
    transition: background 0.2s;
}

.input-field button:hover,
.input-field .mic-btn:hover {
    background: #d0ebff;
}

/* Aktive Zustände für Formular-Buttons */
.btn-secondary.active {
    background-color: #28a745;
    color: white;
    border-color: #28a745;
}

/* Mikrofon-Button Hover */
.mic-btn:hover {
    background-color: #ffc107;
    transform: scale(1.1);
}

/* Eingabefelder Fokus */
.input-field input:focus {
    border-color: #007bff;
    box-shadow: 0 0 0 0.2rem rgba(0, 123, 255, 0.25);
}

/* Für den + Hinzufügen Button noch kräftiger machen */
.input-field .btn-secondary {
    background: #ffc107;
    color: #333;
    font-weight: bold;
    min-width: 32px;
}


/* -------------------------------------------------------------------------- */
 /* Container für den Wegpunkt-Editor: */
#waypoint-editor {
  transition: all 0.3s ease;
  border: 2px solid transparent;
}
#waypoint-editor:target {
  border-color: #007bff;
  background-color: #f8f9fa;
}
 
 /* Container für die Eingabefelder des Wegpunktes mit Grid-Layout: */
 .container-wegpunkt {
  background: #f9fafc;
  border-radius: 10px;
  box-shadow: 0 2px 10px rgba(0,0,0,0.1);
  padding: 20px 25px;
  margin: 25px auto;
  font-family: "Segoe UI", Roboto, sans-serif;
  display: grid;
  justify-items: center;
  grid-template-columns: 25% auto 25%;
  gap: 0px 10px;
  min-width: 95%;
  box-sizing: border-box;
}

 /* Styling der Input-, Textarea- und Select-Elemente: */
 input, textarea, select {
  width: 100%;
  max-width: 300px;
  margin: 8px 0;
  padding: 10px;
  border: 2px solid #e1e1e1;
  border-radius: 5px;
  font-size: 14px;
  transition: border-color 0.3s;
}
input:focus, textarea:focus, select:focus {
  border-color: #007bff;
  outline: none;
} 
 /* Spezifische Breite für das Höhen-Eingabefeld: */
 input#wp_ele {
  width: 30%;
}
 
 /* Vollbreite für Textarea mit Klasse full-row: */
 .container-wegpunkt textarea.full-row {
  grid-column: 1 / 4;
  min-height: 90px;
  resize: vertical;
  font-family: 'Courier New', monospace;
  min-width: 100%;
}

 /* Verankerung der Button-Container rechtsbündig: */
 .button-container {
  text-align: right;
}

 /* Breite der Select-Elemente für Typ, Symbol und Richtung: */
 select#wp_type,
select#wp_sym,
select#richtung {
  width: calc(100% + 25px);
}

/* -------------------------------------------------------------------------- */
 /* Rechtsklickkontextmenü innerhalb von div.leaflet-popup-content-wrapper */
 div.leaflet-popup-content-wrapper {
    /* Gesamt-Popup */
    .leaflet-popup.custom-context-menu {
        font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
        border-radius: 8px;
        box-shadow: 0 4px 15px rgba(0, 0, 0, 0.25);
        background-color: #fff;
        color: #333;
    }

    /* Inhalt Wrapper */
    .leaflet-popup-content-wrapper {
        padding: 15px 20px;
        border-radius: 8px;
        background: linear-gradient(145deg, #f9f9f9, #e8e8e8);
        border: 1px solid #ddd;
        min-width: 280px;
        max-width: 320px;
    }

    /* Überschrift */
    .context-menu h4 {
        font-weight: 600;
        font-size: 1.2rem;
        margin-bottom: 12px;
        color: #222;
        border-bottom: 1px solid #ccc;
        padding-bottom: 6px;
    }

    /* Container für Buttons */
    .menu-items {
        display: flex;
        flex-direction: column;
        gap: 10px;
    }

    /* Buttons */
    .menu-btn {
        background-color: #f0f0f0;
        border: none;
        border-radius: 6px;
        padding: 10px 15px;
        font-size: 1rem;
        color: #444;
        cursor: pointer;
        transition: background-color 0.25s ease, box-shadow 0.25s ease;
        display: flex;
        align-items: center;
        gap: 8px;
        user-select: none;
    }

    .menu-btn:hover, 
    .menu-btn:focus {
        background-color: #0066cc;
        color: #fff;
        box-shadow: 0 0 8px rgba(0, 102, 204, 0.7);
        outline: none;
    }

    .menu-btn:active {
        background-color: #004999;
        box-shadow: inset 0 0 8px rgba(0, 73, 153, 0.9);
    }

    /* Popup-Spitze farblich abgestimmt */
    .leaflet-popup-tip {
        background: #fff;
        filter: drop-shadow(0 0 1px rgba(0,0,0,0.1));
    }

    /* Schließ-Button */
    .leaflet-popup-close-button {
        color: #666;
        font-size: 18px;
        font-weight: bold;
        text-shadow: none;
        opacity: 0.6;
        transition: opacity 0.2s ease;
    }

    .leaflet-popup-close-button:hover {
        opacity: 1;
        color: #222;
    }
 }
/* -------------------------------------------------------------------------- */

/* ===== GPX-Route-Editor – Popup/ContextMenu Styles ===== * 
 * 
 * aus Datei: route-ui-controller.js ausgelagert.
 */
 
/* Kontextmenü (Rechtsklick) */
.leaflet-popup.custom-context-menu .leaflet-popup-content {
  padding: 12px 16px;
  min-width: 260px;
}
.context-menu .ctx-title {
  font-weight: 600;
  font-size: 1.05rem;
  margin: 0 0 8px;
}
.context-menu .menu-items {
  display: flex;
  flex-direction: column;
  gap: 8px;
}
.context-menu .menu-btn {
  background: #f4f6f9;
  border: 1px solid #d5dde5;
  border-radius: 8px;
  padding: 10px 12px;
  font: 14px/1.2 system-ui, sans-serif;
  cursor: pointer;
  transition: background .2s, border-color .2s, box-shadow .2s;
  text-align: left;
}
.context-menu .menu-btn:hover {
  background: #e7f1ff;
  border-color: #90c3ff;
  box-shadow: 0 0 0 3px rgba(0,123,255,.2);
}

/* Sprechblase mit Koordinaten */
.leaflet-popup.coords-popup .leaflet-popup-content {
  padding: 12px 16px;
  min-width: 260px;
}
.coords-bubble {
  font: 14px/1.35 system-ui, sans-serif;
}
.coords-title {
  font-weight: 700;
  margin: 0 0 6px;
}
.coords-text {
  font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, "Liberation Mono", monospace;
  letter-spacing: 0.2px;
  margin-bottom: 8px;
}
.coords-copy {
  display: inline-block;
  border: 1px solid #d5dde5;
  background: #f8fafc;
  padding: 6px 10px;
  border-radius: 6px;
  font: 13px/1.1 system-ui, sans-serif;
  cursor: pointer;
  transition: background .2s, border-color .2s, box-shadow .2s;
}
.coords-copy:hover {
  background: #eef6ff;
  border-color: #a5cfff;
  box-shadow: 0 0 0 3px rgba(0,123,255,.15);
}
.coords-msg {
  margin-top: 6px;
  font-size: 13px;
  color: #4e5a66;
}
.coords-msg.ok { color: #28a745; }
.coords-msg.warn { color: #c98900; }

/* Etwas sanftere Schatten für Leaflet-Popups */
.leaflet-popup-content-wrapper,
.leaflet-popup-tip {
  filter: drop-shadow(0 4px 12px rgba(0,0,0,.18));
}

/* -------------------------------------------------------------------------- */

/* ====== GPX-Route-Editor – Tabs & Modal (Ergänzung) ====== */

/* Header-Layout verbessern: Titel + Tabs in einer Reihe */
.header-left {
  display: flex;
  align-items: center;
  gap: 12px;
}

/* Tabs-Container (hängen direkt hinter dem H1) */
.route-tabs {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  align-items: center;
  margin-left: 12px;
}

.route-tabs-empty {
  opacity: 0.7;
  margin-left: 8px;
  font-size: 0.9rem;
}

/* Einzelner Tab-Button */
.route-tab {
  appearance: none;
  border: 1px solid var(--border-color, #cfd4da);
  background: #fff;
  color: var(--text-color, #333);
  padding: 4px 10px;
  border-radius: 8px;
  font-size: 0.9rem;
  cursor: pointer;
  transition: background .15s, border-color .15s, box-shadow .15s;
}
.route-tab:hover {
  background: #f4f8ff;
  border-color: #9ec5fe;
  box-shadow: 0 1px 4px rgba(0,0,0,0.06);
}
.route-tab.is-active {
  background: #e7f1ff;
  border-color: #5aa2ff;
  box-shadow: 0 1px 4px rgba(31, 120, 255, 0.18);
  font-weight: 600;
}

/* -------- Modal-Dialog (Name für „Neu“) -------- */
.route-modal-overlay {
  position: fixed; inset: 0;
  background: rgba(0,0,0,0.35);
  display: grid;
  place-items: center;
  z-index: var(--z-index-modal, 1003);
}

.route-modal {
  width: min(92vw, 420px);
  background: #fff;
  border-radius: 12px;
  padding: 16px 16px 12px;
  box-shadow: 0 10px 40px rgba(0,0,0,0.25);
  border: 1px solid var(--border-color, #dee2e6);
}
.route-modal-title {
  font-size: 1.1rem;
  font-weight: 700;
  margin-bottom: 8px;
  color: var(--text-color, #333);
}
.route-modal-label {
  display: block;
  font-size: 0.9rem;
  color: var(--text-muted, #495057);
  margin-bottom: 6px;
}
.route-modal-input {
  width: 100%;
  padding: 10px 12px;
  border: 2px solid #e6e6e6;
  border-radius: 8px;
  font-size: 0.95rem;
  outline: none;
  transition: border-color .15s, box-shadow .15s;
}
.route-modal-input:focus {
  border-color: var(--primary-color, #007bff);
  box-shadow: 0 0 0 3px rgba(0,123,255,.15);
}
.route-modal-actions {
  display: flex;
  justify-content: flex-end;
  gap: 8px;
  margin-top: 12px;
}
.route-modal .btn {
  padding: 8px 12px;
  border-radius: 8px;
  border: 1px solid #cfd4da;
  background: #f8f9fa;
  cursor: pointer;
  font-weight: 600;
}
.route-modal .btn-primary {
  background: var(--primary-color, #007bff);
  color: #fff;
  border-color: var(--primary-color, #007bff);
}

.route-modal-actions span {
    font-size: .8rem;
    font-family: system-ui;
}

.btn-primary, .btn-secondary {
    display: flex;
    width: 130px;
    justify-content: space-around;
}

.route-modal .btn-primary:hover { filter: brightness(0.95); }
.route-modal .btn-secondary:hover { background: #eef3f7; }

/* Optional: kleine Optimierung der Leaflet-Leiste, damit Tabs nicht kollidieren */
.leaflet-top.leaflet-left { margin-top: 54px; }

/* -------------------------------------------------------------------------- */

/* ===== Linke Toolbar – States ===== */
.left-toolbar.left-menu button,
.left-toolbar.left-menu .tool-btn {
  transition: opacity .15s, filter .15s, background-color .15s, border-color .15s;
}

.left-toolbar.left-menu .is-disabled {
  opacity: .45;
  filter: grayscale(0.4);
  pointer-events: none;   /* verhindert Klicks */
}

.left-toolbar.left-menu .is-active {
  outline: none;
  box-shadow: 0 0 0 3px rgba(0, 123, 255, .16);
  border-color: var(--primary-color, #007bff);
  background: rgba(0, 123, 255, .08);
}
/* ===== Linke Toolbar – States (Buttons & Links) ===== */
.left-toolbar.left-menu button,
.left-toolbar.left-menu a,
.left-toolbar.left-menu [role="button"] {
  transition: opacity .15s, filter .15s, background-color .15s, border-color .15s;
}

.left-toolbar.left-menu .is-disabled {
  opacity: .45;
  filter: grayscale(0.4);
  pointer-events: none;         /* blockt Klicks für alle (auch <a>) */
  cursor: default !important;
}

.left-toolbar.left-menu .is-active {
  outline: none;
  box-shadow: 0 0 0 3px rgba(0, 123, 255, .16);
  border-color: var(--primary-color, #007bff);
  background: rgba(0, 123, 255, .08);
}

/* -------------------------------------------------------------------------- */

/* ================= Datei Tabs Statusfarben ================= */
.route-tabs { align-items: center; }
.route-tab {
  appearance: none;
  border: 1px solid #d0d5db;
  background: #f8fafc;      /* inaktiv: hellgrau */
  color: #374151;
  padding: 4px 10px;
  border-radius: 8px;
  font: 500 14px/1.2 system-ui, sans-serif;
  cursor: pointer;
  transition: box-shadow .15s, transform .05s, background .15s, border-color .15s;
  box-shadow: 0 1px 0 rgba(0,0,0,.03);
}
.route-tab + .route-tab { margin-left: 6px; }
.route-tab:hover { transform: translateY(-1px); }

/* Inaktive Tabs (nicht .is-active) bleiben dezent grau */
.route-tab:not(.is-active) {
  opacity: .7;
  filter: grayscale(20%);
}

/* Aktiver Tab-Basis */
.route-tab.is-active {
  opacity: 1;
  filter: none;
  box-shadow: 0 2px 10px rgba(0,0,0,.08);
}

/* Aktiver, leerer Tab ? GRAU */
.route-tab.is-active.is-empty {
  background: #e5e7eb;
  border-color: #d1d5db;
  color: #4b5563;
  box-shadow: inset 0 0 0 1px rgba(0,0,0,.04);
}

/* Aktiver, geändert (ungespeichert) ? ORANGE */
.route-tab.is-active.is-modified {
  background: #fff7ed;        /* orange-hell */
  border-color: #fb923c;
  color: #9a3412;
  box-shadow: 0 0 0 2px rgba(251, 146, 60, .25), 0 2px 10px rgba(251,146,60,.15);
}

/* Aktiver, gespeichert ? GRÜN */
.route-tab.is-active.is-saved {
  background: #ecfdf5;        /* grün-hell */
  border-color: #34d399;
  color: #065f46;
  box-shadow: 0 0 0 2px rgba(52, 211, 153, .25), 0 2px 10px rgba(16,185,129,.15);
}

/* Inaktive Tabs leicht „entfärben“ */
.route-tab:not(.is-active).is-empty    { background:#f3f4f6; color:#6b7280; }
.route-tab.is-active.is-empty { color: lightslategray;  background-color: unset; }

.route-tab:not(.is-active).is-modified { background:#fff7ed; color:#c2410c; opacity:.85; }
.route-tab:not(.is-active).is-saved    { background:#ecfdf5; color:#047857; opacity:.85; }

/* Fokus und Tastatur-Navigation */
.route-tab:focus-visible {
  outline: 2px solid #2563eb;
  outline-offset: 2px;
}

/* -------------------------------------------------------------------------- */
/* ================= Datei Tabs Statusfarben ================= */
.route-tab { 
  background:#eef0f3; color:#111827; border:0; padding:.35rem .6rem; border-radius:.6rem;
}
.route-tab:not(.is-active) { opacity:.7; filter: saturate(.7); }
.route-tab.is-active { opacity:1; filter:none; box-shadow: 0 0 0 2px rgba(0,0,0,.08) inset; }
.route-tab.is-empty { background:#f3f4f6; color:#6b7280; }
.route-tab.is-modified { background:#fff7ed; color:#92400e; }
.route-tab.is-saved { background:#e7ffe7; color:#065f46; }

/* -------------------------------------------------------------------------- */

/* Modal-Breite für Farbdialog wiederverwenden */

/**
 * Projekt: GPX-Route-Editor
 * Datei: route-style.css (Erweiterung Linienstil-Dialog)
 * Programmiersprache: CSS
 * Version: 1.0.2
 * Datum: 31.10.2025, 23:05:00 CET
 * Änderungen (durch KI):
 * - Neue Styles für den Linienstil-Dialog (ls-* Namensraum), ohne Einfluss auf bestehendes Layout.
 * - Responsive Grid für Zeilen, Buttons, Inputs.
 * - Vorschau-Bar mit drei Layern (oben/mitte/unten), reine Positionierung – Farben/Breiten setzt JS.
 */

/* ========================= Linienstil-Dialog (ls-*) ========================= */

.ls-overlay {
  position: fixed;
  inset: 0;
  background: rgba(0,0,0,.25);
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 10000;
}

.ls-modal {
  background: #fff;
  border-radius: 12px;
  width: fit-content;
  max-height: 90vh;
  display: flex;
  flex-direction: column;
  box-shadow: 0 20px 60px rgba(0,0,0,.25);
  outline: none;
}

.ls-header { 
    padding: 14px 16px 6px;
    display: flex;
    align-items: flex-end;
    justify-content: space-between;
  }
  
.ls-title  { font-size: 1.2rem; font-weight: 700; }
.ls-sub    { color: #6b7280; font-size: 0.9rem; }

.ls-toolbar {
  display: flex;
  gap: 8px;
  align-items: center;
  padding: 8px 12px;
  border-top: 1px solid #eef2f7;
  border-bottom: 1px solid #eef2f7;
}

.ls-hidden { display: none !important; }

.ls-body   { padding: 6px 12px 10px; overflow: auto; }
.ls-footer { padding: 10px 12px; display: flex; justify-content: flex-end; gap: 8px; border-top: 1px solid #eef2f7; }

.ls-btn {
  appearance: none;
  border: 1px solid #cbd5e1;
  border-radius: 10px;
  padding: 9px 14px;
  cursor: pointer;
  font-weight: 600;
  background: #fff;
}

.ls-btn-primary { 
    background: #4caf50; 
    color: #fff; 
    border-color: #1d4ed8; 
    display: flex;
    width: 150px;
    justify-content: space-between;
}
    
.ls-btn-secondary { 
    display: flex;
    width: 150px;
    justify-content: space-between;
}

.ls-btn-primary:hover   { filter: brightness(1.05); }
.ls-btn-secondary:hover { background: #f2f4f7; }
.ls-btn-tertiary        { background: burlywood; }
.ls-btn-tertiary:hover  { background: #eef2f7; }

.ls-row {
  display: table-row-group;
  align-items: start;
  padding: 10px 2px;
}
.ls-label    { font-weight: 600; color: #374151; padding-top: 6px; }
.ls-controls { display: flex; flex-wrap: wrap; gap: 8px; align-items: center; }

.ls-num, .ls-text, .ls-sel, .ls-color {
  height: 24px;
  border: 1px solid #cbd5e1;
  border-radius: 8px;
  padding: 0 4px;
}
.ls-num   { 
    width: 44px; 
    text-align: right;
}

.ls-text  { width: 120px; }
.ls-sel   { max-width: fit-content; }
.ls-color { 
    width: 22px; 
    padding: 0;
    border-radius: unset;
}

.ls-sep { border: 0; height: 1px; background: #eef2f7; margin: 4px 0; }

.ls-preview { width: 100%; padding: 10px 2px 0; }
.ls-preview-bar {
  position: relative;
  height: 40px;
  border: 1px solid #eef2f7;
  border-radius: 8px;
  background: #fafafa;
  overflow: hidden;
}

/* Drei Layer – Positionierung erfolgt hier;
   Farben/Breiten setzt das JS via Inline-Styles. */
.ls-preview-bar .ls-casing-top,
.ls-preview-bar .ls-line,
.ls-preview-bar .ls-casing-bottom {
  position: absolute;
  left: 10px;
  right: 10px;
  transform: translateY(-50%);
}

/* Vertikale Positionen */
.ls-preview-bar .ls-casing-top    { top: 25%; }
.ls-preview-bar .ls-line          { top: 50%; }
.ls-preview-bar .ls-casing-bottom { top: 75%; }

.ls-btn span {
    font-size: .8rem;
    font-family: system-ui;
}
/* Responsive */
@media (max-width: 700px) {
  .ls-row { grid-template-columns: 1fr; }
  .ls-label { padding-top: 0; }
}


/* Zwangsschließen der Dropdown-Menüs, z.B. wenn ein Modal offen ist */
.menu-force-hide .dropdown-content { display: none !important; }

/* -------------------------------------------------------------------------- */

/* Sichtbarer Zustand für Toggle-Buttons der linken Toolbar */
.left-toolbar li.is-active {
  background: rgba(0,123,255,0.12);
  border-radius: 8px;
  box-shadow:
    0 0 0 2px rgba(0,123,255,0.25) inset,
    0 4px 12px rgba(0,0,0,0.15);
  transform: scale(1.02);
}
.left-toolbar li.is-active svg {
  filter: drop-shadow(0 0 3px rgba(0,123,255,.6));
}

/* Deaktiviert bleibt eindeutig „ausgraut“ */
.left-toolbar li.is-disabled {
  opacity: .45;
  filter: grayscale(40%);
  pointer-events: none;
}

/* -------------------------------------------------------------------------- */
  /* nur ein bisschen Optik für die Lupe */
  .leaflet-magnifying-glass {
    border: 2px solid rgba(0,0,0,.6);
    box-shadow: 0 0 0 2px rgba(255,255,255,.7) inset;
  }
  .leaflet-control-lens-toggle {
    background: #fff;
    border: 1px solid #bbb;
    width: 34px; height: 34px;
    display: grid; place-items: center;
    cursor: pointer;
  }

/* -------------------------------------------------------------------------- */
/* -------------------------------------------------------------------------- */
/* -------------------------------------------------------------------------- */
 /* Reset und Basis-Styles */