/* Camera Stream - YOLO Detection Styles */

body {
  font-family: Arial, sans-serif;
  max-width: 900px;
  margin: 2rem auto;
  padding: 0 1rem;
}

.camera-controls {
  margin-bottom: 1rem;
}

input {
  background: white;
  /*font-size: 0;*/
}

.camera-controls select {
  padding: 0.5rem;
  font-size: 1rem;
  max-width: 300px;
}

.camera-controls button {
  padding: 0.5rem 1rem;
  font-size: 1rem;
  margin-right: 0.5rem;
  cursor: pointer;
}

#video {
  max-width: 100%;
  border: 2px solid #4CAF50;
  margin-bottom: 1rem;
  background: #000;
}

#result {
  display: none;
  margin-top: 1rem;
  border: 2px dashed #007bff;
  padding: 0.5rem;
  border-radius: 8px;
}

.hidden {
  display: none;
}

.loader {
  display: inline-block;
  width: 20px;
  height: 20px;
  border: 3px solid #f3f3f3;
  border-top: 3px solid #007bff;
  border-radius: 50%;
  animation: spin 1s linear infinite;
  margin-left: 10px;
  vertical-align: middle;
}

@keyframes spin {
  0% { transform: rotate(0deg); }
  100% { transform: rotate(360deg); }
}

.label-legend {
  display: flex;
  flex-wrap: wrap;
  gap: 0.2rem;
  padding: 0.5rem;
  background: #f8f9fa;
  border-radius: 4px;
  max-width: 100%;
}

.label-legend span {
  display: inline-flex;
  align-items: center;
  font-size: 0.8rem;
}

.label-legend span::before {
  content: '';
  display: inline-block;
  width: 12px;
  height: 12px;
  margin-right: 0.5rem;
  border: 1px solid #ccc;
}
