/*
Purpose:
- Standardstil für die Webseite 'hoehendaten.de'.

Releases:
- v1.0.0 - 2025-05-25: initial release
- v1.1.0 - 2025-10-18: improvements

Copyright:
- © 2025 | Klaus Tockloth

License:
- MIT License

Description:
- NN
*/

html,
body {
  height: 100%;
  margin: 0;
  padding: 0;
  font-family: sans-serif;
  font-size: 1rem;
  line-height: 1.3;
  color: #333;
  background-color: #fff;
  display: flex;
  flex-direction: column;
  min-height: 100vh;
}

.container {
  max-width: 100%;
  margin: 0em;
  padding-top: 0em;
  padding-left: 1em;
  padding-right: 1em;
  padding-bottom: 0em;
  background-color: #fff;
}

.container img {
  max-width: 100%;
  height: auto;
  display: block;
  border: 1px solid lightgray;
}

.container .img-special-size {
  width: auto;
  max-width: 149px;
  height: auto;
  border: 0;
}

hr {
  border: 0;
  border-top: 1px solid #ccc;
  margin-top: 0.5em;
  margin-bottom: 0.5em;
}

h2,
h3,
h4 {
  color: #555;
  margin-top: 0.5em;
  margin-bottom: 0.5em;
}

p {
  margin-top: 0.5em;
  margin-bottom: 0.5em;
}

ul, ol {
  margin-left: 0;
  padding-left: 1em;
  list-style-position: outside;
}

ul ul,
ul ol,
ol ul,
ol ol {
  margin-left: 0;
  padding-left: 1em;
}

.table-responsive {
  overflow-x: auto;
  margin-bottom: 1em;
}

table {
  border-collapse: collapse;
  margin-top: 10px;
}

table,
th,
td {
  border: 1px solid #ddd;
}

th,
td {
  padding: 6px;
  text-align: left;
}

th {
  background-color: #f9f9f9;
}

.map-container {
  max-width: 100%;
  margin: 0;
  padding: 0;
  background-color: #fff;
  overflow: hidden;
  flex-grow: 1;
  display: flex;
  flex-direction: column;
}

#map {
  height: 100vh;
  width: 100%;
}

.section-box {
  margin-bottom: 20px;
  padding: 15px;
  border: 1px solid #ddd;
  background-color: #f9f9f9;
  border-radius: 5px;
}

.input-group {
  margin-bottom: 10px;
  display: flex;
  align-items: center;
}

.input-group label {
  display: inline-block;
  width: 100px;
  font-weight: bold;
  text-align: left;
  flex-shrink: 0;
}

.input-group input[type="file"],
.input-group input[type="text"],
.input-group input[type="number"],
.input-group select {
  padding: 8px;
  border: 1px solid #ccc;
  border-radius: 4px;
  flex-grow: 1;
  box-sizing: border-box;
}

.button-section {
  text-align: center;
}

#queryButton {
  padding: 12px 25px;
  background-color: #007bff;
  color: white;
  border: none;
  border-radius: 5px;
  cursor: pointer;
  font-size: 1.1em;
  transition: background-color 0.3s ease;
}

#queryButton:hover {
  background-color: #0056b3;
}

.output-section h3 {
  margin-top: 0;
  color: #555;
}

#results {
  margin-top: 5px;
  margin-bottom: 5px;
  box-sizing: border-box;
  width: 100%;
}

#results> :first-child {
  margin-top: 0;
}

#results.loading {
  border-color: #007bff;
  color: #007bff;
}

#results .status-message {
  font-weight: bold;
  display: block;
  margin-bottom: 10px;
  padding-bottom: 10px;
  border-bottom: 1px solid #ddd;
}

#results .download-link-area {
  margin-top: 10px;
  margin-bottom: 0;
  padding-top: 10px;
  padding-bottom: 0;
}

#results .download-link-area a {
  color: #007bff;
  text-decoration: none;
  font-weight: bold;
  display: block;
  margin-bottom: 0;
  padding-top: 10px;
  border-top: 1px solid #ddd;
}

#results .download-link-area a:hover {
  text-decoration: underline;
}

#results.error pre {
  background-color: #f9f9f9;
  border-color: red;
  color: #333;
}

