/* Allgemeine Stile */
html, body {
        height: 100%;
        margin: 0;
}

.container {
        display: flex;
        height: 100%;
}

#controls {
        width: 220px;
        padding: 10px;
        box-sizing: border-box;
        background: #cccccc;
        overflow-y: auto;
        border-right: 1px solid #ccc;
        font-family: Arial, sans-serif;
        font-size: 0.9em;
        position: relative;
        display: flex;
        flex-direction: column;
        justify-content: space-between; /* Wichtig für Platzverteilung */
}
#footerInfo {
        margin-top: auto;
        padding: 10px;
        font-size: 1.0em;
        color: #777;
        text-align: left;
}
#footerContainer {
        position: relative;
        margin-top: auto;
        padding: 10px 0;
}

#map {
        flex-grow: 1;
        height: 100%;
}

/* Bandgruppen */
.bandGroup {
        margin-bottom: 20px;
        border-bottom: 1px solid #ccc;
}
.bandHeader {
        font-weight: bold;
        cursor: pointer;
        margin-bottom: 5px;
        user-select: none;
}
.bandHeader::after {
        content: " \25BC"; /* ▼ */
        font-size: 0.8em;
        float: right;
        transition: transform 0.3s ease;
}
.bandHeader.collapsed::after {
        content: " \25B6"; /* ▶ */
}
table.bandsTable {
        border-collapse: collapse;
        width: 100%;
}
table.bandsTable th, table.bandsTable td {
        padding: 4px 8px;
        vertical-align: middle;
        text-align: left;
        border-bottom: 1px solid #ddd;
}
table.bandsTable th {
        background-color: #A8A8A8; 
}
table.bandsTable th:first-child {
    border-top-left-radius: 8px;
    border-bottom-left-radius: 8px;
}
table.bandsTable th:last-child {
    border-top-right-radius: 8px;
    border-bottom-right-radius: 8px;
}

/* Labels und Eingabeelemente */
label {
        display: flex;
        align-items: center;
        gap: 4px;
        user-select: none;
        cursor: pointer;
}
label img {
        width: 20px;
        height: 20px;
}
label:hover {
        color: #007BFF; /* Blau bei Hover */
}
input[type="checkbox"] {
        width: 18px;
        height: 18px;
        cursor: pointer;
}
select.dropdown {
        width: 90%;
        font-size: 0.85em;
        cursor: pointer;
}
input.colorPicker {
        width: 80%;
        height: 15px;
        border: none;
        padding: 0;
        cursor: pointer;
        background: none;
}
input[type="color"]:focus {
        outline: 2px solid #006699;
}

/* Locator-Label */
.locator-label {
        font-size: 8px;
        font-family: Arial, sans-serif;
        background-color: rgba(255, 255, 255, 0.7);
        padding: 2px;
        border-radius: 4px;
        text-align: center;
        color: rgba(255, 0, 0, 0.6);
}

/* Modales Fenster */
.modal {
        display: none; /* Standardmäßig versteckt */
        position: fixed;
        top: 50%;
        left: 50%;
        transform: translate(-50%, -50%);
        width: 80%;
        max-width: 650px; /* Maximalbreite für große Bildschirme */
        max-height: 90vh; /* Begrenze Höhe auf 90% der Viewport-Höhe */
        overflow: hidden; /* Kein Scrollen im ganzen Modal, nur im Inhalt */
        background: white;
        border: 1px solid #ccc;
        box-shadow: 0 4px 8px rgba(0, 0, 0, 0.3);
        padding: 20px;
        z-index: 1000;
        border-radius: 8px;
        overflow: hidden;
        transition: width 0.3s ease, transform 0.2s ease;
}
.modal-header {
        text-align: center;
        font-size: 1.5rem;
        margin-bottom: 20px;
}
.modal-content {
        margin-bottom: 20px;
        max-height: 60vh; /* Höhe für den scrollbaren Bereich */
        overflow-y: auto; /* Vertikales Scrollen erlauben */
}
.modal-footer {
        display: flex;
        justify-content: flex-end;
        margin-top: 10px;
}

