/* styles.css */

body {
	font-family: Verdana;
	background-color: #f4f4f4;
	color: #333;
	margin: 0;
	padding: 0;
	line-height: 1.6;
}

h1, h2, h3, h4, h5, h6 {
	color: #007bff;
}

p {
	font-size: 1.1em;
	margin-bottom: 1.2em;
}

a {
	color: #007bff;
	text-decoration: none;
}

a:hover {
	text-decoration: underline;
}

.magnify-button {
    background: lightgray;
    border: none;
    cursor: pointer;
}

.magnify-cursor {
    cursor: url('/images/cursor_plus_icon.png'), auto; /* Update with your cursor icon */
}

.hidden {
    display: none; /* Completely removes the element from the document flow */
}

.visible {
    display: block; /* Makes the element visible */
}

.left-section {
    display: flex;
    align-items: center;
    margin-left: 100px;
}

.spinner {
    border: 4px solid rgba(0, 0, 0, 0.1);
    width: 30px;
    height: 30px;
    border-radius: 50%;
    border-left-color: #09f;
    animation: spin 1s ease infinite;
    display: none;
    margin-left: 10px;
}

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

.button-container {
    display: inline-flex;
    align-items: center;  /* Align items vertically centered */
}

.button-container-right {
    display: inline-flex;
    align-items: rigth;
}

/* Style to remove the border of the text box */
input.no-border {
    border: none;
    outline: none; /* Optionally remove the outline when the element is focused */
    width: 100%;
}

/* Apply custom styles for subtitles */
select option span.subtitle {
    display: block;
    font-size: 50%;
    color: #777; /* Adjust color as needed */
}

.checkbox-label {
    display: inline-flex;
    margin-left: 10px;
    font-size: 16px;
}
.checkbox-label input {
    margin-right: 5px;
}

.modal {
    display: none; /* Hidden by default */
    position: fixed;
    z-index: 1;
    left: 0;
    top: 0;
    width: 100%;
    height: 100%;
    overflow: auto;
    background-color: rgba(0, 0, 0, 0.5); /* Black w/ opacity */
    flex-direction: column; /* Arrange elements vertically */
    align-items: center; /* Center horizontally */
    justify-content: center; /* Center vertically */
}

.modal-content {
    margin: auto;
    display: block;
    width: 80%; /* Adjust the width as needed */
    height: auto;
}

.close {
    position: absolute;
    top: 15px;
    right: 35px;
    color: white;
    font-size: 40px;
    font-weight: bold;
    cursor: pointer;
}

#caption {
    margin: auto;
    text-align: center;
    color: white;
    padding: 10px 0;
}

#canvas {
    width: 80%; /* Adjust as needed */
    height: auto;
    border: 1px solid #ccc; /* Optional border */
}

.suggestions {
    position: absolute;
    background: white;
    border: 1px solid #ccc;
    display: none; /* Hidden by default */
    max-height: 150px;
    overflow-y: auto; /* Enable scrolling */
    z-index: 10; /* Higher than the canvas */
}

.suggestions div {
    padding: 5px;
    cursor: pointer;
}

.suggestions div:hover {
    background: #f0f0f0;
}

table {
    width: 100%;
    border-collapse: collapse;
}
th, td {
    border: 1px solid black;
    padding: 8px;
    text-align: left;
}
th {
    background-color: #f2f2f2;
}

#summary {
    margin-top: 20px;
    padding: 10px;
    border: 1px solid #ccc;
    background-color: #f9f9f9;
}
/*.radio-group {
    margin-top: 20px;
}*/

#camera_selector, #image_display {
    margin-top: 10px;
}
#image_display img {
    max-width: 100%;
    height: auto;
}

#image-weed-result {
    display: flex;
    justify-content: center;
}

#image-info {
    margin-bottom: 10px;
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 0 10px;
}
/*#current_image {
    flex: 0 0 auto;
    max-width: 50%;
    overflow: hidden;
}*/

.figure-container {
    flex: 0 0 auto; /* Do not grow or shrink; keep the size fixed */
    width: 500px;
    height: 500px;
    overflow: hidden; /* Hide any overflow content */
}
.table-container {
    flex: 1; /* Allow this to grow and take up available space */
    overflow: auto; /* Enable scrolling if content overflows */
}
.figure {
    max-width: 100%;
    object-fit: cover; /* Preserve aspect ratio, cover the container */
}

#index_input {
    width: 50px;
    text-align: center;
    margin: 0 10px;
}

#image-container {
    text-align: center;
    margin: 5px;
}
#image-controls {
    margin-bottom: 10px;
    display: flex;
    align-items: center; /* Align items vertically in the center */
}

