#sample-search {
  width: 300px;
}
#image-diver {
  display: flex;
  align-items: flex-start;
  justify-content: space-evenly;
  flex-wrap: wrap;
  margin: 20px 0;
}

/* Deposition Direction Indicator */
.deposition-indicator {
  margin-top: 10px;
  text-align: center;
}

.indicator-badge {
  background-color: #3498db;
  color: white;
  padding: 5px 15px;
  border-radius: 20px;
  font-size: 14px;
  font-weight: 500;
  display: inline-block;
}

.image-container {
  width: 260px;
  height: 260px;
  text-align: center;
  cursor: pointer;
}

/* Ensure rotated images fit within their containers */
.image-diver-card img {
  max-width: 100%;
  max-height: 100%;
  object-fit: contain;
  transition: transform 0.3s ease;
}

/* Add padding to accommodate rotated images */
.image-diver-card img[style*="rotate(90deg)"],
.image-diver-card img[style*="rotate(-90deg)"] {
  max-width: calc(100% - 20px);
  max-height: calc(100% - 20px);
}

/* Ensure fullsize image rotates properly in detail view */
#fullsize-image {
  transition: transform 0.3s ease;
  max-width: 100%;
  max-height: 100%;
  object-fit: contain;
}

#fullsize-container {
  display: flex;
  justify-content: center;
  align-items: center;
}

/* Ensure zoom result area handles rotated backgrounds properly */
#zoom-result {
  overflow: hidden;
  border: 2px solid #000;
}

#zoom-lens {
  position: absolute;
  border: 2px solid #000;
  cursor: crosshair;
  background-color: rgba(255, 255, 255, 0.3);
  z-index: 10;
  pointer-events: none;
  width: 40px;
  height: 40px;
}

.image-diver-info {
  width: 200px;
  font-size: .8em;
  overflow-wrap: break-word;
  margin: 10px;
  align-self: flex-start;
}

.image-diver-buttons {
  display: flex;
  align-items: center;
  justify-content: center;
  position: absolute;
  margin: 0px;
  padding: 0px;
  top: 5px;
  right: 5px;
}

.image-diver-buttons button {
  padding: 0;
}

.image-diver-remove {
  color: var(--neutral-5);
}

.image-diver-download {
  color: var(--neutral-5);
}

.download-dropdown-menu {
  position: absolute;
  top: 100%;
  left: 0;
  background: white;
  box-shadow: 0 4px 8px rgba(0, 0, 0, 0.2);
  border-radius: 5px;
  display: flex;
  flex-direction: column;
  margin: 0;
  padding: 0;
  z-index: 100;
}

.download-dropdown-menu.hidden {
  display: none;
}

.download-dropdown-item {
  padding: 5px;
  text-transform: none;
  background: white;
  border: none;
  text-align: left;
  cursor: pointer;
}

.download-dropdown-item:hover {
  background: var(--blue-soft);
}

.image-diver-download-secondary {
  position: absolute;
  bottom: 30px;
  right: 10px;
  background: var(--blue-soft);
  border: none;
  cursor: pointer;
  border-radius: 4px;
  font-size: 13px;
  padding: 1px 6px;
}

.image-diver-download-secondary:hover {
  background: darkgray;
}

.ideality-factor-button {
  position: absolute;
  bottom: 30px;
  right: 10px;
  background: var(--blue-soft);
  border: none;
  cursor: pointer;
  border-radius: 4px;
  font-size: 13px;
  padding: 1px 6px;
  margin: 0;
  text-decoration: none;
  text-transform: none;
}

.ideality-factor-button:hover {
  background: darkgray;
}

.image-diver-sort {
  color: var(--neutral-5);
}

.image-viewer-content {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  margin: 0;
  padding: 0;
  width: 100%;
}

.fullsize-image-viewer {
  display: flex;
  align-items: center;
  justify-content: center;
  margin: 20px 0;
}

