.list-title {
  flex: 1;
}

/* Toggle Switch */
.toggle-switch {
  position: relative;
  width: 40px;
  height: 20px;
}

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

.toggle-switch label {
  position: absolute;
  width: 40px;
  height: 20px;
  background-color: #ccc;
  border-radius: 20px;
  cursor: pointer;
  transition: background-color 0.3s;
}

.toggle-switch label::before {
  content: "";
  position: absolute;
  width: 16px;
  height: 16px;
  border-radius: 50%;
  background: white;
  top: 2px;
  left: 2px;
  transition: transform 0.3s;
}

.toggle-switch input:checked + label {
  background-color: var(--primary-color);
}

.toggle-switch input:checked + label::before {
  transform: translateX(20px);
}

/* Toolbar with Collapsible Button */
.toolbar {
  display: flex;
  align-items: center;
  gap: 10px;
}

/* Collapsible Section */
.collapsible-content {
  display: block;
  background: #e8f0fe;
  border-radius: 8px;
}

.roi-details thead,
.roi-details tbody tr {
  display: table;
  width: 100%;
  table-layout: fixed;
}

.roi-details table {
  width: 100%;
  border-collapse: collapse;
  margin-top: 2px;
  font-family: Arial, sans-serif;
}

.roi-details tbody {
  display: block;
  max-height: 98px;
  /* Adjust height as needed */
  overflow-y: auto;
}

.roi-details th,
.roi-details td {
  border: 1px solid #ddd;
  padding: 0px 8px;
}

.roi-details th {
  background-color: var(--primary-color);
  color: white;
  font-weight: bold;
}

.roi-details tr:nth-child(even) {
  background-color: #f2f2f2;
}

.roi-details tr.selected {
  color: #f2f2f2;
  background: var(--primary-color);
}

.roi-details tr:hover {
  color: #f2f2f2;
  background-color: #014668;
  cursor: pointer;
}

/* Style for the Delete button */
.delete-btn {
  background-color: red;
  color: white;
  border: none;
  padding: 2px 6px;
  cursor: pointer;
  border-radius: 4px;
}

.save-btn {
  background-color: green;
  color: white;
  border: none;
  padding: 2px 6px;
  cursor: pointer;
  border-radius: 4px;
}

.save-btn:hover {
  background-color: darkgreen;
}

.delete-btn:hover {
  background-color: darkred;
}

* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

/* .card {
  background: white;
  box-shadow: 0 4px 10px rgba(0, 0, 0, 0.15);
  border-radius: 10px;
  padding: 2px;
  text-align: center;
  overflow: hidden;
} */

#detections-canvas {
  border: 2px solid #24476e;
  object-fit: cover;
  border-radius: 8px;
}

.tracker-container {
  /* max-height: calc(100vh - 140px); */
  overflow-y: auto;
  /* margin-top: 8px; */
  /* padding-right: 5px; */
  scrollbar-width: thin;
  scrollbar-color: #999 #f1f1f1;
}

.tracker-container::-webkit-scrollbar {
  width: 6px;
}

.tracker-container::-webkit-scrollbar-thumb {
  background: #999;
  border-radius: 3px;
}

.tracker-container::-webkit-scrollbar-track {
  background: #f1f1f1;
}

.tracker-list {
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.tracker-item {
  position: relative;
  display: inline-block;
  overflow: hidden;
}

.tracker-info {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  opacity: 0;
  background-color: rgba(0, 0, 0, 0.6);
  /* translucent black */
  color: white;
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  transition: opacity 0.3s ease-in-out;
  font-size: 0.9rem;
  pointer-events: none;
}

.tracker-item:hover .tracker-info {
  opacity: 1;
  color: #fff;
  pointer-events: auto;
}

/* Selected Item */
.tracker-item.selected {
  background: #24476e;
  color: white;
  font-weight: bold;
  transform: scale(1.02);
}

/* Selected Item */
.tracker-item.selected span {
  color: #fff;
}

.tracker-item img {
  width: 120px;
  height: 60px;
  object-fit: cover;
  border-radius: 4px;
}

.tracker-info {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
}

.tracker-info span {
  font-size: 12px;
  color: #ffffff;
}

.tracker-category {
  font-weight: bold;
  display: flex;
  align-items: center;
  gap: 4px;
}

#detections {
  z-index: 1;
  display: none;
  flex-direction: column;
  /* justify-content: space-between; */
  padding: 0;
  background: #333;
  width: 30vw;
}

.info-pagination-bar {
  display: flex;
  justify-content: space-between;
  align-items: center;
  font-size: 12px;
  background: #f8f8f8;
  padding: 4px;
  border-radius: 6px;
  /* gap: 8px; */
}

.pagination {
  flex-grow: 1;
  display: flex;
  justify-content: space-around;
}

.tracker-container {
  width: 100%;
  padding: 0;
  box-sizing: border-box;
}

.tracker-list {
  padding: 0 4px;
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(119px, 1fr));
  gap: 4px;
  justify-content: center;
}

.tracker-item {
  width: 100%;
  aspect-ratio: 16/9;
  border: 2px solid transparent;
  border-radius: 6px;
  overflow: hidden;
  cursor: pointer;
  transition: border-color 0.3s ease, transform 0.2s ease;
}

.tracker-item img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

.tracker-item.selected {
  border-color: var(--primary-color);
  transform: scale(1.03);
  box-shadow: 0 0 6px rgba(0, 119, 182, 0.4);
}