.speedometer-container {
  display: flex; /* Use flexbox */
  align-items: center; /* Align items vertically */
}

.semi-circle {
  position: absolute;
  width: 100%;
  height: 100%;
  border-top-left-radius: 50%;
  border-top-right-radius: 50%;
  overflow: hidden;
  background-color: #ccc; /* Add background color */
}

.speedometer {
  position: relative;
  width: 50px;
  height: 25px;
  margin-right: 10px; /* Add some spacing */
/*  background: #ccc;
  border-radius: 50%;*/
}

.needle {
  position: absolute;
  bottom: 0;
  left: 50%;
  transform-origin: bottom center;
  width: 1px; /* Adjusted width */
  height: 100%; /* Adjusted height */
  background: red;
  transform: translateX(-50%) rotate(0deg);
  transition: transform 0.5s ease;
}

#speed-value {
  font-size: 18px; /* Adjust font size */
}

/* Styles for overlay */
.overlay {
	display: none;
	position: fixed;
	top: 0;
	left: 0;
	width: 100%;
	height: 100%;
	background: rgba(0, 0, 0, 0.5);
	align-items: center;
	justify-content: center;
    z-index: 999;
}

/* Styles for popup */
.popup {
	background: #fff;
	padding: 20px;
	border-radius: 5px;
	box-shadow: 0 0 10px rgba(0, 0, 0, 0.3);
}

/* Close button styles */
.close-btn {
	cursor: pointer;
	position: absolute;
	top: 10px;
	right: 10px;
}

.right-button {
    position: absolute;
    right: 0px;
    margin-right: 50px;
}

.margin-button {
    position: absolute;
    margin-left: 150px;
}

.narrower-button {
    height: 30px;
    display: flex;
    align-items: center;
}

.form-group {
    display: flex;
    align-items: center;
}

.form-group label {
    width: 150px; /* Adjust as needed */
}

.form-group textarea {
    flex: 1;
    width: calc(100% - 150px); /* Adjust according to label width */
}

.form-group input[type="text"] {
    flex: 1;
    width: 300px; /* Adjust width as needed */
}

.dropdown {
  position: relative;
  display: inline-block;
}

.dropdown-toggle {
  background-color: #f1f1f1;
  border: none;
  padding: 10px;
  cursor: pointer;
  width: auto; /* Adjust width based on content */
}

.dropdown-content {
  display: none;
  position: absolute;
  background-color: #ffffff;
  box-shadow: 0 4px 8px 0 rgba(0,0,0,0.2);
  padding: 10px;
  z-index: 2;
  width: auto; /* Adjust width based on content */
}

.dropdown-content label {
  display: block;
  margin-bottom: 5px;
}

.box {
    width: 100%; /* Set the width of the box */
    height: auto; /* Allow the height to adjust based on content */
    overflow: auto; /* Add scrollbars if necessary */
}

.custom-textarea {
    width: 100%;
    /*height: 100px; /* Set the desired height */
    padding: 10px; /* Optional: add padding */
    resize: none; /* Optional: disable textarea resizing */
    border: none; /* Remove textarea border */
    outline: none; /* Remove outline when focused */
    /* Add any additional styling you need */
}

#cameraSection {
    display: flex;
    justify-content: space-between;
    margin: 5px;
}

#menuContainer {
    width: 15%;
}

#imageContainers {
    display: flex;
    width: 85%;
}

.imageContainer {
    width: 400px;
    margin-right: 10px;
    border: 1px solid #ccc;
    /* Maintain aspect ratio */
    position: relative;
    overflow: hidden;
    display: inline-block; /* Ensure container size is determined by its content */
}

.imageContainer img {
    max-width: 100%; /* Ensure image doesn't overflow container horizontally */
    max-height: 100%; /* Ensure image doesn't overflow container vertically */
    width: 100%;
    height: auto%;
    object-fit: cover;
    display: block; /* ***** */
}

/* Ensure the container maintains its aspect ratio */
.imageContainer::before {
    content: "";
    padding-top: 100%; /* Maintain a 1:1 aspect ratio (adjust as needed) */
}

/* Adjust the z-index of the buttons */
.buttonContainer {
    position: absolute;
    bottom: 1px;
    right: 1px;
    z-index: 1; /* Ensure buttons are displayed in front of the image */
}

/* Define a CSS class for the pan buttons */
.panButton {
    height: 20px; /* Set the desired height */
    width: 20px; /* Set the desired width */
    display: flex;
    justify-content: center; /* Center the content horizontally */
    align-items: center; /* Center the content vertically */
}

