:root {
  --main-font: "Montserrat", sans-serif;
  --font-size-base: 12px;
  --primary-color: #24476d;
}

body {
  font-family: var(--main-font) !important;
  font-size: var(--font-size-base) !important;
  color: var(--primary-color) !important;
}

/* Custom tooltip text styling */
.tooltip-inner {
  font-family: var(--main-font) !important;
  font-size: 1rem;
  color: #fff;
}

/* :root {
  --primary-color: #0078D4; 
} */

.custom-marker {
  background-color: var(--primary-color);
  width: 30px;
  height: 30px;
  border-radius: 50%;
}

.w-0 {
  width: 0 !important;
}

/* Optionally, adjust the arrow's appearance */
.tooltip-arrow {
  border-top-color: #0077b6;
  /* Tooltip arrow color */
}

.marker-number {
  background-color: rgba(0, 0, 0, 0.6);
  color: white;
  padding: 6px 10px;
  border-radius: 50%;
  font-size: 12px;
  font-weight: bold;
}

/* Fullscreen class for the iframe */
.fullscreen {
  position: absolute;
  width: calc(100vw - 48px) !important;
  height: calc(100vh - 56px) !important;
  left: 48px !important;
  top: 56px !important;
  z-index: 1 !important;
  display: flex;
  background: #000 !important;
}

.popup-content-container {
  margin-bottom: 36px;
}

.popup-arrow,
.popup-close {
  display: none !important;
}

.atlas-map .popup-container {
  padding-bottom: 12px;
  pointer-events: none;
}

::-webkit-scrollbar {
  width: 6px;
  height: 12px;
}

::-webkit-scrollbar-thumb {
  background: #888;
  border-radius: 10px;
}

::-webkit-scrollbar-track {
  background: #f1f1f1;
  border-radius: 10px;
}

::-webkit-scrollbar-thumb:hover {
  background: #555;
}

.card-header {
  background-color: var(--primary-color);
  font-size: 1rem;
  text-transform: uppercase;
  font-weight: bolder;
  color: #fff;
  padding: 0;
  display: flex;
  align-items: center;
  justify-content: center;
}

button {
  font-size: 1rem !important;
}

/* Default blue pin marker (mimicking Azure Maps style) */
.emergency-marker-number {
  width: 20px;
  height: 30px;
  font-size: 0.7rem;
  background-color: #ec4c4c;
  /* Azure Maps default blue */
  border-radius: 50% 50% 0 0;
  /* Create a pin-like top shape */
  position: relative;
  /* Positioning for the 'point' */
  text-align: center;
  color: white;
  font-weight: bold;
  line-height: 40px;
  /* Center text vertically */
  display: flex;
  justify-content: center;
  align-items: center;
  box-shadow: 0 0 5px rgba(0, 0, 0, 0.3);
  /* Optional: add shadow */
}

/* Create the pointed bottom of the pin */
.emergency-marker-number::after {
  content: "";
  position: absolute;
  bottom: -10px;
  left: 50%;
  transform: translateX(-50%);
  width: 0;
  height: 0;
  border-left: 5px solid transparent;
  border-right: 5px solid transparent;
  border-top: 10px solid #c74141;
}

#wrapper {
  top: 56px !important;
  left: 50px !important;
  position: absolute !important;
  width: calc(100vw - 50px);
  height: calc(100vh - 56px) !important;
  z-index: 199;
  transition: width 0.3s ease-in-out, margin-left 0.6s ease-in-out;
}

.rightSidebar {
  position: fixed;
  top: 56px;
  right: -300px;
  opacity: 0.2;
  width: 300px;
  height: calc(100% - 56px);
  background: #0077b6;
  color: white;
  transition: right 0.3s ease-in-out;
  padding: 20px;
  box-shadow: -2px 0 5px rgba(0, 0, 0, 0.2);
  z-index: 99;
}

.rightSidebar.active {
  right: 0;
}

.toggle-btn {
  visibility: hidden;
  position: fixed;
  bottom: 20px;
  right: 20px;
  background: #ff7f00;
  color: white;
  padding: 10px 15px;
  border-radius: 5px;
  cursor: pointer;
  box-shadow: 0px 2px 5px rgba(0, 0, 0, 0.3);
  z-index: 999;
}

.shrink {
  width: calc(100% - 350px) !important;
}

.rightSidebar.resized {
  width: calc(100vw - 350px) !important;
  transition: width 0.3s ease-in-out;
}

#minimap {
  position: absolute;
  z-index: -1;
  bottom: 4px;
  left: 56px;
  width: 24vw;
  height: calc((24vw / 16) * 9);
  background: #000;
}

.small-map-fullscreen {
  top: 56px !important;
  left: 50px !important;
  position: absolute !important;
  width: calc(100vw - 50px) !important;
  height: calc(100vh - 56px) !important;
  z-index: 200 !important;
  transition: margin-left 0.6s;
}