pre {
  background-color: #f9f9f9;
  font-family: monospace;
  color: darkred;
  overflow-x: auto;
  overflow-y: auto;
  font-size: 0.8em;
}

pre.request {
  color: darkred;
}

pre.response {
  color: green;
}

h3.request,
h4.request {
  color: darkred;
}

h3.response,
h4.response {
  color: green;
}

nav {
  background-color: #f9f9f9;
  position: relative;
  z-index: 1001; /* Ein Wert, der höher ist als der der Leaflet-Karte und eigener Controls. */
}

nav ul {
  list-style: none;
  padding: 0;
  margin: 0;
  background: #f9f9f9;
  border-bottom: 1px solid #ccc;
  overflow: visible;
}

nav ul li {
  display: inline-block;
  position: relative;
}

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

nav ul li a:hover {
  background-color: #ddd;
}

nav ul li.dropdown .dropbtn {
  display: block;
  padding: 5px 10px;
  text-decoration: none;
  color: #333;
  cursor: pointer;
}

nav ul li.dropdown .dropbtn:hover {
  background-color: #ddd;
}

nav ul .dropdown-content {
  display: none;
  position: absolute;
  background-color: #f9f9f9;
  /* min-width: 160px; */
  white-space: nowrap; 
  box-shadow: 0px 8px 16px 0px rgba(0, 0, 0, 0.2);
  z-index: 1;
  list-style: none;
  padding-top: 2px;
  padding-bottom: 2px;
  margin: 0;
}

nav ul .dropdown-content li {
  float: none;
  display: block;
  width: 100%;
  border-bottom: 1px solid #ddd;
}

nav ul .dropdown-content li:last-child {
  border-bottom: none;
}

nav ul .dropdown-content li a {
  color: black;
  padding: 5px 10px;
  text-decoration: none;
  display: block;
  text-align: left;
  width: auto;
}

nav ul .dropdown-content li a:hover {
  background-color: #f1f1f1;
}

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

.input-section h3 {
  margin-top: 0;
}

.input-group select {
  width: 100%;
  padding: 8px;
  border: 1px solid #ccc;
  box-sizing: border-box;
  margin-bottom: 5px;
}

.input-group input[type="number"],
.input-group input[type="text"] {
  width: 100%;
  padding: 8px;
  border: 1px solid #ccc;
  box-sizing: border-box;
}

.results-table {
  background-color: #fff;
  width: 100%;
  border-collapse: collapse;
  margin-top: 10px;
  table-layout: fixed;
}

.results-table th,
.results-table td {
  border: 1px solid #ddd;
  padding: 8px;
  text-align: left;
  white-space: normal;
  overflow: visible;
  text-overflow: clip;
  word-break: break-word;
}

.results-table th:first-child,
.results-table td:first-child {
  width: 30%;
}

.results-table th:nth-child(2),
.results-table td:nth-child(2) {
  width: 70%;
}

.copyright {
  text-align: center;
  color: #777;
  font-size: 0.8em;
}

button {
  padding: 8px 12px;
  border: none;
  background-color: #007bff;
  color: white;
  border-radius: 4px;
  cursor: pointer;
  font-size: 14px;
  margin-right: 10px;
}

button:hover {
  background-color: #0056b3;
}

.config-section {
  background-color: #f8f9fa;
  border: 1px solid #dee2e6;
  border-radius: 5px;
  padding: 15px;
  margin: 25px 0;
}

.config-section label {
  font-weight: bold;
  margin-right: 10px;
}

#color-table td:first-child input {
  width: 4em;
}

#color-table tbody tr td:nth-child(1) input {
  width: 100px;
  min-width: 100px;
  box-sizing: border-box;
}

.color-comparison-box {
  width: 150px;
  height: 36px;
  border: 1px solid #ccc;
  margin: auto;
  display: block;
  border-radius: 4px;
}

#output-container {
  margin-top: 30px;
}

#header-comment {
  width: 100%;
  box-sizing: border-box;
}

input[data-colorpicker] {
  cursor: pointer;
}

textarea {
  padding: 8px;
  border: 1px solid #ccc;
  border-radius: 4px;
}
