html, body {
  /* Verhindert Double-Tap-Zoom, erlaubt aber normales Scrollen und Pinch-Zoom */
  touch-action: manipulation;
}

body {
  margin: 0;
  font-family: Arial, sans-serif;
  background-color: #F5F5F5;
}

.topnav {
  overflow: hidden;
  background-color: #333;
}

.topnav a {
  float: left;
  display: block;
  color: #f2f2f2;
  text-align: center;
  padding: 14px 16px;
  text-decoration: none;
  font-size: 17px;
  border-radius: 10px;
}

.active {
  background-color: #004080 !important;
  color: white !important;
}

.topnav .icon {
  display: none;
}

.dropdown {
  float: left;
  overflow: hidden;
}

.dropdown .dropbtn {
  font-size: 17px;    
  border: none;
  outline: none;
  color: white;
  padding: 14px 16px;
  background-color: inherit;
  font-family: inherit;
  margin: 0;
}

.dropdown-content {
  display: none;
  position: absolute;
  background-color: #f9f9f9;
  min-width: 160px;
  box-shadow: 0px 8px 16px 0px rgba(0,0,0,0.2);
  z-index: 1000;
}

.dropdown-content a {
  float: none;
  color: black;
  padding: 12px 16px;
  text-decoration: none;
  display: block;
  text-align: left;
}

.topnav a:hover, .dropdown:hover .dropbtn {
  background-color: #555;
  color: white;
}

.dropdown-content a:hover {
  background-color: #ddd;
  color: black;
}

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

@media screen and (max-width: 600px) {
  .topnav a:not(:first-child), .dropdown .dropbtn {
    display: none;
  }
  .topnav a.icon {
    float: right;
    display: block;
  }
}

@media screen and (max-width: 600px) {
  .topnav.responsive {position: relative;}
  .topnav.responsive .icon {
    position: absolute;
    right: 0;
    top: 0;
  }
  .topnav.responsive a {
    float: none;
    display: block;
    text-align: left;
  }
  .topnav.responsive .dropdown {float: none;}
  .topnav.responsive .dropdown-content {position: relative;}
  .topnav.responsive .dropdown .dropbtn {
    display: block;
    width: 100%;
    text-align: left;
  }
}

input[type=submit], button {
  background-color: #004080; 
  border: none;
  color: white;
  padding: 10px;
  text-align: center;
  text-decoration: none;
  display: inline-block;
  font-size: 16px;
  margin: 4px 2px;
  cursor: pointer;
  border-radius: 10px;
  transition-duration: 0.4s;
}

input[type=submit]:hover {
  background-color: #1e90ff;
  color: white;
}

input[type=text], [type=password], [type=date], select, textarea {
  padding: 8px;
  margin: 8px 0;
  display: inline-block;
  border: 1px solid #ccc;
  border-radius: 4px;
  box-sizing: border-box;
  color: black;
}

label {
  display: block;
}

.header-control {
    display: flex;
    justify-content: space-between; 
    align-items: center; 
}

.header-text {
    font-weight: bold;
    font-size: 1.3em;
    color: #333;
}

.header-nav a {
    white-space: nowrap; 
	font-weight: bold;
    font-size: 2.5em;
	text-decoration: none !important;
}

.dashboard {
	display: grid;
	grid-template-columns: repeat(auto-fill, minmax(120px, 1fr));
	grid-auto-flow: dense;
	gap: 10px;
	padding-top: 10px;
}

.data-box {
	border: 2px solid #fff; 
	border-radius: 8px;
	padding: 10px;
	background-color: #ffffff;
	grid-column: span 1;
	grid-row: span 1;
}

.data-box2 {
	border: 2px solid #fff; 
	border-radius: 8px;
	padding: 10px;
	background-color: #ffffff;
	grid-column: span 2;
	grid-row: span 1;
}

