/* Reset default margin, padding, and box-sizing */
* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

/* Style for p5 canvas */
.p5Canvas {
  padding: 5px;
}

/* Container for the video and settings */
.container {
  position: absolute;
  top: 0;
  left: 400px;
  width: 700px;
  height: 90vh;
  padding: 5px;
}

/* Sub-container for settings */
.subContainer {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 10px;
  background-color: rgb(232, 232, 232);
  padding: 10px;
  border-radius: 10px;
  height: 100%;
  box-shadow: 0 0 10px 0 rgba(0, 0, 0, 0.4);
}

/* Space between for image link */
.spaceBetween {
  display: flex;
  justify-content: space-between;
  width: 50%;
}

/* Container for filter settings */
#settingsContainer {
  display: flex;
  flex-direction: row;
  justify-content: space-evenly;
  padding: 20px 10px;
  background-color: rgb(232, 232, 232);
  border-radius: 10px;
  width: 90%;
  box-shadow: 0 0 10px 0 rgba(0, 0, 0, 0.4);
}

/* Select menu for filter selection */
#filterSelect {
  width: 160px;
  position: relative;
}

/* Selected filter display */
#selectedFilter {
  width: 100%;
  padding: 10px 5px;
  border-radius: 5px;
  border: 1px solid #ccc;
}

/* Dropdown menu for filter selection */
#filterSelectMenu {
  border-radius: 5px;
  border: 1px solid #ccc;
  width: 100%;
  flex-direction: column;
  position: absolute;
  background-color: white;
  z-index: 1;
  display: none;
  top: 100%;
  left: 0px;
  height: 250px;
  overflow-y: auto;
}

/* Style for filter selection buttons */
#filterSelectMenu button {
  padding: 10px 5px;
  border: none;
  width: 100%;
  text-align: left;
  cursor: pointer;
}

/* Hover effect for filter selection buttons */
#filterSelectMenu button:hover {
  background-color: #ffffff;
}

/* Style for first and last child of the filter selection menu */
#filterSelectMenu :first-child {
  border-top-left-radius: 5px;
  border-top-right-radius: 5px;
}

#filterSelectMenu :last-child {
  border-bottom-left-radius: 5px;
  border-bottom-right-radius: 5px;
}

/* Show class for displaying dropdown menu */
.show {
  display: flex !important;
}

/* Style for edge detection controls */
#edgeDetectionControls {
  display: none;
  flex-direction: column;
  gap: 10px;
  width: 100%;
  padding-top: 10px;
}

/* Style for active overlay */
.active {
  position: fixed;
  width: 420px !important;
  height: 340px !important;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  border-radius: 10px;
  box-shadow: 0 0 10px 0 rgba(0, 0, 0, 0.4);
  z-index: 1;
}

/* Style for capture button */
.capture {
  padding: 10px 20px;
  border-radius: 5px;
  border: none;
  background-color: #4caf50;
  color: white;
  cursor: pointer;
  transition: 0.3s;
  height: 40px;
}

/* Hover effect for capture button */
.capture:hover {
  background-color: #45a049;
}

/* Container for images */
#imagesContainer {
  display: grid;
  grid-template-columns: 1fr 1fr 1fr;
  gap: 10px;
  padding: 10px;
  background-color: rgb(232, 232, 232);
  border-radius: 10px;
  width: 90%;
  overflow-y: auto;
  height: 100%;
  box-shadow: 0 0 10px 0 rgba(0, 0, 0, 0.4);
}

/* Style for images */
#imagesContainer img,
#imagesContainer video {
  width: 160px;
  height: 120px;
  object-fit: cover;
  border-radius: 5px;
  cursor: pointer;
  display: flex;
  justify-content: center;
}

/* Style for container div */
#imagesContainer div {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 5px;
}

/* Style for buttons inside container div */
#imagesContainer div button {
  border-radius: 5px;
  border: none;
  color: gray;
  cursor: pointer;
  transition: 0.3s;
  background-color: transparent;
}

/* Hover effect for buttons inside container div */
#imagesContainer div button:hover {
  color: black;
  text-decoration: underline;
}

/* Scrollbar style */
::-webkit-scrollbar {
  width: 6px;
}

::-webkit-scrollbar-thumb {
  background-color: #ccc;
  border-radius: 5px;
}
