.qrscanner-wrapper {
  width: 100%;
}

// ── Device selection ──────────────────────────────────────────────────────────
.device-selection {
  display: flex;
  flex-direction: column;
  align-items: center;
  padding: 20px 0 10px;
}

.device-selection-title {
  font-size: 15px;
  font-weight: 600;
  color: #374151;
  margin-bottom: 24px;
}

.device-btn-row {
  display: flex;
  gap: 20px;
}

.device-btn {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 10px;
  width: 140px;
  height: 120px;
  border: 2px solid #e5e7eb;
  border-radius: 12px;
  background: #f9fafb;
  cursor: pointer;
  transition: border-color 0.2s, background 0.2s;
  font-size: 13px;
  color: #374151;

  mat-icon {
    font-size: 36px;
    width: 36px;
    height: 36px;
    color: #834DD0;
  }

  &:hover {
    border-color: #834DD0;
    background: #f5f0ff;
  }
}

// ── Internal camera ───────────────────────────────────────────────────────────
.scanner-container {
  position: relative;
  width: 100%;
  max-width: 400px;
  margin: auto;

  video {
    width: 100%;
    height: auto;
    border-radius: 8px;
    transform: scaleX(-1);
  }
}

// ── External scanner input ────────────────────────────────────────────────────
.external-scanner-container {
  display: flex;
  flex-direction: column;
  align-items: center;
  padding: 24px 16px 16px;
  gap: 14px;
}

.external-scanner-label {
  font-size: 14px;
  font-weight: 500;
  color: #374151;
  text-align: center;
  margin: 0;
}

.external-scanner-input-wrap {
  display: flex;
  align-items: center;
  gap: 10px;
  width: 100%;
  border: 2px solid #834DD0;
  border-radius: 8px;
  padding: 8px 12px;
  background: #fff;
  box-sizing: border-box;

  .external-scan-icon {
    color: #834DD0;
    font-size: 28px;
    width: 28px;
    height: 28px;
    flex-shrink: 0;
  }
}

.external-scanner-input-wrap:focus-within {
  border-color: #5b21b6;
  box-shadow: 0 0 0 3px rgba(131, 77, 208, 0.2);
}

.external-scan-input {
  flex: 1;
  border: none;
  outline: none;
  font-size: 14px;
  color: #834DD0;
  background: transparent;

  &::placeholder {
    color: #9ca3af;
    font-size: 13px;
  }
}

.external-scanner-hint {
  font-size: 12px;
  color: #6b7280;
  text-align: center;
  margin: 0;
}