.image-viewer-container {
  position: relative;
  display: flex;
  align-items: center;
  height: 65vh;
  width: 90vw;
  margin: 20px 10px 50px;
}

.image-viewer-left {
  display: flex;
  flex-direction: row;
  align-items: center;
  height: 100%;
  margin-right: 20px;
}

.image-viewer-left img {
  /* Allow image to maintain natural aspect ratio */
  max-height: 100%;
  width: auto;  /* Let width adjust naturally */
  align-self: flex-start;
}

#colorbar {
  margin: 0 10px 10px;
  padding: 0;
  height: 100%;
}

.deposition-direction-toggle label {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-bottom: 10px;
}

.deposition-direction-toggle span {
  font-weight: 500;
}

.download-dropdown-menu {
  position: absolute;
  top: 100%;
  right: 0;
  background: white;
  border: 1px solid #ccc;
  border-radius: 4px;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
  z-index: 1000;
  min-width: 120px;
}

.download-dropdown-item {
  padding: 8px 12px;
  cursor: pointer;
  border-bottom: 1px solid #eee;
}

.download-dropdown-item:hover {
  background-color: #f5f5f5;
}

.download-dropdown-item:last-child {
  border-bottom: none;
}

.hidden {
  display: none;
}

#colorbar-canvas {
  width: 80px;
  height: 100%;
}

#zoom-lens {
  position: absolute;
  border: 1px solid var(--neutral-1);
  width: 40px;
  height: 40px;
}

#zoom-lens:hover {
  cursor: pointer;
}

#zoom-lens.fixed {
  border: 2px solid greenyellow;
}

.image-viewer-right {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  height: 100%;
  
  margin-left: 20px;
}

#zoom-result {
  border: 1px solid var(--neutral-1);
  /*set the size of the result div:*/
  width: 450px;
  height: 450px;
}

.zoom-in {
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 0 10px;
  margin: 0 10px;
  width: 90%;
}

.zoom-sign {
  font-size: 1.5em;
  font-weight: bold;
  margin: 0 10px;
  padding: 0;
}

.slider {
  appearance: none;
  height: 15px;
  width: 100%;
  border-radius: 5px;  
  background: var(--neutral-2);
  outline: none;
  opacity: 0.7;
  -webkit-transition: .2s;
  transition: opacity .2s;
}

.slider::-webkit-slider-thumb {
  appearance: none;
  width: 25px;
  height: 25px;
  border-radius: 50%; 
  background: var(--blue-bold);
  cursor: pointer;
}

.slider::-moz-range-thumb {
  width: 25px;
  height: 25px;
  border-radius: 50%;
  background: var(--blue-bold);
  cursor: pointer;
}

.slider:disabled {
  opacity: 0.5;
}

.slider:disabled::-webkit-slider-thumb {
  opacity: 0.5;
  cursor: not-allowed;
}

.slider:disabled:-moz-range-thumb {
  opacity: 0.5;
  cursor: not-allowed;
}

#toggle-container {
  padding: 0 10px;
}

.toggle-criteria {
  display: flex;
  align-items: center;
  margin: 0 10px;
  padding: 5px 10px;
  height: 30px;
}

.criteria-text {
  padding: 0 10px;
  font-size: 14px;
}

.chip {
  display: flex;
  align-items: center;
  margin: 10px 5px;
  padding: 0 10px;
  font-size: 12px;
  border-radius: 25px;
  border: 1px solid var(--neutral-5);
  background-color: None;
  color: var(--neutral-5);
}

.chip.chip-selected {
  background-color: var(--blue-bold);
  color: white;
}

.chip input[type="checkbox"] {
  display: none;
}
.chip label {
  cursor: pointer;
  margin-bottom: 0;
}

#zoom-value {
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 15px;
  font-weight: bold;
  padding: 0;
  margin: 0;
}

#image-viewer-buttons {
  display: flex;
  align-items: center;
  justify-content: center;
}

#image-viewer-buttons button {
  margin: 0 10px;
}

.how-to-use {
  color: var(--blue-bold);
}