.alert-container {
  z-index: 999999;
  display: flex;
  position: absolute;
  width: 300px;
  left: calc(56px + 24vw + 8rem + 12px);
  gap: 4px;
  bottom: 0px;
  margin: 0;
  padding: 0;
  box-sizing: border-box;
  background-color: #f7f7f7;
  height: max-content;
  opacity: 0.85;
  flex-direction: column;
  transform: translateY(0);
  transition: opacity 0.5s ease, transform 0.5s ease;
  border-radius: 10px;
}

/* Left Card */
.left-card {
  /* width: 30vw; */
  background-color: white;
  border-radius: 10px;
  /* box-shadow: 0 4px 8px rgba(0, 0, 0, 0.1); */
  padding: 4px;
  display: flex;
  flex-direction: column;
  align-items: center;
  height: fit-content;
}

.alert-main-image {
  width: 100%;
  height: 60%;
  /* Adjust image height within card */
  object-fit: cover;
  /* Ensure it fills the space without distortion */
  border-radius: 10px;
}

.description {
  font-size: 1rem;
  color: #333;
  text-align: center;
  margin-top: 10px;
}

/* Responsive Design */
@media (max-width: 768px) {
  .alert-container {
    flex-direction: column;
    align-items: center;
    height: auto;
    /* Prevent stretching */
  }

  .left-card {
    width: 80vw;
    height: auto;
  }

  .grid-container {
    grid-template-columns: repeat(2, 1fr);
    width: 90%;
  }
}

@media (max-width: 480px) {
  .grid-container {
    grid-template-columns: 1fr;
  }
}

/* When hidden */
.displayNone {
  opacity: 0;
  transform: translateY(-20px);
  pointer-events: none;
  /* Prevent clicks when hidden */
}

/* Tabination Container */
.tabination {
  width: 100%;
  max-width: 600px;
  border-radius: 10px;
  box-shadow: 0 4px 8px rgba(0, 0, 0, 0.1);
  overflow: hidden;
  background: white;
}

/* Tabs */
.tabs {
  display: flex;
}

.tab {
  flex: 1;
  padding: 4px;
  border: none;
  background: transparent;
  color: #333;
  cursor: pointer;
  font-size: 1rem;
  transition: background 0.3s ease;
}

.tab:hover {
  background: rgba(255, 255, 255, 0.2);
}

/* Active Tab Styling */
.tab.active {
  background: var(--primary-color);
  color: white;
  font-weight: bold;
}

/* Hide inactive tabs */
.tab-panel {
  display: none;
  animation: fadeIn 0.3s ease-in-out;
}

.tab-panel.active {
  display: block;
}

/* Fade In Animation */
@keyframes fadeIn {
  from {
    opacity: 0;
    transform: translateY(5px);
  }

  to {
    opacity: 1;
    transform: translateY(0);
  }
}

/* List Container */
.list-container {
  display: flex;
  flex-direction: column;
  gap: 2px;
  margin-top: 2px;
}

/* List Item */
.alert-list-item {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 4px 8px;
  background: white;
  box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
  transition: all 0.3s ease-in-out;
  cursor: pointer;
  color: #333;
}

/* Selected Item */
.alert-list-item.selected {
  background: var(--primary-color) !important;
  color: white;
  font-weight: bold;
  transform: scale(1.02);
}

.alert-list-item input {
  accent-color: var(--primary-color) !important;
  /* Blue color */
  /* width: 18px; */
  height: 18px;
  /* cursor: pointer; */
  margin-right: 1rem;
}

.alert-list-item input {
  margin-right: 5px;
}

.pencil-icon {
  margin-left: auto;
  font-family: "Material Symbols Outlined";
  display: inline-flex;
  justify-content: center;
  align-items: center;
  color: #ffffff;
  border-radius: 50%;
  padding: 6px;
  /* Increased padding for better button feel */
  font-size: 8px;
  /* Slightly larger icon */
  cursor: pointer;
  box-shadow: 0 2px 4px rgba(0, 0, 0, 0.2);
  /* Soft shadow for button effect */
  transition: transform 0.2s ease-in-out, box-shadow 0.2s ease-in-out;
}

.drawing {
  background: #4caf50;
}

.list-title {
  margin: 0;
}

.apply-button {
  background-color: var(--primary-color) !important;
  /* Primary blue */
  color: white;
  border: none;
  padding: 4px 8px;
  font-size: 12px;
  font-weight: bold;
  border-radius: 8px;
  cursor: pointer;
  transition: background 0.3s ease-in-out, transform 0.2s ease;
  display: flex;
  align-items: center;
  gap: 8px;
}

.apply-button:hover {
  background-color: #005f8c;
  /* Slightly darker blue */
  transform: scale(1.05);
}

.apply-button:active {
  background-color: var(--primary-color) !important;
  /* Even darker on click */
  transform: scale(0.98);
}

.line-id-cell {
  position: relative;
  padding-left: 12px;
}

.line-id-cell::before {
  content: "";
  position: absolute;
  left: 0;
  top: 50%;
  transform: translateY(-50%);
  width: 4px;
  height: 20px;
  background-color: var(--line-color, #999);
  border-radius: 2px;
}

.mission-details {
  z-index: 9 !important;
  height: 100%;
  top: 0;
  right: 0;
  border-radius: 4px 0 0 4px;
  background: transparent;
}

.margin-right-transition {
  transition: margin-right 0.3s ease;
}

.w-55 {
  width: 55%;
}

.w-0 {
  width: 0px;
  transition: width 0.3s ease; /* Add this line */
  overflow: hidden; /* Prevent content overflow during transition */
}