/* Modal Overlay */
.modal-overlay {
        display: none; /* Standardmäßig versteckt */
        position: fixed;
        top: 0;
        left: 0;
        width: 100%;
        height: 100%;
        background: rgba(0, 0, 0, 0.5); /* Halbtransparenter Hintergrund */
        z-index: 999;
}
.close {
        position: absolute;
        right: 20px;
        top: 10px;
        font-size: 24px;
        cursor: pointer;
}
/* Datei-Upload */
.file-upload {
    display: flex;
    flex-direction: column;
    gap: 10px;
}
.file-upload-row {
    display: flex;
    align-items: center;
    gap: 10px;
}
.myGrid-container {
  display: grid;
  grid-template-columns: max-content auto 1fr;
  grid-column-gap: 12px;
  align-items: center;
  margin-bottom: 0.5em;
}
.info-box {
    border: 1px solid orange;
    background-color: #fff3cd;
    color: #856404;
    padding: 10px 15px;
    border-radius: 5px;
    margin-top: 10px;
    display: flex;
    align-items: start;
    gap: 10px;
    font-size: 0.95em;
}
.info-box::before {
    content: "⚠️";
    font-size: 1.2em;
    line-height: 1.4em;
}
.error-box {
    border: 1px solid red;
    background-color: #f8d7da;
    color: #721c24;
}
.error-box::before {
    content: "❌";
    font-size: 1.2em;
    line-height: 1.4em;
}


/* Label Haupt: max-content (Breite so groß wie nötig), Zeilenumbruch per word-break */
.myGrid_label_main {
  font-weight: bold;
  white-space: normal;
  word-break: break-word;
  max-width: 130px; /* optional, max Breite */
}

/* Input: ca. 10 Zeichen breit */
#myGrid {
  width: 10ch;
  padding: 5px;
  border: 1px solid #7d7d7d;
  border-radius: 4px;
  transition: border-color 0.2s, box-shadow 0.2s;
}
/* Fokus blau */
#myGrid:focus {
  border-color: #007BFF;
  outline: none;
  box-shadow: 0 0 3px #007BFF;
}
/* Info-Label nimmt den restlichen Platz */
.myGrid_label_info {
  font-size: 0.85em;
  color: #555;
  white-space: normal;
  word-break: break-word;
}


.hidden-file-input {
        opacity: 0;
        position: absolute;
        z-index: -1;
}
.file-name {
        font-size: 0.9rem;
        color: #555;
}

/* Marker-Liste */
.marker-container {
        display: flex;
        flex-wrap: wrap;
        gap: 10px;
        justify-content: center;
}

.icon-picker-img {
        width: 40px;
        height: 40px;
        cursor: pointer;
        border: 2px solid transparent;
        transition: border 0.3s ease;
}
.icon-picker-img:hover {
        border: 2px solid #006699;
}

/* Buttons */
button {
        padding: 10px 10px;
        font-size: 1em;
        border-radius: 6px;
        cursor: pointer;
        transition: background-color 0.3s ease, transform 0.2s ease;
        border: none;
        width: auto;          /* <<< WICHTIG: nicht volle Breite */
        max-width: 100%;      /* falls der Text lang wird */
        display: inline-block; /* verhindert Stretching bei flex */
        align-self: flex-start;
}
button.primary {
        background-color: #006699;
        color: white;
}
button.primary:hover {
        background-color: #0056b3;
        transform: scale(1.05);
}
button.primary:active {
        background-color: #003f7f;
        transform: scale(0.95);
}
button.secondary {
        background-color: #f8f9fa;
        color: #333;
        border: 1px solid #ccc;
}
button.secondary:hover {
        background-color: #e2e6ea;
        transform: scale(1.05);
}
button.secondary:active {
        background-color: #d6d8db;
        transform: scale(0.95);
}