#Status,
#modeValue,
#flightTimeValue,
#deviceTime,
#satelliteValue,
#lat,
#lng,
#pitch,
#roll,
#altitudeValue,
#batteryValue,
#batteryVoltage,
#gpsValue,
#yaw,
#armstatus,
#carrier {
  color: #c53030;
  /* font-weight: normal;
  font-size: 1rem; */
  /* color: var(--secondary-color); */
}

#armstatus,
#carrier,
#pitch,
#roll,
#yaw {
  color: var(--secondary-color);
}

.col-auto img {
  width: 24px;
  height: 24px;
}

.emergency-span {
  font-weight: bolder;
}

#small-map {
  display: none;
  position: absolute;
  bottom: 4px;
  left: 54px;
  width: 24vw;
  height: calc((24vw / 16) * 9) !important;
  z-index: 9999;
}

.disabled {
  pointer-events: none;
  opacity: 0.5;
  cursor: not-allowed;
  color: #999;
}

#configCard {
  position: fixed;
  top: 30%;
  left: -350px;
  width: 320px;
  padding: 4px;
  background: #f0f0f0;
  box-shadow: 2px 2px 15px rgba(0, 0, 0, 0.2);
  border-radius: 6px;
  transition: left 0.3s ease;
  z-index: 1000;
}

#configCard.active {
  left: 56px;
}

.close-btn {
  cursor: pointer;
  font-size: 20px;
  color: #666;
}

.url-box {
  margin-top: 15px;
  display: flex;
  align-items: center;
  gap: 10px;
}

.url-text {
  flex: 1;
  background: #fff;
  padding: 8px;
  font-size: 1rem;
  border: 1px solid #ccc;
  overflow-x: auto;
}

.button-group {
  margin-top: 8px;
  display: flex;
  gap: 10px;
}

.button-group button {
  flex: 1;
  padding: 8px;
  border: none;
  background: #007bff;
  color: white;
  cursor: pointer;
  border-radius: 4px;
}

/* Toggle switch styling */
.switch {
  margin-right: 8px;
  position: relative;
  display: inline-block;
  width: 40px;
  height: 20px;
  margin-left: auto;
}

.switch input {
  opacity: 0;
  width: 0;
  height: 0;
}

.slider {
  position: absolute;
  cursor: pointer;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background-color: #ccc;
  transition: 0.4s;
  border-radius: 20px;
}

.slider:before {
  position: absolute;
  content: "";
  height: 14px;
  width: 14px;
  left: 3px;
  bottom: 3px;
  background-color: white;
  transition: 0.4s;
  border-radius: 50%;
}

input:checked + .slider {
  background-color: #4caf50;
}

input:checked + .slider:before {
  transform: translateX(20px);
}

.stream-toggle {
  display: flex;
  margin-top: 8px;
}

.stream-toggle p {
  margin: 0;
}

#mystream-iframe {
  position: relative;
  width: 100%;
  height: 100%;
  text-align: center;
  color: var(--primary-text-color);
  border: none;
  pointer-events: none;
}

#small-screen-toggle {
  position: absolute;
  display: flex;
  justify-content: space-between;
  margin-bottom: -8px;
  top: 0;
  z-index: 9999;
}

#konva-container {
  width: 100%;
  aspect-ratio: 16/9;
  background-color: #000;
  cursor: pointer;
}

.slider-wrapper {
  flex: 1;
  padding: 0 1.5rem;
}

.noUi-horizontal {
  height: 10px;
  width: 100%;
  margin: 5px 4px;
  background: #e9ecef;
  border-radius: 4px;
}

.noUi-connect {
  background: #007bff;
  border-radius: 4px;
  height: 10px;
}

.noUi-handle {
  width: 16px !important;
  height: 16px !important;
  top: -3px !important;
  right: -8px !important;
  background: #ffffff;
  border: 2px solid #007bff;
  border-radius: 50%;
  box-shadow: 0 1px 2px rgba(0, 0, 0, 0.2);
  cursor: pointer;
}

.noUi-handle::before {
  content: "";
  position: absolute;
  top: 50%;
  left: 50%;
  width: 6px;
  height: 6px;
  background: #007bff;
  border-radius: 50%;
  transform: translate(-50%, -50%);
}

.noUi-handle:after,
.noUi-handle:before {
  height: auto;
}

.timestamp-display {
  display: flex;
  justify-content: space-between;
  margin-top: 5px;
  font-size: 0.7rem;
  color: #495057;
}

.timestamp-display span {
  background: #f1f3f5;
  padding: 2px 6px;
  border-radius: 4px;
}

#notifications {
  bottom: 10px;
  right: 10px;
  height: fit-content;
}

.card-container {
  position: absolute;
  display: block;
  width: max-content;
  max-width: 480px;
  box-sizing: border-box;
  z-index: 99999999;
}

ul#alerts-list {
  list-style-type: none;
  padding: 0;
  margin: 0;
}

.notification.info {
  background-color: #2196f3;
  border-left: 5px solid #64b5f6;
}

