.controls {
  display: flex;
  flex-direction: row;
  margin-bottom: 10px;
  /*position: sticky; */
  top: 8px;
}

.image .menu-button {
  position: absolute;
  top: 5px;
  right: 5px;
  background: rgba(255, 255, 255, 0.8);
  border: none;
  cursor: pointer;
  display: none;
  z-index: 30; /* Ensure it is above the canvas overlay */
}

.image:hover .menu-button {
  display: block;
}

.image .menu {
  position: absolute;
  top: 30px;
  right: 5px;
  background: white;
  border: 1px solid #ccc;
  display: none;
  z-index: 30; /* Ensure it is above the canvas overlay */
}

.image .menu.visible {
  display: block;
}

.image .menu-item {
  padding: 5px 10px;
  cursor: pointer;
}

.image .menu-item:hover {
  background-color: #f0f0f0;
}

.image .menu-button {
  position: absolute;
  top: 5px;
  right: 5px;
  background: rgba(255, 255, 255, 0.8);
  border: none;
  cursor: pointer;
  display: none;
  z-index: 30; /* Ensure it is above the canvas overlay */
}

.image:hover .menu-button {
  display: block;
}

.image .menu {
  position: absolute;
  top: 30px;
  right: 5px;
  background: white;
  border: 1px solid #ccc;
  display: none;
  z-index: 30; /* Ensure it is above the canvas overlay */
}

.image .menu.visible {
  display: block;
}

.image .menu-item {
  padding: 5px 10px;
  cursor: pointer;
}

.image .menu-item:hover {
  background-color: #f0f0f0;
}

.control {
  position: relative;
  border: 1px solid #ccc;
  padding: 5px 10px;
  margin-right: 10px;
  background-color: white;
  max-height: 300px;
  overflow-y: auto;
  flex-grow: 1;
}

.dirCtrl {
}

.images {
  display: flex;
  flex-wrap: wrap;
}

input[type="range"] {
  margin-bottom: -3px;
  margin-left: 5px;
  margin-right: 5px;
}

.image {
  margin: 5px;
  padding: 5px;
  border: 1px solid #ccc;
  text-align: center;
  flex-grow: 1;
  position: relative;
}

.image img {

}

.overlay {
  position: absolute;
  z-index: 10;
}

.caption {
  font-size: 0.8em;
}

canvas#scoreCanvas {
  width: 100%;
}

.sort-rows {
  font-size: 0.7em;
  margin-top: 5px;
}

.randomBtn {
  position: absolute;
  right: 13px;
}

.pairs {
  display: flex;
  flex-wrap: wrap;
}

.pairs > div {
  border: 1px solid gray;
  padding: 5px;
  margin-right: 15px;
  margin-bottom: 5px;
  text-align: center;
}

.searchMsg {
  white-space: pre;
  font-family: monospace;
  margin-top: 2em;
}