.data-box-map-small {
	border: 2px solid #fff; 
	border-radius: 8px;
	padding: 10px;
	background-color: #ffffff;
	grid-column: span 2;
	grid-row: span 2;
}

.data-box-map-small .leaflet-container {
	height: 256px;
	width: 256px;
}

.data-box-map-large {
	border: 2px solid #fff; 
	border-radius: 8px;
	padding: 10px;
	background-color: #ffffff;
	grid-column: span 3;
	grid-row: span 3;
}

.data-box-map-large .leaflet-container {
	height: 384px;
	width: 384px;
}

.data-box-map-big {
	border: 2px solid #fff; 
	border-radius: 8px;
	padding: 10px;
	background-color: #ffffff;
	grid-column: span 4;
	grid-row: span 3;
}

.data-box-map-big .leaflet-container {
	height: 384px;
	width: 512px;
}

.data-box-ais {
	border: 2px solid #fff; 
	border-radius: 8px;
	padding: 10px;
	background-color: #ffffff;
	grid-column: span 2;
	grid-row: span 2;
}

.data-box-speed-gauge {
	border: 2px solid #fff; 
	border-radius: 8px;
	padding: 10px;
	background-color: #ffffff;
	grid-column: span 2;
	grid-row: span 2;
}

.data-box-wind {
	border: 2px solid #fff; 
	border-radius: 8px;
	padding: 10px;
	background-color: #ffffff;
	grid-column: span 2;
	grid-row: span 2;
}

.data-box-rudder {
	border: 2px solid #fff; 
	border-radius: 8px;
	padding: 10px;
	background-color: #ffffff;
	grid-column: span 2;
	grid-row: span 1;
}

.data-box-speed-gauge svg {
}

.data-box-wind svg {
}	

.data-box-rudder svg {
	padding-top: 15px;
}

.data-box-title {
	text-align: left;
	font-size: 0.9em;
	color: #0056b3;
	font-weight: 600;
}

.data-box-content {
	flex-grow: 1; 
	display: flex;
	justify-content: center;
	align-items: flex-end; 
    padding-top: 15px;
}

@property --num {
    syntax: '<number>';
    initial-value: 0;
    inherits: false;
  }

.data-box-value {
	font-size: 2.2em; 
	font-weight: bold;
	color: #333;
	line-height: 1;
}

.data-box-value2 {
	font-size: 1.5em; 
	font-weight: bold;
	color: #333;
	line-height: 1;	
}

.data-box-value3 {
	font-size: 1.5em; 
	font-weight: bold;
	color: #333;
	line-height: 1;
}

.data-box-unit {
	font-size: 1.1em;
	margin-left: 3px; 
	color: #444;
	font-weight: 500;
	line-height: 1;
	align-self: flex-end; 
}

.data-box-tank {
	border: 2px solid #fff; 
	border-radius: 8px;
	padding: 10px;
	background-color: #ffffff;
	grid-column: span 1;
	grid-row: span 2;
}

.data-box-tank-border {
	display: flex;
    flex-direction: column; /* Stack children vertically */
    justify-content: flex-end; /* Push children to the bottom */
	height: 100px;
	border: 2px solid #333;
	background: #eee;
	border-radius: 0 0 10px 10px;
	overflow: hidden;
	margin-top: 15px;
}

.data-box-tank-fluid {
	width: 100%;
	position: relative;
	bottom: 0;
	background: #3498db;
	height: 0%;
	transition: height 0.3s ease, background-color 0.3s;
}

.needle {
  transform-origin: bottom center;
  transform: rotate(0deg);
  transition: transform 0.5s ease;
}

table {
  border-collapse: separate; /* no double borders */
  border-spacing: 0;
  width: 100%;
}

th, td {
  border: 2px solid #F5F5F5;   
  padding: 8px;
  text-align: center;
}

th {
  background-color: #6FA8DC;
  color: #FFFFFF;
}

td {
}

tbody tr:nth-child(odd) {
  background-color: #CFE2F3;
}