.material-symbols-outlined {
  font-family: "Material Symbols Outlined";
  font-weight: normal;
  font-style: normal;
  font-size: 24px;
  line-height: 1;
  letter-spacing: normal;
  text-transform: none;
  display: inline-block;
  white-space: nowrap;
  word-wrap: normal;
  direction: ltr;
  -webkit-font-feature-settings: "liga";
  -webkit-font-smoothing: antialiased;
  cursor: pointer;
  flex: 0 0 auto;
}

.collapsible-expand {
  margin-left: auto;
  color: #4b4e4c;
  transition: transform 0.3s ease;
  font-size: 24px;
  text-decoration: none;
  background-color: transparent;
}

#alerts-list {
  color: #333;
  padding: 8px;
}

#alerts-list li .collapsible-body {
  padding: 8px;
}

#alerts-list li .notification-title {
  flex-grow: 1;
  font-size: 1rem;
  font-weight: bold;
  color: #fff;
}

.rotate-180 {
  transform: rotate(180deg);
}

.collapsible-body p {
  display: flex;
  justify-content: space-between;
}

.alert-card {
  /* border: 1px solid #ccc; */
  border: none;
  padding: 0 4px;
  margin-top: 4px;
  /* background-color: #f9f9f9; */
  max-width: none;
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.alert-problem {
  /* white-space: normal;
  overflow-wrap: break-word;*/
  margin: 0;
  font-weight: 500;
}

.alert-timestamp {
  font-size: 1rem;
  color: gray;
  text-align: center;
  margin: 5px 0 0 8px;
}

.card-content {
  max-height: 250px;
  /* Set the maximum height */
  overflow-y: auto;
  padding: 0;
  /* Optional: Add some padding to the right if the scroll bar appears */
}

/* Styling the list */
#upcoming-missions-list {
  list-style-type: none;
  margin: 0;
  padding: 0;
}

/* Styling each mission item */
.mission-item {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 5px 10px;
  border: 1px solid #0077b6;
  border-radius: 5px;
  margin-top: 4px;
  background-color: #f9f9f9;
  box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
  font-family: Arial, sans-serif;
}

/* Styling the mission number */
.mission-number {
  font-weight: bold;
  color: #0077b6;
  width: 30px;
  text-align: center;
}

/* Styling the mission name */
.mission-name {
  flex-grow: 1;
  margin: 0 15px;
  font-size: 1rem;
  color: #333;
}

/* Styling the mission date */
.mission-date {
  font-size: 1rem;
  color: #555;
}

.card-icon {
  width: 36px;
  height: 36px;
  margin-right: 10px;
}

.card-description {
  font-size: 0.95rem;
  color: #555;
  margin: 16px 0;
}

.card-stats {
  display: flex;
  justify-content: space-between;
  margin-bottom: 16px;
}

.stat-item {
  text-align: center;
}

.stat-title {
  font-size: 0.85rem;
  color: #777;
}

.stat-value {
  font-size: 1.1rem;
  color: #0077b6;
  font-weight: bold;
}

.progress-bar {
  width: 100%;
  height: 8px;
  background-color: #e0e0e0;
  border-radius: 5px;
  overflow: hidden;
  margin-bottom: 20px;
}

.progress {
  height: 100%;
}

.card-actions {
  display: flex;
  justify-content: center;
}

.card-actions button {
  padding: 10px 24px;
  background-color: #0077b6;
  color: white;
  border: none;
  border-radius: 6px;
  font-size: 0.9rem;
  cursor: pointer;
  transition: background-color 0.3s ease;
}

.card-actions button:hover {
  background-color: #005b93;
}

/* Table styles */

.table-wrapper {
  width: 100%;
  max-height: calc((24vw / 16) * 9);
  /* Set the max height for the scrollable area */
  /* overflow-y: auto; */
  /* Enable vertical scroll */
}

table {
  width: 100%;
}

table th,
table td {
  padding: 2px;
  text-align: start;
  font-size: 1rem;
  border-bottom: 1px solid #ddd;
  white-space: nowrap;
  vertical-align: middle;
}

table td input,
table td select {
  width: 7rem;
  padding: 0 4px;
  font-size: 1rem;
  border: 1px solid #ccc;
  border-radius: 4px;
  text-align: left;
}

table td button {
  font-size: 1rem;
  border: none;
  background-color: #e53e3e;
  color: white;
  cursor: pointer;
  border-radius: 4px;
  transition: background-color 0.3s ease;
}

table th {
  background-color: var(--primary-color);
  color: white;
  font-weight: bold;
  text-transform: uppercase;
}

table td button:hover {
  background-color: #c53030;
}

table tr:hover {
  background-color: #f1f1f1;
}

#waypoints-table {
  bottom: 4px;
  height: fit-content;
  left: calc(50px + 24vw + 8px + 218px);
}

#waypoints-table .card-header {
  padding: 0;
}

.home-tr {
  background-color: #c53030;
}

.land-tr {
  background-color: #9aff9a;
}

.generate-link-btn {
  padding: 4px 8px;
  background-color: #0077b6;
  color: white;
  border: none;
  border-radius: 6px;
  font-weight: bold;
  cursor: pointer;
}

.generate-link-btn:hover {
  background-color: #005f8a;
}

.device-info-card-content {
  text-align: left;
}