/* Versteckte Elemente */
.hidden {
        display: none;
}
#lineToggleHeader {
        display: none;
}

h3 {
    font-size: 1em;
}
                        
 

                        
/* Maker PopUp*/   
:where(.leaflet-popup-content) table td.w10a {
    font-size: 8pt !important;
    font-family: Arial !important;
    padding: 2px !important;
    line-height: 10px !important;
    overflow: hidden !important;
    white-space: nowrap !important;
    text-overflow: ellipsis !important;

}
:where(.leaflet-popup-content) table td.w10h {
    font-size: 8pt !important;
    font-family: Arial !important;
    padding: 2px !important;
    background-color: #d0d0d0 !important;
    line-height: 12px !important;
}
.leaflet-popup-content-wrapper,
.leaflet-popup-content {
  width: auto !important;
  max-width: none !important;
}
.nowrap-text {
    white-space: nowrap;
    display: inline-block;
}

/*Buttons oben auf der Karte*/
.GMAButtonNew {
	background-color: #006699 !important;
	color: white !important;
	padding: 6px 14px;
	border: none;
	border-radius: 6px;
	margin: 6px 4px;
	font-size: 1em;
	cursor: pointer;
	transition: background-color 0.2s ease;

	z-index: 999;
}
.GMAButtonNew:hover {
    transform: scale(1.03);
    filter: brightness(1.1);
}
.GMAButtonNew:active {
    transform: scale(0.96);
    filter: brightness(0.95);
}
input[type="checkbox"].GMAButtonNew {
    transform: scale(0.8);
    vertical-align: middle;
    margin-right: 0.3em;
}


#style-switcher {
  position: absolute;
  top: 10px;
  right: 10px;
  background: white;
  padding: 6px;
  border-radius: 6px;
  z-index: 999;

  display: flex;         /* Hiermit werden die Buttons nebeneinander */
  gap: 6px;              /* Abstand zwischen den Buttons */
  align-items: center;   /* Optional: vertikale Ausrichtung */
}

#meinePos_Box {
        font-size: 16px;
        padding-top: 5px;
        padding-bottom: 20px;
}
#meinePos {
    width: 100px;
    height: 10px;
    padding: 10px;
    font-size: 16px;
    border: 2px solid #ccc;
    border-radius: 5px;
    box-shadow: 2px 2px 5px rgba(0, 0, 0, 0.2);
    color: #333;
    background-color: #f9f9f9;
    font-family: Arial, sans-serif;
}
#meinePos:focus {
    border-color: #007bff;
    outline: none;
    box-shadow: 0 0 8px #007bff;}

/*Spinner beim Hochladen*/
.spinner {
  display: inline-block;
  width: 16px;
  height: 16px;
  border: 2px solid #ccc;
  border-top: 2px solid #333;
  border-radius: 50%;
  animation: spin 0.6s linear infinite;
  margin-right: 8px;
  vertical-align: middle;
}
@keyframes spin {
  0% { transform: rotate(0deg); }
  100% { transform: rotate(360deg); }
}

/*language Switcher*/
#languageSwitcher {
    font-family: Arial, sans-serif;
	display: flex;
    align-items: center; 	/* Label und Dropdown vertikal zentrieren */
    gap: 8px; 				/* Abstand zwischen Label und Dropdown */
    width: 80%; 			/* Breite an Layout anpassen */
}

#languageSwitcher label {
    margin-right: 0px;
}

#languageSelect {
    flex-grow: 1; /* Dropdown passt sich flexibel an die verfügbare Breite an */
    height: 30px;
    padding: 5px;
    border: 1px solid #ccc;
    border-radius: 5px;
    font-size: 14px;
}

/*Trennlinie*/
.divider {
    border: none; 	/* Entfernt die Standardlinie */
    border-top: 1px solid #333; /* Erstellt eine horizontale Linie */
    margin: 10px 0; /* Abstand oben und unten */
    width: 100%; 	/* Füllt die Breite des Containers aus */
}