tbody tr:nth-child(even) {
  background-color: #6FA8DC;
}

th:first-child { 
  border-top-left-radius: 10px; 
}

th:last-child { 
  border-top-right-radius: 10px; 
}

tr:last-child td:first-child { 
  border-bottom-left-radius: 10px; 
}

tr:last-child td:last-child { 
  border-bottom-right-radius: 10px; 
}

.select-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr); /* Creates 3 equal-width columns */
  gap: 10px; /* Adds space between grid items */
}

.responsive-svg {
  width: 75%; /* Makes the SVG fill the width of its parent */
  height: auto; /* Maintains the aspect ratio defined by viewBox */
  max-width: 800px; /* Sets the maximum width for the SVG */
  display: block; /* Prevents extra space below the SVG if it's inline */
  margin: 0; 
  background-color: white;
}

fieldset {
  width: clamp(300px, 90%, 1200px);
  margin: 0 auto;
  display: block; 
}

legend {
  font-size: x-large;
  padding: 10px;
  margin: 10px;
}

.radar-display {
    border: 1px solid #ccc;
    border-radius: 50%;
    overflow: hidden;
    position: relative;
    width: 100%; /* Makes the SVG fill the width of its parent */
    height: auto; /* Maintains the aspect ratio defined by viewBox */
    max-width: 800px; /* Sets the maximum width for the SVG */
    display: block; /* Prevents extra space below the SVG if it's inline */
}

#ais-radar {
    display: block;
    background-color: #001f3f; /* Dark blue for radar background */
}

.axis {
    stroke: #aaa;
    stroke-width: 1;
    stroke-dasharray: 4 4;
}

.your-boat-cog {
    stroke: yellow;
    stroke-width: 1.5;
}

.boat-cog {
    stroke: white;
    stroke-width: 0.5;
}

.range-circle {
    fill: none;
    stroke: #007bff;
    stroke-width: 1.5;
    opacity: 0.7;
}

.boat {
    fill: gray;
    transition: transform 0.3s ease-out; 
}

.boat:hover {
    fill: darkgray;
}

.boat_classA {
    fill: blue;
    transition: transform 0.3s ease-out; 
}

.boat_classA:hover {
    fill: darkblue;
}

.buddyboat {
    fill: #50C878;
    transition: transform 0.3s ease-out; 
}

.buddyboat:hover {
    fill: #50C8B4;
}

.collisionboat {
    fill: red;
    transition: transform 0.3s ease-out; 
}

.collisionboat:hover {
    fill: darkred;
}

.your-boat {
    fill: white;
}

.ais-radar-text {
	fill: white;
}

.same-row {
	display: flex; 
    gap: 20px;
}

.leaflet-container {
	height: 256px;
	width: 100%;
	max-width: 100%;
	max-height: 100%;
}

.map-rotated-arrow {
	/* Standardize for browsers */
	-webkit-transform-origin: center;
	-moz-transform-origin: center;
	transform-origin: center;
	/* Example: A simple arrow */
	content: '>'; /* Or use background-image */
	font-size: 24px;
	color: #000000;
}

.map-leaflet-bar {
  box-shadow: 0 1px 5px rgba(0, 0, 0, 0.65);
  border-radius: 5px;
}

.map-boatdata {
  background: #fff;
  color: #000000;
  padding: 10px;
}

.smooth_transition {
  transition: transform 2s cubic-bezier(0.25, 0.1, 0.25, 1);
  transform: rotate(var(--heading, 0deg));
  will-change: transform;
}

.spinner {
  border: 4px solid #BDBDBD; 
  border-top: 4px solid #00CF91; 
  border-radius: 50%;
  width: 40px;
  height: 40px;
  animation: spin 1s linear infinite;
  margin: 20px auto;
}

@keyframes spin {
  0% { transform: rotate(0deg); }
  100% { transform: rotate(360deg); }
}