/* Drop zone */
.drop-zone {
  border: 2px dashed #adb5bd;
  border-radius: 0.5rem;
  padding: 2rem 1rem;
  text-align: center;
  cursor: pointer;
  transition:
    border-color 0.2s,
    background-color 0.2s;
}

.drop-zone.drag-over {
  border-color: #0d6efd;
  background-color: #e7f1ff;
}

.drop-zone-prompt {
  display: flex;
  flex-direction: column;
  align-items: center;
}

/* Preview thumbnails */
.preview-grid {
  display: flex;
  flex-wrap: wrap;
  gap: 0.75rem;
  overflow-y: auto;
  max-height: 300px;
}

.preview-item {
  position: relative;
  width: 110px;
  text-align: center;
}

.preview-item img {
  width: 110px;
  height: 80px;
  object-fit: cover;
  border-radius: 0.375rem;
  border: 1px solid #dee2e6;
}

.preview-item .remove-btn {
  position: absolute;
  top: -6px;
  right: -6px;
  width: 22px;
  height: 22px;
  border-radius: 50%;
  border: none;
  background: #dc3545;
  color: #fff;
  font-size: 0.7rem;
  line-height: 1;
  padding: 0;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
}

.preview-item .file-info {
  font-size: 0.7rem;
  color: #6c757d;
  margin-top: 0.25rem;
  word-break: break-all;
  line-height: 1.2;
}

/* Result cards */
.result-card {
  border-left: 4px solid #dee2e6;
}

.result-card.overall-match {
  border-left-color: #198754;
}

.result-card.overall-partial {
  border-left-color: #ffc107;
}

.result-card.overall-mismatch {
  border-left-color: #dc3545;
}

.result-thumb {
  width: 120px;
  height: 90px;
  object-fit: cover;
  border-radius: 0.375rem;
  border: 1px solid #dee2e6;
}

/* Badge colors for match status */
.badge-match {
  background-color: #198754 !important;
}
.badge-partial {
  background-color: #ffc107 !important;
  color: #000 !important;
}
.badge-mismatch {
  background-color: #dc3545 !important;
}
.badge-not-found {
  background-color: #6c757d !important;
}

/* Confidence bar */
.confidence-bar {
  height: 6px;
  border-radius: 3px;
  background: #e9ecef;
  overflow: hidden;
  width: 60px;
  display: inline-block;
  vertical-align: middle;
}

.confidence-bar-fill {
  height: 100%;
  border-radius: 3px;
  background: #0d6efd;
}

/* Form control sizing for comfort */
.form-check-input {
  width: 1.25em;
  height: 1.25em;
}

.form-check-label {
  padding-top: 0.15em;
  margin-left: 0.25em;
}

/* Annotated image with bounding-box overlays */
.annotated-image-wrap {
  max-width: 600px;
}

.annotated-image-inner {
  position: relative;
  display: inline-block;
  line-height: 0;
}

.annotated-image {
  max-width: 100%;
  height: auto;
  border-radius: 0.375rem;
  border: 1px solid #dee2e6;
}

.bbox-overlay {
  position: absolute;
  border: 2px solid;
  border-radius: 2px;
  pointer-events: none;
  box-sizing: border-box;
}

.bbox-legend {
  display: flex;
  flex-wrap: wrap;
  gap: 0.75rem;
  font-size: 0.8rem;
}

.bbox-legend-item {
  display: inline-flex;
  align-items: center;
  gap: 0.3rem;
}

.bbox-legend-swatch {
  display: inline-block;
  width: 12px;
  height: 12px;
  border-radius: 2px;
}
