/* src/ui/static/css/style.css */

body {
  font-family: 'Segoe UI', Roboto, Helvetica, Arial, sans-serif;
  background: #f9fafb;
  color: #222;
  margin: 0;
  padding: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  min-height: 100vh;
  text-align: center;
}

main {
  max-width: 480px;
  padding: 2rem;
  background: white;
  border-radius: 12px;
  box-shadow: 0 2px 10px rgba(0,0,0,0.1);
}

h1 {
  color: #0078D4;
  margin-bottom: 1rem;
}

a {
  color: #0078D4;
  text-decoration: none;
}

a:hover {
  text-decoration: underline;
}

.primary-btn {
  background-color: #0078D4;
  color: white;
  border: none;
  padding: 0.75rem 1.25rem;
  border-radius: 8px;
  font-size: 1rem;
  cursor: pointer;
  transition: background 0.2s ease-in-out;
}
.primary-btn:hover { background-color: #005fa3; }
#controls { margin-top: 1rem; }
#ocrStatus { margin-top: 1rem; color: #0078D4; }

button.primary-btn + .primary-btn {
  margin-left: 0.5rem;
}

#modeSelect {
  margin-bottom: 1rem;
}

.dropdown {
  font-size: 1rem;
  padding: 0.4rem 0.6rem;
  border-radius: 6px;
  border: 1px solid #ccc;
  margin-left: 0.5rem;
}

/* === Unified mobile-friendly camera layout for BoothBeacon === */

html, body {
  height: 100%;
  margin: 0;
  background: #f9fafb;
}

main {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: flex-start;
  padding: 1rem;
  width: 100%;
  max-width: 480px;
  box-sizing: border-box;
}

/* --- Camera preview container --- */
#reader {
  position: relative;
  width: 100%;
  max-width: 420px;
  aspect-ratio: 3 / 4;        /* keeps full camera frame visible */
  border-radius: 12px;
  overflow: hidden;
  box-shadow: 0 2px 10px rgba(0,0,0,0.15);
  margin: 0 auto 1rem auto;
}

/* Remove html5-qrcode's default white scan box */
#reader__scan_region,
#reader__dashboard_section_csr,
#qr-shaded-region {
  background: transparent !important;
}

/* Force the live camera view to fill and center */
#reader video,
#reader canvas {
  width: 100% !important;
  height: 100% !important;
  object-fit: cover;
  display: block;
  position: absolute;
  top: 0;
  left: 0;
}

/* --- Controls below the camera --- */
#controls,
#modeSelect {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  width: 100%;
  max-width: 420px;
  margin: 0 auto;
}

#controls {
  margin-top: 0.75rem;
}

#modeSelect {
  margin-top: 0.5rem;
}

/* --- Buttons and dropdowns --- */
button.primary-btn {
  width: 90%;
  max-width: 320px;
  font-size: 1.1rem;
  padding: 0.8rem;
  margin: 0 auto;
}

#modeSelect label {
  font-weight: 600;
  margin-bottom: 0.25rem;
}

.dropdown {
  width: 90%;
  max-width: 320px;
  font-size: 1rem;
  padding: 0.6rem;
  border-radius: 6px;
  border: 1px solid #ccc;
}

/* --- Short-screen adjustments --- */
@media (max-height: 750px) {
  main { padding: 0.75rem; }
  #reader { aspect-ratio: 4 / 5; }
  h1 { margin-bottom: 0.5rem; }
}

/* Force vertical stacking inside <main> */
main > * {
  width: 100%;
}