/* Adjust the z-index of the buttons */
.panButtonsContainer {
    position: absolute;
    bottom: 1px;
    left: 1px;
    z-index: 1; /* Ensure buttons are displayed in front of the image */
}

#cameraCheckboxes {
    /* Adjust the font size as needed */
    font-size: 18px;
}

#menuContainer label {
    font-size: 18px; /* Adjust the font size as needed */
}

section {
    width: 100%;
    padding: 5px;
    text-align: left;
    background-color: #f2f2f2;
}

.sub-section {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    flex-wrap: wrap;
    height: 100%; /* or height: 100vh; */
}

.left-subsection {
    width: 70%;
    box-sizing: border-box;
}

.right-subsection {
    width: 30%;
    box-sizing: border-box;
}

.left-subsection-cams {
    width: 20%;
    box-sizing: border-box;
    display: flex;
    vertical-align: flex-start;
    flex-direction: column; /* Stack items vertically */
}

.right-subsection-cams {
    width: 80%;
    box-sizing: border-box;
}

.led {
    width: 20px;
    height: 20px;
    border-radius: 50%;
    display: inline-block;
    margin-right: 5px;
    vertical-align: middle;
}

.led-green {
    background-color: green;
}

.led-red {
    background-color: red;
}

.battery-container {
    display: flex;
    align-items: center;
    justify-content: left;
    margin-bottom: 1px;
    margin-top: 1 px;
}

.battery {
    position: relative;
    width: 50px;
    height: 20px;
    background-color: #ddd;
    border-radius: 5px;
    overflow: hidden;
}

.battery-level {
    position: absolute;
    height: 100%;
    transition: width 0.5s, background-color 0.5s; /* Add a smooth transition effect */
}

.battery-text {
    margin-left: 10px;
    font-size: 18px;
}

/*For Mission planner*/

.planner-container {
    display: flex;
    height: 100%;
    min-height: 700px;
}

#configContainer {
    flex: 1;
    padding: 20px;
    box-sizing: border-box;
}

#map_planner_map {
    flex: 2;
    padding: 20px;
    box-sizing: border-box;
    display: flex;
    flex-direction: column;
}

#map {
  flex: 1;
  max-height: 500px; /* ✅ Limit how tall the map grows */
  min-height: 300px;
  width: 100%;
  border: 1px solid #ccc;
}

#msg_planner_map {
    flex: 2;
    background-color: #f0f0f0; /* White background color */
    padding: 10px;
    box-sizing: border-box;
}

#point-list {
  list-style: none;
  padding-left: 0;
  width: 100%;
  max-width: 350px;

  max-height: 300px;
  overflow-y: auto;
}

#point-list li {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 6px 10px;
  gap: 10px;
  border-bottom: 1px solid #ccc;
}

#point-list li > div:first-child {
  flex: 1;
}

.action-icons {
  visibility: hidden;
  opacity: 0;
  transition: opacity 0.15s ease;
}

#point-list li:hover .action-icons {
  visibility: visible;
  opacity: 1;
}

.icon-button {
    cursor: pointer;
    margin-left: 5px;
}

.button-row {
  display: flex;
  flex-direction: row;
  gap: 10px; /* Optional: adds space between buttons */
  margin-bottom: 5px;
}

.input-text {
  border: none;
  border-bottom: 1px solid #ccc;
  padding: 5px 8px;
  font-size: 15px;
  width: 250px;
}

.input-text:focus {
  outline: none;
  border-bottom: 1px solid #007bff; /* Bootstrap primary color */
}

.label-text {
  font-size: 18px;
  margin-left: 5px;
}

.message-box {
  border: 1px solid #ccc;
  background-color: #f0f0f0;
  padding: 10px;
  font-size: 14px;
  margin-top: 10px;
  width: 300px;
  height: auto;
}

/* Estados de calidad */
.quality-0 {
    background-color: black;
}

.quality-1 {
    background-color: #e74c3c; /* rojo */
}

.quality-2 {
    background-color: #e67e22; /* naranja */
}

.quality-3 {
    background-color: #f1c40f; /* amarillo */
    color: black;
}

.quality-4 {
    background-color: #2ecc71; /* verde */
}

/* Alerta visual */
.quality-warning {
    border: 4px solid red;
}

/* Opcional: efecto hover */
.quality-indicator:hover {
    transform: scale(1.05);
}

.record-btn {
    width: 70px;
    height: 70px;
    font-size: 1.6rem;
    margin: 20px;
    transition: transform 0.1s ease, box-shadow 0.1s ease;
}

.record-btn:hover {
    transform: scale(1.1);
}

.record-btn:active {
    transform: scale(0.95);
    box-shadow: inset 0 0 10px rgba(0,0,0,0.3);
}