:root {
  font-family: 'Roboto', system-ui, Avenir, Helvetica, Arial, sans-serif;
  line-height: 1.5;
  font-weight: 400;

  color-scheme: light dark;
  color: rgba(255, 255, 255, 0.87);
  background-color: #1F2937; /* Match header gray900 color (OCA dark blue) */

  font-synthesis: none;
  text-rendering: optimizeLegibility;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

html {
  background-color: #1F2937; /* Match header gray900 color for iOS overscroll */
}

a {
  font-weight: 500;
  color: #646cff;
  text-decoration: inherit;
}
a:hover {
  color: #535bf2;
}

body {
  margin: 0;
  display: flex;
  place-items: center;
  min-width: 320px;
  min-height: 100vh;
  background-color: #1F2937; /* Match header gray900 color (OCA dark blue) */
}

h1 {
  font-size: 3.2em;
  line-height: 1.1;
}

button {
  border-radius: 8px;
  border: 1px solid transparent;
  padding: 0.6em 1.2em;
  font-size: 1em;
  font-weight: 500;
  font-family: inherit;
  background-color: #1a1a1a;
  cursor: pointer;
  transition: border-color 0.25s;
}
button:hover {
  border-color: #646cff;
}
button:focus,
button:focus-visible {
  outline: 4px auto -webkit-focus-ring-color;
}

@media (prefers-color-scheme: light) {
  :root {
    color: #213547;
    background-color: #ffffff;
  }
  a:hover {
    color: #747bff;
  }
  button {
    background-color: #f9f9f9;
  }
}
/* Mobile app styles with OCA theme */
* {
  box-sizing: border-box;
}

body {
  margin: 0;
  padding: 0;
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
  background-color: #1F2937; /* Match web app title bar */
  color: #000000; /* iOS true black */
  position: fixed;
  width: 100%;
  height: 100vh;
  overflow: hidden;
}

#root {
  width: 100%;
  height: 100vh;
  margin: 0;
  padding: 0;
  overflow: hidden;
}

.app {
  width: 100%;
  height: 100vh;
  display: flex;
  flex-direction: column;
  background-color: #F2F2F7; /* iOS grouped background */
}

/* Ensure mobile-friendly interactions */
button {
  -webkit-tap-highlight-color: transparent;
  touch-action: manipulation;
}

button:active {
  transform: scale(0.98);
  transition: transform 0.1s ease;
}

/* Custom scrollbar for webkit browsers */
::-webkit-scrollbar {
  width: 4px;
}

::-webkit-scrollbar-track {
  background: #F3F4F6;
}

::-webkit-scrollbar-thumb {
  background: #D1D5DB;
  border-radius: 2px;
}

::-webkit-scrollbar-thumb:hover {
  background: #9CA3AF;
}

/* Disable default focus outlines and add custom ones */
button:focus,
input:focus,
select:focus {
  outline: 2px solid #2563EB;
  outline-offset: 2px;
}

/* Ensure proper text rendering */
body,
input,
button,
select,
textarea {
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

/* Mobile responsive adjustments */
@media (max-width: 768px) {
  body {
    font-size: 16px; /* Prevent zoom on iOS */
  }
}

/* Page transition animations */
@keyframes slideInFromRight {
  from {
    transform: translateX(100%);
    opacity: 0.8;
  }
  to {
    transform: translateX(0);
    opacity: 1;
  }
}

@keyframes slideInFromLeft {
  from {
    transform: translateX(-100%);
    opacity: 0.8;
  }
  to {
    transform: translateX(0);
    opacity: 1;
  }
}

@keyframes slideOutToLeft {
  from {
    transform: translateX(0);
    opacity: 1;
  }
  to {
    transform: translateX(-100%);
    opacity: 0.8;
  }
}

@keyframes slideOutToRight {
  from {
    transform: translateX(0);
    opacity: 1;
  }
  to {
    transform: translateX(100%);
    opacity: 0.8;
  }
}
/* Barcode Scanner Visibility Styles */

/* Make HTML, body, root and app elements transparent when barcode scanner is active */
html.barcode-scanner-active,
body.barcode-scanner-active {
  background: transparent !important;
  background-color: transparent !important;
}

body.barcode-scanner-active #root {
  background: transparent !important;
  background-color: transparent !important;
}

body.barcode-scanner-active .app {
  background: transparent !important;
  background-color: transparent !important;
}

/* Hide all elements when barcode scanner is active */
body.barcode-scanner-active * {
  visibility: hidden !important;
}

/* Show only the barcode scanner modal */
body.barcode-scanner-active .barcode-scanner-modal {
  visibility: visible !important;
}

body.barcode-scanner-active .barcode-scanner-modal * {
  visibility: visible !important;
}