#instructions {
  position: fixed;
  display: flex;
  flex-direction: column;
  background-color: white;
  border: 1px solid var(--neutral-5);
  border-radius: 25px;
  top: 100px;
  right: 20px;
  width: 250px;
}

#instructions.hidden {
  display: none;
}

#instructions p {
  padding: 5px 0;
}

.instructions-title {
  font-weight: 900;
  text-align: center;
  padding: 10px 0;
}

.instructions-button {
  align-self: center;
}

.image-viewer-header {
  display: flex;
  align-items: center;
  margin: 0 20px;
  padding: 0 10px;
}

#fullsize-container, #zoomed-container {
  display: inline-block;
  position: relative;
  margin: 0;
  height: 95%;
}

canvas {
  pointer-events: none; /* Ensure the canvas does not interfere with mouse events */
}

.input-group {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  margin-bottom: 0;
  padding-bottom: 0;
}

.resolution-control {
  min-width: 0;
}

.resolution-action-row {
  display: flex;
  align-items: center;
  gap: 8px;
  height: 36px;
  margin: 0;
  padding: 0;
}

.resolution-status {
  display: inline-flex;
  align-items: center;
  height: 32px;
  padding: 0 10px;
  border: 1px solid var(--neutral-2);
  border-radius: 6px;
  background: #f7f9fb;
  color: var(--neutral-5);
  font-size: 13px;
  font-weight: 600;
  white-space: nowrap;
}

.resolution-toggle {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 9px;
  height: 36px;
  padding: 0 11px 0 9px;
  border: 1px solid var(--neutral-2);
  border-radius: 6px;
  background: white;
  color: var(--neutral-5);
  cursor: pointer;
  font-size: 13px;
  font-weight: 700;
  line-height: 1;
  white-space: nowrap;
}

.resolution-toggle:hover:not(:disabled) {
  border-color: var(--blue-bold);
}

.resolution-toggle:focus-visible {
  outline: 2px solid var(--blue-bold);
  outline-offset: 2px;
}

.resolution-toggle:disabled {
  background: #f7f9fb;
  color: var(--neutral-5);
  cursor: default;
}

.resolution-toggle-track {
  position: relative;
  display: inline-flex;
  align-items: center;
  width: 34px;
  height: 20px;
  border-radius: 999px;
  background: var(--neutral-2);
  transition: background-color 120ms ease;
}

.resolution-toggle-thumb {
  position: absolute;
  left: 3px;
  width: 14px;
  height: 14px;
  border-radius: 50%;
  background: white;
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.24);
  transition: transform 120ms ease;
}

.resolution-toggle[aria-checked="true"] {
  border-color: var(--blue-bold);
  background: var(--blue-bold);
  color: white;
}

.resolution-toggle[aria-checked="true"] .resolution-toggle-track {
  background: rgba(255, 255, 255, 0.32);
}

.resolution-toggle[aria-checked="true"] .resolution-toggle-thumb {
  transform: translateX(14px);
}

.resolution-toggle.is-loading .resolution-toggle-thumb {
  opacity: 0.75;
}

.legacy-detail-control {
  min-width: 0;
  padding-top: 20px;
}

.legacy-detail-link {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  height: 36px;
  padding: 0 12px;
  border: 1px solid var(--neutral-2);
  border-radius: 6px;
  background: white;
  color: var(--neutral-5);
  font-size: 13px;
  font-weight: 700;
  line-height: 1;
  text-decoration: none;
  white-space: nowrap;
}

.legacy-detail-link:hover {
  border-color: var(--blue-bold);
  color: var(--blue-bold);
}

.legacy-detail-link:focus-visible {
  outline: 2px solid var(--blue-bold);
  outline-offset: 2px;
}

#plot-container {
  display: flex;
  flex-direction: row;
  align-items: stretch;
}

#dynamic-ivoc, #distplot {
  margin: 0;
  padding: 0;
  flex: 1;
  height: 700px;
}
