.scanner-wrap {
  max-width: 480px;
  margin: 0 auto;
  padding: 2rem 1rem;
  text-align: center;
}

.scanner-title {
  font-family: 'Noto Serif', serif;
  font-size: 1.6rem;
  margin-bottom: 0.25rem;
  color: #111;
}

.scanner-sub {
  color: #666;
  margin-bottom: 1.5rem;
  font-size: 0.95rem;
}

.scanner-box {
  display: none;
  position: relative;
  width: 100%;
  aspect-ratio: 1;
  background: #000;
  border-radius: 16px;
  overflow: hidden;
  margin-bottom: 1rem;
}

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

.scanner-overlay {
  position: absolute;
  inset: 0;
  pointer-events: none;
}

.scanner-line {
  position: absolute;
  left: 15%;
  right: 15%;
  top: 50%;
  height: 2px;
  background: #2563eb;
  opacity: 0.8;
  animation: scan 2s ease-in-out infinite;
}

@keyframes scan {
  0%, 100% { top: 25%; }
  50% { top: 75%; }
}

.scanner-corner {
  position: absolute;
  width: 24px;
  height: 24px;
  border-color: #2563eb;
  border-style: solid;
  border-width: 0;
}
.scanner-corner.tl { top: 12%; left: 12%; border-top-width: 3px; border-left-width: 3px; border-radius: 4px 0 0 0; }
.scanner-corner.tr { top: 12%; right: 12%; border-top-width: 3px; border-right-width: 3px; border-radius: 0 4px 0 0; }
.scanner-corner.bl { bottom: 12%; left: 12%; border-bottom-width: 3px; border-left-width: 3px; border-radius: 0 0 0 4px; }
.scanner-corner.br { bottom: 12%; right: 12%; border-bottom-width: 3px; border-right-width: 3px; border-radius: 0 0 4px 0; }

.scanner-status {
  position: absolute;
  bottom: 0;
  left: 0;
  right: 0;
  padding: 0.6rem;
  background: rgba(0,0,0,0.6);
  color: #fff;
  font-size: 0.85rem;
}

.scanner-start-btn {
  background: #2563eb;
  color: #fff;
  border: none;
  padding: 0.9rem 2rem;
  border-radius: 10px;
  font-size: 1rem;
  font-weight: 600;
  cursor: pointer;
  width: 100%;
  max-width: 320px;
}
.scanner-start-btn:hover { background: #1d4ed8; }

/* Resultat */
.scan-result {
  background: #f0fdf4;
  border: 1.5px solid #86efac;
  border-radius: 14px;
  padding: 1.25rem;
  margin-bottom: 1rem;
  text-align: left;
}

.scan-result-inner {
  display: flex;
  gap: 1rem;
  align-items: center;
  margin-bottom: 1rem;
}

.result-img {
  width: 72px;
  height: 72px;
  object-fit: contain;
  border-radius: 8px;
  background: #fff;
  flex-shrink: 0;
}

.result-name { font-weight: 700; font-size: 1rem; color: #111; margin-bottom: 0.2rem; }
.result-brand { font-size: 0.82rem; color: #888; margin-bottom: 0.4rem; }
.result-price { font-size: 1.1rem; font-weight: 700; color: #059669; }
.result-chain { font-size: 0.82rem; color: #555; margin-top: 0.2rem; }

.result-cta {
  display: block;
  background: #2563eb;
  color: #fff;
  text-decoration: none;
  text-align: center;
  padding: 0.7rem;
  border-radius: 8px;
  font-weight: 600;
  margin-bottom: 0.75rem;
}

.scan-again-btn {
  background: none;
  border: 1.5px solid #d1d5db;
  color: #555;
  padding: 0.6rem 1.2rem;
  border-radius: 8px;
  cursor: pointer;
  font-size: 0.9rem;
  width: 100%;
}
.scan-again-btn:hover { background: #f9fafb; }

/* Ikke funnet */
.not-found {
  background: #fef2f2;
  border: 1.5px solid #fca5a5;
  border-radius: 14px;
  padding: 1.5rem;
  margin-bottom: 1rem;
}
.not-found-icon { font-size: 2rem; margin-bottom: 0.5rem; }
.not-found p { color: #555; margin: 0.25rem 0; }
.not-found-ean { font-size: 0.8rem; color: #999; font-family: monospace; }

.scanner-hint {
  margin-top: 1rem;
  color: #888;
  font-size: 0.875rem;
  line-height: 1.5;
  max-width: 300px;
  margin-left: auto;
  margin-right: auto;
}
