/* /styles.css */
/* Updated: 2026-06-28 09:30 PM EDT */

* {
  box-sizing: border-box;
}

body {
  margin: 0;
  font-family: Arial, Helvetica, sans-serif;
  background: #f2f4f7;
  color: #1f2937;
}

.app {
  width: 100%;
  max-width: 900px;
  margin: 0 auto;
  padding: 16px;
}

.card {
  background: #ffffff;
  border-radius: 16px;
  padding: 18px;
  margin-bottom: 16px;
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.08);
}

h1,
h2 {
  margin-top: 0;
}

.subtitle {
  color: #4b5563;
  line-height: 1.4;
}

.notice {
  background: #fff7ed;
  border: 1px solid #fed7aa;
  border-radius: 12px;
  padding: 12px;
  margin: 14px 0;
  font-size: 14px;
  line-height: 1.4;
}

.controls {
  display: grid;
  grid-template-columns: 1fr;
  gap: 10px;
  margin: 14px 0;
}

button {
  border: none;
  border-radius: 12px;
  padding: 14px 16px;
  font-size: 16px;
  font-weight: 700;
  cursor: pointer;
}

button:disabled {
  opacity: 0.55;
  cursor: not-allowed;
}

.primary {
  background: #0f172a;
  color: #ffffff;
}

.secondary {
  background: #e5e7eb;
  color: #111827;
}

.label {
  display: block;
  margin-top: 12px;
  margin-bottom: 6px;
  font-size: 14px;
  font-weight: 700;
}

.select {
  width: 100%;
  border: 1px solid #cbd5e1;
  border-radius: 12px;
  padding: 12px;
  font-size: 16px;
  background: #ffffff;
}

.videoWrap {
  position: relative;
  overflow: hidden;
  width: 100%;
  margin-top: 14px;
  border-radius: 16px;
  background: #111827;
  aspect-ratio: 4 / 3;
}

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

/*
  Top-positioned, extra-wide guide box.

  Virginia licenses commonly have the PDF417 barcode near the top.
  This guide is intentionally almost full-width so the left/right sides
  of the barcode are not cut off.
*/
.videoWrap::after {
  content: "";
  position: absolute;
  left: 1.5%;
  right: 1.5%;
  top: 12%;
  height: 32%;
  border: 3px solid rgba(255, 255, 255, 0.95);
  border-radius: 12px;
  box-shadow: 0 0 0 9999px rgba(0, 0, 0, 0.16);
  pointer-events: none;
}

.scanOverlay {
  position: absolute;
  left: 12px;
  right: 12px;
  bottom: 12px;
  background: rgba(15, 23, 42, 0.86);
  color: #ffffff;
  padding: 10px 12px;
  border-radius: 12px;
  font-size: 14px;
  text-align: center;
  line-height: 1.35;
}

.status {
  margin-top: 12px;
  padding: 10px 12px;
  background: #eff6ff;
  border: 1px solid #bfdbfe;
  border-radius: 12px;
  color: #1e3a8a;
  font-size: 14px;
  line-height: 1.4;
}

.empty {
  color: #6b7280;
  padding: 12px;
  border: 1px dashed #cbd5e1;
  border-radius: 12px;
}

.hidden {
  display: none;
}

.hiddenCanvas {
  display: none;
}

.resultGrid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 12px;
}

.resultGrid > div {
  padding: 12px;
  background: #f9fafb;
  border: 1px solid #e5e7eb;
  border-radius: 12px;
}

.fieldLabel {
  display: block;
  color: #6b7280;
  font-size: 12px;
  font-weight: 700;
  text-transform: uppercase;
  margin-bottom: 4px;
}

.fieldValue {
  display: block;
  font-size: 16px;
  font-weight: 700;
  overflow-wrap: anywhere;
}

.raw {
  background: #111827;
  color: #d1d5db;
  padding: 14px;
  border-radius: 12px;
  overflow-x: auto;
  white-space: pre-wrap;
  min-height: 120px;
  font-size: 13px;
}

.small {
  color: #6b7280;
  font-size: 13px;
}

@media (min-width: 700px) {
  .controls {
    grid-template-columns: repeat(4, 1fr);
  }

  .resultGrid {
    grid-template-columns: repeat(2, 1fr);
  }
}