/* styles.css */

/* Define CSS variables */
:root {
  --scanner-height: 70vh; /* Adjustable via app.js */
}

/* Reset default margins and paddings */
* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

body {
  font-family: Arial, sans-serif;
  background-color: #000;
  color: #fff;
  transition: background-color 0.5s ease;
  display: flex;
  flex-direction: column;
  min-height: 100vh;
}

#scanner-container {
  width: 100%;
  height: var(--scanner-height);
  position: relative;
}

video {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

#message {
  text-align: center;
  font-size: 1.5em;
  padding: 10px;
  background-color: #111;
  border-bottom: 1px solid #333;
  transition: background-color 0.5s ease;
}

/* Controls at the bottom */
#controls {
  padding: 20px;
  background-color: #111;
  display: flex;
  flex-direction: column;
  align-items: center;
}

#start-button {
  font-size: 1.5em;
  padding: 10px 20px;
  margin-bottom: 10px;
  cursor: pointer;
}

#camera-select {
  font-size: 1.2em;
  padding: 8px 16px;
  cursor: pointer;
  background-color: #fff;
  color: #000;
  border: 1px solid #ccc;
  border-radius: 5px;
}

/* Styles for success and failure messages */
#message.success {
  color: #fff;
}

#message.failure {
  color: #fff;
}

/* Dark mode support */
@media (prefers-color-scheme: dark) {
  #camera-select {
    background-color: #333;
    color: #fff;
    border-color: #666;
  }

  #camera-select option {
    background-color: #333;
    color: #fff;
  }
}
